MoonshotAI / MoonshotAI/kimi-code

Feature request: support slash commands mid-prompt

Open
#2,497 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
7.5k
Forks
1.2k
Avg merge
11h 53m
Merged PRs (30d)
350

Description

Problem

Slash commands are only recognized at the very start of the input, which creates two daily friction points:

  1. Skills and plugin commands can't be embedded in a natural prompt. If I want to give the skill context before invoking it — e.g. review this diff /skill:code-style with care — I can't: the command only activates when the message starts with it, so the text I already typed either has to be discarded or becomes a plain message with no activation at all.

  2. Mode toggles and panels require a cleared input. Halfway through writing a long prompt I often realize I want Plan mode, a different model, or a permission change. Today that means clearing (or submitting) my draft, running /plan / /model, and retyping the prompt.

Proposal

Allow slash commands mid-prompt:

  • Typing / after existing text offers completion for skill/plugin commands and a curated set of quick built-ins (toggles, pickers, info panels); other built-ins stay leading-only.
  • Skill/plugin tokens in free text activate on submit, with the surrounding text as the command's input (exact-name match only, so /tmp stays plain text).
  • Quick built-ins (/plan, /model, /yolo, …) run immediately when selected, leaving the rest of the draft in place.

A working implementation with tests and docs is available in #2496 (closed per the "discuss first" policy — happy to reopen or rework it based on your feedback).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the working implementation, tests, and docs referenced in issue #2496, then compare them with this proposal's mid-prompt skill/plugin and quick built-in behavior. Done means the proposed command completion, activation, draft preservation, and leading-only exceptions are covered consistently by the implementation, tests, and documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.