Skip to content

AskGlific: Create the UI and implement backend apis #3826

@akanshaaa19

Description

@akanshaaa19

Summary

Build the AI assistant chat panel in the Glific React frontend. Custom UI only do not use Dify's default embed. The panel should feel native to Glific's existing design system.

Requirements

  • Add AI chat button to Glific sidebar/nav (only visible when flag is on)
  • Build chat panel component: message input, message list, loading state, error state
  • Stream responses from Glific backend (which proxies Dify SSE)
  • Pass context to backend with each message:
    • Current org_id (always)
    • flow_id if user is on a flow page
    • contact_id if user is on a contact page
    • Current page URL
  • Render markdown in AI responses (use existing markdown lib if available in Glific)
  • Persist conversation_id in component state for multi-turn conversations
  • Show "Ask about this flow" hint text when user is on a flow page

Acceptance Criteria

  • Panel opens/closes cleanly, gated by feature flag
  • Messages send and receive with streaming
  • Context (flow_id, contact_id) passed correctly based on current page
  • Markdown renders in responses
  • Multi-turn conversation works within a session

Screenshots

No response

Additional Notes

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions