Merge remote-tracking branch 'origin/main'

This commit is contained in:
Can Bölük
2026-05-19 18:18:34 +09:00
6 changed files with 54 additions and 0 deletions
@@ -3113,6 +3113,13 @@ export class AgentSession {
if (!permissionIntent) {
return await target.execute(toolCallId, args as never, signal, onUpdate, ctx);
}
const command =
target.name === "bash" && args && typeof args === "object" && !Array.isArray(args)
? getStringProperty(args as Record<string, unknown>, "command")
: undefined;
const commandContent = command
? [{ type: "content" as const, content: { type: "text" as const, text: `$ ${command}` } }]
: undefined;
// Short-circuit on persisted decisions.
const persisted = this.#acpPermissionDecisions.get(permissionIntent.cacheKey);
if (persisted === "allow_always") {
@@ -3137,8 +3144,10 @@ export class AgentSession {
toolCallId,
toolName: target.name,
title: permissionIntent.title,
...(target.name === "bash" ? { kind: "execute" } : {}),
status: "pending",
rawInput: args,
...(commandContent ? { content: commandContent } : {}),
locations: extractPermissionLocations(
args,
this.sessionManager.getCwd(),
@@ -27,6 +27,7 @@ export interface ClientBridgePermissionToolCall {
kind?: string;
status?: "pending" | "in_progress" | "completed" | "failed";
rawInput?: unknown;
content?: unknown[];
locations?: { path: string; line?: number }[];
}