diff options
Diffstat (limited to 'kaakaa/tea.scm')
| -rw-r--r-- | kaakaa/tea.scm | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/kaakaa/tea.scm b/kaakaa/tea.scm index ce0090e..3e57ac4 100644 --- a/kaakaa/tea.scm +++ b/kaakaa/tea.scm @@ -302,16 +302,22 @@ and a list of effects. (over state-agent-request-id 1+ <>)) - (list (acp-message `(("jsonrpc" . "2.0") - ("id" . ,request-id) - ("method" . "session/request_permission") - ("params" - ("sessionId" . ,session-id) - ("toolCall" - ("toolCallId" . ,(tool-call-id call))) - ("options" . - ,(vector %tool-allow-once - %tool-reject-once)))))))))) + (let ((tool (focus (key-ref (tool-call-function call)) + tools)) + (args (alist->plist (tool-call-arguments call)))) + (list (acp-message `(("jsonrpc" . "2.0") + ("id" . ,request-id) + ("method" . "session/request_permission") + ("params" + ("sessionId" . ,session-id) + ("toolCall" + ("toolCallId" . ,(tool-call-id call)) + ("title" . ,(apply (tool-title tool) args)) + ("kind" . ,(apply (tool-kind tool) args)) + ("rawInput" . ,(tool-call-arguments call))) + ("options" . + ,(vector %tool-allow-once + %tool-reject-once))))))))))) (define (next-state-llm-response state response tools) "Given current @var{state} and a new LLM @var{response}, return the next state |
