mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-14 22:02:59 -07:00
docs(core): update comments for composite session key in RemoteSessionInvocation
This commit is contained in:
@@ -40,15 +40,16 @@ export interface SubagentInvocationOptions {
|
|||||||
* which wraps the A2A client streaming behind the AgentProtocol interface.
|
* which wraps the A2A client streaming behind the AgentProtocol interface.
|
||||||
*
|
*
|
||||||
* Cross-invocation A2A session state (contextId/taskId) is persisted via a
|
* Cross-invocation A2A session state (contextId/taskId) is persisted via a
|
||||||
* static map keyed by agent name, matching the original RemoteAgentInvocation
|
* static map keyed by a composite of agent name and target URL. This ensures
|
||||||
* behavior.
|
* agents with the same name but different endpoints maintain independent state.
|
||||||
*/
|
*/
|
||||||
export class RemoteSessionInvocation extends BaseToolInvocation<
|
export class RemoteSessionInvocation extends BaseToolInvocation<
|
||||||
RemoteAgentInputs,
|
RemoteAgentInputs,
|
||||||
ToolResult
|
ToolResult
|
||||||
> {
|
> {
|
||||||
// Persist A2A conversation state across ephemeral invocation instances.
|
// Persist A2A conversation state across ephemeral invocation instances.
|
||||||
// Keyed by agent name — each remote agent maintains independent state.
|
// Keyed by composite of name + target URL so agents with the same name
|
||||||
|
// but different endpoints don't share state.
|
||||||
private static readonly sessionState = new Map<
|
private static readonly sessionState = new Map<
|
||||||
string,
|
string,
|
||||||
{ contextId?: string; taskId?: string }
|
{ contextId?: string; taskId?: string }
|
||||||
|
|||||||
Reference in New Issue
Block a user