This commit is contained in:
Timothy Jaeryang Baek committed 2026-07-09 22:40:33 -05:00
1 parent 867c0eadad
commit 3f50e3c7e9
2 files changed
+48 -21

No files matched your search

+12 -2
View File
@@ -35,7 +35,9 @@ def _prompt_from_messages(messages: list[dict[str, Any]]) -> str:
return "\n\n".join(parts)
def _claude_query_input(prompt: str, attachments: PreparedAgentAttachments) -> Any:
def _claude_query_input(
prompt: str, attachments: PreparedAgentAttachments
) -> str | AsyncIterator[dict[str, Any]]:
if not attachments.images:
return prompt
content: list[dict[str, Any]] = []
@@ -52,7 +54,15 @@ def _claude_query_input(prompt: str, attachments: PreparedAgentAttachments) -> A
},
}
)
return content
async def messages() -> AsyncIterator[dict[str, Any]]:
yield {
"type": "user",
"message": {"role": "user", "content": content},
"parent_tool_use_id": None,
}
return messages()
def _chat_approval_mode(chat_params: dict[str, Any]) -> str: