Pdf comment agent (#6196)

Co-authored-by: James Brunton <[email protected]>
This commit is contained in:
ConnorYoh
2026-05-01 10:19:38 +01:00
committed by GitHub
co-authored by James Brunton
parent 2dc5276e8b
commit 86774d556e
78 changed files with 5091 additions and 112 deletions
+13
View File
@@ -15,6 +15,7 @@ from stirling.contracts import (
AiToolAgentStep,
ConversationMessage,
EditPlanResponse,
OrchestratorRequest,
PdfEditRequest,
PdfEditTerminalResponse,
format_conversation_history,
@@ -44,6 +45,18 @@ class UserSpecAgent:
model_settings=runtime.smart_model_settings,
)
async def orchestrate(self, request: OrchestratorRequest) -> AgentDraftWorkflowResponse:
"""Entry point for the orchestrator delegate — adapts the orchestrator's
request shape into an :class:`AgentDraftRequest` and runs the standard
:meth:`draft` pipeline.
"""
return await self.draft(
AgentDraftRequest(
user_message=request.user_message,
conversation_history=request.conversation_history,
)
)
async def draft(self, request: AgentDraftRequest) -> AgentDraftWorkflowResponse:
edit_plan = await self._build_edit_plan(request.user_message, request.conversation_history)
if not isinstance(edit_plan, EditPlanResponse):