mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 01:07:46 +00:00
Add toggleable IDE mode setting (#5146)
This commit is contained in:
@@ -101,6 +101,7 @@ describe('useSlashCommandProcessor', () => {
|
||||
setHistory: vi.fn().mockResolvedValue(undefined),
|
||||
})),
|
||||
getExtensions: vi.fn(() => []),
|
||||
getIdeMode: vi.fn(() => false),
|
||||
} as unknown as Config;
|
||||
|
||||
const mockSettings = {} as LoadedSettings;
|
||||
|
||||
@@ -185,6 +185,8 @@ export const useSlashCommandProcessor = (
|
||||
],
|
||||
);
|
||||
|
||||
const ideMode = config?.getIdeMode();
|
||||
|
||||
useEffect(() => {
|
||||
const controller = new AbortController();
|
||||
const load = async () => {
|
||||
@@ -205,7 +207,7 @@ export const useSlashCommandProcessor = (
|
||||
return () => {
|
||||
controller.abort();
|
||||
};
|
||||
}, [config]);
|
||||
}, [config, ideMode]);
|
||||
|
||||
const handleSlashCommand = useCallback(
|
||||
async (
|
||||
|
||||
Reference in New Issue
Block a user