chore(vscode-ide-companion): rm useTerminal & some useless code about openDiff

This commit is contained in:
yiliang114
2025-12-08 12:46:42 +08:00
parent 6269415e7b
commit ac0d5206ba
13 changed files with 15 additions and 240 deletions

View File

@@ -21,24 +21,12 @@ export function registerNewCommands(
disposables.push(
vscode.commands.registerCommand(openChatCommand, async () => {
const config = vscode.workspace.getConfiguration('qwenCode');
const useTerminal = config.get<boolean>('useTerminal', false);
// Use terminal mode
if (useTerminal) {
await vscode.commands.executeCommand(
runQwenCodeCommand,
vscode.TerminalLocation.Editor, // create a terminal in the editor area,
);
const providers = getWebViewProviders();
if (providers.length > 0) {
await providers[providers.length - 1].show();
} else {
// Use WebView mode
const providers = getWebViewProviders();
if (providers.length > 0) {
await providers[providers.length - 1].show();
} else {
const provider = createWebViewProvider();
await provider.show();
}
const provider = createWebViewProvider();
await provider.show();
}
}),
);