implemented /clear and Ctrl+D and thinking
This commit is contained in:
@@ -426,12 +426,12 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
}
|
||||
|
||||
func (m *model) runAgent() tea.Cmd {
|
||||
var ctx context.Context
|
||||
ctx, m.cancel = context.WithCancel(context.Background())
|
||||
return func() tea.Msg {
|
||||
res, err := m.agent.Run(ctx, m.history, m.pool)
|
||||
return agentResponseMsg{response: res, err: err}
|
||||
}
|
||||
var ctx context.Context
|
||||
ctx, m.cancel = context.WithCancel(context.Background())
|
||||
return func() tea.Msg {
|
||||
res, err := m.agent.Run(ctx, m.history, m.pool)
|
||||
return agentResponseMsg{response: res, err: err}
|
||||
}
|
||||
}
|
||||
|
||||
func (m model) View() string {
|
||||
|
||||
Reference in New Issue
Block a user