Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/features/workspaces/ai/ai-tool-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const AI_TOOL_REGISTRY = defineAiToolRegistry({
title: "Calculate time",
visibility: "hidden",
}),
workspace_list_items: readTool({ icon: "file", title: "List workspace" }),
workspace_list_items: readTool({ icon: "file", title: "List workspace", visibility: "hidden" }),
workspace_read_items: readTool({ icon: "file", title: "Read workspace" }),
workspace_rename_item: writeTool({ icon: "edit", title: "Rename item" }),
workspace_move_items: writeTool({ icon: "edit", title: "Move items" }),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,22 @@ function ActivitySummary({
}) {
const isRunning = activity.status === "running";
const { presentation } = activity;
const label = `${presentation.title}: ${activity.summary}`;

return (
<div
role={isRunning ? "status" : undefined}
aria-live={isRunning ? "polite" : undefined}
title={label}
title={activity.summary}
className="group/tool-row inline-flex min-w-0 max-w-full items-center gap-1.5 py-0.5 text-sm text-muted-foreground"
>
<span className="grid size-4 shrink-0 place-items-center self-center text-muted-foreground/80">
<ToolActivityIcon icon={presentation.icon} />
</span>
<span
className={cn("shrink-0 truncate font-medium text-foreground/90", isRunning && "shimmer")}
className={cn("min-w-0 truncate font-medium text-foreground/90", isRunning && "shimmer")}
>
{presentation.title}
{activity.summary}
</span>
<span className="min-w-0 truncate text-muted-foreground text-xs">{activity.summary}</span>
<InlineSourceFavicons sources={sourcePreviews.slice(0, INLINE_SOURCE_LIMIT)} />
<ToolStatusIcon status={activity.status} />
{canExpand ? (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ describe("Code Mode tool groups", () => {
{
seq: 1,
connector: "tools",
method: "workspace_list_items",
args: { path: "/" },
result: { items: [{ path: "/Notes" }] },
method: "web_search",
args: { query: "notes" },
result: { results: [] },
requiresApproval: false,
state: "applied",
},
Expand All @@ -36,15 +36,15 @@ describe("Code Mode tool groups", () => {

expect(group.children).toEqual([
{
id: "1:tools:workspace_list_items",
id: "1:tools:web_search",
presentation: {
icon: "file",
title: "List workspace",
icon: "search",
title: "Search web",
visibility: "visible",
},
status: "completed",
summary: "Listed 1 item",
toolName: "workspace_list_items",
summary: "Found 0 sources for “notes”",
toolName: "web_search",
},
]);
expect(parts[1]).toMatchObject({ toolCallId: "direct-tool-1" });
Expand All @@ -54,11 +54,11 @@ describe("Code Mode tool groups", () => {
const message = createMessage([
createOrchestratePart({ status: "completed", executionId: "execution-1", result: null }),
{
type: "tool-workspace_list_items",
type: "tool-web_search",
toolCallId: "tool-1",
state: "output-available",
input: { path: "/" },
output: { items: [] },
input: { query: "hello" },
output: { results: [] },
},
]);

Expand All @@ -68,13 +68,13 @@ describe("Code Mode tool groups", () => {
{
id: "tool-1",
presentation: {
icon: "file",
title: "List workspace",
icon: "search",
title: "Search web",
visibility: "visible",
},
status: "completed",
summary: "Listed 0 items",
toolName: "workspace_list_items",
summary: "Found 0 sources for “hello”",
toolName: "web_search",
},
]);
});
Expand Down
Loading