@@ -18,8 +18,8 @@ import { FileWatcherEvent } from "../file-watcher/schemas.js";
1818import type { FileWatcherService } from "../file-watcher/service.js" ;
1919import type { FocusService } from "../focus/service.js" ;
2020import { FocusServiceEvent } from "../focus/service.js" ;
21- import type { ShellService } from "../shell/service.js" ;
2221import { getWorktreeLocation } from "../settingsStore" ;
22+ import type { ShellService } from "../shell/service.js" ;
2323import { loadConfig , normalizeScripts } from "./configLoader" ;
2424import type {
2525 BranchChangedPayload ,
@@ -414,13 +414,14 @@ export class WorkspaceService extends TypedEventEmitter<WorkspaceServiceEvents>
414414 log . info (
415415 `Running ${ initScripts . length } init script(s) for task ${ taskId } (local mode)` ,
416416 ) ;
417- const initResult = await this . ensureScriptRunner ( ) . executeScriptsWithTerminal (
418- taskId ,
419- initScripts ,
420- "init" ,
421- folderPath ,
422- { failFast : true , workspaceEnv } ,
423- ) ;
417+ const initResult =
418+ await this . ensureScriptRunner ( ) . executeScriptsWithTerminal (
419+ taskId ,
420+ initScripts ,
421+ "init" ,
422+ folderPath ,
423+ { failFast : true , workspaceEnv } ,
424+ ) ;
424425 terminalSessionIds = initResult . terminalSessionIds ;
425426
426427 if ( ! initResult . success ) {
@@ -437,13 +438,14 @@ export class WorkspaceService extends TypedEventEmitter<WorkspaceServiceEvents>
437438 log . info (
438439 `Running ${ startScripts . length } start script(s) for task ${ taskId } (local mode)` ,
439440 ) ;
440- const startResult = await this . ensureScriptRunner ( ) . executeScriptsWithTerminal (
441- taskId ,
442- startScripts ,
443- "start" ,
444- folderPath ,
445- { failFast : false , workspaceEnv } ,
446- ) ;
441+ const startResult =
442+ await this . ensureScriptRunner ( ) . executeScriptsWithTerminal (
443+ taskId ,
444+ startScripts ,
445+ "start" ,
446+ folderPath ,
447+ { failFast : false , workspaceEnv } ,
448+ ) ;
447449 terminalSessionIds = [
448450 ...terminalSessionIds ,
449451 ...startResult . terminalSessionIds ,
@@ -570,13 +572,14 @@ export class WorkspaceService extends TypedEventEmitter<WorkspaceServiceEvents>
570572 log . info (
571573 `Running ${ initScripts . length } init script(s) for task ${ taskId } ` ,
572574 ) ;
573- const initResult = await this . ensureScriptRunner ( ) . executeScriptsWithTerminal (
574- taskId ,
575- initScripts ,
576- "init" ,
577- worktree . worktreePath ,
578- { failFast : true , workspaceEnv } ,
579- ) ;
575+ const initResult =
576+ await this . ensureScriptRunner ( ) . executeScriptsWithTerminal (
577+ taskId ,
578+ initScripts ,
579+ "init" ,
580+ worktree . worktreePath ,
581+ { failFast : true , workspaceEnv } ,
582+ ) ;
580583
581584 terminalSessionIds = initResult . terminalSessionIds ;
582585
@@ -598,13 +601,14 @@ export class WorkspaceService extends TypedEventEmitter<WorkspaceServiceEvents>
598601 log . info (
599602 `Running ${ startScripts . length } start script(s) for task ${ taskId } ` ,
600603 ) ;
601- const startResult = await this . ensureScriptRunner ( ) . executeScriptsWithTerminal (
602- taskId ,
603- startScripts ,
604- "start" ,
605- worktree . worktreePath ,
606- { failFast : false , workspaceEnv } ,
607- ) ;
604+ const startResult =
605+ await this . ensureScriptRunner ( ) . executeScriptsWithTerminal (
606+ taskId ,
607+ startScripts ,
608+ "start" ,
609+ worktree . worktreePath ,
610+ { failFast : false , workspaceEnv } ,
611+ ) ;
608612
609613 terminalSessionIds = [
610614 ...terminalSessionIds ,
@@ -687,11 +691,12 @@ export class WorkspaceService extends TypedEventEmitter<WorkspaceServiceEvents>
687691 mode : association . mode ,
688692 } ) ;
689693
690- const destroyResult = await this . ensureScriptRunner ( ) . executeScriptsSilent (
691- destroyScripts ,
692- scriptPath ,
693- workspaceEnv ,
694- ) ;
694+ const destroyResult =
695+ await this . ensureScriptRunner ( ) . executeScriptsSilent (
696+ destroyScripts ,
697+ scriptPath ,
698+ workspaceEnv ,
699+ ) ;
695700
696701 if ( ! destroyResult . success ) {
697702 log . warn (
@@ -980,7 +985,9 @@ export class WorkspaceService extends TypedEventEmitter<WorkspaceServiceEvents>
980985 branchName,
981986 baseBranch : null ,
982987 createdAt : new Date ( ) . toISOString ( ) ,
983- terminalSessionIds : this . ensureScriptRunner ( ) . getTaskSessions ( assoc . taskId ) ,
988+ terminalSessionIds : this . ensureScriptRunner ( ) . getTaskSessions (
989+ assoc . taskId ,
990+ ) ,
984991 hasStartScripts : startScripts . length > 0 ,
985992 } ;
986993 }
0 commit comments