tui: permission prompt does not display message set by permission.evaluate hook
Maintainer thường phản hồi trong vòng 1 ngày
@ningsiyuan1024 đang làm issue này rồi.
Từ ngày 1/12/2026.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 74/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ệ
- typescript
- Lĩnh vực
- developer-experience, frontend
Hướng nghiên cứu
Theo dõi lời nhắc quyền trong TUI hiển thị Permission required và kiểm tra cách nó nhận Permission.Request. Bắt đầu bằng cách tìm lời nhắc đó và request.message trong mã TUI; issue xác định sự kiện permission.asked là sự kiện mang thông báo. Hoàn tất khi lời nhắc hiển thị thông báo được cung cấp cho một yêu cầu được nâng quyền.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Summary
When a server plugin sets event.message in a permission.evaluate hook and escalates to effect = "ask", OpenCode's server attaches message to Permission.Request and sends it in permission.asked, but the TUI permission prompt never renders it.
Environment
- opencode version: 2.4.3
- Client: TUI
- Model and provider: Not relevant
- OS: Darwin 25.6.0 (darwin arm64)
- Terminal: TERM_PROGRAM=ghostty, TERM=xterm-256color, COLORTERM=truecolor
- Shell: /bin/zsh
- Install/channel: latest
- Active plugins:
@mattietk/opencode-clef-guard@latest(opencode.json);@mattietk/opencode-queue-steer@latest,@mattietk/opencode-session-diff@latest,@mattietk/opencode-session-tree@latest(cli.json)
Reproduction
- Register a server plugin with a
permission.evaluatehook that escalates an action toaskwith a message:await ctx.permission.hook("evaluate", (event) => { if (event.action === "shell") { event.effect = "ask" event.message = "Flagged by policy (score 0.68 >= 0.40)" } }) - Trigger a
shelltool call in a TUI session. - Observe the permission prompt displayed in the TUI.
Expected Behavior
Per the Server plugins documentation ("message appears in an escalated permission request or becomes the denial reason"), the TUI permission prompt should display request.message so the user can see why the plugin escalated the action.
Actual Behavior
The TUI permission prompt only shows Permission required, the action/command details, and the approval options (Allow once, Allow always, Reject). request.message is never displayed, even though Permission.Request.message is present in the permission.asked event and in context.data.session.permission.list(sessionID).
Additional Context
- Reproducible consistently for every permission action (
shell,edit,webfetch,external_directory). - Workaround: shipping a companion
./tuiplugin that readscontext.data.session.permission.list(sessionID)and rendersrequest.messagein thesession.composer.topslot above the prompt.
- Ngôn ngữ chính
- TypeScript
- Star
- 230k
- Fork
- 31.3k
- Merge trung bình
- 5 giờ 59 phút
- Pull request đã merge (30 ngày)
- 473
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 anomalyco/opencode
-
area/web platform/ios type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#67504 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/tui platform/macos type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
anomalyco/opencode#67490 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Plain source starting with `let ftype` is attached as video/mp4Có thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mởarea/core platform/macos status/repro-simulated type/bug version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#67448 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/desktop type/feature
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#67414 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/desktop platform/macos type/feature version/v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
anomalyco/opencode#67266 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
Amélioration du résumé regĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
MTES-MCT/monitorenv#3257 ·
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
salesforce/sa11y#1022 ·
-
Kartographer map markers lose their geo: link on non-English wikisCó thể đã có người làm @playlikeboy đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
openzim/mwoffliner#3014 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Report: Bloomberg HTĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
ardia-browser/ardia#5810 ·
Maintainer thường phản hồi trong vòng 1 ngày