mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-18 01:51:20 -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.
11 lines
5.3 KiB
JSON
11 lines
5.3 KiB
JSON
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"BAN"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10019,"totalTokenCount":10019,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10019}]}},{"candidates":[{"content":{"parts":[{"text":"ANA\n"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7184,"candidatesTokenCount":3,"totalTokenCount":7187,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7184}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":3}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"The word is BAN"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10030,"totalTokenCount":10030,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10030}]}},{"candidates":[{"content":{"parts":[{"text":"ANA.\n"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7195,"candidatesTokenCount":7,"totalTokenCount":7202,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7195}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":7}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"The"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10157,"totalTokenCount":10157,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10157}]}},{"candidates":[{"content":{"parts":[{"text":" word is BANANA.\n"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7306,"candidatesTokenCount":7,"totalTokenCount":7313,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7306}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":7}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"BANANA\n"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10030,"totalTokenCount":10030,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10030}]}},{"candidates":[{"content":{"parts":[{"text":""}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7195,"candidatesTokenCount":3,"totalTokenCount":7198,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7195}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":3}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"BANANA\n"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10030,"totalTokenCount":10030,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10030}]}},{"candidates":[{"content":{"parts":[{"text":""}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7195,"candidatesTokenCount":3,"totalTokenCount":7198,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7195}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":3}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"BAN"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10030,"totalTokenCount":10030,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10030}]}},{"candidates":[{"content":{"parts":[{"text":"ANA\n"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7195,"candidatesTokenCount":3,"totalTokenCount":7198,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7195}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":3}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"BANANA\n"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10030,"totalTokenCount":10030,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10030}]}},{"candidates":[{"content":{"parts":[{"text":""}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7195,"candidatesTokenCount":3,"totalTokenCount":7198,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7195}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":3}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"BANANA\n"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10040,"totalTokenCount":10040,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10040}]}},{"candidates":[{"content":{"parts":[{"text":""}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7203,"candidatesTokenCount":3,"totalTokenCount":7206,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7203}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":3}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"BANANA\n"}],"role":"model"}}],"usageMetadata":{"promptTokenCount":10030,"totalTokenCount":10030,"promptTokensDetails":[{"modality":"TEXT","tokenCount":10030}]}},{"candidates":[{"content":{"parts":[{"text":""}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7195,"candidatesTokenCount":3,"totalTokenCount":7198,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7195}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":3}]}}]}
|
|
{"method":"generateContentStream","response":[{"candidates":[{"content":{"parts":[{"text":"BANANA"}],"role":"model"},"finishReason":"STOP"}],"usageMetadata":{"promptTokenCount":7203,"candidatesTokenCount":2,"totalTokenCount":7205,"promptTokensDetails":[{"modality":"TEXT","tokenCount":7203}],"candidatesTokensDetails":[{"modality":"TEXT","tokenCount":2}]}}]}
|