Elffuss BraidHub

kikocis/auto-code-rover public

main · 433 BRawPermalink
1"""
2Common stuff for task agents.
3"""
4
5from app.data_structures import MessageThread
6
7
8def replace_system_prompt(msg_thread: MessageThread, prompt: str) -> MessageThread:
9 """
10 Replace the system prompt in the message thread.
11 This is because the main agent system prompt main invole tool_calls info, which
12 should not be known to task agents.
13 """
14 msg_thread.messages[0]["content"] = prompt
15 return msg_thread