mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-08-09 00:16:57 -07:00
feat(cli): A2A Server Primary Agent Support
- Added a new `/agents use <name>` command to allow users to set a remote agent as the primary agent for the current session. - Implemented `A2AStreamingAdapter` to seamlessly integrate A2A server task polling with the existing CLI streaming UX. - Mapped A2A server task status updates to Gemini `Thought` events, providing native thinking visualization in the terminal. - Updated `nonInteractiveCli` and `useGeminiStream` to dynamically route requests through the `A2AStreamingAdapter` when a session primary agent is configured. - Ensured context history continuity by maintaining `contextId` and `taskId` across requests within the adapter.
This commit is contained in:
@@ -93,6 +93,7 @@ describe('ExtensionManager theme loading', () => {
|
||||
startExtension: vi.fn().mockResolvedValue(undefined),
|
||||
}),
|
||||
getGeminiClient: () => ({
|
||||
getSessionPrimaryAgent: vi.fn().mockReturnValue(null),
|
||||
isInitialized: () => false,
|
||||
updateSystemInstruction: vi.fn(),
|
||||
setTools: vi.fn(),
|
||||
@@ -203,6 +204,7 @@ describe('ExtensionManager theme loading', () => {
|
||||
setGeminiMdFilePaths: vi.fn(),
|
||||
getEnableExtensionReloading: () => true,
|
||||
getGeminiClient: () => ({
|
||||
getSessionPrimaryAgent: vi.fn().mockReturnValue(null),
|
||||
isInitialized: () => false,
|
||||
updateSystemInstruction: vi.fn(),
|
||||
setTools: vi.fn(),
|
||||
|
||||
Reference in New Issue
Block a user