Skip to content

收紧 Gen Code 流式补丁的内部派发类型 - #58

Merged
tiye merged 1 commit into
mainfrom
refine/gen-code-draft-boundary-0400
Nov 10, 2026
Merged

tiye merged 1 commit into
mainfrom
refine/gen-code-draft-boundary-0400

Conversation

@tiye

@tiye tiye commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

用户需要注意

Editor 等宿主继续接收原有的匿名 :states-merge 事件。提交、生成失败后的提示和原草稿恢复保持原有行为。

改动与风险

  • 生成和错误回调内部通过 GenCodeOp 派发补丁,在传给宿主时转换为旧事件。
  • 保留 Run 开始时清空生成代码、失败时使用原草稿的区别。公开插件签名和事件格式不变。

验证

完整 strict、原质量基线、7 项 Calcit 测试、原离线 stream/dispatch 测试和 Vite 构建通过。额外用合成失败流验证原草稿,隔离 Editor 客户端的 10 个 Gen Code Box 定义通过。

Summary by CodeRabbit

  • Refactor
    • Updated the handling of code-generation actions and their status updates across submit, refresh, and run flows, including error cases. This is an internal change; no user-facing behavior changes are specified in the summary.

@coderabbitai

coderabbitai Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The use-gen-code dispatcher converts GenCodeOp values to wire operations. Submit, refresh, and run handlers use state-bound patch dispatchers for state updates and error patches.

Changes

GenCode operation dispatch

Layer / File(s) Summary
Wire and patch dispatch
calcit.cirru
wire-dispatch converts operations with plugin-op-to-wire before calling the host dispatcher. patch-dispatch emits a :states-merge operation through this adapter.
Handler patch dispatch
calcit.cirru
Submit, refresh, and run handlers use state-bound patch dispatchers for request, loading, and failure-state patches.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Possibly related PRs

Suggested reviewers: chenyong

Merge Risk: Minimal · up to 90d7e

No actionable issue remains identified in the dispatch change; it is ready for normal merge checks.

Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed 标题概括了主要变更:收紧 Gen Code 流式补丁的内部派发类型。
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 38758917-af95-46b8-8437-b62caad251df
Commits

Reviewing files that changed from the base of the PR and between 588e0f0 and 90d7ec3.

Files selected for processing: 1

  • calcit.cirru

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@tiye
tiye merged commit 2085b41 into main Nov 10, 2026
1 check passed
@tiye
tiye deleted the refine/gen-code-draft-boundary-0400 branch November 10, 2026 12:09
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.

1 participant