@@ -27,16 +27,11 @@ export class MarkdownContentProvider implements TextDocumentContentProvider {
27
27
constructor ( private container : Container ) {
28
28
this . registration = workspace . registerTextDocumentContentProvider ( Schemes . GitLensAIMarkdown , this ) ;
29
29
30
- // Track document visibility to detect when content needs recovery
30
+ // Track tab changes to detect when content needs recovery
31
31
this . visibilityTracker = Disposable . from (
32
32
window . tabGroups . onDidChangeTabs ( ( e : TabChangeEvent ) => {
33
33
this . onTabsChanged ( e ) ;
34
34
} ) ,
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
- // }),
40
35
) ;
41
36
42
37
workspace . onDidCloseTextDocument ( document => {
@@ -118,25 +113,6 @@ export class MarkdownContentProvider implements TextDocumentContentProvider {
118
113
this . visibilityTracker . dispose ( ) ;
119
114
}
120
115
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
-
140
116
private onTabsChanged ( e : TabChangeEvent ) {
141
117
for ( const tab of e . changed ) {
142
118
if ( tab . input instanceof TabInputCustom && tab . input . uri . scheme === Schemes . GitLensAIMarkdown ) {
0 commit comments