Repository navigation
fix(webview): preserve existing text when selecting slash command at start #11728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
johnnyeric
merged 20 commits into
Kilo-Org:main
from
rakshith1928:fix/slash-command-preserve-inputs
Aug 14, 2026
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
43b524f
fix(webview): preserve existing text when selecting slash command at …
rakshith1928 e5c1bdd
remove unwanted check not related to pr
rakshith1928 66f42c1
fix(webview): update test mocks for new select() cursor usage and add…
rakshith1928 74cb1ad
chore: add changeset for slash command trailing text fix
rakshith1928 9cc9f73
fix(webview): add slashEnd signal to fix cursor-corruption bug when s…
rakshith1928 de3db79
chore(test): fix redundant double type assertion in use-slash-command…
rakshith1928 669fcc2
chore(test): fix memory test state and add memory command trailing te…
rakshith1928 828f038
Merge branch 'main' into fix/slash-command-preserve-inputs
rakshith1928 64f16b2
address the pr review comments
rakshith1928 5906cbb
Merge remote-tracking branch 'upstream/main' into fix/slash-command-p…
rakshith1928 bf2810a
fix(test): use full text length as onInput cursor in review slash test
rakshith1928 b5d436f
Merge branch 'fix/slash-command-preserve-inputs' of https://github.co…
rakshith1928 a9ff187
fix: preserve trailing text on no-argument /memory commands
rakshith1928 b578ca0
refactor: drop review commit and review pr slash suggestions
rakshith1928 b1aa2bc
fix(webview): place caret at start when preserving trailing text for …
rakshith1928 c1b7438
fix(kilo-memory): preserve trailing text for /memory show like other …
rakshith1928 c26bb84
fix(kilo-vscode): update mirrored /memory show fixture for rest field
rakshith1928 4664540
fix(kilo-vscode): format prompt-input-utils.ts to satisfy prettier
rakshith1928 366a1c9
fix(kilo-vscode): place caret at start for preserved /memory text
rakshith1928 d1cc665
Merge branch 'main' into fix/slash-command-preserve-inputs
rakshith1928 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "kilo-code": patch | ||
| --- | ||
|
|
||
| Typing extra text after the `/memory show` command (for example `/memory show my notes`) used to clear that text from the chat input when the command ran. The text now stays in the input so you don't lose what you typed. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "kilo-code": patch | ||
| --- | ||
|
|
||
| Preserve existing text when selecting a slash command at the start of the chat input. Previously, typing `/new` or another slash command with text before the cursor would wipe the existing content entirely. |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WARNING: The mirrored fixture test in the VS Code package wasn't updated for the new
restfieldShownow always carriesrest(""even with no trailing text), soparseMemoryCommand("/memory show")returns{ kind: "show", rest: "" }. The kilo-memory suite'sexpected()was updated accordingly, butpackages/kilo-vscode/tests/unit/memory-command.test.ts(line 35) still returns{ kind: "show" }while consuming this same sharedcommand-cases.json— so the existing show fixtures (/mem show,/memory project show) and the newshow preserves trailing textfixture all failtoEqualthere. Suggest mirroring the change:if (item.result === "show") return { kind: "show", rest: item.rest ?? "" }.Reply with
@kilocode-bot fix itto have Kilo Code address this issue.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed both follow-ups. I made the action-command caret position explicit when preserving trailing text, and updated the shared VS Code memory-command fixture expectations for the new show.rest field. Also added coverage for /memory show preserving trailing text.