Skip to content

Commit e8132d9

Browse files
committed
Add plan_id field to PlanApprovalResponse
Introduces an optional plan_id attribute to the PlanApprovalResponse dataclass to support referencing the plan by its unique identifier.
1 parent 095239d commit e8132d9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/backend/v3/api/router.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,14 @@ async def plan_approval(human_feedback: messages.PlanApprovalResponse, request:
314314
if user_id and human_feedback.plan_dot_id:
315315
if orchestration_config and human_feedback.plan_dot_id in orchestration_config.approvals:
316316
orchestration_config.approvals[human_feedback.plan_dot_id] = human_feedback.approved
317+
orchestration_config.plans[human_feedback.plan_dot_id]["plan_id"] = human_feedback.plan_id
318+
print("Plan approval received:", human_feedback)
319+
print("Updated orchestration config:", orchestration_config.plans[human_feedback.plan_dot_id])
317320
track_event_if_configured(
318321
"PlanApprovalReceived",
319322
{
320-
"plan_id": human_feedback.plan_dot_id,
323+
"plan_id": human_feedback.plan_id,
324+
"plan_dot_id": human_feedback.plan_dot_id,
321325
"approved": human_feedback.approved,
322326
"user_id": user_id,
323327
"feedback": human_feedback.feedback

src/backend/v3/models/messages.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class PlanApprovalResponse:
5252
plan_dot_id: str
5353
approved: bool
5454
feedback: str | None = None
55+
plan_id: str | None = None
5556

5657
@dataclass(slots=True)
5758
class ReplanApprovalRequest:

0 commit comments

Comments
 (0)