on main help sign in
chore: prevent switching the model while agent is working
commit121825d8e3f497982a1d9fa181f9b6d29cc26f9a authorKujtim Hoxha <kujtimii.h@gmail.com> dateWed 30 Jul 2025, 12:39 (1 year ago) parentebf3b43
1 file changed+3
internal/tui/tui.go+3
internal/tui/tui.go+3
@@ -180,6 +180,9 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
180180 return a, a.handleWindowResize(a.wWidth, a.wHeight)
181181 // Model Switch
182182 case models.ModelSelectedMsg:
183+ if a.app.CoderAgent.IsBusy() {
184+ return a, util.ReportWarn("Agent is busy, please wait...")
185+ }
183186 config.Get().UpdatePreferredModel(msg.ModelType, msg.Model)
184187
185188 // Update the agent with the new model/provider configuration