summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks/useCompletion.test.ts
diff options
context:
space:
mode:
authorchristine betts <[email protected]>2025-07-25 20:56:33 +0000
committerGitHub <[email protected]>2025-07-25 20:56:33 +0000
commiteb65034117f7722554a717de034e891ba1996e93 (patch)
treef279bee5ca55b0e447eabc70a11e96de307d76f3 /packages/cli/src/ui/hooks/useCompletion.test.ts
parentde968877895a8ae5f0edb83a43b37fa190cc8ec9 (diff)
Load and use MCP server prompts as slash commands in the CLI (#4828)
Co-authored-by: harold <[email protected]> Co-authored-by: N. Taylor Mullen <[email protected]>
Diffstat (limited to 'packages/cli/src/ui/hooks/useCompletion.test.ts')
-rw-r--r--packages/cli/src/ui/hooks/useCompletion.test.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/cli/src/ui/hooks/useCompletion.test.ts b/packages/cli/src/ui/hooks/useCompletion.test.ts
index cd525435..da6a7ab3 100644
--- a/packages/cli/src/ui/hooks/useCompletion.test.ts
+++ b/packages/cli/src/ui/hooks/useCompletion.test.ts
@@ -1100,7 +1100,7 @@ describe('useCompletion', () => {
result.current.handleAutocomplete(0);
});
- expect(mockBuffer.setText).toHaveBeenCalledWith('/memory');
+ expect(mockBuffer.setText).toHaveBeenCalledWith('/memory ');
});
it('should append a sub-command when the parent is complete', () => {
@@ -1145,7 +1145,7 @@ describe('useCompletion', () => {
result.current.handleAutocomplete(1); // index 1 is 'add'
});
- expect(mockBuffer.setText).toHaveBeenCalledWith('/memory add');
+ expect(mockBuffer.setText).toHaveBeenCalledWith('/memory add ');
});
it('should complete a command with an alternative name', () => {
@@ -1190,7 +1190,7 @@ describe('useCompletion', () => {
result.current.handleAutocomplete(0);
});
- expect(mockBuffer.setText).toHaveBeenCalledWith('/help');
+ expect(mockBuffer.setText).toHaveBeenCalledWith('/help ');
});
it('should complete a file path', async () => {