-
Notifications
You must be signed in to change notification settings - Fork 14.9k
修复bunx tsc --noEmit报错 #238
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
Closed
+7
−5
Closed
Changes from all commits
Commits
Show all changes
43 commits
Select commit
Hold shift + click to select a range
def3617
docs: update contributors
2228293026 269b794
Merge branch 'claude-code-best:main' into main
2228293026 35d5207
Merge branch 'claude-code-best:main' into main
2228293026 4a18d0d
docs: update contributors
2228293026 1dccbd9
Merge branch 'claude-code-best:main' into main
2228293026 2771eee
docs: update contributors
2228293026 629371a
Merge branch 'claude-code-best:main' into main
2228293026 e01680c
Merge branch 'claude-code-best:main' into main
2228293026 b4a7cc2
Merge branch 'claude-code-best:main' into main
2228293026 d0b54de
docs: update contributors
2228293026 0d63f98
Merge branch 'claude-code-best:main' into main
2228293026 24dff7a
Merge branch 'claude-code-best:main' into main
2228293026 81792af
添加status命令里更多模型api介绍
8c09119
Merge branch 'claude-code-best:main' into main
2228293026 e2469b2
Merge branch 'claude-code-best:main' into main
2228293026 c01f089
Merge branch 'claude-code-best:main' into main
2228293026 43c8be6
docs: update contributors
2228293026 44e4020
Fix: /help error
4f1aa63
Merge branch 'claude-code-best:main' into main
2228293026 25bac1c
1. 修复 src/commands/fork/index.ts — 将空 stub 改为有效的 Command 定义
3bd5300
Merge branch 'claude-code-best:main' into main
2228293026 c02786d
Update src/commands/fork/fork.tsx
2228293026 10d4d33
fix
2228293026 06869c0
Merge branch 'claude-code-best:main' into main
2228293026 6c1100b
Merge branch 'claude-code-best:main' into main
2228293026 f624f25
Merge branch 'claude-code-best:main' into main
2228293026 13efceb
Merge branch 'claude-code-best:main' into main
2228293026 8ff58c9
Merge branch 'claude-code-best:main' into main
2228293026 5d170e8
Merge branch 'claude-code-best:main' into main
2228293026 7eb1e5f
Merge branch 'claude-code-best:main' into main
2228293026 49579f9
docs: update contributors
2228293026 ada7b3e
fix: disable strict mode in tsconfig to avoid decompilation type errors
fab0573
Merge branch 'claude-code-best:main' into main
2228293026 28c1987
docs: update contributors
2228293026 4cf61d1
Fix
bf5addb
Merge branch 'claude-code-best:main' into main
2228293026 49f310f
Merge branch 'claude-code-best:main' into main
2228293026 5fd12e0
Merge branch 'claude-code-best:main' into main
2228293026 32411a1
Merge branch 'claude-code-best:main' into main
2228293026 d68845d
Merge branch 'claude-code-best:main' into main
2228293026 8e00c3b
Merge branch 'claude-code-best:main' into main
2228293026 442a70e
Merge branch 'claude-code-best:main' into main
2228293026 69fc07b
Merge branch 'claude-code-best:main' into main
2228293026 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
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
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.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: claude-code-best/claude-code
Length of output: 4913
🏁 Script executed:
sed -n '360,380p' src/commands/ultraplan.tsxRepository: claude-code-best/claude-code
Length of output: 1088
Remove
as anycasts; the discriminated union type is already narrowed in this branch.At line 367 (
if (!eligibility.eligible)), the type system guaranteeseligibility.errorsis present and properly typed asBackgroundRemoteSessionPrecondition[]. Theas anycasts at lines 370–376 and the redundantArray.isArray()guards weaken type safety and violate the coding guideline: "Use type guards andRecord<string, unknown>instead ofas anyin non-test code."See the pattern in
src/tools/AgentTool/AgentTool.tsx(line 672) for the correct approach: use a specific type assertion instead ofas any.Proposed fix
if (!eligibility.eligible) { + const preconditionErrors = eligibility.errors.map(e => e.type) logEvent('tengu_ultraplan_create_failed', { reason: 'precondition' as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, - precondition_errors: Array.isArray((eligibility as any).errors) - ? (eligibility as any).errors.map((e: any) => e.type).join(',') as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS - : undefined, + precondition_errors: + preconditionErrors.join(',') as AnalyticsMetadata_I_VERIFIED_THIS_IS_NOT_CODE_OR_FILEPATHS, }); - const reasons = Array.isArray((eligibility as any).errors) - ? (eligibility as any).errors.map(formatPreconditionError).join('\n') - : ''; + const reasons = eligibility.errors.map(formatPreconditionError).join('\n') enqueuePendingNotification({ value: `ultraplan: cannot launch remote session —\n${reasons}`, mode: 'task-notification', });📝 Committable suggestion
🤖 Prompt for AI Agents