feat: mid-session status updates — ticket notes, client updates, email drafts
Engineers can now generate AI-powered status updates during active FlowPilot
sessions and after resolve/escalate. Three audiences (Ticket Notes, Client
Update, Email Draft) with Quick/Detailed length options. Copy to clipboard
with one click. Client names auto-inserted from intake/PSA context.
Backend: new endpoint POST /ai-sessions/{id}/status-update with audience-aware
system prompts. Frontend: StatusUpdateModal with 2-step selection flow,
Share Update button in action bar, Share Resolution/Escalation on completed
sessions. Also updates Solutions Library spec with Community tier design.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -137,6 +137,38 @@ class SessionCloseResponse(BaseModel):
|
||||
member_mapping_warning: str | None = None
|
||||
|
||||
|
||||
class StatusUpdateRequest(BaseModel):
|
||||
"""Generate a mid-session or post-session status update."""
|
||||
audience: str = Field(
|
||||
...,
|
||||
pattern="^(ticket_notes|client_update|email_draft)$",
|
||||
description="Who is this update for?",
|
||||
)
|
||||
length: str = Field(
|
||||
"detailed",
|
||||
pattern="^(quick|detailed)$",
|
||||
description="Quick (1-2 sentences) or detailed breakdown",
|
||||
)
|
||||
context: str = Field(
|
||||
"status",
|
||||
pattern="^(status|resolution|escalation)$",
|
||||
description="What type of communication: mid-session status, resolution close-out, or escalation handoff",
|
||||
)
|
||||
|
||||
|
||||
class StatusUpdateResponse(BaseModel):
|
||||
"""Generated status update content."""
|
||||
content: str
|
||||
audience: str
|
||||
length: str
|
||||
context: str
|
||||
session_status: str
|
||||
steps_completed: int
|
||||
time_spent_display: str | None = None
|
||||
client_name: str | None = None
|
||||
generated_at: datetime
|
||||
|
||||
|
||||
class RateSessionRequest(BaseModel):
|
||||
"""Submit post-session rating."""
|
||||
rating: int = Field(..., ge=1, le=5)
|
||||
|
||||
Reference in New Issue
Block a user