Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src-tauri/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,11 @@ pub(crate) struct AppSettings {
rename = "showMessageFilePath"
)]
pub(crate) show_message_file_path: bool,
#[serde(
default = "default_chat_history_scrollback_items",
rename = "chatHistoryScrollbackItems"
)]
pub(crate) chat_history_scrollback_items: Option<u32>,
#[serde(default, rename = "threadTitleAutogenerationEnabled")]
pub(crate) thread_title_autogeneration_enabled: bool,
#[serde(default = "default_ui_font_family", rename = "uiFontFamily")]
Expand Down Expand Up @@ -760,6 +765,10 @@ fn default_show_message_file_path() -> bool {
true
}

fn default_chat_history_scrollback_items() -> Option<u32> {
Some(200)
}

fn default_ui_font_family() -> String {
"system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif".to_string()
}
Expand Down Expand Up @@ -1187,6 +1196,7 @@ impl Default for AppSettings {
theme: default_theme(),
usage_show_remaining: default_usage_show_remaining(),
show_message_file_path: default_show_message_file_path(),
chat_history_scrollback_items: default_chat_history_scrollback_items(),
thread_title_autogeneration_enabled: false,
ui_font_family: default_ui_font_family(),
code_font_family: default_code_font_family(),
Expand Down Expand Up @@ -1350,6 +1360,7 @@ mod tests {
assert_eq!(settings.theme, "system");
assert!(!settings.usage_show_remaining);
assert!(settings.show_message_file_path);
assert_eq!(settings.chat_history_scrollback_items, Some(200));
assert!(!settings.thread_title_autogeneration_enabled);
assert!(settings.ui_font_family.contains("system-ui"));
assert!(settings.code_font_family.contains("ui-monospace"));
Expand Down
3 changes: 3 additions & 0 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,9 @@ function MainApp() {
reviewDeliveryMode: appSettings.reviewDeliveryMode,
steerEnabled: appSettings.steerEnabled,
threadTitleAutogenerationEnabled: appSettings.threadTitleAutogenerationEnabled,
chatHistoryScrollbackItems: appSettingsLoading
? null
: appSettings.chatHistoryScrollbackItems,
customPrompts: prompts,
onMessageActivity: handleThreadMessageActivity,
threadSortKey: threadListSortKey,
Expand Down
Loading
Loading