Download packages/agent-core-v2/src/agent/fullCompaction/compactionInstruction.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 584 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/agent/fullCompaction/compactionInstruction.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/packages/agent-core-v2/src/agent/fullCompaction/compactionInstruction.ts
-
curl -L -o compactionInstruction.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/packages/agent-core-v2/src/agent/fullCompaction/compactionInstruction.ts
584 Bytes
| import { renderPrompt } from '#/_base/utils/render-prompt'; | |
| import compactionInstructionTemplate from './compaction-instruction.md?raw'; | |
| export interface CompactionInstructionInput { | |
| readonly customInstruction?: string; | |
| } | |
| export function renderCompactionInstruction(input: CompactionInstructionInput): string { | |
| const customInstruction = input.customInstruction?.trim() ?? ''; | |
| return renderPrompt(compactionInstructionTemplate, { | |
| custom_instruction_block: | |
| customInstruction.length > 0 ? `\nOptional user instruction:\n${customInstruction}\n` : '', | |
| }).trimEnd(); | |
| } | |