File tree Expand file tree Collapse file tree 3 files changed +11
-7
lines changed
Expand file tree Collapse file tree 3 files changed +11
-7
lines changed Original file line number Diff line number Diff line change 22
33## Unreleased
44
5+ - Fix args streaming in toolCallPrepare to not repeat the args. https://github.com/editor-code-assistant/eca-nvim/issues/28
6+
57## 0.29.0
68
79- Add editor tools to retrieve information like diagnostics. #56
Original file line number Diff line number Diff line change @@ -547,6 +547,8 @@ interface UsageContent {
547547
548548/**
549549 * Tool call that LLM is preparing to execute.
550+ * This will be sent multiple times for same tool id for each time LLM outputs
551+ * a part of the arg, so clients should append the arguments to UI.
550552 */
551553interface ToolCallPrepareContent {
552554 type: ' toolCallPrepare' ;
@@ -587,7 +589,7 @@ interface ToolCallPrepareContent {
587589}
588590
589591/**
590- * Tool call final request that LLM may trigger.
592+ * Tool call final request that LLM may trigger, sent once per id .
591593 */
592594interface ToolCallRunContent {
593595 type: ' toolCallRun' ;
@@ -628,7 +630,7 @@ interface ToolCallRunContent {
628630}
629631
630632/**
631- * Tool call result that LLM trigerred and was executed already.
633+ * Tool call result that LLM trigerred and was executed already, sent once per id .
632634 */
633635interface ToolCalledContent {
634636 type: ' toolCalled' ;
@@ -683,6 +685,9 @@ interface ToolCalledContent {
683685 details? : ToolCallDetails ;
684686}
685687
688+ /**
689+ * Tool call rejected, sent once per id.
690+ */
686691interface ToolCallRejected {
687692 type: ' toolCallRejected' ;
688693
Original file line number Diff line number Diff line change 116116 all-tools (f.tools/all-tools behavior @db* config)
117117 received-msgs* (atom " " )
118118 received-thinking* (atom " " )
119- tool-call-by-id* (atom {:args {}})
120119 add-to-history! (fn [msg]
121120 (swap! db* update-in [:chats chat-id :messages ] (fnil conj []) msg))]
122121
165164 (finish-chat-prompt! :idle chat-ctx))))
166165 :on-prepare-tool-call (fn [{:keys [id name arguments-text]}]
167166 (assert-chat-not-stopped! chat-ctx)
168- (swap! tool-call-by-id* update-in [id :args ] str arguments-text)
169167 (send-content! chat-ctx :assistant
170168 (assoc-some
171169 {:type :toolCallPrepare
172170 :name name
173171 :origin (tool-name->origin name all-tools)
174- :arguments-text ( get-in @tool-call-by-id* [id :args ])
172+ :arguments-text arguments-text
175173 :id id
176174 :manual-approval (f.tools/manual-approval? name config)}
177175 :summary (f.tools/tool-call-summary all-tools name nil ))))
248246 :reason :user
249247 :id id}
250248 :details details
251- :summary summary))))
252- (swap! tool-call-by-id* dissoc id)))))]
249+ :summary summary))))))))]
253250 ; ; Wait all tool calls to complete before returning
254251 (run! deref calls)
255252 (send-content! chat-ctx :system {:type :progress :state :running :text " Generating" })
You can’t perform that action at this time.
0 commit comments