fix toolbar error

This commit is contained in:
Mery-Sanz 2025-06-16 12:56:45 +02:00
parent 191b657c6a
commit 845a2da4e2
2 changed files with 4 additions and 3 deletions

View File

@ -906,7 +906,8 @@ Model: {get_compact_model() or os.environ.get("CAI_MODEL", "gpt-4")}
# Register the memory in the index
self._register_memory(memory_id, memory_name)
os.environ['CAI_MEMORY'] = 'true'
console.print(f"[green]✓ Saved memory: {memory_name} (ID: {memory_id})[/green]")
# Automatically apply the memory to the agent's system prompt

View File

@ -157,8 +157,8 @@ def update_toolbar_in_background():
auto_compact_color = "ansired"
# Get memory status
memory_enabled = os.getenv('CAI_MEMORY', 'false').lower() != 'false'
memory_str = os.getenv('CAI_MEMORY', 'false') if memory_enabled else ""
memory_enabled = os.getenv('CAI_MEMORY', 'false').lower() == 'true'
memory_str = "" if memory_enabled else ""
memory_color = "ansigreen" if memory_enabled else "ansigray"
# Get streaming status