a2a-source-edit: write agent.py
This commit is contained in:
15
agent.py
15
agent.py
@@ -312,19 +312,8 @@ class QuoteJudgeStudioV1(A2AAgent[QuoteJudgeStudioV1Config, PlatformUserAuth]):
|
|||||||
"comparison_id": _clean_comparison_id(comparison_id),
|
"comparison_id": _clean_comparison_id(comparison_id),
|
||||||
}
|
}
|
||||||
try:
|
try:
|
||||||
grant = await ctx.workspace.request_access(
|
reader = getattr(ctx.workspace, "read_bytes")
|
||||||
files=[document.path],
|
raw = reader(document.path)
|
||||||
mode=WorkspaceMode.READ_ONLY,
|
|
||||||
reason="Parse the caller-uploaded quote file for comparison.",
|
|
||||||
purpose="Read uploaded vendor quote file",
|
|
||||||
)
|
|
||||||
view = await ctx.workspace.open_view(
|
|
||||||
purpose="Read uploaded vendor quote file",
|
|
||||||
hints=[document.path],
|
|
||||||
max_files=1,
|
|
||||||
reason="Parse the caller-uploaded quote file for comparison.",
|
|
||||||
)
|
|
||||||
raw = await view.read(grant.files[0].path)
|
|
||||||
except Exception:
|
except Exception:
|
||||||
return {
|
return {
|
||||||
"ok": False,
|
"ok": False,
|
||||||
|
|||||||
Reference in New Issue
Block a user