@@ -27,16 +27,11 @@ export class MarkdownContentProvider implements TextDocumentContentProvider {
2727 constructor ( private container : Container ) {
2828 this . registration = workspace . registerTextDocumentContentProvider ( Schemes . GitLensAIMarkdown , this ) ;
2929
30- // Track document visibility to detect when content needs recovery
30+ // Track tab changes to detect when content needs recovery
3131 this . visibilityTracker = Disposable . from (
3232 window . tabGroups . onDidChangeTabs ( ( e : TabChangeEvent ) => {
3333 this . onTabsChanged ( e ) ;
3434 } ) ,
35- // // Also track when tabs change which might affect preview visibility
36- // window.onDidChangeActiveTextEditor(() => {
37- // // Delay to allow VS Code to finish tab switching
38- // setTimeout(() => this.forceRecoveryForAllOpenedDocuments(), 1000);
39- // }),
4035 ) ;
4136
4237 workspace . onDidCloseTextDocument ( document => {
@@ -118,25 +113,6 @@ export class MarkdownContentProvider implements TextDocumentContentProvider {
118113 this . visibilityTracker . dispose ( ) ;
119114 }
120115
121- // /**
122- // * Checks preview visibility by examining workspace documents
123- // */
124- // private forceRecoveryForAllOpenedDocuments(): void {
125- // // Check all workspace documents for our markdown scheme
126- // for (const document of workspace.textDocuments) {
127- // if (document.uri.scheme === Schemes.GitLensAIMarkdown) {
128- // const uriString = document.uri.toString();
129- // if (this.contents.has(uriString)) {
130- // console.log(`[GitLens] Checking preview visibility for: ${document.uri.path}`);
131- // // Trigger recovery check for this document
132- // setTimeout(() => {
133- // this.forceContentRecovery(document.uri);
134- // }, 1000);
135- // }
136- // }
137- // }
138- // }
139-
140116 private onTabsChanged ( e : TabChangeEvent ) {
141117 for ( const tab of e . changed ) {
142118 if ( tab . input instanceof TabInputCustom && tab . input . uri . scheme === Schemes . GitLensAIMarkdown ) {
0 commit comments