Conversation
Continuing a conversation without passing `--cfg` flags caused the conversation's model and tools to be silently reset to defaults on each invocation. The root cause was a sequencing issue: `apply_conversation_config` runs inside `load_partial_config` and needs to access the active conversation's stream config from disk. Previously, `load_conversations_from_disk` was called _after_ `load_partial_config`, so events weren't loaded yet. The merge fell back to an empty partial and overwrote whatever the conversation had stored. The fix splits the old `load_conversations_from_disk` into two methods. `load_conversation_index` loads conversation IDs, metadata, and `TombMap` entries — everything needed for lazy event access — and is now called _before_ `load_partial_config`. `ensure_active_conversation_stream` handles the one remaining config-dependent step (creating a default stream for fresh workspaces) and runs _after_ the final `AppConfig` is built. Signed-off-by: Jean Mertz <git@jeanmertz.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Continuing a conversation without passing
--cfgflags caused the conversation's model and tools to be silently reset to defaults on each invocation.The root cause was a sequencing issue:
apply_conversation_configruns insideload_partial_configand needs to access the active conversation's stream config from disk. Previously,load_conversations_from_diskwas called afterload_partial_config, so events weren't loaded yet. The merge fell back to an empty partial and overwrote whatever the conversation had stored.The fix splits the old
load_conversations_from_diskinto two methods.load_conversation_indexloads conversation IDs, metadata, andTombMapentries — everything needed for lazy event access — and is now called beforeload_partial_config.ensure_active_conversation_streamhandles the one remaining config-dependent step (creating a default stream for fresh workspaces) and runs after the finalAppConfigis built.