HERMES-GIELIE/api
Nathan Esquenazi 8aa1c9684d
fix: sync message_count to state.db for /insights (#163) (#164)
* fix: sync message_count to state.db for /insights (#163)

sync_session_usage() didn't write message_count to state.db, so
/insights showed 0 messages for all WebUI sessions even with
sync_to_insights enabled.

Added message_count parameter to sync_session_usage() and pass
len(s.messages) from both the streaming and non-streaming chat paths.

Fixes #163

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: use callable pattern for _execute_write in sync_session_usage

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-06 22:56:27 -07:00
..
__init__.py Hermes Web UI — Sprints 11-14: multi-provider models, settings, session QoL, alerts, polish 2026-03-31 07:02:47 +00:00
auth.py fix: correct 9 inaccurate type hints 2026-04-04 23:54:58 -07:00
config.py fix: custom endpoint URL, custom_providers in dropdown, .env key resolution (#157) (#160) 2026-04-06 14:39:19 -07:00
helpers.py chore: add missing type hints across 10 files 2026-04-05 13:30:20 +07:00
models.py feat: /personality slash command with backend integration (#143) 2026-04-06 11:16:37 -07:00
profiles.py chore: add missing type hints across 10 files 2026-04-05 13:30:20 +07:00
routes.py fix: sync message_count to state.db for /insights (#163) (#164) 2026-04-06 22:56:27 -07:00
state_sync.py fix: sync message_count to state.db for /insights (#163) (#164) 2026-04-06 22:56:27 -07:00
streaming.py fix: sync message_count to state.db for /insights (#163) (#164) 2026-04-06 22:56:27 -07:00
updates.py fix: apply_update concurrency lock, boot.js settings-fail guard, dead workspace code, test_updates URL param 2026-04-05 16:20:12 +00:00
upload.py chore: add missing type hints across 10 files 2026-04-05 13:30:20 +07:00
workspace.py chore: add missing type hints across 10 files 2026-04-05 13:30:20 +07:00