diff --git a/src/shared/global-settings-types.ts b/src/shared/global-settings-types.ts index dae70940c4b..fd2e76664f8 100644 --- a/src/shared/global-settings-types.ts +++ b/src/shared/global-settings-types.ts @@ -37,24 +37,11 @@ import type { TaskViewPresetId } from './ui-chrome-types' import type { SetupScriptLaunchMode } from './worktree/launch-types' -import type { - CustomWorktreeVisibilitySource, - ExternalWorktreeVisibility, - WorktreeVisibilitySourcePreferences -} from './repo-types' +import type { WorktreeVisibilityDefaults } from './worktree/visibility-defaults' /** MiniMax account region used to select the quota endpoint. */ export type MiniMaxEndpoint = 'overseas' | 'cn' -export type WorktreeVisibilityDefaults = { - /** Default for worktrees outside a recognized source. */ - external?: ExternalWorktreeVisibility - /** Host-owned roots applied to every repository on that host. */ - customSources?: CustomWorktreeVisibilitySource[] - /** Defaults for built-in and host-owned custom sources. */ - sourcePreferences?: WorktreeVisibilitySourcePreferences -} - export type GlobalSettings = { workspaceDir: string /** Host-owned defaults used when a repository has no explicit visibility override. */ @@ -538,6 +525,7 @@ export type OrcaWorkspaceLayout = { nestWorkspaces: boolean } -// Re-exported so existing importers keep one entry point; the shape lives in its -// own file because this one is at the max-lines ceiling. +// Re-exported so existing importers keep one entry point; the shapes live in their +// own files because this one is at the max-lines ceiling. export type { GhosttyImportPreview } from './ghostty-import-preview' +export type { WorktreeVisibilityDefaults } from './worktree/visibility-defaults' diff --git a/src/shared/worktree/visibility-defaults.ts b/src/shared/worktree/visibility-defaults.ts new file mode 100644 index 00000000000..2a39cac6390 --- /dev/null +++ b/src/shared/worktree/visibility-defaults.ts @@ -0,0 +1,15 @@ +import type { + CustomWorktreeVisibilitySource, + ExternalWorktreeVisibility, + WorktreeVisibilitySourcePreferences +} from '../repo-types' + +/** Host-owned worktree visibility defaults, used when a repository has no explicit override. */ +export type WorktreeVisibilityDefaults = { + /** Default for worktrees outside a recognized source. */ + external?: ExternalWorktreeVisibility + /** Host-owned roots applied to every repository on that host. */ + customSources?: CustomWorktreeVisibilitySource[] + /** Defaults for built-in and host-owned custom sources. */ + sourcePreferences?: WorktreeVisibilitySourcePreferences +}