mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-04 23:44:41 +00:00
* test(antigravity): record agy stream-json fixtures * feat(antigravity): add Antigravity provider plugin * fix(antigravity): address Phase 1 review findings * test(antigravity): record parity discovery blockers * feat(antigravity): support image prompts and daemon e2e * docs(antigravity): document provider setup and limitations * test(antigravity): respect Windows interrupt semantics * docs(plugins): avoid duplicate provider override guidance * fix(antigravity): report fresh denials and correct mode metadata Native denial results accumulate within a driver process. Track reported occurrences until respawn so later text-only turns do not repeat notices, while new denials of the same action remain visible. * fix(antigravity): use the official Antigravity mark
56 lines
2.2 KiB
TypeScript
56 lines
2.2 KiB
TypeScript
import type {
|
|
ProviderTimelineItem,
|
|
ProviderToolCallDetail,
|
|
} from "@getpaseo/plugin/server/provider";
|
|
import type { Step } from "./wire.js";
|
|
|
|
export function toolItem(
|
|
step: Step,
|
|
id: string,
|
|
): Extract<ProviderTimelineItem, { type: "tool_call" }> {
|
|
const detail = toolDetail(step);
|
|
const name = step.tool_name || "Antigravity tool";
|
|
const metadata = step.subagent_info ? { subagents: step.subagent_info.subagents } : undefined;
|
|
const base = { type: "tool_call" as const, id, callId: id, name, detail, metadata };
|
|
if (step.state === "ERROR") {
|
|
const error =
|
|
step.tool_info && step.tool_info.error
|
|
? step.tool_info.error.message
|
|
: "Antigravity tool failed";
|
|
return { ...base, status: "failed", error };
|
|
}
|
|
const status = step.state === "ACTIVE" ? "running" : "completed";
|
|
return { ...base, status, error: null };
|
|
}
|
|
|
|
function toolDetail(step: Step): ProviderToolCallDetail {
|
|
if (step.subagent_info) {
|
|
const child = step.subagent_info.subagents[0];
|
|
if (child)
|
|
return {
|
|
type: "sub_agent",
|
|
subAgentType: child.type_name,
|
|
description: child.initial_prompt,
|
|
childSessionId: child.conversation_id === null ? undefined : child.conversation_id,
|
|
log: child.log_uri,
|
|
};
|
|
}
|
|
const info = step.tool_info;
|
|
if (!info) return { type: "plain_text", label: step.tool_name, text: "" };
|
|
const path = info.parameters.AbsolutePath || info.parameters.TargetFile;
|
|
if (info.name === "run_command" && typeof info.parameters.CommandLine === "string") {
|
|
return { type: "shell", command: info.parameters.CommandLine, output: info.output };
|
|
}
|
|
if (info.name === "view_file" && typeof path === "string")
|
|
return { type: "read", filePath: path, content: info.output };
|
|
if (info.name === "write_to_file" && typeof path === "string")
|
|
return { type: "write", filePath: path };
|
|
if (
|
|
(info.name === "replace_file_content" || info.name === "multi_replace_file_content") &&
|
|
typeof path === "string"
|
|
)
|
|
return { type: "edit", filePath: path };
|
|
// Native frames summarize writes; they do not carry the file contents or diff.
|
|
return { type: "unknown", input: info.parameters, output: info.error || info.output };
|
|
}
|