mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
feat: Implement Plan Mode for Safe Code Planning (#658)
This commit is contained in:
@@ -777,6 +777,19 @@ describe('ShellTool', () => {
|
||||
});
|
||||
|
||||
describe('shouldConfirmExecute', () => {
|
||||
it('should not request confirmation for read-only commands', async () => {
|
||||
const invocation = shellTool.build({
|
||||
command: 'ls -la',
|
||||
is_background: false,
|
||||
});
|
||||
|
||||
const confirmation = await invocation.shouldConfirmExecute(
|
||||
new AbortController().signal,
|
||||
);
|
||||
|
||||
expect(confirmation).toBe(false);
|
||||
});
|
||||
|
||||
it('should request confirmation for a new command and whitelist it on "Always"', async () => {
|
||||
const params = { command: 'npm install', is_background: false };
|
||||
const invocation = shellTool.build(params);
|
||||
|
||||
Reference in New Issue
Block a user