mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 07:10:55 +00:00
prefactor(commands): Command Service Prefactor for Extensible Commands (#4511)
This commit is contained in:
parent
7a9821607b
commit
2a95c8287e
36 changed files with 919 additions and 720 deletions
|
|
@ -66,13 +66,13 @@ describe('useCompletion', () => {
|
|||
mockSlashCommands = [
|
||||
{
|
||||
name: 'help',
|
||||
altName: '?',
|
||||
altNames: ['?'],
|
||||
description: 'Show help',
|
||||
action: vi.fn(),
|
||||
},
|
||||
{
|
||||
name: 'stats',
|
||||
altName: 'usage',
|
||||
altNames: ['usage'],
|
||||
description: 'check session stats. Usage: /stats [model|tools]',
|
||||
action: vi.fn(),
|
||||
},
|
||||
|
|
@ -410,7 +410,7 @@ describe('useCompletion', () => {
|
|||
});
|
||||
|
||||
it.each([['/?'], ['/usage']])(
|
||||
'should not suggest commands when altName is fully typed',
|
||||
'should not suggest commands when altNames is fully typed',
|
||||
(altName) => {
|
||||
const { result } = renderHook(() =>
|
||||
useCompletion(
|
||||
|
|
@ -427,7 +427,7 @@ describe('useCompletion', () => {
|
|||
},
|
||||
);
|
||||
|
||||
it('should suggest commands based on partial altName matches', () => {
|
||||
it('should suggest commands based on partial altNames matches', () => {
|
||||
const { result } = renderHook(() =>
|
||||
useCompletion(
|
||||
'/usag', // part of the word "usage"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue