fix(cli): improve command conflict handling for skills (#21942)

This commit is contained in:
N. Taylor Mullen
2026-03-14 16:33:14 -07:00
committed by GitHub
parent 0bf7ea60c5
commit bd590bbde6
11 changed files with 76 additions and 9 deletions
+2 -1
View File
@@ -480,6 +480,7 @@ describe('oauth2', () => {
expect(fs.existsSync(googleAccountPath)).toBe(true);
if (fs.existsSync(googleAccountPath)) {
const cachedGoogleAccount = fs.readFileSync(googleAccountPath, 'utf-8');
expect(JSON.parse(cachedGoogleAccount)).toEqual({
active: 'test-user-code-account@gmail.com',
old: [],
@@ -1349,7 +1350,7 @@ describe('oauth2', () => {
let dataHandler: ((data: Buffer) => void) | undefined;
await vi.waitFor(() => {
const dataCall = stdinOnSpy.mock.calls.find(
(call: [string, ...unknown[]]) => call[0] === 'data',
(call: [string | symbol, ...unknown[]]) => call[0] === 'data',
);
dataHandler = dataCall?.[1] as ((data: Buffer) => void) | undefined;
if (!dataHandler) throw new Error('stdin handler not registered yet');
+2
View File
@@ -27,6 +27,8 @@ export interface SkillDefinition {
disabled?: boolean;
/** Whether the skill is a built-in skill. */
isBuiltin?: boolean;
/** The name of the extension that provided this skill, if any. */
extensionName?: string;
}
export const FRONTMATTER_REGEX =
@@ -89,6 +89,7 @@ const mockHeapStatistics = {
total_global_handles_size: 8192,
used_global_handles_size: 4096,
external_memory: 2097152,
total_allocated_bytes: 31457280,
};
const mockHeapSpaceStatistics = [