fix: positional arguments for MCP prompts (#8034)

This commit is contained in:
Luke Schlangen
2025-09-15 10:13:21 -05:00
committed by GitHub
parent 7470133a13
commit 5cbab75c7d
4 changed files with 368 additions and 18 deletions
@@ -549,7 +549,13 @@ describe('useSlashCompletion', () => {
await waitFor(() => {
expect(mockCompletionFn).toHaveBeenCalledWith(
mockCommandContext,
expect.objectContaining({
invocation: {
raw: '/chat resume my-ch',
name: 'resume',
args: 'my-ch',
},
}),
'my-ch',
);
});
@@ -591,7 +597,16 @@ describe('useSlashCompletion', () => {
);
await waitFor(() => {
expect(mockCompletionFn).toHaveBeenCalledWith(mockCommandContext, '');
expect(mockCompletionFn).toHaveBeenCalledWith(
expect.objectContaining({
invocation: {
raw: '/chat resume',
name: 'resume',
args: '',
},
}),
'',
);
});
await waitFor(() => {