Register compact command in slash commands palette and registry - #1265
Register compact command in slash commands palette and registry#1265nordicnode wants to merge 1 commit into
Conversation
- Add compact slash command with summarize alias to ALL_SLASH_COMMANDS in cli/src/data/slash-commands.ts. - Define compact command in ALL_COMMANDS via defineCommand in cli/src/commands/command-registry.ts. - Implement handleCompactCommand in cli/src/commands/compact.ts with empty-history guard and mid-turn queue safety. - Add unit test coverage in cli/src/commands/__tests__/compact-command.test.ts (8 test cases) and track in command-args.test.ts.
|
Nice, focused change that follows the established command pattern (mirrors One thing worth double-checking before porting: Minor nit: the Overall the CLI-side wiring is clean and in scope; flag the backend-behavior assumption for the maintainer doing the port. |
Summary
/compact(and alias/summarize) slash command incli/src/data/slash-commands.tsandcli/src/commands/command-registry.ts.handleCompactCommandincli/src/commands/compact.tswith early empty-history bailout (Nothing to compact — the conversation is empty.) and mid-turn queue safety (params.addToQueue).cli/src/commands/__tests__/compact-command.test.ts(8 test cases) and updatescli/src/commands/__tests__/command-args.test.ts.Test plan
[✓]
bun test --config=/dev/null --preload ../sdk/test/setup-env.ts src/commands/__tests__/compact-command.test.ts[✓]
bun test --config=/dev/null --preload ../sdk/test/setup-env.ts src/commands/__tests__/router-input.test.ts[✓]
bun test --config=/dev/null --preload ../sdk/test/setup-env.ts src/commands/__tests__/command-args.test.ts[✓]
bun test --config=/dev/null --preload ../sdk/test/setup-env.ts src/data/slash-commands.test.ts[✓]
bun run --cwd cli typecheck[✓]
bun run build:sdk[✓]
bun freebuff/cli/build.ts 0.0.0-ci[✓]
bun cli/scripts/smoke-binary.ts cli/bin/freebuff[✓] PR hygiene check passed