diff --git a/client/src/components/tools/CreateTodoToolUI.tsx b/client/src/components/tools/CreateTodoToolUI.tsx index 32d67a6..ac34dce 100644 --- a/client/src/components/tools/CreateTodoToolUI.tsx +++ b/client/src/components/tools/CreateTodoToolUI.tsx @@ -1,14 +1,17 @@ import { makeAssistantToolUI } from "@assistant-ui/react"; import { useEffect, useRef } from "react"; import { queryClient } from "@/lib/queryClient"; +import { FileText } from "lucide-react"; type CreateTodoArgs = { item: string; + files?: string[]; }; type CreateTodoResult = { id: number; item: string; + files?: string[]; createdAt: string | Date; }; @@ -19,6 +22,12 @@ export const CreateTodoToolUI = makeAssistantToolUI Creating todo: {args.item} + {args.files && args.files.length > 0 && ( +
+ + {args.files.length} file{args.files.length > 1 ? 's' : ''} attached +
+ )} ); } @@ -61,6 +70,22 @@ export const CreateTodoToolUI = makeAssistantToolUI
Todo created
{result.item}
+ {result.files && result.files.length > 0 && ( +
+
+ + Attached files: +
+
+ {result.files.map((file, index) => ( +
+ + {file.split('/').pop() || file} +
+ ))} +
+
+ )} ); }, diff --git a/client/src/pages/dashboard.tsx b/client/src/pages/dashboard.tsx index 1d66b32..3b7ddee 100644 --- a/client/src/pages/dashboard.tsx +++ b/client/src/pages/dashboard.tsx @@ -5,7 +5,7 @@ import { useAuth } from "@/hooks/useAuth"; import { Button } from "@/components/ui/button"; import { useToast } from "@/hooks/useToast"; import { SearchBar } from "@/components/SearchBar"; -import { Plus } from "lucide-react"; +import { Plus, FileText } from "lucide-react"; import { apiRequest } from "@/lib/queryClient"; import { Dialog, DialogContent, DialogHeader, DialogTitle } from "@/components/ui/dialog"; import { Input } from "@/components/ui/input"; @@ -184,6 +184,7 @@ export default function Dashboard() { Item + Files Actions @@ -191,6 +192,20 @@ export default function Dashboard() { {filteredItems.map((item) => ( {item.item} + + {item.files && item.files.length > 0 ? ( +
+ {item.files.map((file, index) => ( +
+ + {file.split('/').pop() || file} +
+ ))} +
+ ) : ( + No files + )} +