Files
gemini-cli/packages/sdk/test-data/tool-success.json
Michael Bleigh c7866e6a92 feat(sdk): implement runtime hooks support in GeminiCliAgent
- Introduced a new Hook type and hook() helper for strongly-typed SDK hooks.
- Integrated runtime hooks into GeminiCliSession lifecycle (startup, close, and tool execution).
- Added hooks option to GeminiCliAgentOptions.
- Exported executeToolWithHooks from core to facilitate SDK integration.
- Updated SDK_DESIGN.md to reflect implemented features and remaining tasks.
- Added and re-recorded SDK integration tests for hooks.
2026-02-25 13:44:16 -08:00

3 lines
943 B
JSON

{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"functionCall":{"name":"add","args":{"a":5,"b":3}}}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7045,"candidatesTokenCount":5,"totalTokenCount":7050,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7045}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":5}]}}]}
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"8"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":9849,"totalTokenCount":9849,"promptTokensDetails":[{"modality":"TEXT","tokenCount":9849}]}},{"candidates":[{"content":{"parts":[{"text":""}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7053,"candidatesTokenCount":1,"totalTokenCount":7054,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7053}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":1}]}}]}