feat: add slash-command autocomplete and multi-line editor mode to TUI input
Maintainers usually reply within 1 day
A pull request for this has already been merged.
- #1368 by @avoidwork — merged
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- javascript
- Domain
- cli
Research direction
Start in src/tui/filePicker.js (deriveFilter, shouldOpenPicker) and src/tui/inputArea.js, which gates the picker, then check how src/tui/app.js renders InputArea. The body still contains an unfilled ${CURRENT_BODY} placeholder, so the original request is missing and the scope should be confirmed first. Done means / opens a command picker that Tab completes, and a multi-line editor mode is reachable from the input.
Written by the indexing model from the issue text.
Description
${CURRENT_BODY}
Audit Findings (for Issue #1356)
src/tui/commandParser.js—CommandParserholds the dispatch table in a private#dispatchMap, populated in the constructor via#register(). ExposeslistCommands()(returns registered command names, excluding internal_-prefixed keys) andhasCommand(name). This is the source for slash-command autocomplete. Note:parse()also routes skill invocations viacontext._skillList, so autocomplete should include skills as well as registered commands.src/tui/filePicker.js— The@file-path autocomplete pattern to mirror. ExportsderiveFilter(value, cursor),shouldOpenPicker(value),replaceToken(value, tokenStart, tokenEnd, path),sortFiles(files), and theFilePickercomponent. ThederiveFilterword-boundary logic is the template for a/-prefix command filter.src/tui/inputPanel.js— Thin wrapper overink-text-input'sTextInput(single-line input). Multi-line editor mode would need a mode toggle here or ininputArea.js.src/tui/inputArea.js— OwnsinputTextstate and thepickerOpengate (viashouldOpenPicker). Renders eitherInputPanelorFilePickerbased onpickerOpen. This is the integration point for both features. The command list would need to be passed in as a prop (e.g.,commandList) sinceInputAreadoes not currently receive theCommandParserinstance.src/tui/app.js:75andsrc/tui/conversationArea.js:109— Both instantiatenew CommandParser().app.jsis whereInputAreais rendered; the command list fromparser.listCommands()would need to be threaded down toInputArea.
Fix Steps
- Expose command list to InputArea — In
app.js, passcommandList={parser.listCommands()}(and optionally the skill list) toInputArea. Add acommandListprop toInputArea. - Add a command filter helper — Add a
deriveCommandFilter(value, cursor)(or similar) mirroringderiveFilterinfilePicker.js, but triggering on/instead of@. ExportshouldOpenCommandPicker(value). - Create a CommandPicker component — Mirror
FilePickerwith aCommandPickerthat filterscommandListby prefix and renders suggestions. Wire Tab-completion to accept a suggestion. - Wire the gate in InputArea — Add a
commandPickerOpenstate and auseEffectgate mirroring thepickerOpenlogic, renderingCommandPickerwhen a/trigger token is present. - Add multi-line editor mode — Add a mode toggle (e.g., Ctrl+E) that spawns
$EDITORviachild_process.spawn, reads the saved content, and callshandleSubmit. Handle$EDITORunset and non-zero exit. - Write tests — Add unit tests for the command filter and editor-mode spawn logic; add integration coverage for the picker gate.
- Verify — Run
npm run test,npm run lint, andnpm run coverageto confirm everything passes.
- Dominant language
- JavaScript
- Stars
- 2
- Forks
- 0
- Avg merge
- 1h 15m
- Merged PRs (30d)
- 237
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from avoidwork/madz
-
feat: add dedicated subagent view to TUIPossibly taken @avoidwork claimed this today. Openapproved feature in progress
Difficulty 4/5 3-5 days Newbie friendliness 22/100
avoidwork/madz#1360 · 1 comment ·
Maintainers usually reply within 1 day
-
feature
Difficulty 4/5 3-5 days Newbie friendliness 22/100
avoidwork/madz#1358 · 1 comment ·
Maintainers usually reply within 1 day
-
feature
Difficulty 5/5 Over a week Newbie friendliness 15/100
avoidwork/madz#1355 · 1 comment ·
Maintainers usually reply within 1 day
-
feature
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
Similar issues
-
factory-active factory-automatic task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
vercel/ai#22796 · 2 comments ·
Maintainers usually reply within 1 day
-
good first issue needs-triage priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
melodic-software/claude-code-plugins#6982 · 1 comment ·
Maintainers usually reply within 1 day
-
chore v2
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
modelcontextprotocol/servers#5115 ·
Maintainers usually reply within 1 day
-
beginner bug good first issue
Difficulty 1/5 Under an hour Newbie friendliness 85/100
philaconvalley/website#168 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
Maintainers usually reply within 1 day