修复联网研究取消状态收口 - #93
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 907ed21fe7
ℹ️ 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".
|
|
||
| const cancel = () => { | ||
| const runId = result?.run_id ?? options.activeRunId; | ||
| if (!runId) return; |
There was a problem hiding this comment.
Abort lookups before the durable run ID arrives
When the user presses Stop while the initial createResearchRun request is still pending, isBusy has already made the Stop button visible, but neither result nor activeRunId is populated. This early return therefore skips operationRegistry.abort("web_lookup"), allowing the create request to finish and executeResearchRun to start despite the stop action; abort the browser operation even when there is not yet a run ID, while conditionally skipping only the server cancellation request.
Useful? React with 👍 / 👎.
仅修复 Study Agent ResearchRun 取消闭环:首次取消响应仍为 running 时轮询同一 run 到终态;等待期间不采用研究结果;刷新恢复 cancelled;同一查询从 checkpoint 重试。包含 Vitest 与 desktop/mobile real-stack 回归。Provider 与学习真值不变。