feat(desktop): add /doctor diagnostics with non-blocking execution#5474
Open
XTLine wants to merge 6 commits into
Open
feat(desktop): add /doctor diagnostics with non-blocking execution#5474XTLine wants to merge 6 commits into
XTLine wants to merge 6 commits into
Conversation
Add Controller.DoctorText with runtime and doctor report output, wire /doctor through managementNotice, expose Desktop Doctor(tabID), and register the builtin command. Thread binary version through boot/controller construction across CLI, Desktop, ACP, serve, and bot paths so doctor reports include the real version. Add regression coverage for /doctor routing and non-blocking diagnostics while a turn is running.
Route /doctor before the running-turn steer path so diagnostics are available while a turn is running or stuck. Add a small command-routing predicate, frontend regression test, and browser bridge mock output for local development.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f6fa1fd30
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
- Add /doctor to CLI TUI (runSlashCommand, completion, help) - Make doctor.Collect workspace-scoped: pass WorkingDir/SessionDir instead of relying on global os.Getwd()/config.SessionDir() - Surface config.LoadForRoot error instead of silently dropping it - Redact MCP failure error messages to prevent credential leaks (auth headers, tokens, passwords) - Add redactMCPError test covering common leak patterns and truncation - Update completion test to reflect /doctor in fuzzy filter results
- Resolved package.json test script conflict - Included both approval-modal-file-reference.test.tsx and doctor-steer-bypass.test.ts
解决与main-v2的冲突,合并Memory v5改进相关代码
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #2631
Closes #5473
Summary
/doctorruntime diagnostics command, surfaced across CLI, serve, and the desktop GUIbypassesSteerWhenRunning) so you can inspect state without interrupting or being blocked by long outputversionstring throughboot/ CLI / serve so it shows in the diagnosticsNoticeCardto detect multi-line text and render it as a preformatted monospace block, preserving the column-aligned layout the backend produces; single-line notices keep their compact inline styleVerification
/doctorwhile idle → shows runtime, providers, plugins, lsp, sessions, sandbox, network, permissions in aligned columns (screenshot 2)/doctorwhile an agent turn is running → returns diagnostics immediately,turnshowsrunning, no need to cancel or wait (screenshot 3)/goal,/theme) still render inline without block stylinggo test ./internal/control/...andpnpm test(incl.doctor-steer-bypass.test.ts) passInvoking

/doctor:Output while idle:

Output during a running turn (non-blocking):

Cache impact
Cache-impact: none - boot.go only adds a
Versionstring field plumbed through to diagnostic output (DoctorText); the assembled system prompt, tools, and cache keys are unchanged.Cache-guard: existing boot/system-prompt golden tests cover this; the
Versionfield never enters the prompt sent to the model, only/doctordisplay output.System-prompt-review: Confirmed no system-prompt change — boot.go adds only a diagnostics
Versionfield; @esengine please confirm.