feat(webui): polish agent output and app discovery
This commit is contained in:
1 parent
b189a37648
commit
aa8387fb4d
87 files changed
+6225
-2379
No files matched your search
@@ -0,0 +1,34 @@
|
||||
import { AlertCircle, Search } from "lucide-react";
|
||||
|
||||
import { ActivityStep } from "@/components/thread/activity/ActivityStep";
|
||||
import { WebActivityRow } from "@/components/thread/activity/WebActivityRow";
|
||||
import {
|
||||
presentWebSearchAction,
|
||||
type WebSearchRunModel,
|
||||
} from "@/components/thread/activity/web-search-model";
|
||||
|
||||
export function WebSearchRun({ run, turnActive }: { run: WebSearchRunModel; turnActive: boolean }) {
|
||||
const active = run.status === "running" && turnActive;
|
||||
const status = run.status === "running" && !turnActive ? "done" : run.status;
|
||||
const label = presentWebSearchAction(run.query, status);
|
||||
|
||||
return (
|
||||
<>
|
||||
<ActivityStep
|
||||
icon={status === "error" ? AlertCircle : Search}
|
||||
active={active}
|
||||
tone={status === "error" ? "error" : status === "done" ? "success" : "active"}
|
||||
label={label}
|
||||
/>
|
||||
{run.sources.map((source) => (
|
||||
<WebActivityRow
|
||||
key={source.href}
|
||||
title={source.title}
|
||||
href={source.href}
|
||||
host={source.host}
|
||||
displayUrl={source.displayUrl}
|
||||
/>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user