Select thinking mode from the chat

This commit is contained in:
Georg Bauer
2026-08-01 09:49:37 +02:00
parent d0431edaff
commit c0e4ec13cc
5 changed files with 104 additions and 9 deletions

View File

@@ -345,7 +345,7 @@ fn optional_string<T: ToString>(value: Option<T>) -> String {
value.map_or_else(String::new, |value| value.to_string())
}
fn update_runtime_config(runtime_config: &RwLock<Config>, config: &Config) {
pub(super) fn update_runtime_config(runtime_config: &RwLock<Config>, config: &Config) {
*runtime_config
.write()
.unwrap_or_else(|poisoned| poisoned.into_inner()) = config.clone();

View File

@@ -305,6 +305,19 @@ impl App {
.text_size(12)
.padding([2, 6])
});
let reasoning_mode = self.config.generation.effective_reasoning_mode();
let reasoning_control: Element<'_, Message> = if self.active_chat_count() > 0 {
text(reasoning_mode.to_string()).size(12).into()
} else {
pick_list(
self.config.generation.supported_reasoning_modes(),
Some(reasoning_mode),
Message::ReasoningModeChanged,
)
.text_size(12)
.padding([2, 6])
.into()
};
composer_content =
composer_content.push(
row![
@@ -341,6 +354,7 @@ impl App {
)
.text_size(12)
.padding([2, 6]),
reasoning_control,
icon(ICON_MODEL, 16),
text(self.config.model.to_string()).size(12),
action,