mirror of
				https://github.com/charmbracelet/crush.git
				synced 2025-08-02 05:20:46 +03:00 
			
		
		
		
	Merge pull request #354 from charmbracelet/prevent_model_switch
chore: prevent switching the model while agent is working
This commit is contained in:
		| @@ -180,6 +180,9 @@ func (a *appModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) { | ||||
| 		return a, a.handleWindowResize(a.wWidth, a.wHeight) | ||||
| 	// Model Switch | ||||
| 	case models.ModelSelectedMsg: | ||||
| 		if a.app.CoderAgent.IsBusy() { | ||||
| 			return a, util.ReportWarn("Agent is busy, please wait...") | ||||
| 		} | ||||
| 		config.Get().UpdatePreferredModel(msg.ModelType, msg.Model) | ||||
|  | ||||
| 		// Update the agent with the new model/provider configuration | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Kujtim Hoxha
					Kujtim Hoxha