feat(eba): consolidate event bindings, fix command.tsx pointer-events

- Replace legacy pipeline binding card + RoutingRulesEditor with unified
  EventBindingsEditor; remove use_pipeline_uuid/pipeline_routing_rules
  from bot form schema and API update handler
- Add _augment_event_data() to botmgr for filter virtual fields
  (message_text, message_element_types, chat_type)
- Add alembic migration 0009: migrate use_pipeline_uuid and
  pipeline_routing_rules into event_bindings on first run
- Fix command.tsx: data-[disabled] -> data-[disabled=true] so cmdk 1.x
  items (data-disabled=false) are not pointer-events:none
- EventBindingsEditor: onSelect on CommandItems, filter conditions panel,
  disabled bindings section, dnd reorder
- i18n: add filter/condition keys for zh-Hans and en-US
- Update tests to match new bot service behavior

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Junyan Qin
2026-06-26 16:26:38 +08:00
committed by huanghuoguoguo
parent d08f163bff
commit 4aa0ac401b
14 changed files with 2498 additions and 972 deletions
+20
View File
@@ -372,14 +372,34 @@ const enUS = {
targetPipeline: 'Pipeline',
targetDiscard: 'Discard',
selectTarget: 'Select handling logic',
searchTarget: 'Search…',
noTargetFound: 'No results found',
priority: 'Priority',
enabled: 'Enabled',
eventBindingDescriptionPlaceholder: 'Rule description',
noEventBindings: 'No event bindings',
unsupportedPipelineEvent: 'Pipelines can only be used for message.* events',
disable: 'Disable',
enable: 'Enable',
disabledBindings: 'Disabled',
eventCustom: 'Custom event',
eventWildcard: 'All events',
eventNamespaceWildcard: '{{namespace}}.*',
conditions: 'Conditions',
conditionsDescription:
'All conditions must match to trigger this binding. Leave empty to always trigger.',
conditionsEmpty: 'No conditions — always triggers.',
addFilter: 'Add condition',
filterChatType: 'Session type',
filterChatId: 'Session ID',
filterMessageText: 'Message text',
filterMessageElement: 'Message element',
operator_eq: 'equals',
operator_neq: 'not equals',
operator_contains: 'contains',
operator_not_contains: 'not contains',
operator_starts_with: 'starts with',
operator_regex: 'regex',
routingRules: 'Conditional Routing Rules',
routingRulesDescription:
'Rules are evaluated in order; first match routes to its pipeline. Fallback to the default pipeline above if none match.',
+19
View File
@@ -356,14 +356,33 @@ const zhHans = {
targetPipeline: 'Pipeline',
targetDiscard: '丢弃',
selectTarget: '选择处理逻辑',
searchTarget: '搜索处理逻辑…',
noTargetFound: '未找到匹配项',
priority: '优先级',
enabled: '启用',
eventBindingDescriptionPlaceholder: '规则说明',
noEventBindings: '暂无事件绑定',
unsupportedPipelineEvent: 'Pipeline 仅可用于 message.* 事件',
disable: '禁用',
enable: '启用',
disabledBindings: '已禁用',
eventCustom: '自定义事件',
eventWildcard: '全部事件',
eventNamespaceWildcard: '{{namespace}}.*',
conditions: '触发条件',
conditionsDescription: '满足所有条件时才触发此绑定,不添加则无条件触发。',
conditionsEmpty: '无条件,始终触发。',
addFilter: '添加条件',
filterChatType: '会话类型',
filterChatId: '会话 ID',
filterMessageText: '消息文本',
filterMessageElement: '消息元素',
operator_eq: '等于',
operator_neq: '不等于',
operator_contains: '包含',
operator_not_contains: '不包含',
operator_starts_with: '前缀匹配',
operator_regex: '正则匹配',
routingRules: '条件路由规则',
routingRulesDescription:
'按顺序匹配,命中第一条规则后路由到对应流水线;都不匹配时使用上方默认流水线',