Phase 4: KI-UI-Steuerung — AI agent UI control via WebSocket
- New ai_ui_control plugin: WS endpoint /ws/ai-ui-control, REST API (POST /command, GET /command/{id}/status, GET /online-users)
- UI-Command-Protocol: 6 command types (navigate, filter, open_contact, modal, tab, settings) with Pydantic schemas
- WebSocket manager: per-user connections, command delivery, feedback storage, stale cleanup
- Frontend useAIUIControl hook: WS client with auto-reconnect, command dispatch, feedback sending
- aiUIControlStore: Zustand store for command state, active modal/tab, pending filter/settings
- AIUIControlIndicator: visual KI indication (Bot icon, toast, pulse animation)
- ContactDetail integration: syncs activeTab and personModalOpen from AI control store
- AppShell integration: useAIUIControl hook + AIUIControlIndicator
- i18n keys for DE/EN
- 18 Vitest tests: command protocol, store actions, feedback, visual indication
- TSC: 0 new errors (only 2 pre-existing Dms.tsx errors)
This commit is contained in:
@@ -77,7 +77,8 @@
|
||||
"status": "Status",
|
||||
"role": "Role",
|
||||
"active": "Active",
|
||||
"inactive": "Inactive"
|
||||
"inactive": "Inactive",
|
||||
"dismiss": "Dismiss"
|
||||
},
|
||||
"dashboard": {
|
||||
"title": "Dashboard",
|
||||
@@ -891,5 +892,17 @@
|
||||
"empty": "No change history available",
|
||||
"changes": "Changes",
|
||||
"fieldsChanged": "fields changed"
|
||||
},
|
||||
"ai": {
|
||||
"uiControl": {
|
||||
"active": "AI is controlling the UI",
|
||||
"executing": "AI is executing action",
|
||||
"navigate": "Navigation",
|
||||
"filter": "Apply filter",
|
||||
"openContact": "Open contact",
|
||||
"modal": "Open dialog",
|
||||
"tab": "Switch tab",
|
||||
"settings": "Change settings"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user