You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add experimental global AI assistant option (#4567)
* feat: add global chat streaming endpoint and routing
- Add global_chat_stream/2 to ApolloClient for /services/global_chat/stream
- Add global_chat?/1 and process_global_message/2 to MessageProcessor
- Route to global_chat when use_global_assistant is in session meta
- Pass use_global_assistant and page through channel message_options
- Add experimental_features_enabled to workflow channel get_context
* feat: add query_global_stream and build_global_message
- Add query_global_stream/3 using process_stream with build_global_message
- build_global_message extracts code from attachments (job_code or workflow_yaml)
- Context-aware: on job step prefers job_code, on overview prefers workflow_yaml
- Resolves job_id from job_key in attachment by matching against workflow jobs
* feat: add experimental features flag to frontend session context
- Add experimental_features_enabled to SessionContextResponseSchema
- Map to experimentalFeaturesEnabled in SessionContextStore
- Add useExperimentalFeaturesEnabled hook
- Add use_global_assistant and page to MessageOptions type
* feat: add global assistant checkbox and UI wiring
- Add Global assistant (experimental) checkbox to ChatInput with
localStorage persistence and onGlobalAssistantChange callback
- Pass use_global_assistant and page through AIChannelRegistry buildJoinParams
- Wire checkbox through AIAssistantPanel with showGlobalAssistantOption,
isGlobalAssistantActive, and onGlobalAssistantChange props
- AIAssistantPanelWrapper includes workflow YAML and page when global
assistant is active, derives page from workflow/job context
- Badge shows "Global (experimental)" in amber when active
* chore: add changelog entry for global AI assistant (#4532)
* test: add experimental_features_enabled to session context test fixture
The Zod schema adds a default value for the new optional field,
so the parsed output includes it. Update the test fixture to match.
* refactor: extract_global_code_and_job to reduce cyclomatic complexity
Split build_global_message into smaller functions to satisfy
credo's complexity threshold.
* test: add coverage for global chat integration
- ApolloClient: global_chat_stream payload, nil filtering, error handling
- AiAssistant: query_global_stream SSE processing, job_code vs workflow_yaml
extraction, job resolution from job_key, error handling
- MessageProcessor: global_chat routing when use_global_assistant is set
- AiAssistantChannel: session options and message options with global assistant
- WorkflowChannel: experimental_features_enabled in get_context
* test: add coverage for edge cases in build_global_message
Cover workflow_yaml fallback on overview pages, nil job_key handling
in resolve_job_from_key, and non-list attachments.
* test: cover resolve_job_from_key with nil workflow_id
* test: cover normalize_job_name catch-all with non-string job_key
* feat: use job_key from global chat to identify job code messages
When the global chat routes to job_code_agent and the job can't be
resolved to a DB record, store the job_key in message meta as
from_global_job_code so the frontend can render "Generated Job Code"
with a diff view instead of a generic workflow card.
0 commit comments