Skip to content

Conversation

@cameronr
Copy link
Collaborator

@cameronr cameronr commented Nov 4, 2025

When loading a session, clear state.current_model and set it to the model used by the most recent message.

Topbar shouldn't set a model as a side effect, it should just display what's been selected.

Add core.initialize_current_model() which will initialize state.current_model to the default from the config_file if it hasn't been set

I think this achieves the behavior described in #96 (comment):

  • If you load a session, it will set state.current_model to the model most recently used in that session
  • If you create a new session, state.current_model will get re-initialized to the default
  • Rerendering a session won't change state.current_model

When loading a session, clear state.current_model and set it to the
model used by the most recent message.

Topbar shouldn't set a model as a side effect, it should just display
what's been selected.

Add `core.initialize_current_model()` which will initialize
state.current_model to the default from the config_file if it hasn't
been set
@sudo-tee
Copy link
Owner

sudo-tee commented Nov 4, 2025

Thanks for having a look at this.

I wanted to have a look pretty soon. You beat me to it 😁.

@sudo-tee sudo-tee merged commit 94ce86a into sudo-tee:main Nov 4, 2025
5 checks passed
@cameronr cameronr deleted the refactor/model-init branch November 6, 2025 01:22
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