qwen-code/docs
Shaojin Wen f29f210201
feat(cli): browse MCP server resources in the /mcp dialog (#5635)
* feat(cli): browse MCP server resources in the /mcp dialog

The @server:uri resource reference (read + inject) shipped in #5544, but
the /mcp management dialog only surfaced a numeric "Resources: N" count —
there was no way to list a server's resource URIs, so a user who didn't
already know a URI couldn't discover what to reference.

Mirror the existing tools flow: add a "View resources" action on the
server detail step that opens a resource list, plus a detail view showing
each resource's URI, name, MIME type, size and description, along with the
exact @server:uri reference to paste into a message. Gated on
resourceCount > 0 (so untrusted folders, where MCP is never discovered,
show nothing). Adds en/zh/zh-TW strings, unit tests for both new steps,
and updates the MCP docs.

* fix(cli): wire MCP resource browser into the extensions manager + dedupe ref builder

Addresses review on #5635:

- [Critical] ServerDetailStep is shared with the extensions manager
  (McpServerActionsView), which doesn't pass onViewResources — so the new
  "View resources" action rendered there as a dead no-op. Gate the action on
  the optional handler being present (and add it to the useMemo deps), and
  implement the resource subview in McpServerActionsView so extension MCP
  servers get the same browser as the /mcp dialog.

- [Suggestion] Add a canonical buildMcpResourceRef() next to
  matchMcpServerPrefix() (its exact inverse) and use it for the @server:uri
  hint and the @server: autocomplete value, so the format has one source of
  truth; add a round-trip test.

- [Suggestion] Cover previously-untested paths: ResourceListStep scroll
  window (15 items: row windowing + ↑/↓ + count), ResourceDetailStep size:0
  and showName dedup, and ServerDetailStep action gating (incl. the
  dead-action regression).
2026-06-22 13:11:07 +00:00
..
design refactor(cli): rename serve files to kebab-case (#5592) 2026-06-22 13:13:07 +08:00
developers test(integration): run no-AK smoke tests on PRs (#5607) 2026-06-22 19:41:32 +08:00
e2e-tests feat(worktree): Phase D — startup --worktree flag + symlinkDirectories + PR refs (#4381) 2026-05-27 17:04:51 +08:00
plans feat(core)!: redesign auto-compaction thresholds with three-tier ladder (#4345) 2026-05-25 21:11:08 +08:00
superpowers feat(serve): add daemon idle detection to GET /health?deep=true (#4934) 2026-06-18 06:55:03 +00:00
users feat(cli): browse MCP server resources in the /mcp dialog (#5635) 2026-06-22 13:11:07 +00:00
verification/abort-controller-refactor fix(core): stop AbortSignal listener leak in long sessions (MaxListenersExceededWarning) (#4366) 2026-05-26 14:21:49 +08:00
_meta.ts feat: refactor docs 2025-12-05 10:51:57 +08:00
declarative-agents-port.md feat(core): port declarative-agent mcpServers + hooks (CC 2.1.168 parity follow-up) (#4996) 2026-06-12 14:15:51 +08:00
index.md fix: lint issues 2025-12-19 15:52:11 +08:00
yaml-parser-replacement.md feat(core): port declarative-agent mcpServers + hooks (CC 2.1.168 parity follow-up) (#4996) 2026-06-12 14:15:51 +08:00