-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Add session header to chat widget #3592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add session header to chat widget #3592
Conversation
da1ed96
to
f49a42d
Compare
codex-rs/tui/src/chatwidget.rs
Outdated
@@ -1278,7 +1302,11 @@ impl ChatWidget { | |||
|
|||
/// Set the model in the widget's config copy. | |||
pub(crate) fn set_model(&mut self, model: String) { | |||
let header_changed = self.session_header.set_model(model.clone()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change model
to be &str
instead of String
and avoid clone()
when it's not really necessary.
Self { model } | ||
} | ||
|
||
pub(crate) fn set_model(&mut self, model: String) -> bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please document the return type.
} | ||
|
||
impl SessionHeader { | ||
// Keep signature to avoid changing call sites; underscore params silence warnings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this new in this PR? Why are these being passed in?
Uh oh!
There was an error while loading. Please reload this page.