diff options
| author | adamdottv <[email protected]> | 2025-05-12 14:32:27 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-05-12 14:32:27 -0500 |
| commit | 36e5ae804e4bf0c96a0ce6cca90029e88c2da9b3 (patch) | |
| tree | e4dd3910956376104c2b3996c245393bf625bc32 /internal/tui/components | |
| parent | c9b90dd184084a2a3669db49717eb485c8861ee4 (diff) | |
| download | opencode-36e5ae804e4bf0c96a0ce6cca90029e88c2da9b3.tar.gz opencode-36e5ae804e4bf0c96a0ce6cca90029e88c2da9b3.zip | |
chore: rename coder -> primary
Diffstat (limited to 'internal/tui/components')
| -rw-r--r-- | internal/tui/components/chat/editor.go | 4 | ||||
| -rw-r--r-- | internal/tui/components/chat/list.go | 4 | ||||
| -rw-r--r-- | internal/tui/components/core/status.go | 4 | ||||
| -rw-r--r-- | internal/tui/components/dialog/models.go | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/internal/tui/components/chat/editor.go b/internal/tui/components/chat/editor.go index 99991cdf7..e96e6df3d 100644 --- a/internal/tui/components/chat/editor.go +++ b/internal/tui/components/chat/editor.go @@ -124,7 +124,7 @@ func (m *editorCmp) Init() tea.Cmd { } func (m *editorCmp) send() tea.Cmd { - if m.app.CoderAgent.IsSessionBusy(m.session.ID) { + if m.app.PrimaryAgent.IsSessionBusy(m.session.ID) { status.Warn("Agent is working, please wait...") return nil } @@ -189,7 +189,7 @@ func (m *editorCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { return m, nil } if key.Matches(msg, editorMaps.OpenEditor) { - if m.app.CoderAgent.IsSessionBusy(m.session.ID) { + if m.app.PrimaryAgent.IsSessionBusy(m.session.ID) { status.Warn("Agent is working, please wait...") return m, nil } diff --git a/internal/tui/components/chat/list.go b/internal/tui/components/chat/list.go index bce6f50e1..bf72e74b5 100644 --- a/internal/tui/components/chat/list.go +++ b/internal/tui/components/chat/list.go @@ -170,7 +170,7 @@ func (m *messagesCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { } func (m *messagesCmp) IsAgentWorking() bool { - return m.app.CoderAgent.IsSessionBusy(m.session.ID) + return m.app.PrimaryAgent.IsSessionBusy(m.session.ID) } func formatTimeDifference(unixTime1, unixTime2 int64) string { @@ -376,7 +376,7 @@ func (m *messagesCmp) help() string { text := "" - if m.app.CoderAgent.IsBusy() { + if m.app.PrimaryAgent.IsBusy() { text += lipgloss.JoinHorizontal( lipgloss.Left, baseStyle.Foreground(t.TextMuted()).Bold(true).Render("press "), diff --git a/internal/tui/components/core/status.go b/internal/tui/components/core/status.go index d6612fed4..be2f39432 100644 --- a/internal/tui/components/core/status.go +++ b/internal/tui/components/core/status.go @@ -140,7 +140,7 @@ func formatTokensAndCost(tokens int64, contextWindow int64, cost float64) string func (m statusCmp) View() string { t := theme.CurrentTheme() - modelID := config.Get().Agents[config.AgentCoder].Model + modelID := config.Get().Agents[config.AgentPrimary].Model model := models.SupportedModels[modelID] // Initialize the help widget @@ -283,7 +283,7 @@ func (m statusCmp) model() string { cfg := config.Get() - coder, ok := cfg.Agents[config.AgentCoder] + coder, ok := cfg.Agents[config.AgentPrimary] if !ok { return "Unknown" } diff --git a/internal/tui/components/dialog/models.go b/internal/tui/components/dialog/models.go index 9dc2fdffe..67c4fdfa1 100644 --- a/internal/tui/components/dialog/models.go +++ b/internal/tui/components/dialog/models.go @@ -283,7 +283,7 @@ func (m *modelDialogCmp) setupModels() { func GetSelectedModel(cfg *config.Config) models.Model { - agentCfg := cfg.Agents[config.AgentCoder] + agentCfg := cfg.Agents[config.AgentPrimary] selectedModelId := agentCfg.Model return models.SupportedModels[selectedModelId] } @@ -325,7 +325,7 @@ func findProviderIndex(providers []models.ModelProvider, provider models.ModelPr func (m *modelDialogCmp) setupModelsForProvider(provider models.ModelProvider) { cfg := config.Get() - agentCfg := cfg.Agents[config.AgentCoder] + agentCfg := cfg.Agents[config.AgentPrimary] selectedModelId := agentCfg.Model m.provider = provider |
