Tie in tab input, remove cleanup .d.ts

This commit is contained in:
Logan Ramos
2022-03-17 16:54:35 -04:00
parent fc0bac73a1
commit 85c3df0dde
9 changed files with 96 additions and 171 deletions

View File

@@ -11,7 +11,7 @@ import {
MainContext, MainThreadDebugServiceShape, ExtHostDebugServiceShape, DebugSessionUUID,
IBreakpointsDeltaDto, ISourceMultiBreakpointDto, IFunctionBreakpointDto, IDebugSessionDto
} from 'vs/workbench/api/common/extHost.protocol';
import { Disposable, Position, Location, SourceBreakpoint, FunctionBreakpoint, DebugAdapterServer, DebugAdapterExecutable, DataBreakpoint, DebugConsoleMode, DebugAdapterInlineImplementation, DebugAdapterNamedPipeServer } from 'vs/workbench/api/common/extHostTypes';
import { Disposable, Position, Location, SourceBreakpoint, FunctionBreakpoint, DebugAdapterServer, DebugAdapterExecutable, DataBreakpoint, DebugConsoleMode, DebugAdapterInlineImplementation, DebugAdapterNamedPipeServer, TextDiffTabInput, NotebookEditorDiffTabInput, TextTabInput } from 'vs/workbench/api/common/extHostTypes';
import { AbstractDebugAdapter } from 'vs/workbench/contrib/debug/common/abstractDebugAdapter';
import { IExtHostWorkspace } from 'vs/workbench/api/common/extHostWorkspace';
import { IExtHostExtensionService } from 'vs/workbench/api/common/extHostExtensionService';
@@ -956,11 +956,10 @@ export class ExtHostVariableResolverService extends AbstractVariableResolverServ
const activeTab = editorTabs.tabGroups.groups.find(group => group.isActive)?.activeTab;
if (activeTab !== undefined) {
// Resolve a resource from the tab
const asSideBySideResource = activeTab.resource as { primary?: URI; secondary?: URI } | undefined;
if (asSideBySideResource && (asSideBySideResource.primary || asSideBySideResource.secondary)) {
return asSideBySideResource.primary ?? asSideBySideResource.secondary;
if (activeTab?.input instanceof TextDiffTabInput || activeTab?.input instanceof NotebookEditorDiffTabInput) {
return activeTab?.input.modified;
} else {
return activeTab.resource as URI | undefined;
return (activeTab?.input as TextTabInput | undefined)?.uri;
}
}
}