mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
updated /quit to use new slash command arch (#4259)
Co-authored-by: Abhi <abhipatel@google.com>
This commit is contained in:
@@ -25,6 +25,7 @@ import { compressCommand } from '../ui/commands/compressCommand.js';
|
||||
import { mcpCommand } from '../ui/commands/mcpCommand.js';
|
||||
import { editorCommand } from '../ui/commands/editorCommand.js';
|
||||
import { bugCommand } from '../ui/commands/bugCommand.js';
|
||||
import { quitCommand } from '../ui/commands/quitCommand.js';
|
||||
|
||||
// Mock the command modules to isolate the service from the command implementations.
|
||||
vi.mock('../ui/commands/memoryCommand.js', () => ({
|
||||
@@ -75,9 +76,12 @@ vi.mock('../ui/commands/editorCommand.js', () => ({
|
||||
vi.mock('../ui/commands/bugCommand.js', () => ({
|
||||
bugCommand: { name: 'bug', description: 'Mock Bug' },
|
||||
}));
|
||||
vi.mock('../ui/commands/quitCommand.js', () => ({
|
||||
quitCommand: { name: 'quit', description: 'Mock Quit' },
|
||||
}));
|
||||
|
||||
describe('CommandService', () => {
|
||||
const subCommandLen = 16;
|
||||
const subCommandLen = 17;
|
||||
let mockConfig: Mocked<Config>;
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -144,6 +148,7 @@ describe('CommandService', () => {
|
||||
const commandNames = tree.map((cmd) => cmd.name);
|
||||
expect(commandNames).toContain('ide');
|
||||
expect(commandNames).toContain('editor');
|
||||
expect(commandNames).toContain('quit');
|
||||
});
|
||||
|
||||
it('should overwrite any existing commands when called again', async () => {
|
||||
@@ -183,6 +188,7 @@ describe('CommandService', () => {
|
||||
mcpCommand,
|
||||
memoryCommand,
|
||||
privacyCommand,
|
||||
quitCommand,
|
||||
statsCommand,
|
||||
themeCommand,
|
||||
toolsCommand,
|
||||
|
||||
Reference in New Issue
Block a user