Last active
May 13, 2026 22:38
-
-
Save codigoconjuan/94467450e25e6062a2f295f258a81efe to your computer and use it in GitHub Desktop.
Base para Chat de CashTrackr impulsado por Laravel AI SDK y React AI SDK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useState } from 'react'; | |
| type Props = { | |
| budgetId: number | |
| } | |
| export default function CashTrackrAgent({budgetId}: Props) { | |
| const [input, setInput] = useState(''); | |
| return ( | |
| <section className='p-10 lg:px-5 shadow-lg mt-10'> | |
| <h2 className="text-3xl font-bold">Pregunta sobre tu Presupuesto, añade gastos y más.</h2> | |
| <div className="space-y-3 mb-4 mt-8"></div> | |
| <form | |
| onSubmit={() => {} } | |
| className="flex flex-col gap-2" | |
| > | |
| <textarea | |
| value={input} | |
| onChange={(e) => setInput(e.target.value)} | |
| placeholder="Consulta dudas sobre tu Presupuesto o Agrega Gastos" | |
| className="w-full border border-gray-300 p-3 rounded-lg text-xl" | |
| /> | |
| <div className="flex gap-2"> | |
| <button | |
| type="submit" | |
| className="flex-1 mt-5 bg-purple-950 hover:bg-purple-800 p-3 rounded-lg text-white font-bold text-xl cursor-pointer disabled:opacity-20" | |
| > | |
| Consultar | |
| </button> | |
| <button | |
| type="button" | |
| onClick={() => {} } | |
| className="mt-5 bg-amber-500 hover:bg-amber-500 p-3 rounded-lg text-white font-bold text-xl cursor-pointer disabled:opacity-20" | |
| > | |
| Subir Ticket | |
| </button> | |
| </div> | |
| <input | |
| type="file" | |
| accept="image/*" | |
| className="hidden" | |
| /> | |
| </form> | |
| </section> | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment