mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-21 09:17:53 +00:00
feat(vscode-ide-companion): 更新核心服务和扩展功能
- 增强 extension.ts,集成新增功能 - 优化 ide-server.ts,改进服务端逻辑 - 更新 diff-manager.ts,提升差异管理能力 - 改进 ACP 连接和消息处理 - 更新会话处理器,支持新的交互模式 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -177,6 +177,30 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
diffManager.cancelDiff(docUri);
|
||||
}
|
||||
}),
|
||||
vscode.commands.registerCommand(
|
||||
'qwenCode.showDiff',
|
||||
async (args: { path: string; oldText: string; newText: string }) => {
|
||||
log(`[Command] showDiff called for: ${args.path}`);
|
||||
try {
|
||||
// Convert relative path to absolute if needed
|
||||
let absolutePath = args.path;
|
||||
if (!args.path.startsWith('/') && !args.path.match(/^[a-zA-Z]:/)) {
|
||||
const workspaceFolder = vscode.workspace.workspaceFolders?.[0];
|
||||
if (workspaceFolder) {
|
||||
absolutePath = vscode.Uri.joinPath(
|
||||
workspaceFolder.uri,
|
||||
args.path,
|
||||
).fsPath;
|
||||
}
|
||||
}
|
||||
|
||||
await diffManager.showDiff(absolutePath, args.oldText, args.newText);
|
||||
} catch (error) {
|
||||
log(`[Command] Error showing diff: ${error}`);
|
||||
vscode.window.showErrorMessage(`Failed to show diff: ${error}`);
|
||||
}
|
||||
},
|
||||
),
|
||||
vscode.commands.registerCommand('qwenCode.openChat', () => {
|
||||
// Open or reveal the most recent chat tab
|
||||
if (webViewProviders.length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user