Skip to content

fix(cli): align session import with runtime message storage#203

Merged
duguwanglong merged 1 commit intomainfrom
fix/cli-import-runtime-message-storage
Apr 28, 2026
Merged

fix(cli): align session import with runtime message storage#203
duguwanglong merged 1 commit intomainfrom
fix/cli-import-runtime-message-storage

Conversation

@xiami762
Copy link
Copy Markdown
Contributor

Summary

Session import now writes the same aggregated keys the runtime and WebUI expect (message:<session_id>, message_parts:<session_id>) instead of legacy per-message keys.

Changes

  • Normalize legacy/exported part payloads (tool state, reasoning timestamps, etc.) before persistence.
  • Update round-trip tests and add coverage for aggregated storage and legacy reasoning parts.

Testing

uv run pytest tests/cli/test_export_import.py -q — all passed.

Made with Cursor

- Persist messages under message:<session_id> and message_parts:<session_id>
  instead of per-message keys so WebUI/Message.list_with_parts work.
- Normalize legacy exported parts (tool state, reasoning time, etc.).
- Add tests for aggregated storage format and legacy reasoning payloads.

Made-with: Cursor
@duguwanglong duguwanglong merged commit 83193e8 into main Apr 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants