File tree Expand file tree Collapse file tree 4 files changed +12
-1
lines changed
src/cli/tui/routes/workflow Expand file tree Collapse file tree 4 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -43,6 +43,7 @@ export interface UIActions {
4343 batchAddSubAgents ( parentId : string , subAgents : SubAgentState [ ] ) : void
4444 updateSubAgentStatus ( subAgentId : string , status : AgentStatus ) : void
4545 clearSubAgents ( parentId : string ) : void
46+ setWorkflowName ( name : string ) : void
4647 setWorkflowStatus ( status : "running" | "stopping" | "completed" | "stopped" | "awaiting" | "paused" | "error" ) : void
4748 setCheckpointState ( checkpoint : { active : boolean ; reason ?: string } | null ) : void
4849 setInputState ( inputState : InputState | null ) : void
@@ -95,6 +96,7 @@ export class OpenTUIAdapter extends BaseUIAdapter {
9596 case "workflow:started" :
9697 // Reset timer for new workflow (will auto-start on first agent)
9798 timerService . reset ( )
99+ this . actions . setWorkflowName ( event . workflowName )
98100 this . actions . setWorkflowStatus ( "running" )
99101 break
100102
Original file line number Diff line number Diff line change @@ -13,6 +13,13 @@ export type WorkflowActionsContext = {
1313}
1414
1515export function createWorkflowActions ( ctx : WorkflowActionsContext ) {
16+ function setWorkflowName ( name : string ) : void {
17+ const state = ctx . getState ( )
18+ if ( state . workflowName === name ) return
19+ ctx . setState ( { ...state , workflowName : name } )
20+ ctx . notify ( )
21+ }
22+
1623 function setWorkflowStatus ( status : WorkflowStatus ) : void {
1724 const state = ctx . getState ( )
1825 if ( state . workflowStatus === status ) return
@@ -129,6 +136,7 @@ export function createWorkflowActions(ctx: WorkflowActionsContext) {
129136 }
130137
131138 return {
139+ setWorkflowName,
132140 setWorkflowStatus,
133141 setCheckpointState,
134142 setInputState,
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export type UIActions = {
3636 toggleTimeline ( ) : void
3737 setVisibleItemCount ( count : number ) : void
3838 setScrollOffset ( offset : number , visibleItemCount ?: number ) : void
39+ setWorkflowName ( name : string ) : void
3940 setWorkflowStatus ( status : WorkflowStatus ) : void
4041 setCheckpointState ( checkpoint : { active : boolean ; reason ?: string } | null ) : void
4142 setInputState ( inputState : InputState | null ) : void
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export function Workflow(props: WorkflowProps) {
3131 }
3232
3333 return (
34- < UIStateProvider workflowName = "CodeMachine Workflow" >
34+ < UIStateProvider workflowName = "Workflow" >
3535 < WorkflowShell
3636 version = { getVersion ( ) }
3737 currentDir = { getCwd ( ) }
You can’t perform that action at this time.
0 commit comments