feat(cli): unify /chat and /resume command UX (#20256)

This commit is contained in:
Dmitry Lyalin
2026-03-08 18:50:51 -04:00
committed by GitHub
parent d012929a28
commit d41735d6a9
18 changed files with 619 additions and 90 deletions

View File

@@ -374,7 +374,7 @@ export function useCommandCompletion({
}
// Apply space padding for slash commands (needed for subcommands like "/chat list")
let suggestionText = suggestion.value;
let suggestionText = suggestion.insertValue ?? suggestion.value;
if (completionMode === CompletionMode.SLASH) {
// Add leading space if completing a subcommand (cursor is after parent command with no space)
if (start === end && start > 1 && currentLine[start - 1] !== ' ') {
@@ -423,7 +423,7 @@ export function useCommandCompletion({
}
// Add space padding for Tab completion (auto-execute gets padding from getCompletedText)
let suggestionText = suggestion.value;
let suggestionText = suggestion.insertValue ?? suggestion.value;
if (completionMode === CompletionMode.SLASH) {
if (
start === end &&