[PP-1] Refactor message handling logic to use dedicated Message classes and a factory in AiWizard.jsx

Created on 13 June 2025, 11 days ago

Overview

Currently, the message handling code uses multiple if statements within a single async function to process different message types based on the presence of keys like css_structure, js_structure, component_structure, and props_metadata. This approach risks becoming unwieldy and hard to maintain as more message types or processing rules are added.

Proposed resolution

Implement a factory pattern with dedicated message handler classes for each function call type.
See https://git.drupalcode.org/project/experience_builder/-/merge_requests/1048#note_533787

User interface changes

📌 Task
Status

Active

Version

0.0

Component

AI

Created by

🇮🇳India narendraR Jaipur, India

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024