forked from
oppi.li/claude-code
source dump of claude code
1import type { Command } from '../../commands.js'
2import { isEnvTruthy } from '../../utils/envUtils.js'
3
4const compact = {
5 type: 'local',
6 name: 'compact',
7 description:
8 'Clear conversation history but keep a summary in context. Optional: /compact [instructions for summarization]',
9 isEnabled: () => !isEnvTruthy(process.env.DISABLE_COMPACT),
10 supportsNonInteractive: true,
11 argumentHint: '<optional custom summarization instructions>',
12 load: () => import('./compact.js'),
13} satisfies Command
14
15export default compact