(state any)
| 882 | } |
| 883 | |
| 884 | func (b *FullscreenRendererBackend) formatIdleStatus(state any) string { |
| 885 | var parts []string |
| 886 | if cfg, ok := b.terminal.execCtx["config"].(config.Config); ok { |
| 887 | var agentState *agent.AgentState |
| 888 | if typed, ok := state.(*agent.AgentState); ok { |
| 889 | agentState = typed |
| 890 | } else if typed, ok := state.(agent.AgentState); ok { |
| 891 | agentState = &typed |
| 892 | } |
| 893 | snapshot := BuildContextWindowSnapshot(cfg, agentState) |
| 894 | if status := FormatContextWindowStatus(snapshot.ModelName, snapshot.UsedTokens, snapshot.LimitTokens, 20); status != "" { |
| 895 | parts = append(parts, status) |
| 896 | } |
| 897 | } |
| 898 | if toolbarState, ok := state.(luminacli.ToolbarState); ok { |
| 899 | if toolbar := luminacli.BuildSessionToolbar(toolbarState, luminacli.ToolbarSeparator); toolbar != "" { |
| 900 | parts = append(parts, toolbar) |
| 901 | } |
| 902 | } |
| 903 | return strings.Join(parts, luminacli.ToolbarSeparator) |
| 904 | } |
| 905 | |
| 906 | func FormatFullscreenModal(modalState map[string]any) string { |
| 907 | if len(modalState) == 0 { |
no test coverage detected