/ commands / compact / index.ts
index.ts
 1  import type { Command } from '../../commands.js'
 2  import { isEnvTruthy } from '../../utils/envUtils.js'
 3  
 4  const 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  
15  export default compact