Label: enhancement, good first issue
Milestone:
Projects:
Problem Statement
Thuki already has useful slash commands like /tldr, /rewrite, and /bullets. A /explain command would let users highlight any text (code, jargon, a paragraph) and instantly get a plain-English explanation, without having to type out a prompt manually.
Proposed Solution
Add a /explain command to the slash command registry in src/config/commands.ts.
The command should:
- Accept highlighted text or typed text as input
- Ask the model to explain it in plain, simple language
- Output only the explanation (no preamble like "Sure! Here's an explanation...")
All the plumbing is already in place. Adding a command here is all that's needed: the autocomplete UI, the tab-completion, and the prompt builder all pick it up automatically.
File to edit: src/config/commands.ts
Follow the exact same shape as the existing entries (e.g. /tldr or /bullets). Each command needs:
trigger — the slash string, e.g. "/explain"
label — same as trigger
description — one-line hint shown in the autocomplete dropdown
docs — human-facing documentation fields (summary, usage, examples, behavior)
promptHelp — short model-facing summary
promptTemplate — the actual prompt sent to the model, using $INPUT as the placeholder for the user's text
A suggested prompt template to start from:
Explain the following in plain, simple language. Assume the reader is smart but not familiar with the topic. Be concise. Output only the explanation, no introduction or sign-off.
Text: $INPUT
Feel free to improve the wording.
Definition of Done
Label: enhancement, good first issue
Milestone:
Projects:
Problem Statement
Thuki already has useful slash commands like
/tldr,/rewrite, and/bullets. A/explaincommand would let users highlight any text (code, jargon, a paragraph) and instantly get a plain-English explanation, without having to type out a prompt manually.Proposed Solution
Add a
/explaincommand to the slash command registry insrc/config/commands.ts.The command should:
All the plumbing is already in place. Adding a command here is all that's needed: the autocomplete UI, the tab-completion, and the prompt builder all pick it up automatically.
File to edit:
src/config/commands.tsFollow the exact same shape as the existing entries (e.g.
/tldror/bullets). Each command needs:trigger— the slash string, e.g."/explain"label— same as triggerdescription— one-line hint shown in the autocomplete dropdowndocs— human-facing documentation fields (summary,usage,examples,behavior)promptHelp— short model-facing summarypromptTemplate— the actual prompt sent to the model, using$INPUTas the placeholder for the user's textA suggested prompt template to start from:
Feel free to improve the wording.
Definition of Done
/explainappears in theCOMMANDSarray insrc/config/commands.ts/explainin the ask bar shows it in the autocomplete suggestions/explainwith highlighted or typed text sends the prompt to the model and streams a responsebun run test:all:coveragepasses (100% coverage maintained)bun run validate-buildpasses with zero warnings and zero errors