update /docs to new slash command arch (#4133)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Harold Mciver
2025-07-16 11:56:05 -04:00
committed by GitHub
parent f4cd0055fd
commit ddcac4201d
5 changed files with 145 additions and 22 deletions

View File

@@ -10,6 +10,7 @@ import { type SlashCommand } from '../ui/commands/types.js';
import { memoryCommand } from '../ui/commands/memoryCommand.js';
import { helpCommand } from '../ui/commands/helpCommand.js';
import { clearCommand } from '../ui/commands/clearCommand.js';
import { docsCommand } from '../ui/commands/docsCommand.js';
import { chatCommand } from '../ui/commands/chatCommand.js';
import { authCommand } from '../ui/commands/authCommand.js';
import { themeCommand } from '../ui/commands/themeCommand.js';
@@ -30,6 +31,9 @@ vi.mock('../ui/commands/helpCommand.js', () => ({
vi.mock('../ui/commands/clearCommand.js', () => ({
clearCommand: { name: 'clear', description: 'Mock Clear' },
}));
vi.mock('../ui/commands/docsCommand.js', () => ({
docsCommand: { name: 'docs', description: 'Mock Docs' },
}));
vi.mock('../ui/commands/authCommand.js', () => ({
authCommand: { name: 'auth', description: 'Mock Auth' },
}));
@@ -56,7 +60,7 @@ vi.mock('../ui/commands/mcpCommand.js', () => ({
}));
describe('CommandService', () => {
const subCommandLen = 12;
const subCommandLen = 13;
describe('when using default production loader', () => {
let commandService: CommandService;
@@ -88,6 +92,7 @@ describe('CommandService', () => {
expect(commandNames).toContain('memory');
expect(commandNames).toContain('help');
expect(commandNames).toContain('clear');
expect(commandNames).toContain('docs');
expect(commandNames).toContain('chat');
expect(commandNames).toContain('theme');
expect(commandNames).toContain('stats');
@@ -127,6 +132,7 @@ describe('CommandService', () => {
chatCommand,
clearCommand,
compressCommand,
docsCommand,
extensionsCommand,
helpCommand,
mcpCommand,