File tree Expand file tree Collapse file tree 4 files changed +27
-9
lines changed
Expand file tree Collapse file tree 4 files changed +27
-9
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ ## 0.44.1
6+
7+ - Fix renew token regression.
8+ - Improve error feedback when failed to renew token.
9+
510## 0.44.0
611
712- Support ` deny ` tool calls via ` toolCall approval deny ` setting.
Original file line number Diff line number Diff line change 1- 0.44.0
1+ 0.44.1
Original file line number Diff line number Diff line change 129129 (send-content! chat-ctx :system {:type :progress
130130 :state :running
131131 :text " Renewing auth token" })
132- (f.login/renew-auth! provider db*)))
132+ (f.login/renew-auth! provider chat-ctx
133+ {:on-error (fn [error-msg]
134+ (send-content! chat-ctx :system {:type :text
135+ :text error-msg})
136+ (finish-chat-prompt! :idle chat-ctx)
137+ (throw (ex-info " Auth token renew failed" {})))})))
133138
134139 (send-content! chat-ctx :system {:type :progress
135140 :state :running
Original file line number Diff line number Diff line change 4949 :content {:type :text
5050 :text (str input " \n " )}})
5151 (login-step ctx)
52- (db/update-global-cache! @db*)
5352 {:chat-id chat-id
5453 :status step}))
5554
56- (defn renew-auth! [provider db*]
57- (login-step
58- {:provider provider
59- :step :login/renew-token
60- :db* db*})
61- (db/update-global-cache! @db*))
55+ (defn renew-auth!
56+ [provider
57+ {:keys [db* messenger config]}
58+ {:keys [on-error]}]
59+ (try
60+ (login-step
61+ {:provider provider
62+ :messenger messenger
63+ :config config
64+ :step :login/renew-token
65+ :db* db*})
66+ (db/update-global-cache! @db*)
67+ (catch Exception e
68+ (on-error (.getMessage e)))))
6269
6370(defn login-done! [{:keys [db* config messenger]}]
71+ (db/update-global-cache! @db*)
6472 (models/sync-models! db*
6573 config
6674 (fn [new-models]
You can’t perform that action at this time.
0 commit comments