diff options
| author | Arun Isaac | 2026-04-09 00:43:02 +0100 |
|---|---|---|
| committer | Arun Isaac | 2026-04-09 01:19:01 +0100 |
| commit | d7b8110e65116900eb6fd07321cd524c486fa9bf (patch) | |
| tree | 789857c412bfb27eea684459833b84f5b7e27fd0 | |
| parent | d57a26657ac4e3926df296950cafaa76091a7078 (diff) | |
| download | kaagum-d7b8110e65116900eb6fd07321cd524c486fa9bf.tar.gz kaagum-d7b8110e65116900eb6fd07321cd524c486fa9bf.tar.lz kaagum-d7b8110e65116900eb6fd07321cd524c486fa9bf.zip | |
Provide title, kind and rawInput to client when requesting permission.
| -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 |
