345
const state = e.state;
346
if (state.confirmationTitle) {
348
>
type: ActionType.ChatToolCallReady,
349
>
turnId,
350
>
toolCallId: state.toolCallId,
351
>
invocationMessage: state.invocationMessage,
352
>
toolInput: state.toolInput,
353
>
confirmationTitle: state.confirmationTitle,
354
>
riskAssessment: state.riskAssessment,
355
>
edits: state.edits,
356
>
editable: state.editable,
357
>
...(state._meta ? { _meta: state._meta } : {}),
358
>
// Agents can supply tool-specific buttons (e.g. ExitPlanMode's
359
>
// `Approve`/`Deny`) by populating `state.options`. The standard
360
>
// `Allow Once / Allow in this Session / Skip` set is the default.
361
>
options: state.options ? state.options.slice() : CONFIRMATION_OPTIONS.slice(),
362
>
};
363
>
}
364
return {
365
type: ActionType.ChatToolCallReady,