mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-15 08:31:14 -07:00
- 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.
9 lines
5.0 KiB
JSON
9 lines
5.0 KiB
JSON
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"Ah"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":9828,"totalTokenCount":9828,"promptTokensDetails":[{"modality":"TEXT","tokenCount":9828}]}},{"candidates":[{"content":{"parts":[{"text":"oy, matey! Ready to chart a course through the code?"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7095,"candidatesTokenCount":15,"totalTokenCount":7110,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7095}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":15}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"Ah"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10014,"totalTokenCount":10014,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10014}]}},{"candidates":[{"content":{"parts":[{"text":"oy, matey! Ready to shiver some timbers, I be.\n"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7179,"candidatesTokenCount":17,"totalTokenCount":7196,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7179}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":17}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"Ah"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10025,"totalTokenCount":10025,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10025}]}},{"candidates":[{"content":{"parts":[{"text":"oy, matey! Ready to chart a course through the digital seas?"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7190,"candidatesTokenCount":16,"totalTokenCount":7206,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7190}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":16}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"Ah"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10025,"totalTokenCount":10025,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10025}]}},{"candidates":[{"content":{"parts":[{"text":"oy, matey! Ready to chart a course through these digital seas?"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7190,"candidatesTokenCount":16,"totalTokenCount":7206,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7190}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":16}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"Ah"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10025,"totalTokenCount":10025,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10025}]}},{"candidates":[{"content":{"parts":[{"text":"oy, matey! Ready to chart a course and plunder some code, are"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10025,"totalTokenCount":10025,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10025}]}},{"candidates":[{"content":{"parts":[{"text":" we?\n"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7190,"candidatesTokenCount":20,"totalTokenCount":7210,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7190}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":20}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"Ahoy,"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10025,"totalTokenCount":10025,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10025}]}},{"candidates":[{"content":{"parts":[{"text":" matey! Ready to chart a course and plunder some code?\n"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7190,"candidatesTokenCount":17,"totalTokenCount":7207,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7190}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":17}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"Ah"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10025,"totalTokenCount":10025,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10025}]}},{"candidates":[{"content":{"parts":[{"text":"oy, matey! Ready to chart a course through the code?"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7190,"candidatesTokenCount":15,"totalTokenCount":7205,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7190}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":15}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"Ah"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10025,"totalTokenCount":10025,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10025}]}},{"candidates":[{"content":{"parts":[{"text":"oy, matey! Ready to chart a course through the digital seas?"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7190,"candidatesTokenCount":16,"totalTokenCount":7206,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7190}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":16}]}}]}
|