@@ -890,9 +890,20 @@ <h3><span data-i18n="all_projects">All Projects</span> <span class="projects-cou
890890< div class ="modal-backdrop " id ="modal-continue ">
891891 < div class ="modal ">
892892 < h3 data-i18n ="continue_project "> Continue Project</ h3 >
893- < div class ="form-group ">
894- < label data-i18n-html ="additional_iterations_label "> Additional iterations < span style ="color:var(--text-muted);font-weight:400 "> (max 3)</ span > </ label >
895- < input type ="number " id ="continue-iter " value ="3 " min ="1 " max ="3 " style ="width:80px " />
893+ < div class ="form-row ">
894+ < div class ="form-group " style ="flex:1 ">
895+ < label data-i18n-html ="additional_iterations_label "> Additional iterations < span style ="color:var(--text-muted);font-weight:400 "> (max 3)</ span > </ label >
896+ < input type ="number " id ="continue-iter " value ="3 " min ="1 " max ="3 " style ="width:80px " />
897+ </ div >
898+ < div class ="form-group " style ="flex:2 ">
899+ < label > Model</ label >
900+ < div style ="display:flex;gap:8px;flex-wrap:wrap " id ="continue-model-options ">
901+ < label class ="model-option "> < input type ="radio " name ="continue-model " value ="claude-sonnet-4-6 " checked /> < span class ="model-chip "> Sonnet 4.6</ span > </ label >
902+ < label class ="model-option continue-model-admin " style ="display:none "> < input type ="radio " name ="continue-model " value ="claude-opus-4-6 " /> < span class ="model-chip "> Opus 4.6</ span > </ label >
903+ < label class ="model-option continue-model-admin " style ="display:none "> < input type ="radio " name ="continue-model " value ="claude-haiku-4-5 " /> < span class ="model-chip "> Haiku 4.5</ span > </ label >
904+ < label class ="model-option continue-model-admin " style ="display:none "> < input type ="radio " name ="continue-model " value ="gemini " /> < span class ="model-chip "> Gemini</ span > </ label >
905+ </ div >
906+ </ div >
896907 </ div >
897908 < div class ="form-group ">
898909 < label data-i18n-html ="instructions_comments_label "> Instructions / Comments < span style ="color:var(--text-muted);font-weight:400 "> (optional)</ span > </ label >
@@ -902,7 +913,7 @@ <h3 data-i18n="continue_project">Continue Project</h3>
902913 </ div >
903914 < div class ="modal-footer ">
904915 < button type ="button " class ="btn-secondary " onclick ="closeModal('modal-continue') " data-i18n ="cancel "> Cancel</ button >
905- < button class ="btn-primary " id ="continue-btn " onclick ="submitContinue() " data-i18n ="continue_btn "> ▶ Continue</ button >
916+ < button class ="btn-primary " id ="continue-btn " onclick ="submitContinue() " data-i18n ="continue_btn "> Continue</ button >
906917 </ div >
907918 </ div >
908919</ div >
@@ -2295,23 +2306,41 @@ <h3 data-i18n="edit_project">Edit Project</h3>
22952306// ══════════════════════════════════════════════════════
22962307let continueProjectId = null ;
22972308
2298- function openContinueModal ( id ) {
2309+ async function openContinueModal ( id ) {
22992310 continueProjectId = id ;
23002311 document . getElementById ( 'continue-comment' ) . value = '' ;
23012312 document . getElementById ( 'continue-iter' ) . value = '3' ;
2313+
2314+ // Fetch project detail to pre-fill model
2315+ const res = await fetch ( `/api/projects/${ id } ` ) ;
2316+ if ( res . ok ) {
2317+ const p = await res . json ( ) ;
2318+ const modelMap = { 'claude-sonnet-4-6' : 'claude-sonnet-4-6' , 'claude-opus-4-6' : 'claude-opus-4-6' ,
2319+ 'claude-haiku-4-5' : 'claude-haiku-4-5' , 'gemini' : 'gemini' , 'sonnet' : 'claude-sonnet-4-6' ,
2320+ 'opus' : 'claude-opus-4-6' , 'haiku' : 'claude-haiku-4-5' } ;
2321+ const modelVal = modelMap [ p . model ] || 'claude-sonnet-4-6' ;
2322+ document . querySelectorAll ( 'input[name="continue-model"]' ) . forEach ( r => {
2323+ r . checked = ( r . value === modelVal ) ;
2324+ } ) ;
2325+ }
2326+ if ( currentUser && currentUser . is_admin ) {
2327+ document . querySelectorAll ( '.continue-model-admin' ) . forEach ( el => el . style . display = '' ) ;
2328+ }
2329+
23022330 document . getElementById ( 'modal-continue' ) . classList . add ( 'open' ) ;
23032331}
23042332
23052333async function submitContinue ( ) {
23062334 const iter = Math . max ( 1 , Math . min ( 3 , parseInt ( document . getElementById ( 'continue-iter' ) . value ) || 3 ) ) ;
23072335 const comment = document . getElementById ( 'continue-comment' ) . value . trim ( ) ;
2336+ const model = ( [ ...document . querySelectorAll ( 'input[name="continue-model"]' ) ] . find ( r => r . checked ) || { } ) . value || 'claude-sonnet-4-6' ;
23082337 const btn = document . getElementById ( 'continue-btn' ) ;
23092338 btn . disabled = true ;
23102339 try {
23112340 const res = await fetch ( `/api/projects/${ continueProjectId } /continue` , {
23122341 method : 'POST' ,
23132342 headers : { 'Content-Type' : 'application/json' } ,
2314- body : JSON . stringify ( { additional_iterations : iter , comment } ) ,
2343+ body : JSON . stringify ( { additional_iterations : iter , comment, model } ) ,
23152344 } ) ;
23162345 if ( ! res . ok ) {
23172346 const e = await res . json ( ) . catch ( ( ) => ( { } ) ) ;
0 commit comments