File tree Expand file tree Collapse file tree
apps/pythinker-code/src/tui Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ function platformValue ( sel : string | { value : string } ) : string {
2+ return typeof sel === 'string' ? sel : sel . value ;
3+ }
4+
15import {
26 applyOpenPlatformConfig ,
37 fetchOpenPlatformModels ,
Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ export class ModelSelectorComponent extends Container implements Focusable {
196196 private draftFor ( choice : ModelChoice ) : string {
197197 const override = this . thinkingOverrides . get ( choice . alias ) ;
198198 if ( override !== undefined ) return override ;
199- return coerceEffortForModel ( choice . model , this . opts . currentThinkingEffort ) ;
199+ return coerceEffortForModel ( choice . model as import ( "@pymodel/pythinker-code-sdk" ) . ModelAlias | undefined , this . opts . currentThinkingEffort ) ;
200200 }
201201
202202 /** Draft coerced onto the model's segment list so rendering/selection never
Original file line number Diff line number Diff line change @@ -759,7 +759,7 @@ export class AgentDynamicWorkflowProgressComponent implements Component {
759759 layout . renderText ,
760760 layout . cellWidth ,
761761 layout . barCells ,
762- estimate === undefined ? member . ticks : estimate . displayTicks ,
762+ estimate === undefined ? member . ticks : ( estimate ? .displayTicks ?? 0 ) ,
763763 Math . min ( snapshot . phaseElapsedMs , COMPLETE_FILL_MS ) ,
764764 ] ;
765765 const cached = member . cellCache ;
@@ -803,7 +803,7 @@ export class AgentDynamicWorkflowProgressComponent implements Component {
803803 } ) ;
804804 const id = chalk . hex ( memberIdColor ( member . id , this . colors ) ) ( member . id ) ;
805805 const bar = brailleBar (
806- estimate . displayTicks ,
806+ ( estimate ? .displayTicks ?? 0 ) ,
807807 snapshot . phase ,
808808 layout . barCells ,
809809 this . colors ,
@@ -831,7 +831,7 @@ export class AgentDynamicWorkflowProgressComponent implements Component {
831831 } ) ;
832832 const id = chalk . hex ( memberIdColor ( member . id , this . colors ) ) ( member . id ) ;
833833 const bar = brailleBar (
834- estimate . displayTicks ,
834+ ( estimate ? .displayTicks ?? 0 ) ,
835835 estimatePhase ,
836836 barCells ,
837837 this . colors ,
Original file line number Diff line number Diff line change @@ -86,8 +86,8 @@ export function buildExpertTalkStatusLines(
8686 }
8787
8888 if ( status . arm !== undefined ) lines . push ( currentTheme . fg ( 'primary' , 'Armed for the next message' ) ) ;
89- if ( status . pairValidation . state !== 'valid' && status . pairValidation . reason !== undefined ) {
90- lines . push ( currentTheme . fg ( 'error' , status . pairValidation . reason ) ) ;
89+ if ( status . pairValidation ? .state !== 'valid' && status . pairValidation ? .reason !== undefined ) {
90+ lines . push ( currentTheme . fg ( 'error' , status . pairValidation ? .reason ) ) ;
9191 }
9292
9393 if ( run !== undefined ) {
@@ -322,8 +322,8 @@ export function buildExpertTalkExchangeLines(
322322 width = 120 ,
323323) : readonly string [ ] {
324324 const safeWidth = Math . max ( 1 , width ) ;
325- const lead = displayModel ( run . bindings [ 0 ] . effectiveModelId , models ) ;
326- const peer = displayModel ( run . bindings [ 1 ] . effectiveModelId , models ) ;
325+ const lead = displayModel ( ( run . bindings ?? [ ] ) [ 0 ] . effectiveModelId , models ) ;
326+ const peer = displayModel ( ( run . bindings ?? [ ] ) [ 1 ] . effectiveModelId , models ) ;
327327 const columnWidth = Math . floor ( ( safeWidth - GRID_GUTTER_WIDTH ) / 2 ) ;
328328 const grid = columnWidth < MIN_AGENT_COLUMN_WIDTH
329329 ? renderAgentGrid (
You can’t perform that action at this time.
0 commit comments