fix(cli): clarify asyncTaskId vs generationId in gen status/download + better error message#14230
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8f68331ac7
ℹ️ 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".
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## canary #14230 +/- ##
===========================================
+ Coverage 68.00% 86.03% +18.03%
===========================================
Files 2260 620 -1640
Lines 193666 51652 -142014
Branches 23366 8719 -14647
===========================================
- Hits 131694 44440 -87254
+ Misses 61843 7083 -54760
Partials 129 129
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
mutoe
pushed a commit
to mutoe/lobehub
that referenced
this pull request
May 1, 2026
…+ better error message (lobehub#14230) * 🔖 chore(release): release version v2.1.53 [skip ci] * fix(cli): improve gen status/download error message for wrong asyncTaskId * docs(cli-skill): clarify asyncTaskId vs generationId in gen status/download * fix(builtin-skills): clarify asyncTaskId vs generationId in gen status/download * fix(cli): distinguish asyncTaskId not found vs generationId not found in error message * Update package.json --------- Co-authored-by: lobehubbot <i@lobehub.com>
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.
问题
lh gen status/download命令在传错 ID 时会触发服务端 500,完全没有有用的错误提示。根本原因:命令签名是
<generationId> <taskId>,<taskId>这个名字不够明确,容易让人误传gen_xxx(generation ID),而实际上需要传的是asyncTaskId(UUID 格式,打印在→ Task后面)。传错 ID 后,
getGenerationStatus在async_tasks表里查不到记录,抛NOT_FOUND,但 Vercel/tRPC 层包成了 500,CLI 只吐出一堆 stack trace。变更
apps/cli/src/commands/generate/index.ts<taskId>→<asyncTaskId>,和 server 端 tRPC 入参字段名对齐status和download均加了 try/catch,识别NOT_FOUND/INTERNAL_SERVER_ERROR,输出清晰的引导信息,告知用户 asyncTaskId 是→ Task后面的 UUID 而非gen_xxxpackages/builtin-skills/src/lobehub/references/generate.ts<taskId>→<asyncTaskId>⚠️ asyncTaskId vs generationId说明段,附带示例,明确标出哪个是 asyncTaskId.agents/skills/cli/references/generate.md(内部开发 skill,顺带更新)测试
复现步骤: