Skip to content

从具名 Respo 事件读取 Gen Code 输入 - #64

Merged
tiye merged 1 commit into
mainfrom
refine/gen-code-input-event-field
Nov 13, 2026
Merged

tiye merged 1 commit into
mainfrom
refine/gen-code-input-event-field

Conversation

@tiye

@tiye tiye commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

使用者需要注意

编辑提示词时,文本框仍按原逻辑更新草稿。空事件值仍按空字符串处理,其他值仍经过字符串校验。

改动与风险

  • 从 Respo 的具名事件直接读取 :value,省去一次 Struct 转 Map 和开放字段查询。
  • 使用正式 Calcit 0.42.1,通过完整 strict、7 项原测试、离线 stream/dispatch 回归及 Demo 构建。

Summary by CodeRabbit

  • Bug Fixes
    • Textarea input now handles missing values as an empty string, preventing nil values from being stored.

@coderabbitai

coderabbitai Bot commented Nov 13, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The textarea input handler now reads :value directly from the event. It stores an empty string when the value is nil.

Changes

Textarea input

Layer / File(s) Summary
Read and normalize event value
calcit.cirru
The handler replaces the open-field read and string decoding with direct event-value access. It uses an empty string when the value is nil.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Refactor

Possibly related issues

  • calcit-lang/gen-code#22 — The change removes one call site of schema/read-open-field-or, but it does not change the helper or address the other strict-typing debt listed in the issue.
Merge Risk: Minimal · up to 45b4c

The Gen Code textarea reads its input from the event more directly, and empty values still become an empty string. No actionable merge risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "从具名 Respo 事件读取 Gen Code 输入" (Read Gen Code input from a named Respo event) matches the change. The raw summary says the textarea input handler now reads :value directly from the event and…
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: Title check

Explanation

The title "从具名 Respo 事件读取 Gen Code 输入" (Read Gen Code input from a named Respo event) matches the change. The raw summary says the textarea input handler now reads :value directly from the event and stores an empty string when it is nil, instead of reading an open :value field and decoding it as a string. The PR objectives confirm the goal: read :value directly from the named Respo event, skipping a Struct-to-Map conversion and an open-field lookup. The title names the primary change, and the terms match the objectives.

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: ef1adb3f-51dd-428f-a51a-feb4e29f1d2f
Commits

Reviewing files that changed from the base of the PR and between ad73a57 and 45b4c02.

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 0ab7d04 into main Nov 13, 2026
1 check passed
@tiye
tiye deleted the refine/gen-code-input-event-field branch November 13, 2026 09:08
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