Skip to content

Conversation

Fr4nc3
Copy link
Collaborator

@Fr4nc3 Fr4nc3 commented Sep 10, 2025

Purpose

  • ...

Does this introduce a breaking change?

  • Yes
  • No

How to Test

  • Get the code
git clone [repo-address]
cd [repo-name]
git checkout [branch-name]
npm install
  • Test the code

What to Check

Verify that the following are valid

  • ...

Other Information

Removed session-related methods and fields from database base and CosmosDB client, and updated data models to eliminate redundant session_id fields. Added and refactored current team deletion logic, and improved team selection handling to return the selected team. Updated API and service layers to use new team management methods and fixed related bugs.
Introduces async static methods for handling agent and human clarification messages in PlanService. Also replaces print statements with logger.debug in settings.py for better error reporting and removes redundant websocket debug output.
Refactored PlanPage state management to use explicit types and removed unused team config logic. Improved agent message streaming parsing and added a utility to simplify human clarification lines in PlanDataService. Enhanced WebSocketService logging for agent message streaming events.
Introduces plan approval workflow, including PlanStatus.approved, mplan CRUD operations, and plan deletion by ID. Refactors CosmosDB and DatabaseBase to support new mplan methods, updates PlanService for approval/rejection logic, and improves frontend plan parsing and state management. Minor prompt and logging adjustments included.
Updated handle_agent_messages and handle_human_clarification in PlanService to accept a user_id parameter for improved context handling. Also reformatted ReactMarkdown components prop in StreamingBufferMessage.tsx for better readability.
Extended AgentMessageData and AgentMessageResponse models in backend and frontend to include plan_id, user_id, m_plan_id, timestamp, content, raw_data, steps, and next_steps fields. This supports richer agent message data for plan-related workflows.
Refactored the user_clarification endpoint to call PlanService.handle_human_clarification and improved error handling. Updated event tracking to use 'HumanClarificationReceived'. In PlanService, fixed plan approval logic to ensure plan_id and team_id consistency before updating orchestration state.
Introduces a new /agent_message POST endpoint to receive agent messages in the backend API. Updates the AgentMessageResponse model to make several fields optional for improved flexibility. Also removes an unnecessary blank line in PlanPage.tsx.
Reordered fields in AgentMessageResponse and set default values for optional fields. The timestamp now defaults to the current time, and other optional fields are initialized to None for consistency.
Improves agent message processing by restructuring the backend to use a new handler for agent messages, adds error handling and event tracking, and updates plan service logic for message persistence. Also cleans up unused imports in PlanPage.tsx and refines orchestration config typing for plans.
Refactored PlanDataService to robustly handle agent message and streaming message inputs in both legacy string and new object formats, including direct object and JSON string cases. Extracted step and next_steps parsing logic into a helper to reduce duplication. Updated content extraction and unescaping for consistency.
Introduces methods for adding, updating, and retrieving agent messages in the database layer (CosmosDBClient and DatabaseBase). Implements conversion and persistence logic for agent messages in PlanService. Also adds a session_id field to MPlan for partitioning.
Introduces a new API endpoint and method for sending agent messages to the backend. PlanPage now persists agent messages using the new APIService.sendAgentMessage method, with logging for success and failure.
Improved code readability by reformatting function signatures, argument lists, and multi-line statements. Enhanced exception logging and standardized code style, including consistent spacing and indentation. No functional changes were made.
Added detailed OpenAPI-style docstrings to the plan_approval, user_clarification, and agent_message_user endpoints. These docstrings specify request parameters, request body schemas, and possible responses to improve API documentation and clarity for consumers.
Updated database interfaces and implementations to use AgentMessageData instead of AgentMessageResponse for agent message operations. Added ordering to CosmosDB queries for plans and messages. Modified API route for plan retrieval to return plan, team, messages, and m_plan as structured objects instead of a list, improving response consistency and context.
Corrects the indentation of the HTTPException raise statement to ensure it is only triggered within the error response block.
Updated backend to return raw plan, team, messages, and m_plan objects instead of model_dump results. Adjusted frontend API service and PlanPage to handle new response structure and improved variable naming for clarity. Refactored WebSocketService to use planId instead of sessionId for connection and URL building.
Deleted the unused getPlanWithSteps method from apiService.tsx. Updated PlanPage.tsx to handle plan status and agent messages after fetching plan data, improving state management and UI logic.
Introduces the is_final flag to AgentMessageResponse and updates backend and frontend logic to handle final agent messages, marking plans as completed when appropriate. Refactors message processing in PlanPage and PlanDataService to support new message types and ensures consistent data structures between backend and frontend.
Renamed the get_team_by_id method parameter from 'id' to 'team_id' for clarity and updated its usage in CosmosDBClient and DatabaseBase. Refactored the /plan endpoint in router.py to use Optional plan_id and added improved error handling with logging for plan retrieval.
Updated PlanPage to pass planData to processAgentMessage and related websocket handlers, ensuring agent message responses include current plan data. Added logging for planData and improved error handling in PlanDataService for invalid plan data. Removed unnecessary ORDER BY clause in CosmosDBClient.get_mplan query.
Removed unused fields from AgentMessageResponse in both backend and frontend models for consistency. Updated related logic in PlanPage and PlanDataService to match the new structure and improve message persistence handling.
Added a call to PlanDataService.simplifyHumanClarification to preprocess agent message content before updating state and processing. This ensures agent messages are simplified prior to display and handling.
@blessing-sanusi blessing-sanusi merged commit bcf5c22 into macae-v3-dev-v2-vip Sep 12, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants