mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-13 12:14:19 +00:00
fix(copilot): refine ownership checks and command error handling
This commit is contained in:
1 parent
1fd128e50f
commit
930d66fc0d
6 files changed
+27
-39
No files matched your search
@@ -2,7 +2,6 @@ import { describe, expect, it } from 'bun:test';
|
||||
import {
|
||||
COPILOT_SUBCOMMANDS,
|
||||
COPILOT_SUBCOMMAND_TOKENS,
|
||||
isLikelyCopilotFlagAlias,
|
||||
normalizeCopilotSubcommand,
|
||||
} from '../../../src/copilot/constants';
|
||||
|
||||
@@ -24,13 +23,6 @@ describe('copilot command aliases', () => {
|
||||
expect(normalizeCopilotSubcommand('unknown')).toBe('unknown');
|
||||
});
|
||||
|
||||
it('detects likely mistyped command aliases for entrypoint routing', () => {
|
||||
expect(isLikelyCopilotFlagAlias('--statu')).toBe(true);
|
||||
expect(isLikelyCopilotFlagAlias('--enabl')).toBe(true);
|
||||
expect(isLikelyCopilotFlagAlias('--print')).toBe(false);
|
||||
expect(isLikelyCopilotFlagAlias('--')).toBe(false);
|
||||
});
|
||||
|
||||
it('exposes complete routing token list for ccs entrypoint', () => {
|
||||
for (const subcommand of COPILOT_SUBCOMMANDS) {
|
||||
expect(COPILOT_SUBCOMMAND_TOKENS).toContain(subcommand);
|
||||
|
||||
Reference in new issue
Block a user