Repository navigation
feat: Doctor report pipeline (i18n keys + actions, non-breaking) #89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
a32b3a0
fix: balance session browser layout
ymkiux 2e739ab
feat: add doctor dashboard
ymkiux e2d4552
refactor: group top nav by workflow
ymkiux f335d02
feat: add doctor shortcuts
ymkiux 2531c3e
fix: populate doctor dashboard
ymkiux d4e3a64
fix: prevent doctor content overflow
ymkiux 6a1961b
style: center doctor status text
ymkiux f0ee771
style: center doctor kv values
ymkiux 902867c
feat: add doctor core report
ymkiux fd6d957
feat: doctor actions and exports
ymkiux ce1a2fe
feat: localize doctor report
ymkiux 212bb53
fix: keep legacy health check behavior
ymkiux 0b74785
fix: localize dashboard inspector strings
ymkiux 349c8d7
refactor: split i18n dictionary
ymkiux 795e124
feat: doctor issue keys and checks pipeline
ymkiux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fail fast on invalid doctor flags instead of silently coercing.
Unsupported values for
--format,--range, and--target-appcurrently fall back to defaults, and unknown flags are ignored. That can make typoed commands appear successful with wrong behavior.Suggested fix
function parseDoctorCommandArgs(argv = []) { @@ if (token === '--format') { const value = String(argv[cursor + 1] || '').trim().toLowerCase(); if (!value || value.startsWith('--')) { throw new Error('错误: --format 需要一个值(json/md)'); } - options.format = value === 'md' || value === 'markdown' ? 'md' : 'json'; + if (value !== 'json' && value !== 'md' && value !== 'markdown') { + throw new Error('错误: --format 仅支持 json 或 md'); + } + options.format = value === 'json' ? 'json' : 'md'; cursor += 2; continue; } @@ if (token === '--range') { const value = String(argv[cursor + 1] || '').trim().toLowerCase(); if (!value || value.startsWith('--')) { throw new Error('错误: --range 需要一个值(7d/30d/all)'); } - options.range = value === 'all' ? 'all' : (value === '30d' ? '30d' : '7d'); + if (value !== '7d' && value !== '30d' && value !== 'all') { + throw new Error('错误: --range 仅支持 7d/30d/all'); + } + options.range = value; cursor += 2; continue; } @@ if (token === '--target-app') { const value = String(argv[cursor + 1] || '').trim().toLowerCase(); if (!value || value.startsWith('--')) { throw new Error('错误: --target-app 需要一个值(codex/claude)'); } - options.targetApp = value === 'claude' ? 'claude' : 'codex'; + if (value !== 'codex' && value !== 'claude') { + throw new Error('错误: --target-app 仅支持 codex 或 claude'); + } + options.targetApp = value; cursor += 2; continue; } @@ - cursor += 1; + if (token.startsWith('--')) { + throw new Error(`错误: 未知参数 ${token}`); + } + cursor += 1; } return options; }📝 Committable suggestion
🤖 Prompt for AI Agents