Skip to content

Commit

Permalink
feat: remove the Chinese characters
Browse files Browse the repository at this point in the history
  • Loading branch information
stone-lyl committed Feb 18, 2025
1 parent 32ce6e2 commit f2932ba
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/ds-ext/src/JsonReadonlyProvider.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import vscode from 'vscode';

export class JsonReadonlyProvider implements vscode.TextDocumentContentProvider {
// 存储各 URI 对应的内容
// Store the content corresponding to each URI
private contentMap = new Map<string, string>();
readonly onDidChangeEmitter = new vscode.EventEmitter<vscode.Uri>();
readonly onDidChange = this.onDidChangeEmitter.event;

// 更新指定 URI 的内容
// Update the content of the specified URI
updateContent(uri: vscode.Uri, content: string) {
this.contentMap.set(uri.toString(), content);
this.onDidChangeEmitter.fire(uri); // 通知 VS Code 内容更新
// Notify VS Code that the content has been updated
this.onDidChangeEmitter.fire(uri);
}

provideTextDocumentContent(uri: vscode.Uri): string {
Expand Down

0 comments on commit f2932ba

Please sign in to comment.