@@ -16,6 +16,8 @@ interface UseCreationWorkspaceReturn {
1616 branches : string [ ] ;
1717 trunkBranch : string ;
1818 setTrunkBranch : ( branch : string ) => void ;
19+ fetchLatest : boolean ;
20+ setFetchLatest : ( value : boolean ) => void ;
1921 runtimeMode : RuntimeMode ;
2022 sshHost : string ;
2123 setRuntimeOptions : ( mode : RuntimeMode , host : string ) => void ;
@@ -42,7 +44,7 @@ export function useCreationWorkspace({
4244 const [ isSending , setIsSending ] = useState ( false ) ;
4345
4446 // Centralized draft workspace settings with automatic persistence
45- const { settings, setRuntimeOptions, setTrunkBranch, getRuntimeString } =
47+ const { settings, setRuntimeOptions, setTrunkBranch, setFetchLatest , getRuntimeString } =
4648 useDraftWorkspaceSettings ( projectPath , branches , recommendedTrunk ) ;
4749
4850 // Get send options from shared hook (uses project-scoped storage key)
@@ -87,6 +89,7 @@ export function useCreationWorkspace({
8789 runtimeConfig,
8890 projectPath, // Pass projectPath when workspaceId is null
8991 trunkBranch : settings . trunkBranch , // Pass selected trunk branch from settings
92+ fetchLatest : settings . fetchLatest , // Fetch remote updates before branching when requested
9093 } ) ;
9194
9295 if ( ! result . success ) {
@@ -118,13 +121,16 @@ export function useCreationWorkspace({
118121 getRuntimeString ,
119122 sendMessageOptions ,
120123 settings . trunkBranch ,
124+ settings . fetchLatest ,
121125 ]
122126 ) ;
123127
124128 return {
125129 branches,
126130 trunkBranch : settings . trunkBranch ,
127131 setTrunkBranch,
132+ fetchLatest : settings . fetchLatest ,
133+ setFetchLatest,
128134 runtimeMode : settings . runtimeMode ,
129135 sshHost : settings . sshHost ,
130136 setRuntimeOptions,
0 commit comments