mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
fix: resolve EditTool naming inconsistency causing agent confusion loops (#513)
* fix: resolve EditTool naming inconsistency causing agent confusion loops * docs: restore original format for edit tool * fix: apply prettier formatting to docs and tests * test: update snapshots for edit tool
This commit is contained in:
@@ -1665,7 +1665,7 @@ describe('loadCliConfig tool exclusions', () => {
|
||||
const argv = await parseArguments();
|
||||
const config = await loadCliConfig({}, [], 'test-session', argv);
|
||||
expect(config.getExcludeTools()).not.toContain('run_shell_command');
|
||||
expect(config.getExcludeTools()).not.toContain('replace');
|
||||
expect(config.getExcludeTools()).not.toContain('edit');
|
||||
expect(config.getExcludeTools()).not.toContain('write_file');
|
||||
});
|
||||
|
||||
@@ -1675,7 +1675,7 @@ describe('loadCliConfig tool exclusions', () => {
|
||||
const argv = await parseArguments();
|
||||
const config = await loadCliConfig({}, [], 'test-session', argv);
|
||||
expect(config.getExcludeTools()).not.toContain('run_shell_command');
|
||||
expect(config.getExcludeTools()).not.toContain('replace');
|
||||
expect(config.getExcludeTools()).not.toContain('edit');
|
||||
expect(config.getExcludeTools()).not.toContain('write_file');
|
||||
});
|
||||
|
||||
@@ -1685,7 +1685,7 @@ describe('loadCliConfig tool exclusions', () => {
|
||||
const argv = await parseArguments();
|
||||
const config = await loadCliConfig({}, [], 'test-session', argv);
|
||||
expect(config.getExcludeTools()).toContain('run_shell_command');
|
||||
expect(config.getExcludeTools()).toContain('replace');
|
||||
expect(config.getExcludeTools()).toContain('edit');
|
||||
expect(config.getExcludeTools()).toContain('write_file');
|
||||
});
|
||||
|
||||
@@ -1695,7 +1695,7 @@ describe('loadCliConfig tool exclusions', () => {
|
||||
const argv = await parseArguments();
|
||||
const config = await loadCliConfig({}, [], 'test-session', argv);
|
||||
expect(config.getExcludeTools()).not.toContain('run_shell_command');
|
||||
expect(config.getExcludeTools()).not.toContain('replace');
|
||||
expect(config.getExcludeTools()).not.toContain('edit');
|
||||
expect(config.getExcludeTools()).not.toContain('write_file');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -913,7 +913,7 @@ export const useGeminiStream = (
|
||||
}
|
||||
const restorableToolCalls = toolCalls.filter(
|
||||
(toolCall) =>
|
||||
(toolCall.request.name === 'replace' ||
|
||||
(toolCall.request.name === 'edit' ||
|
||||
toolCall.request.name === 'write_file') &&
|
||||
toolCall.status === 'awaiting_approval',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user