mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-20 16:57:46 +00:00
README + reduce required VS Code version for companion extension (#5719)
This commit is contained in:
@@ -56,7 +56,7 @@ export class DiffManager {
|
||||
private diffDocuments = new Map<string, DiffInfo>();
|
||||
|
||||
constructor(
|
||||
private readonly logger: vscode.OutputChannel,
|
||||
private readonly log: (message: string) => void,
|
||||
private readonly diffContentProvider: DiffContentProvider,
|
||||
) {}
|
||||
|
||||
@@ -151,9 +151,7 @@ export class DiffManager {
|
||||
async acceptDiff(rightDocUri: vscode.Uri) {
|
||||
const diffInfo = this.diffDocuments.get(rightDocUri.toString());
|
||||
if (!diffInfo) {
|
||||
this.logger.appendLine(
|
||||
`No diff info found for ${rightDocUri.toString()}`,
|
||||
);
|
||||
this.log(`No diff info found for ${rightDocUri.toString()}`);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -179,9 +177,7 @@ export class DiffManager {
|
||||
async cancelDiff(rightDocUri: vscode.Uri) {
|
||||
const diffInfo = this.diffDocuments.get(rightDocUri.toString());
|
||||
if (!diffInfo) {
|
||||
this.logger.appendLine(
|
||||
`No diff info found for ${rightDocUri.toString()}`,
|
||||
);
|
||||
this.log(`No diff info found for ${rightDocUri.toString()}`);
|
||||
// Even if we don't have diff info, we should still close the editor.
|
||||
await this.closeDiffEditor(rightDocUri);
|
||||
return;
|
||||
|
||||
@@ -42,7 +42,7 @@ export async function activate(context: vscode.ExtensionContext) {
|
||||
updateWorkspacePath(context);
|
||||
|
||||
const diffContentProvider = new DiffContentProvider();
|
||||
const diffManager = new DiffManager(logger, diffContentProvider);
|
||||
const diffManager = new DiffManager(log, diffContentProvider);
|
||||
|
||||
context.subscriptions.push(
|
||||
vscode.workspace.onDidCloseTextDocument((doc) => {
|
||||
|
||||
Reference in New Issue
Block a user