@@ -531,7 +531,7 @@ export function Prompt(props: PromptProps) {
531531 if ( store . mode === "shell" ) {
532532 sdk . client . session . shell ( {
533533 sessionID,
534- agent : local . agent . current ( ) . name ,
534+ agent : local . agent . current ( ) ? .name ?? "build" ,
535535 model : {
536536 providerID : selectedModel . providerID ,
537537 modelID : selectedModel . modelID ,
@@ -552,7 +552,7 @@ export function Prompt(props: PromptProps) {
552552 sessionID,
553553 command : command . slice ( 1 ) ,
554554 arguments : args . join ( " " ) ,
555- agent : local . agent . current ( ) . name ,
555+ agent : local . agent . current ( ) ? .name ?? "build" ,
556556 model : `${ selectedModel . providerID } /${ selectedModel . modelID } ` ,
557557 messageID,
558558 variant,
@@ -569,7 +569,7 @@ export function Prompt(props: PromptProps) {
569569 sessionID,
570570 ...selectedModel ,
571571 messageID,
572- agent : local . agent . current ( ) . name ,
572+ agent : local . agent . current ( ) ? .name ?? "build" ,
573573 model : selectedModel ,
574574 variant,
575575 parts : [
@@ -690,7 +690,7 @@ export function Prompt(props: PromptProps) {
690690 const highlight = createMemo ( ( ) => {
691691 if ( keybind . leader ) return theme . border
692692 if ( store . mode === "shell" ) return theme . primary
693- return local . agent . color ( local . agent . current ( ) . name )
693+ return local . agent . color ( local . agent . current ( ) ? .name ?? "build" )
694694 } )
695695
696696 const showVariant = createMemo ( ( ) => {
@@ -701,7 +701,7 @@ export function Prompt(props: PromptProps) {
701701 } )
702702
703703 const spinnerDef = createMemo ( ( ) => {
704- const color = local . agent . color ( local . agent . current ( ) . name )
704+ const color = local . agent . color ( local . agent . current ( ) ? .name ?? "build" )
705705 return {
706706 frames : createFrames ( {
707707 color,
@@ -935,7 +935,7 @@ export function Prompt(props: PromptProps) {
935935 />
936936 < box flexDirection = "row" flexShrink = { 0 } paddingTop = { 1 } gap = { 1 } >
937937 < text fg = { highlight ( ) } >
938- { store . mode === "shell" ? "Shell" : Locale . titlecase ( local . agent . current ( ) . name ) } { " " }
938+ { store . mode === "shell" ? "Shell" : Locale . titlecase ( local . agent . current ( ) ? .name ?? "build" ) } { " " }
939939 </ text >
940940 < Show when = { store . mode === "normal" } >
941941 < box flexDirection = "row" gap = { 1 } >
0 commit comments