mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-01 21:20:44 +00:00
fix: rename /plan execute to /plan exit
Rename the subcommand to accurately reflect its behavior (exits plan mode and restores previous approval mode, does not trigger execution). Update source, tests, i18n keys (6 locales), and docs.
This commit is contained in:
parent
b50f23f91c
commit
1d4c17b1ce
10 changed files with 49 additions and 52 deletions
|
|
@ -1974,14 +1974,14 @@ export default {
|
|||
'Press Ctrl+O to show full tool output':
|
||||
'Strg+O für vollständige Tool-Ausgabe drücken',
|
||||
|
||||
'Switch to plan mode or execute the current plan':
|
||||
'Switch to plan mode or execute the current plan',
|
||||
'Exited plan mode. The agent will now execute the plan.':
|
||||
'Exited plan mode. The agent will now execute the plan.',
|
||||
'Switch to plan mode or exit plan mode':
|
||||
'Switch to plan mode or exit plan mode',
|
||||
'Exited plan mode. Previous approval mode restored.':
|
||||
'Exited plan mode. Previous approval mode restored.',
|
||||
'Enabled plan mode. The agent will analyze and plan without executing tools.':
|
||||
'Enabled plan mode. The agent will analyze and plan without executing tools.',
|
||||
'Already in plan mode. Use "/plan execute" to execute the plan.':
|
||||
'Already in plan mode. Use "/plan execute" to execute the plan.',
|
||||
'Already in plan mode. Use "/plan exit" to exit plan mode.':
|
||||
'Already in plan mode. Use "/plan exit" to exit plan mode.',
|
||||
'Not in plan mode. Use "/plan" to enter plan mode first.':
|
||||
'Not in plan mode. Use "/plan" to enter plan mode first.',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2014,14 +2014,14 @@ export default {
|
|||
'Press Ctrl+O to show full tool output':
|
||||
'Press Ctrl+O to show full tool output',
|
||||
|
||||
'Switch to plan mode or execute the current plan':
|
||||
'Switch to plan mode or execute the current plan',
|
||||
'Exited plan mode. The agent will now execute the plan.':
|
||||
'Exited plan mode. The agent will now execute the plan.',
|
||||
'Switch to plan mode or exit plan mode':
|
||||
'Switch to plan mode or exit plan mode',
|
||||
'Exited plan mode. Previous approval mode restored.':
|
||||
'Exited plan mode. Previous approval mode restored.',
|
||||
'Enabled plan mode. The agent will analyze and plan without executing tools.':
|
||||
'Enabled plan mode. The agent will analyze and plan without executing tools.',
|
||||
'Already in plan mode. Use "/plan execute" to execute the plan.':
|
||||
'Already in plan mode. Use "/plan execute" to execute the plan.',
|
||||
'Already in plan mode. Use "/plan exit" to exit plan mode.':
|
||||
'Already in plan mode. Use "/plan exit" to exit plan mode.',
|
||||
'Not in plan mode. Use "/plan" to enter plan mode first.':
|
||||
'Not in plan mode. Use "/plan" to enter plan mode first.',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1465,14 +1465,14 @@ export default {
|
|||
'詳細モードで完全なツール出力と思考を表示します(Ctrl+O で切り替え)。',
|
||||
'Press Ctrl+O to show full tool output': 'Ctrl+O で完全なツール出力を表示',
|
||||
|
||||
'Switch to plan mode or execute the current plan':
|
||||
'Switch to plan mode or execute the current plan',
|
||||
'Exited plan mode. The agent will now execute the plan.':
|
||||
'Exited plan mode. The agent will now execute the plan.',
|
||||
'Switch to plan mode or exit plan mode':
|
||||
'Switch to plan mode or exit plan mode',
|
||||
'Exited plan mode. Previous approval mode restored.':
|
||||
'Exited plan mode. Previous approval mode restored.',
|
||||
'Enabled plan mode. The agent will analyze and plan without executing tools.':
|
||||
'Enabled plan mode. The agent will analyze and plan without executing tools.',
|
||||
'Already in plan mode. Use "/plan execute" to execute the plan.':
|
||||
'Already in plan mode. Use "/plan execute" to execute the plan.',
|
||||
'Already in plan mode. Use "/plan exit" to exit plan mode.':
|
||||
'Already in plan mode. Use "/plan exit" to exit plan mode.',
|
||||
'Not in plan mode. Use "/plan" to enter plan mode first.':
|
||||
'Not in plan mode. Use "/plan" to enter plan mode first.',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1964,14 +1964,14 @@ export default {
|
|||
'Press Ctrl+O to show full tool output':
|
||||
'Pressione Ctrl+O para exibir a saída completa da ferramenta',
|
||||
|
||||
'Switch to plan mode or execute the current plan':
|
||||
'Switch to plan mode or execute the current plan',
|
||||
'Exited plan mode. The agent will now execute the plan.':
|
||||
'Exited plan mode. The agent will now execute the plan.',
|
||||
'Switch to plan mode or exit plan mode':
|
||||
'Switch to plan mode or exit plan mode',
|
||||
'Exited plan mode. Previous approval mode restored.':
|
||||
'Exited plan mode. Previous approval mode restored.',
|
||||
'Enabled plan mode. The agent will analyze and plan without executing tools.':
|
||||
'Enabled plan mode. The agent will analyze and plan without executing tools.',
|
||||
'Already in plan mode. Use "/plan execute" to execute the plan.':
|
||||
'Already in plan mode. Use "/plan execute" to execute the plan.',
|
||||
'Already in plan mode. Use "/plan exit" to exit plan mode.':
|
||||
'Already in plan mode. Use "/plan exit" to exit plan mode.',
|
||||
'Not in plan mode. Use "/plan" to enter plan mode first.':
|
||||
'Not in plan mode. Use "/plan" to enter plan mode first.',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1971,14 +1971,14 @@ export default {
|
|||
'Press Ctrl+O to show full tool output':
|
||||
'Нажмите Ctrl+O для показа полного вывода инструментов',
|
||||
|
||||
'Switch to plan mode or execute the current plan':
|
||||
'Switch to plan mode or execute the current plan',
|
||||
'Exited plan mode. The agent will now execute the plan.':
|
||||
'Exited plan mode. The agent will now execute the plan.',
|
||||
'Switch to plan mode or exit plan mode':
|
||||
'Switch to plan mode or exit plan mode',
|
||||
'Exited plan mode. Previous approval mode restored.':
|
||||
'Exited plan mode. Previous approval mode restored.',
|
||||
'Enabled plan mode. The agent will analyze and plan without executing tools.':
|
||||
'Enabled plan mode. The agent will analyze and plan without executing tools.',
|
||||
'Already in plan mode. Use "/plan execute" to execute the plan.':
|
||||
'Already in plan mode. Use "/plan execute" to execute the plan.',
|
||||
'Already in plan mode. Use "/plan exit" to exit plan mode.':
|
||||
'Already in plan mode. Use "/plan exit" to exit plan mode.',
|
||||
'Not in plan mode. Use "/plan" to enter plan mode first.':
|
||||
'Not in plan mode. Use "/plan" to enter plan mode first.',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1818,14 +1818,13 @@ export default {
|
|||
'详细模式下显示完整工具输出和思考过程(Ctrl+O 切换)。',
|
||||
'Press Ctrl+O to show full tool output': '按 Ctrl+O 查看详细工具调用结果',
|
||||
|
||||
'Switch to plan mode or execute the current plan':
|
||||
'切换到计划模式或执行当前计划',
|
||||
'Exited plan mode. The agent will now execute the plan.':
|
||||
'退出计划模式。智能体现在将执行计划。',
|
||||
'Switch to plan mode or exit plan mode': '切换到计划模式或退出计划模式',
|
||||
'Exited plan mode. Previous approval mode restored.':
|
||||
'已退出计划模式,已恢复之前的审批模式。',
|
||||
'Enabled plan mode. The agent will analyze and plan without executing tools.':
|
||||
'启用计划模式。智能体将只分析和规划,而不执行工具。',
|
||||
'Already in plan mode. Use "/plan execute" to execute the plan.':
|
||||
'已处于计划模式。使用 "/plan execute" 执行计划。',
|
||||
'Already in plan mode. Use "/plan exit" to exit plan mode.':
|
||||
'已处于计划模式。使用 "/plan exit" 退出计划模式。',
|
||||
'Not in plan mode. Use "/plan" to enter plan mode first.':
|
||||
'未处于计划模式。请先使用 "/plan" 进入计划模式。',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ describe('planCommand', () => {
|
|||
expect(result).toEqual({
|
||||
type: 'message',
|
||||
messageType: 'info',
|
||||
content: 'Already in plan mode. Use "/plan execute" to execute the plan.',
|
||||
content: 'Already in plan mode. Use "/plan exit" to exit plan mode.',
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -96,7 +96,7 @@ describe('planCommand', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('should exit plan mode when execute argument is passed', async () => {
|
||||
it('should exit plan mode when exit argument is passed', async () => {
|
||||
if (!planCommand.action) {
|
||||
throw new Error('The plan command must have an action.');
|
||||
}
|
||||
|
|
@ -105,7 +105,7 @@ describe('planCommand', () => {
|
|||
ApprovalMode.PLAN,
|
||||
);
|
||||
|
||||
const result = await planCommand.action(mockContext, 'execute');
|
||||
const result = await planCommand.action(mockContext, 'exit');
|
||||
|
||||
expect(mockContext.services.config?.setApprovalMode).toHaveBeenCalledWith(
|
||||
ApprovalMode.DEFAULT,
|
||||
|
|
@ -113,7 +113,7 @@ describe('planCommand', () => {
|
|||
expect(result).toEqual({
|
||||
type: 'message',
|
||||
messageType: 'info',
|
||||
content: 'Exited plan mode. The agent will now execute the plan.',
|
||||
content: 'Exited plan mode. Previous approval mode restored.',
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -129,7 +129,7 @@ describe('planCommand', () => {
|
|||
ApprovalMode.AUTO_EDIT,
|
||||
);
|
||||
|
||||
const result = await planCommand.action(mockContext, 'execute');
|
||||
const result = await planCommand.action(mockContext, 'exit');
|
||||
|
||||
expect(mockContext.services.config?.setApprovalMode).toHaveBeenCalledWith(
|
||||
ApprovalMode.AUTO_EDIT,
|
||||
|
|
@ -137,7 +137,7 @@ describe('planCommand', () => {
|
|||
expect(result).toEqual({
|
||||
type: 'message',
|
||||
messageType: 'info',
|
||||
content: 'Exited plan mode. The agent will now execute the plan.',
|
||||
content: 'Exited plan mode. Previous approval mode restored.',
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -147,7 +147,7 @@ describe('planCommand', () => {
|
|||
}
|
||||
|
||||
// Default mock returns ApprovalMode.DEFAULT (not PLAN)
|
||||
const result = await planCommand.action(mockContext, 'execute');
|
||||
const result = await planCommand.action(mockContext, 'exit');
|
||||
|
||||
expect(mockContext.services.config?.setApprovalMode).not.toHaveBeenCalled();
|
||||
expect(result).toEqual({
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ import { ApprovalMode } from '@qwen-code/qwen-code-core';
|
|||
export const planCommand: SlashCommand = {
|
||||
name: 'plan',
|
||||
get description() {
|
||||
return t('Switch to plan mode or execute the current plan');
|
||||
return t('Switch to plan mode or exit plan mode');
|
||||
},
|
||||
kind: CommandKind.BUILT_IN,
|
||||
action: async (
|
||||
|
|
@ -36,7 +36,7 @@ export const planCommand: SlashCommand = {
|
|||
const trimmedArgs = args.trim();
|
||||
const currentMode = config.getApprovalMode();
|
||||
|
||||
if (trimmedArgs === 'execute') {
|
||||
if (trimmedArgs === 'exit') {
|
||||
if (currentMode !== ApprovalMode.PLAN) {
|
||||
return {
|
||||
type: 'message',
|
||||
|
|
@ -56,7 +56,7 @@ export const planCommand: SlashCommand = {
|
|||
return {
|
||||
type: 'message',
|
||||
messageType: 'info',
|
||||
content: t('Exited plan mode. The agent will now execute the plan.'),
|
||||
content: t('Exited plan mode. Previous approval mode restored.'),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
@ -98,9 +98,7 @@ export const planCommand: SlashCommand = {
|
|||
return {
|
||||
type: 'message',
|
||||
messageType: 'info',
|
||||
content: t(
|
||||
'Already in plan mode. Use "/plan execute" to execute the plan.',
|
||||
),
|
||||
content: t('Already in plan mode. Use "/plan exit" to exit plan mode.'),
|
||||
};
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue