File tree Expand file tree Collapse file tree 4 files changed +11
-22
lines changed
Expand file tree Collapse file tree 4 files changed +11
-22
lines changed Original file line number Diff line number Diff line change @@ -391,10 +391,6 @@ export interface HostConfigAutomaticFileSystems {
391391 enabled : boolean ;
392392}
393393
394- export interface HostConfigImprovedWorkspaces {
395- enabled : boolean ;
396- }
397-
398394export interface HostConfigVeLogging {
399395 enabled : boolean ;
400396 testing : boolean ;
@@ -452,7 +448,6 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
452448 devToolsAiAssistanceFileAgent : HostConfigAiAssistanceFileAgent ,
453449 devToolsAiAssistancePerformanceAgent : HostConfigAiAssistancePerformanceAgent ,
454450 devToolsAutomaticFileSystems : HostConfigAutomaticFileSystems ,
455- devToolsImprovedWorkspaces : HostConfigImprovedWorkspaces ,
456451 devToolsVeLogging : HostConfigVeLogging ,
457452 devToolsWellKnown : HostConfigWellKnown ,
458453 devToolsPrivacyUI : HostConfigPrivacyUI ,
Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ devtools_module("workspace_diff") {
1313 deps = [
1414 " ../../core/common:bundle" ,
1515 " ../../core/host:bundle" ,
16- " ../../core/root:bundle" ,
1716 " ../../models/formatter:bundle" ,
1817 " ../../models/persistence:bundle" ,
1918 " ../../models/text_utils:bundle" ,
Original file line number Diff line number Diff line change 44
55import * as Common from '../../core/common/common.js' ;
66import * as Host from '../../core/host/host.js' ;
7- import * as Root from '../../core/root/root.js' ;
87import * as Diff from '../../third_party/diff/diff.js' ;
98import * as FormatterModule from '../formatter/formatter.js' ;
109import * as Persistence from '../persistence/persistence.js' ;
@@ -112,20 +111,18 @@ export class WorkspaceDiffImpl extends Common.ObjectWrapper.ObjectWrapper<EventT
112111 }
113112
114113 #shouldTrack( uiSourceCode : Workspace . UISourceCode . UISourceCode ) : boolean {
115- // We track differences for all Network resources.
116- if ( uiSourceCode . project ( ) . type ( ) === Workspace . Workspace . projectTypes . Network ) {
117- return true ;
118- }
114+ switch ( uiSourceCode . project ( ) . type ( ) ) {
115+ case Workspace . Workspace . projectTypes . Network :
116+ // We track differences for all Network resources.
117+ return true ;
119118
120- // Additionally we also track differences for FileSystem resources that don't have
121- // a binding (as part of the kDevToolsImprovedWorkspaces feature).
122- if ( uiSourceCode . project ( ) . type ( ) === Workspace . Workspace . projectTypes . FileSystem &&
123- this . #persistence. binding ( uiSourceCode ) === null &&
124- Root . Runtime . hostConfig . devToolsImprovedWorkspaces ?. enabled ) {
125- return true ;
126- }
119+ case Workspace . Workspace . projectTypes . FileSystem :
120+ // We track differences for FileSystem resources without bindings.
121+ return this . #persistence. binding ( uiSourceCode ) === null ;
127122
128- return false ;
123+ default :
124+ return false ;
125+ }
129126 }
130127
131128 private async updateModifiedState ( uiSourceCode : Workspace . UISourceCode . UISourceCode ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import * as Breakpoints from '../../models/breakpoints/breakpoints.js';
99import * as Persistence from '../../models/persistence/persistence.js' ;
1010import * as Workspace from '../../models/workspace/workspace.js' ;
1111import * as WorkspaceDiff from '../../models/workspace_diff/workspace_diff.js' ;
12- import { describeWithEnvironment , updateHostConfig } from '../../testing/EnvironmentHelpers.js' ;
12+ import { describeWithEnvironment } from '../../testing/EnvironmentHelpers.js' ;
1313import { createFileSystemUISourceCode } from '../../testing/UISourceCodeHelpers.js' ;
1414import { createViewFunctionStub } from '../../testing/ViewFunctionHelpers.js' ;
1515
@@ -58,8 +58,6 @@ describeWithEnvironment('CombinedDiffView', () => {
5858 let workspaceDiff : WorkspaceDiff . WorkspaceDiff . WorkspaceDiffImpl ;
5959 let uiSourceCode : Workspace . UISourceCode . UISourceCode ;
6060 beforeEach ( ( ) => {
61- // This is needed for tracking file system UI source codes.
62- updateHostConfig ( { devToolsImprovedWorkspaces : { enabled : true } } ) ;
6361 const workspace = createWorkspace ( ) ;
6462 workspaceDiff = createWorkspaceDiff ( { workspace} ) ;
6563 ( { uiSourceCode} =
You can’t perform that action at this time.
0 commit comments