2288
}
2289
2291
>
const { confirmationTitle, invocationMessage, toolInput, permissionKind, permissionPath } = getPermissionDisplay(request, this._workingDirectory, isNewFile);
2292
>
2293
>
// Fire a pending_confirmation signal to transition the tool to PendingConfirmation
2294
>
const toolName = request.toolName ?? request.kind;
2295
>
// Forward the tool's parentToolCallId (if any) so the host can
2296
>
// route the resulting ChatToolCallReady to the correct
2297
>
// subagent session — without it the action would land on the
2298
>
// parent session, which has no matching ChatToolCallStart.
2299
>
const parentToolCallId = this._activeToolCalls.get(toolCallId)?.parentToolCallId;
2300
>
this._onDidSessionProgress.fire({
2301
>
kind: 'pending_confirmation',
2302
>
chat: this._chatChannelUri,
2303
>
state: {
2304
>
status: ToolCallStatus.PendingConfirmation,
2305
>
toolCallId,
2306
>
toolName,
2307
>
displayName: getToolDisplayName(toolName),
2308
>
invocationMessage,
2309
>
toolInput,
2310
>
confirmationTitle,
2311
>
riskAssessment: autoApproval?.reason
2312
? {
2313
kind: ToolCallRiskAssessmentKind.Judge,