File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 500500 :details details
501501 :summary summary})))
502502 ; ; assert: In :rejected state
503- (let [[reject-reason reject-text] (if (= :deny approval)
504- [:user-config " Tool call denied by user config" ]
505- [:user-choice " Tool call rejected by user choice" ])]
503+ (let [tool-call-state (get-tool-call-state @db* chat-id id)
504+ {:keys [code text]} (:decision-reason tool-call-state)]
506505 (add-to-history! {:role " tool_call" :content tool-call})
507506 (add-to-history! {:role " tool_call_output"
508507 :content (assoc tool-call :output {:error true
509- :contents [{:text reject- text
508+ :contents [{:text text
510509 :type :text }]})})
511510 (transition-tool-call! db* chat-ctx id :send-reject
512511 {:origin origin
513512 :name name
514513 :arguments arguments
515- :reason reject-reason
514+ :reason code
516515 :details details
517516 :summary summary})))))))]
518517 (assert-chat-not-stopped! chat-ctx)
You can’t perform that action at this time.
0 commit comments