mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
feat: Implement Plan Mode for Safe Code Planning (#658)
This commit is contained in:
@@ -464,6 +464,7 @@ export type ToolResultDisplay =
|
||||
| string
|
||||
| FileDiff
|
||||
| TodoResultDisplay
|
||||
| PlanResultDisplay
|
||||
| TaskResultDisplay;
|
||||
|
||||
export interface FileDiff {
|
||||
@@ -490,6 +491,12 @@ export interface TodoResultDisplay {
|
||||
}>;
|
||||
}
|
||||
|
||||
export interface PlanResultDisplay {
|
||||
type: 'plan_summary';
|
||||
message: string;
|
||||
plan: string;
|
||||
}
|
||||
|
||||
export interface ToolEditConfirmationDetails {
|
||||
type: 'edit';
|
||||
title: string;
|
||||
@@ -541,7 +548,15 @@ export type ToolCallConfirmationDetails =
|
||||
| ToolEditConfirmationDetails
|
||||
| ToolExecuteConfirmationDetails
|
||||
| ToolMcpConfirmationDetails
|
||||
| ToolInfoConfirmationDetails;
|
||||
| ToolInfoConfirmationDetails
|
||||
| ToolPlanConfirmationDetails;
|
||||
|
||||
export interface ToolPlanConfirmationDetails {
|
||||
type: 'plan';
|
||||
title: string;
|
||||
plan: string;
|
||||
onConfirm: (outcome: ToolConfirmationOutcome) => Promise<void>;
|
||||
}
|
||||
|
||||
export enum ToolConfirmationOutcome {
|
||||
ProceedOnce = 'proceed_once',
|
||||
|
||||
Reference in New Issue
Block a user