prefactor(commands): Command Service Prefactor for Extensible Commands (#4511)

This commit is contained in:
Abhi
2025-07-20 16:57:34 -04:00
committed by GitHub
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"