mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-10-19 15:33:54 +00:00
feat: add agent prefix to self-chat replies for visual distinction
This commit is contained in:
parent
18c5716d10
commit
e664673c1c
2 changed files with 9 additions and 0 deletions
|
|
@ -237,6 +237,13 @@ async def send_wa_reply(
|
|||
if not reply_to and context.data.get(CTX_WA_IS_GROUP):
|
||||
reply_to = context.data.get(CTX_WA_LAST_MSG_ID, "")
|
||||
|
||||
# Prefix response in self-chat mode so user can distinguish agent messages
|
||||
mode = config.get("mode", "dedicated")
|
||||
if mode == "self-chat":
|
||||
response_text = context.agent0.read_prompt(
|
||||
"fw.wa.self_chat_prefix.md", response_text=response_text,
|
||||
)
|
||||
|
||||
# Send text
|
||||
try:
|
||||
result = await wa_client.send_message(base_url, chat_id, response_text, reply_to=reply_to)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,2 @@
|
|||
[🤖 Agent Zero]
|
||||
{{response_text}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue