fix: presentation.go with mcp-table.go: the message for each MCP server comes back
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 1/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 78/100
Hướng nghiên cứu
Đọc examples/extensions/presentation.go và pkg/extensions/test/presentation_yaegi_test.go, bắt đầu bằng cách xem OnSessionStart thiết lập các cờ hiển thị UI như thế nào. Thêm thiết lập còn thiếu HideMCPStartupMessages và cập nhật hoặc chạy bài kiểm tra presentation để kiểm tra cả hai extension cùng nhau. Hoàn thành khi thông báo khởi động MCP vẫn bị ẩn lúc presentation.go được tải cùng với mcp-table.go, trong khi các thông báo lỗi vẫn hiển thị.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Description
With both example extensions loaded, Kit prints the message for each MCP server that has loaded, and then the table of mcp-table.go.
Steps to Reproduce
To reproduce with v0.133.0 and at least one MCP server in the config:
1. Copy examples/extensions/mcp-table.go to ~/.config/kit/extensions/.
2. Run `kit -e examples/extensions/presentation.go`.
Kit shows "MCP server 'demo' loaded with 1 tools" and then the table. With mcp-table.go alone, Kit shows only the table.
Cause: both examples call `SetUIVisibility` in `OnSessionStart`, and each call replaces all flags. presentation.go loads after mcp-table.go, in a directory (by file name) and with `-e` (explicit paths load last). Its call does not set `HideMCPStartupMessages`, so it clears the flag that mcp-table.go set.
Fix: presentation.go also sets `HideMCPStartupMessages`. This suits a presentation: without mcp-table.go, the message for each server is hidden too, and failure messages still appear.
presentation.go came with #222, my PR, and I missed this interaction. A PR with the fix follows.
Relevant Code / Configuration
Affected Component
examples/extensions/presentation.go pkg/extensions/test/presentation_yaegi_test.go
Kit Version
master
Additional Context
I apologize for this combination not having been tested before.
Checklist
- I've searched existing issues and this hasn't been reported yet
- I've tested with the latest version of Kit
- Ngôn ngữ chính
- Go
- Star
- 142
- Fork
- 29
- Merge trung bình
- 4 giờ 29 phút
- Pull request đã merge (30 ngày)
- 57
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 mark3labs/kit
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
mark3labs/kit#218 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của mark3labs/kit
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
grafana/tempo-operator#1691 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Project submission: Sno StationĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
slavakurilyak/awesome-ai-agents#827 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
mpyw/declscope#262 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
search_modules reports "failed to parse module results" when the registry returns no modulesĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
hashicorp/terraform-mcp-server#583 ·
Maintainer thường phản hồi trong vòng 3 ngày