feat(web3): 规则类型加 'string' + 「跳过空值」开关
字符串规则 (rule_type='string'): - RULE_TYPES 扩展;rule/code 列与 number/date 共用,存 Python def check(value) -> bool - ai_rule.py 加 _STRING prompt 模板(字符串语义:len/startswith/re) - RuleModal tab 加「字符串」+ desc/codePlaceholder/aiBtnLabel 分支 + Python 函数 hint 提示 value 是字符串 跳过空值开关 (skip_null): - rule 表加 skip_null 列(INTEGER NOT NULL DEFAULT 0)+ 迁移函数 - run_rule() 入口短路 None/空 str/空 bytes(regex 在 _evaluate_row 内联短路) - RulePayload/RuleOut + _replace/_copy/_row_to_out + _load_task_compiled 全链路透传 - RuleModal 「规则类型」行右侧加 checkbox;测试/保存透传 skip_null - /api/rule/test 同步支持(用户在 RuleModal 测试空值时也走短路) UI 修复: - 「规则类型」行用嵌套 modifier .rule-type-row flex 化,不污染其他 grid cell 行 (之前全局改 .rule-item-ctrl flex 把 .code-line/.test-line/.regex-line 全压塌) 测试: - test_rule_types_e2e.py 加 4 个新用例(string 持久化 + dispatch + skip_null=False/True + regex skip_null) - FAKE_TABLE_ROWS 加 2 行空值('' + None),覆盖 skip_null 场景 - test_rule_runner.py RULE_TYPES 常量断言更新 后端 77 passed;vite build clean
Showing
This diff is collapsed.
Please register or sign in to comment