From d7b8110e65116900eb6fd07321cd524c486fa9bf Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 9 Apr 2026 00:43:02 +0100 Subject: Provide title, kind and rawInput to client when requesting permission. --- kaakaa/tea.scm | 26 ++++++++++++++++---------- 1 file 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 -- cgit 1.4.1