@@ -531,6 +531,14 @@ func (a *sessionAgent) Run(ctx context.Context, call SessionAgentCall) (*fantasy
531 currentAssistant.AddFinish(message.FinishReasonPermissionDenied, "User denied permission", "")
531 currentAssistant.AddFinish(message.FinishReasonPermissionDenied, "User denied permission", "")
532 } else if errors.Is(err, hyper.ErrUnauthorized) {
532 } else if errors.Is(err, hyper.ErrUnauthorized) {
533 currentAssistant.AddFinish(message.FinishReasonError, "Unauthorized", `Authentication with Hyper failed. Please run "crush auth" to re-authenticate.`)
533 currentAssistant.AddFinish(message.FinishReasonError, "Unauthorized", `Authentication with Hyper failed. Please run "crush auth" to re-authenticate.`)
534+ if a.notify != nil {
535+ a.notify.Publish(pubsub.CreatedEvent, notify.Notification{
536+ SessionID: call.SessionID,
537+ SessionTitle: currentSession.Title,
538+ Type: notify.TypeReAuthenticate,
539+ ProviderID: largeModel.ModelCfg.Provider,
534 } else if errors.Is(err, hyper.ErrNoCredits) {
542 } else if errors.Is(err, hyper.ErrNoCredits) {
535 url := hyper.BaseURL()
543 url := hyper.BaseURL()
536 link := linkStyle.Hyperlink(url, "id=hyper").Render(url)
544 link := linkStyle.Hyperlink(url, "id=hyper").Render(url)