mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
Update agent.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e9ec258bc9
commit
8eeb04336e
@@ -450,7 +450,7 @@ func (a *agent) createUserMessage(ctx context.Context, sessionID, content string
|
||||
func (a *agent) streamAndHandleEvents(ctx context.Context, sessionID string, msgHistory []message.Message) (message.Message, *message.Message, error) {
|
||||
ctx = context.WithValue(ctx, tools.SessionIDContextKey, sessionID)
|
||||
if !a.toolsDone.Load() {
|
||||
return message.Message{}, nil, fmt.Errorf("tools not initialized yet")
|
||||
return message.Message{}, nil, fmt.Errorf("Agent is still initializing, please wait a moment and try again")
|
||||
}
|
||||
eventChan := a.provider.StreamResponse(ctx, msgHistory, a.tools)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user