Skip to content

fix: 修复 ClaudeProvider qualityLevelToString 编译错误 - #576

Closed
luojiaping wants to merge 1 commit into
AAswordman:mainfrom
luojiaping:fix/claude-qualitylevel-clean
Closed

fix: 修复 ClaudeProvider qualityLevelToString 编译错误#576
luojiaping wants to merge 1 commit into
AAswordman:mainfrom
luojiaping:fix/claude-qualitylevel-clean

Conversation

@luojiaping

Copy link
Copy Markdown
Collaborator

问题

PR #568 (pr_claude_thinking) 合并后,ClaudeProvider.ktqualityLevelToString() 函数体裸露在类顶层,导致 CI 构建失败:

e: ClaudeProvider.kt:1160:15 Unexpected tokens
e: ClaudeProvider.kt:1161:13 Expecting an element
e: ClaudeProvider.kt:1928:1 Expecting a top level declaration

修复

将孤立的 return when(qualityLevel.coerceIn(...)) 包裹进正确的 qualityLevelToString() 函数中。

变更

仅修改 ClaudeProvider.kt 一个文件,+4 行(函数头 + 注释),0 行删除。

验证

✅ CI 构建通过(Run #50 on fix/dead-code-qualitylevel)

/cc @luojiaping

Commit a20049d introduced an orphaned return statement outside any
function body in ClaudeProvider.kt. This dead code was never caught
by upstream CI (no automated build) and only surfaced when our fork's
assembleDebug CI triggered kaptGenerateStubsDebugKotlin.
@AAswordman AAswordman closed this Jun 1, 2026
@AAswordman

Copy link
Copy Markdown
Owner

来晚了 我已经修完了(x)

@luojiaping

Copy link
Copy Markdown
Collaborator Author

好吧好吧

@luojiaping
luojiaping deleted the fix/claude-qualitylevel-clean branch June 15, 2026 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants