Commit Graph

13 Commits

Author SHA1 Message Date
andienguyen-ecoligo
54a0f3d038 fix(session): handle errors in legacy session migration
shutil.move() in _load() can fail due to permissions, disk full, or
concurrent access. Without error handling, the exception propagates up
and prevents the session from loading entirely.

Wrap in try/except so migration failures are logged as warnings and the
session falls back to loading from the legacy path on next attempt.

Fixes #863
2026-02-21 12:35:21 -05:00
Re-bin
d9cc144575 style: remove redundant comment in list_sessions 2026-02-20 15:42:24 +00:00
Nikolas de Hor
73530d51ac fix: store session key in JSONL metadata to avoid lossy filename reconstruction
list_sessions() previously reconstructed the session key by replacing all
underscores in the filename with colons. This is lossy: a key like
'cli:user_name' became 'cli:user:name' after round-tripping.

Now the actual key is persisted in the metadata line during save() and read
back in list_sessions(). Legacy files without the key field fall back to
replacing only the first underscore, which handles the common channel:chat_id
pattern correctly.

Closes #899
2026-02-20 09:57:11 -03:00
Re-bin
73fdd0dd45 fix: complete ensure_ascii=False and UTF-8 encoding migration 2026-02-20 07:59:32 +00:00
Re-bin
37252a4226 fix: complete loguru native formatting migration across all files 2026-02-20 07:55:34 +00:00
Nikolas de Hor
53b83a38e2 fix: use loguru native formatting to prevent KeyError on messages containing curly braces
Closes #857
2026-02-19 17:19:36 -03:00
chtangwin
c7b5dd9350 Fix: Ensure UTF-8 encoding for all file operations 2026-02-18 18:28:54 -08:00
Re-bin
27a131830f refine: migrate legacy sessions on load and simplify get_history 2026-02-18 05:09:57 +00:00
Kiplangatkorir
8f49b52079 Scope sessions to workspace with legacy fallback 2026-02-16 15:22:15 +03:00
Re-bin
f821e95d3c fix: wire max_tokens/temperature to all chat calls, clean up redundant comments 2026-02-14 01:40:37 +00:00
chengyongru
a3f4bb74ff fix: increase max_messages to 500 as temporary workaround
Temporarily increase default max_messages from 50 to 500 to allow
more context in conversations until a proper consolidation strategy
is implemented.
2026-02-13 22:10:53 +08:00
chengyongru
740294fd74 fix: history messages should not be change[kvcache] 2026-02-13 15:10:07 +08:00
Re-bin
d4cc48afd5 🐈nanobot: hello world! 2026-02-01 07:36:42 +00:00