Download packages/agent-core-v2/src/session/agentLifecycle/mainAgent.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 489 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/session/agentLifecycle/mainAgent.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/agent-core-v2/src/session/agentLifecycle/mainAgent.ts
-
curl -L -o mainAgent.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/session/agentLifecycle/mainAgent.ts
489 Bytes
| import type { ISessionScopeHandle } from '#/_base/di/scope'; | |
| import type { AgentContext } from '#/agent/agentContext/agentContext'; | |
| import { type CreateAgentOptions, IAgentLifecycleService, MAIN_AGENT_ID } from './agentLifecycle'; | |
| export async function ensureMainAgent( | |
| session: ISessionScopeHandle, | |
| opts?: Omit<CreateAgentOptions, 'agentId'>, | |
| ): Promise<AgentContext> { | |
| return session.accessor.get(IAgentLifecycleService).create({ | |
| ...opts, | |
| agentId: MAIN_AGENT_ID, | |
| }); | |
| } | |