feat(cli): Suppress slash command execution and suggestions in shell … (#11380)

This commit is contained in:
Jainam M
2025-10-17 23:00:27 +05:30
committed by GitHub
parent 795e5134c7
commit 659b0557be
6 changed files with 154 additions and 36 deletions
@@ -789,6 +789,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -816,6 +817,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -843,6 +845,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -870,6 +873,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -897,6 +901,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -925,6 +930,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -952,6 +958,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -980,6 +987,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -1008,6 +1016,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -1036,6 +1045,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -1064,6 +1074,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -1094,6 +1105,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -1122,6 +1134,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -1152,6 +1165,7 @@ describe('InputPrompt', () => {
mockSlashCommands,
mockCommandContext,
false,
false,
expect.any(Object),
);
@@ -1161,7 +1175,6 @@ describe('InputPrompt', () => {
describe('vim mode', () => {
it('should not call buffer.handleInput when vim mode is enabled and vim handles the input', async () => {
props.vimModeEnabled = true;
props.vimHandleInput = vi.fn().mockReturnValue(true); // Mock that vim handled it.
const { stdin, unmount } = renderWithProviders(
<InputPrompt {...props} />,
@@ -1177,7 +1190,6 @@ describe('InputPrompt', () => {
});
it('should call buffer.handleInput when vim mode is enabled but vim does not handle the input', async () => {
props.vimModeEnabled = true;
props.vimHandleInput = vi.fn().mockReturnValue(false); // Mock that vim did NOT handle it.
const { stdin, unmount } = renderWithProviders(
<InputPrompt {...props} />,
@@ -155,6 +155,7 @@ export const InputPrompt: React.FC<InputPromptProps> = ({
slashCommands,
commandContext,
reverseSearchActive,
shellModeActive,
config,
);