An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
Fix display of multiple tool calls
Yoshiki Miura393e5965ac75
diff --git a/components/default-skeleton.tsx b/components/default-skeleton.tsxindex 0a800f54..6c086e2b 100644--- a/components/default-skeleton.tsx+++ b/components/default-skeleton.tsx@@ -5,7 +5,7 @@ import { Skeleton } from './ui/skeleton'export const DefaultSkeleton = () => {return (- <div className="flex flex-col gap-2">+ <div className="flex flex-col gap-2 pb-4"><Skeleton className="h-6 w-48" /><Skeleton className="w-full h-6" /></div>diff --git a/lib/actions/workflow.tsx b/lib/actions/workflow.tsxindex 902931ba..c138ae78 100644--- a/lib/actions/workflow.tsx+++ b/lib/actions/workflow.tsx@@ -59,6 +59,9 @@ export async function workflow(// Set the collapsed state to trueisCollapsed.done(true)+ // Remove the spinner+ uiStream.update(null)+const useOllama = process.env.OLLAMA_MODEL && process.env.OLLAMA_BASE_URL// Select the appropriate researcher function based on the environment variablesconst { text, toolResults } = useOllamadiff --git a/lib/agents/tools/search.tsx b/lib/agents/tools/search.tsxindex f4efc187..e9aaff8d 100644--- a/lib/agents/tools/search.tsx+++ b/lib/agents/tools/search.tsx@@ -27,7 +27,7 @@ export const searchTool = ({ uiStream, fullResponse }: ToolProps) =>let hasError = false// Append the search sectionconst streamResults = createStreamableValue<string>()- uiStream.update(+ uiStream.append(<SearchSectionresult={streamResults.value}includeDomains={include_domains}