Commit Graph
22 Commits
Author SHA1 Message Date
Lingao MengandXubin Ren 3f8eafc89a fix(provider): restore reasoning_content and extra_content in message sanitization
reasoning_content and extra_content were accidentally dropped from
_ALLOWED_MSG_KEYS.

Also fix session/manager.py to include reasoning_content when building
LLM messages from session history, so the field is not lost across
turns.

Without this fix, providers such as Kimi, emit reasoning_content in
assistant messages will have it stripped on the next request, breaking
multi-turn thinking mode.

Fixes: https://github.com/HKUDS/nanobot/issues/2777
Signed-off-by: Lingao Meng <menglingao@xiaomi.com>
2026-04-04 20:08:44 +08:00
Xubin Ren fbedf7ad77 feat: harden agent runtime for long-running tasks 2026-04-01 19:12:49 +00:00
Xubin RenandXubin Ren 2056061765 refine heartbeat session retention boundaries 2026-03-24 00:33:43 +08:00
Xubin RenandXubin Ren 92f3d5a8b3 fix: keep truncated session history tool-call consistent 2026-03-16 17:25:30 +08:00
riseandXubin Ren db276bdf2b Fix orphan tool results in truncated session history 2026-03-16 17:25:30 +08:00
Re-bin 20dfaa5d34 refactor: unify instance path resolution and preserve workspace override 2026-03-08 02:58:25 +00:00
JK_Lu 977ca725f2 style: unify code formatting and import order
- Remove trailing whitespace and normalize blank lines
- Unify string quotes and line breaks for long lines
- Sort imports alphabetically across modules
2026-02-28 20:55:43 +08:00
Re-bin 2f573e591b fix(session): get_history uses last_consolidated cursor, aligns to user turn 2026-02-23 16:57:08 +00:00
Re-bin 71de1899e6 fix(session): use logger.exception and move import to top 2026-02-22 15:40:17 +00:00
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