What it does
mcp_log_ui
MCP tool-call log viewer (zui) — shows what Claude Code (or any
external agent) is doing in the engine. Comments are the primary
human-readable signal; raw args/results hide behind a per-row expand
or a verbose-mode toggle. The module is stateless from the host's
perspective but keeps a few module-scoped UI prefs
(showErrorsOnly, verboseMode, expandedCallIds) so they survive
hot-reload.
Exports
M.buildContent() -> any— build the toolbar + scroll-list widget tree for one frame. Re-queries the Rust-sidemcpLogring buffer each call.M.handleCallback(callbackId: string, data: any) -> boolean— handle a UI event (filter toggle, row expand, clear). Returnstruewhen the event was consumed.
Usage
local McpLogUI = require("@builtin::modules.engine.editor.mcp_log_ui")
-- From the hosting window:
local content = McpLogUI.buildContent()
local handled = McpLogUI.handleCallback(callbackId, data)
Notes
- Reads the Rust-side
mcpLogglobal; guards against the binding being absent during early boot so it can be required beforeffi_callbackshas registered the global. verboseModeforces every row to render expanded;expandedCallIdsis per-call-id sticky state for one-off expands.mcp-log-clearalso callsmcpLog.clear()on the Rust side so the ring buffer is reset along with the cached row list.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.