Add @ mention support for agents and files, extract CopyButton component

This commit is contained in:
Chris Scott committed 2025-12-06 11:21:06 -08:00
1 parent 3e31dbcdf8
commit dc7964021d
11 files changed
+306 -99

No files matched your search

+10
View File
@@ -442,3 +442,13 @@ export const useConfig = (opcodeUrl: string | null | undefined) => {
enabled: !!client,
});
};
export const useAgents = (opcodeUrl: string | null | undefined, directory?: string) => {
const client = useOpenCodeClient(opcodeUrl, directory);
return useQuery({
queryKey: ["opencode", "agents", opcodeUrl, directory],
queryFn: () => client!.listAgents(),
enabled: !!client,
});
};