feat(vscode): support bidirectional prompt input - #11918
Merged
marius-kilocode merged 1 commit intoJul 3, 2026
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (5 files)
Reviewed by claude-sonnet-5-20260630 · Input: 22 · Output: 8.5K · Cached: 610.2K Review guidance: REVIEW.md from base branch |
Collaborator
|
Thanks @mjnaderi , works great! |
marius-kilocode
approved these changes
Jul 3, 2026
NJ-2020
pushed a commit
to NJ-2020/kilocode
that referenced
this pull request
Jul 4, 2026
5 tasks
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 2026
t7tran
pushed a commit
to t7tran/kilocode
that referenced
this pull request
Aug 14, 2026
…-support feat(vscode): support bidirectional prompt input
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue
Using right-to-left languages in the prompt input is difficult because the input does not resolve text direction from the prompt content. Right-to-left prompts that include left-to-right content such as file paths, code, URLs, or mentions can appear in the wrong visual/logical order, making them hard to read, navigate, and edit.
Context
Add bidirectional text support to the VS Code prompt input.
The prompt can contain right-to-left languages mixed with left-to-right content such as file paths, code, URLs, and file mentions. The prompt input also has two visual layers: the real textarea and the overlay that renders highlighted mentions / ghost text. Both layers need to resolve direction the same way so mixed-direction prompts render and edit correctly.
Implementation
The textarea and highlight overlay now use
dir="auto"so the browser resolves the base direction from the prompt text and applies bidirectional text layout consistently across both layers.This also required updating file-mention arrow navigation. Previously
handleArrowKeyassumedArrowRightalways moved forward through the textarea value andArrowLeftalways moved backward. That was correct before bidirectional prompt support, but right-to-left text reverses the visual meaning of horizontal arrow keys. The mention-skip logic now checks the textarea’s resolved direction before deciding which side of an atomic mention block to jump to.Screenshots
How to Test
Manual/local verification
Reviewer test steps
Blocked checks and substitute verification
Checklist