mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-23 12:44:31 +00:00
Add user-configurable timezone and 12/24-hour preferences, then wire them through settings, runtime snapshots, scheduler payloads, wait handling, notifications, backups, memory, plugin metadata, and frontend formatters. Keep UTC as the boundary for absolute instants while serializing user-facing dates in the configured or browser-resolved timezone. Preserve scheduler wall-clock inputs in the selected timezone, propagate TZ into desktop/runtime process environments, and restart active desktop sessions when the runtime timezone changes. Cover the risky paths with timezone regression tests for settings normalization, auto and fixed timezone resolution, scheduler round-trips, memory timestamp conversion, and desktop timezone sync. |
||
|---|---|---|
| .. | ||
| api | ||
| extensions/webui/set_messages_after_loop | ||
| webui | ||
| plugin.yaml | ||
| README.md | ||
Chat Branching
Create a new chat from any existing point in a conversation.
What It Does
Adds a Branch button to every chat message. Clicking it clones the current chat up to that message, creating a new conversation you can continue independently.
How It Works
-
ID-based log ↔ history linking Every
LogItemandhistory.Messageshare a UUID generated at creation time. The branch button is only shown on messages that carry this ID. -
Clone & trim
- Serializes the source context → deserializes into a new context with a fresh ID.
- Walks log entries: keeps everything up to the selected
log_no, discards the rest. - Collects the IDs of kept entries and uses them to trim
history.messagesso log and history stay consistent.
-
Persist & refresh
- Saves the branched chat immediately.
- Marks UI state dirty so all connected tabs see the new branch.
Entry Points
| Path | Purpose |
|---|---|
api/branch_chat.py |
API endpoint — clone, trim, persist |
extensions/webui/set_messages_after_loop/inject-branch-buttons.js |
Injects the Branch button into each message DOM element |
Plugin Metadata
- Name:
_chat_branching - Title:
Chat Branching - Description: Branch a chat from any message, creating a new chat with history up to that point.