Download packages/agent-core-v2/src/agent/fullCompaction/fullCompaction.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/agent/fullCompaction/fullCompaction.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/agent-core-v2/src/agent/fullCompaction/fullCompaction.ts
-
curl -L -o fullCompaction.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/agent/fullCompaction/fullCompaction.ts
1.01 kB
| import type { | |
| CompactionResult, | |
| CompactionSource, | |
| } from './types'; | |
| import { createDecorator } from "#/_base/di/instantiation"; | |
| import type { Event } from '#/_base/event'; | |
| import type { Hooks } from '#/hooks'; | |
| export interface FullCompactionInput { | |
| readonly source: CompactionSource; | |
| readonly instruction?: string; | |
| } | |
| export interface FullCompactionTask { | |
| readonly abortController: AbortController; | |
| readonly promise: Promise<CompactionResult>; | |
| readonly trigger: CompactionSource; | |
| readonly tokenCount: number; | |
| readonly traceId?: string; | |
| } | |
| export interface IAgentFullCompactionService { | |
| readonly _serviceBrand: undefined; | |
| readonly compacting: FullCompactionTask | null; | |
| begin(input: FullCompactionInput): boolean; | |
| cancel(): void; | |
| readonly hooks: Hooks<{ | |
| onWillCompact: FullCompactionTask; | |
| }>; | |
| readonly onDidFinishCompaction: Event<FullCompactionTask>; | |
| } | |
| export const IAgentFullCompactionService = createDecorator<IAgentFullCompactionService>('agentFullCompactionService'); | |