Skip to content

Conversation

@marius-kilocode
Copy link
Collaborator

@marius-kilocode marius-kilocode commented Jan 6, 2026

Fixes a regression where typing /... during ask_followup_question would submit the first followup suggestion and hide / command suggestions.

  • Followup menu is suppressed while / or @ autocomplete is active so command/file suggestions remain accessible.
  • Submitting a slash command during an active followup no longer auto-selects followup suggestions afterward.
  • Followups are still dismissed for disruptive commands like /clear and /new.

Tests:

  • cd cli && pnpm test src/state/atoms/__tests__/keyboard.test.ts

Changeset:

  • Adds @kilocode/cli patch changeset for the fix.

This is a follow-up for #4797 . Issue flagged by @Drilmo via comment.

@changeset-bot
Copy link

changeset-bot bot commented Jan 6, 2026

🦋 Changeset detected

Latest commit: fbdadc5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@kilocode/cli Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@kiloconnect
Copy link
Contributor

kiloconnect bot commented Jan 6, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Overview

This PR fixes a bug where slash commands (like /help, /clear, /new) were being intercepted by followup suggestions during ask_followup_question prompts in the CLI. The implementation is clean and well-tested.

Key Changes Reviewed

  1. New derived atom followupSuggestionsMenuVisibleAtom - Properly hides followup menu when slash command autocomplete or file mention autocomplete is active
  2. Updated submitInputAtom - Correctly preserves followup suggestions after most slash commands, with special handling for commands like /clear, /new, /exit that should dismiss them
  3. Comprehensive test coverage - New tests verify both the slash command submission and the followup dismissal behavior
Files Reviewed (8 files)
  • .changeset/cli-followup-slash-commands.md - Proper changeset for CLI package
  • cli/src/state/atoms/__tests__/keyboard.test.ts - New tests for slash command vs followup behavior
  • cli/src/state/atoms/index.ts - Export of new atom
  • cli/src/state/atoms/keyboard.ts - Core fix implementation
  • cli/src/state/atoms/ui.ts - New derived atom
  • cli/src/state/hooks/useFollowupSuggestions.ts - Updated import
  • cli/src/state/hooks/useHotkeys.ts - Updated import
  • cli/src/ui/components/__tests__/StatusIndicator.test.tsx - Test fix for atom usage

@marius-kilocode marius-kilocode enabled auto-merge (squash) January 6, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants