fix(tui): apply path/@ completion on Enter

Completion selection on Enter was gated to slash commands only
(value.startsWith('/')), so @file, ./path, and ~/path completions fell
through and submitted the incomplete input instead of inserting the
highlighted row.

Guard on completions.length && compReplace > 0 — useCompletion already
scopes population to slash and path tokens, and the next !== value check
keeps plain-text submits working when the completion is already applied.
This commit is contained in:
Brooklyn Nicholson 2026-04-21 10:42:31 -05:00
parent ce98e1ef11
commit 4b0686f63d
22 changed files with 206 additions and 76 deletions

View file

@ -5,6 +5,7 @@ const originalPlatform = process.platform
async function importPlatform(platform: NodeJS.Platform) {
vi.resetModules()
Object.defineProperty(process, 'platform', { value: platform })
return import('../lib/platform.js')
}