Skip to content

Commit 33c9982

Browse files
jackwotherspoonkunal-10-cloud
authored andcommitted
feat(cli): add /compact alias for /compress command (google-gemini#21711)
1 parent 30a472b commit 33c9982

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

packages/cli/src/ui/commands/compressCommand.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,4 +131,12 @@ describe('compressCommand', () => {
131131
await compressCommand.action!(context, '');
132132
expect(context.ui.setPendingItem).toHaveBeenCalledWith(null);
133133
});
134+
135+
describe('metadata', () => {
136+
it('should have the correct name and aliases', () => {
137+
expect(compressCommand.name).toBe('compress');
138+
expect(compressCommand.altNames).toContain('summarize');
139+
expect(compressCommand.altNames).toContain('compact');
140+
});
141+
});
134142
});

packages/cli/src/ui/commands/compressCommand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { CommandKind } from './types.js';
1111

1212
export const compressCommand: SlashCommand = {
1313
name: 'compress',
14-
altNames: ['summarize'],
14+
altNames: ['summarize', 'compact'],
1515
description: 'Compresses the context by replacing it with a summary',
1616
kind: CommandKind.BUILT_IN,
1717
autoExecute: true,

0 commit comments

Comments
 (0)