File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -642,6 +642,28 @@ fn resolve_runtime_source(
642642 }
643643 }
644644
645+ // In dev we prefer the staged/local runtime so frontend-only edits do not
646+ // trigger a full rebuild of the embedded ACP on every desktop restart.
647+ if cargo_profile ( ) != "release" {
648+ if destination. exists ( ) {
649+ println ! (
650+ "cargo:warning=Reusing staged {} runtime at {} for dev build." ,
651+ spec. label,
652+ destination. display( )
653+ ) ;
654+ return Some ( destination. to_path_buf ( ) ) ;
655+ }
656+
657+ if let Some ( source) = candidates. iter ( ) . find ( |path| path. exists ( ) ) {
658+ println ! (
659+ "cargo:warning=Reusing existing {} runtime at {} for dev build." ,
660+ spec. label,
661+ source. display( )
662+ ) ;
663+ return Some ( source. clone ( ) ) ;
664+ }
665+ }
666+
645667 if spec. label == "codex" {
646668 match build_vendor_runtime ( manifest_dir, spec) {
647669 Ok ( Some ( source) ) => return Some ( source) ,
You can’t perform that action at this time.
0 commit comments