Download src/commands/compact/index.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 530 Bytes
-
https://huggingface.co/chenbhao/codev/resolve/main/src/commands/compact/index.ts
- Command line
-
hf download hf://chenbhao/codev/src/commands/compact/index.ts
-
curl -L -o index.ts https://huggingface.co/chenbhao/codev/resolve/main/src/commands/compact/index.ts
530 Bytes
| import type { Command } from '../../commands.js' | |
| import { isEnvTruthy } from '../../utils/envUtils.js' | |
| const compact = { | |
| type: 'local', | |
| name: 'compact', | |
| description: | |
| 'Clear conversation history but keep a summary in context. Optional: /compact [instructions for summarization]', | |
| isEnabled: () => !isEnvTruthy(process.env.DISABLE_COMPACT), | |
| supportsNonInteractive: true, | |
| argumentHint: '<optional custom summarization instructions>', | |
| load: () => import('./compact.js'), | |
| } satisfies Command | |
| export default compact | |