[Bug]: The slash menu only opens at the start of the first composer line, so Agent Skills cannot be picked mid-prompt
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 43/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- node.js, typescript
- Lĩnh vực
- ai-infra-agents, cli, frontend
Hướng nghiên cứu
Start with packages/tui/src/tui/engine/components/editor.ts at the slash trigger and context checks, then read packages/tui/src/tui/commands/catalog.ts around matchTuiCommandInput(). Trace how composer selection and Skill dispatch interact, since the issue identifies an unresolved product decision about inline invocation. Done means slash completion works at token boundaries across lines and the selected Skill still invokes with the surrounding prompt preserved.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Product or interface
CLI - interactive TUI
Version
0.7.2 (source tree at commit 86f7772), Node.js v24.22.1
Platform
macOS
OS version and architecture
macOS 26 (darwin 25.6.0) arm64
Issue area
UI / UX
Steps to reproduce
- Start the interactive TUI in a workspace that has at least one enabled Skill. An enabled Skill named
reviewis exposed as/review, and/skills [filter]lists the roster. - On an empty composer, type
/. The slash menu opens and lists built-in commands together with the Skills — this works as expected. - Clear the composer, type
please review this fileand then type/. - Observe that no completion menu appears, and the
/is inserted as plain text. - Repeat with the cursor on the second line of a multi-line prompt and type
/. Again nothing appears.
Expected and actual behavior
Expected: a / typed at a token boundary anywhere in the composer opens the completion menu at the cursor, filtered by the token currently being typed, and selecting an Agent Skill inserts its /name token at the cursor. The user should be able to pick a Skill while a prompt is already half written, not only before the first character.
Actual: the menu only opens when the text before the cursor, on the first line, is empty or exactly /. A / typed after other text, or on any line other than the first, produces no completion at all. Because every Skill is only reachable through its /name token, this also means a half-written prompt cannot invoke any Skill unless the user abandons the text, retypes it after a leading /name, or restarts the message.
Source-level observations
The behaviour is gated in three places, so fixing the composer alone is not sufficient:
packages/tui/src/tui/engine/components/editor.ts:1337— the auto-trigger ischar === '/' && this.isAtStartOfMessage().packages/tui/src/tui/engine/components/editor.ts:2357—isAtStartOfMessage()requiresisSlashMenuAllowed()(line 0 only,:2352) andbeforeCursor.trim() === '' || beforeCursor.trim() === '/'.packages/tui/src/tui/engine/components/editor.ts:2364—isInSlashCommandContext()requirestextBeforeCursor.trimStart().startsWith('/'), so typing more letters after a mid-prompt/also never re-triggers the menu.packages/tui/src/tui/commands/catalog.ts:727—matchTuiCommandInput()splits the trimmed input and only treats the first whitespace-separated token as a command token. Even if the menu were shown and inserted/reviewmid-prompt, Enter would send it to the model as ordinary prompt text instead of dispatching a Skill invocation.
The last point needs a product decision as part of the fix: either move the chosen token to the leading position when the user selects a Skill, or define inline skill invocation explicitly so a mid-prompt token still resolves to the Skill and appends the rest of the message as its instructions.
Desired behavior
- Triggering: typing
/at any token boundary in the composer opens the Skill/command menu, including after existing text and on any line of a multi-line prompt. - Filtering: the menu filters on the token before the cursor, and
Escdismisses it without altering the prompt. - Insertion: the selected Skill's token is inserted at the cursor position, preserving the surrounding text.
- Consistency: the same set of Agent Skills is offered wherever the menu opens, so
/skillsand the/nametokens stay in sync with what/skillsreports as available.
Additional context
I searched the existing issues (open and closed) for this behaviour before filing; the closest ones are distinct:
- #230 — Skills as slash commands in ACP mode (closed); about protocol exposure, not composer completion.
- #555 —
disable-model-invocationsupport. - #498 — recursive
SKILL.mddiscovery. - #263 — on-demand Skill discovery to reduce context overhead.
None covers where the completion menu may be triggered, or how a Skill token is resolved when it is not the leading token of the message.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.3k
- Fork
- 315
- Merge trung bình
- 3 giờ 54 phút
- Pull request đã merge (30 ngày)
- 9
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của MiniMax-AI/minimax-code
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MiniMax-AI/minimax-code#639 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
MiniMax-AI/minimax-code#636 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MiniMax-AI/minimax-code#615 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
MiniMax-AI/minimax-code#556 · 4 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
MiniMax-AI/minimax-code#507 ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của MiniMax-AI/minimax-code
Issue tương tự
-
area:api bug good first issue priority:high
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Doezer/Questarr#1486 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:import difficulty:good-first good first issue help wanted priority:P1 roadmap size:S type:test
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Sergey-Bar/Penny#245 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
mihazs/lazysh#3377 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Approve the Cloudflare agent plugin for harness sessionsCó thể đã có người làm @joshtsch đã nhận hôm nay. Đang mởenhancement ready-for-agent
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày