mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-01 21:20:33 +00:00
Memory extensions, UI updates
Auto memory extensions for main and solutions areas UI updates, error toasts, progress bar
This commit is contained in:
parent
0992d52768
commit
d233e0c94f
41 changed files with 1132 additions and 933 deletions
|
|
@ -22,8 +22,8 @@ class Tool:
|
|||
pass
|
||||
|
||||
async def before_execution(self, **kwargs):
|
||||
PrintStyle(font_color="#1B4F72", padding=True, background_color="white", bold=True).print(f"{self.agent.agent_name}: Using tool '{self.name}':")
|
||||
self.log = self.agent.context.log.log(type="tool", heading=f"{self.agent.agent_name}: Using tool '{self.name}':", content="", kvps=self.args)
|
||||
PrintStyle(font_color="#1B4F72", padding=True, background_color="white", bold=True).print(f"{self.agent.agent_name}: Using tool '{self.name}'")
|
||||
self.log = self.agent.context.log.log(type="tool", heading=f"{self.agent.agent_name}: Using tool '{self.name}'", content="", kvps=self.args)
|
||||
if self.args and isinstance(self.args, dict):
|
||||
for key, value in self.args.items():
|
||||
PrintStyle(font_color="#85C1E9", bold=True).stream(self.nice_key(key)+": ")
|
||||
|
|
@ -34,7 +34,7 @@ class Tool:
|
|||
text = messages.truncate_text(self.agent, response.message.strip(), self.agent.config.max_tool_response_length)
|
||||
msg_response = self.agent.read_prompt("fw.tool_response.md", tool_name=self.name, tool_response=text)
|
||||
await self.agent.append_message(msg_response, human=True)
|
||||
PrintStyle(font_color="#1B4F72", background_color="white", padding=True, bold=True).print(f"{self.agent.agent_name}: Response from tool '{self.name}':")
|
||||
PrintStyle(font_color="#1B4F72", background_color="white", padding=True, bold=True).print(f"{self.agent.agent_name}: Response from tool '{self.name}'")
|
||||
PrintStyle(font_color="#85C1E9").print(response.message)
|
||||
self.log.update(content=response.message)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue