WeKnora/internal/application
linhongyu510 df7e84eb30 fix(message): log why chat history indexing was skipped
IndexMessageToKB returned silently when getChatHistoryConfig yielded nil,
so an operator who enabled message indexing in the UI could see
"indexed messages: 0" with nothing in the logs to explain it.

The two paths disagree on what "enabled" means:

  GetChatHistoryKBStats  -> cfg != nil && cfg.Enabled
  IndexMessageToKB       -> cfg.IsConfigured(), which also requires
                            EmbeddingModelID != "" && KnowledgeBaseID != ""

So Enabled=true with either field empty reports the feature as on while
every message is skipped, and the skip emitted no log line at all.

Log the specific missing precondition instead. Behaviour is unchanged -
this only makes an existing silent path attributable.
2026-09-05 16:52:27 +08:00
..
repository fix(models): show usage details when deletion is blocked (#2975) 2026-09-02 17:20:37 +08:00
service fix(message): log why chat history indexing was skipped 2026-09-05 16:52:27 +08:00