@@ -36,6 +36,8 @@ interface UseCreationWorkspaceReturn {
3636 branches : string [ ] ;
3737 trunkBranch : string ;
3838 setTrunkBranch : ( branch : string ) => void ;
39+ fetchLatest : boolean ;
40+ setFetchLatest : ( value : boolean ) => void ;
3941 runtimeMode : RuntimeMode ;
4042 sshHost : string ;
4143 setRuntimeOptions : ( mode : RuntimeMode , host : string ) => void ;
@@ -62,7 +64,7 @@ export function useCreationWorkspace({
6264 const [ isSending , setIsSending ] = useState ( false ) ;
6365
6466 // Centralized draft workspace settings with automatic persistence
65- const { settings, setRuntimeOptions, setTrunkBranch, getRuntimeString } =
67+ const { settings, setRuntimeOptions, setTrunkBranch, setFetchLatest , getRuntimeString } =
6668 useDraftWorkspaceSettings ( projectPath , branches , recommendedTrunk ) ;
6769
6870 // Get send options from shared hook (uses project-scoped storage key)
@@ -107,6 +109,7 @@ export function useCreationWorkspace({
107109 runtimeConfig,
108110 projectPath, // Pass projectPath when workspaceId is null
109111 trunkBranch : settings . trunkBranch , // Pass selected trunk branch from settings
112+ fetchLatest : settings . fetchLatest , // Fetch remote updates before branching when requested
110113 } ) ;
111114
112115 if ( ! result . success ) {
@@ -139,13 +142,16 @@ export function useCreationWorkspace({
139142 getRuntimeString ,
140143 sendMessageOptions ,
141144 settings . trunkBranch ,
145+ settings . fetchLatest ,
142146 ]
143147 ) ;
144148
145149 return {
146150 branches,
147151 trunkBranch : settings . trunkBranch ,
148152 setTrunkBranch,
153+ fetchLatest : settings . fetchLatest ,
154+ setFetchLatest,
149155 runtimeMode : settings . runtimeMode ,
150156 sshHost : settings . sshHost ,
151157 setRuntimeOptions,
0 commit comments