MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / nextGeneratedAgentId

Method nextGeneratedAgentId

packages/agent-core/src/session/index.ts:948–955  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

946 }
947
948 private nextGeneratedAgentId(): string {
949 while (true) {
950 const id = `agent-${this.agentIdCounter++}`;
951 if (this.agents.has(id)) continue;
952 if (this.metadata.agents[id] !== undefined) continue;
953 return id;
954 }
955 }
956
957 private requireMainAgent(): Agent {
958 const agent = this.getReadyAgent('main');

Callers 1

createAgentMethod · 0.95

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected