feat(cli): add /compact alias for /compress command (#21711)

This commit is contained in:
Jack Wotherspoon
2026-03-09 16:45:42 +01:00
committed by GitHub
parent 37ffd608fd
commit a253938ac5
2 changed files with 9 additions and 1 deletions

View File

@@ -131,4 +131,12 @@ describe('compressCommand', () => {
await compressCommand.action!(context, '');
expect(context.ui.setPendingItem).toHaveBeenCalledWith(null);
});
describe('metadata', () => {
it('should have the correct name and aliases', () => {
expect(compressCommand.name).toBe('compress');
expect(compressCommand.altNames).toContain('summarize');
expect(compressCommand.altNames).toContain('compact');
});
});
});

View File

@@ -11,7 +11,7 @@ import { CommandKind } from './types.js';
export const compressCommand: SlashCommand = {
name: 'compress',
altNames: ['summarize'],
altNames: ['summarize', 'compact'],
description: 'Compresses the context by replacing it with a summary',
kind: CommandKind.BUILT_IN,
autoExecute: true,