Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6bdd233

Browse files
taciturnaxolotlandreynering
authored andcommitted
fix(ui): display error on summarization instead of leaving spinning
1 parent a4020df commit 6bdd233

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎internal/agent/agent.go‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -703,6 +703,12 @@ func (a *sessionAgent) Summarize(ctx context.Context, sessionID string, opts fan
703703
deleteErr := a.messages.Delete(ctx, summaryMessage.ID)
704704
return deleteErr
705705
}
706+
// Mark the summary message as finished with an error so the UI
707+
// stops spinning.
708+
summaryMessage.AddFinish(message.FinishReasonError, "Summarization Error", err.Error())
709+
if updateErr := a.messages.Update(ctx, summaryMessage); updateErr != nil {
710+
return updateErr
711+
}
706712
return err
707713
}
708714

0 commit comments

Comments
 (0)