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
@@ -131,4 +131,12 @@ describe('compressCommand', () => {
await compressCommand.action!(context, ''); await compressCommand.action!(context, '');
expect(context.ui.setPendingItem).toHaveBeenCalledWith(null); 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');
});
});
}); });
@@ -11,7 +11,7 @@ import { CommandKind } from './types.js';
export const compressCommand: SlashCommand = { export const compressCommand: SlashCommand = {
name: 'compress', name: 'compress',
altNames: ['summarize'], altNames: ['summarize', 'compact'],
description: 'Compresses the context by replacing it with a summary', description: 'Compresses the context by replacing it with a summary',
kind: CommandKind.BUILT_IN, kind: CommandKind.BUILT_IN,
autoExecute: true, autoExecute: true,