Skip to content
Source
Sign inSign up
pingdotgg/t3code

feat(settings): choose how new worktrees initialize submodules #12955

Mergedjuliusmarmingemerged 8 commits intoworktree-submodules/env-mode-chain fromrefs/pull/12955/headmerged by juliusmarminge View on GitHub

Showing 18 changed files with 69 additions and 11 deletions (loading 15).

x
0 of 18 viewed, 18 left
47 additions and 1 deletionapps/mobile/src/features/settings/SettingsServerControlsRouteScreen.tsxModified
View file
@@ -6,6 +6,7 @@
type ServerSettings,
type ServerSettingsPatch,
type ThreadEnvMode,
+ type WorktreeSubmodules,
PROJECT_SCOPED_SERVER_SETTING_KEYS,
type ProjectScopedServerSettingKey,
} from "@t3tools/contracts";
@@ -43,12 +44,32 @@
};
​
const PAGE_PROJECT_KEYS: Record<SettingsPage, readonly ProjectScopedServerSettingKey[]> = {
- "new-threads": ["defaultThreadEnvMode", "defaultRuntimeMode"],
+ "new-threads": ["defaultThreadEnvMode", "worktreeSubmodules", "defaultRuntimeMode"],
"source-control": ["defaultAutoPull", "newWorktreesStartFromOrigin"],
"agent-behavior": ["responseStreamingMode", "enableAgentBrowserAccess"],
maintenance: ["continueThreadsAfterServerUpdate"],
};
​
+const SUBMODULE_CHOICES: ReadonlyArray<{
+ readonly mode: WorktreeSubmodules | null;
+ readonly label: string;
+ readonly description: string;
+}> = [
+ // Only offered at environment scope; a project falls back through "Use defaults".
+ {
+ mode: null,
+ label: "Inherit",
+ description: "Use the repository's t3.json, or initialize recursively.",