Skip to content

An AI-powered search engine with a generative UI

Fix display of multiple tool calls

Yoshiki Miura393e5965ac75
diff --git a/components/default-skeleton.tsx b/components/default-skeleton.tsx
index 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.tsx
index 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 true
isCollapsed.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 variables
const { text, toolResults } = useOllama
diff --git a/lib/agents/tools/search.tsx b/lib/agents/tools/search.tsx
index 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 section
const streamResults = createStreamableValue<string>()
- uiStream.update(
+ uiStream.append(
<SearchSection
result={streamResults.value}
includeDomains={include_domains}