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 9a0081c4d2
commit 7d801cfb68
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.',