Move preferences from the database to a YAML config file

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Georg Bauer
2026-07-26 09:50:39 +02:00
parent 3f2c42513f
commit 5d441038bc
19 changed files with 571 additions and 964 deletions

View File

@@ -19,55 +19,6 @@ diesel::table! {
}
}
diesel::table! {
preferences (id) {
id -> Integer,
selected_model -> Text,
dspark_enabled -> Bool,
idle_timeout_minutes -> Integer,
context_tokens -> Integer,
max_generated_tokens -> Integer,
system_prompt -> Text,
temperature -> Nullable<Float>,
top_p -> Nullable<Float>,
min_p -> Nullable<Float>,
seed -> Nullable<Text>,
reasoning_mode -> Text,
cpu_threads -> Nullable<Integer>,
power_percent -> Nullable<Integer>,
prefill_chunk -> Nullable<Integer>,
quality -> Bool,
warm_weights -> Bool,
mtp_draft_tokens -> Integer,
mtp_margin -> Float,
glm_mtp -> Bool,
glm_mtp_timing -> Bool,
dspark_confidence_threshold -> Nullable<Float>,
dspark_strict -> Bool,
ssd_streaming -> Bool,
ssd_streaming_cold -> Bool,
ssd_cache_experts -> Nullable<BigInt>,
ssd_cache_gib -> Nullable<BigInt>,
ssd_full_layers -> Nullable<Integer>,
ssd_preload_experts -> Nullable<Integer>,
directional_steering_file -> Nullable<Text>,
directional_steering_ffn -> Nullable<Float>,
directional_steering_attn -> Nullable<Float>,
simulated_used_memory_gib -> Nullable<BigInt>,
expert_profile_path -> Nullable<Text>,
endpoint_port -> Integer,
endpoint_enabled -> Bool,
endpoint_cors -> Bool,
sidebar_collapsed -> Bool,
last_project_id -> Nullable<Integer>,
sidebar_width -> Integer,
kv_budget_gib -> Nullable<BigInt>,
kv_min_tokens -> Nullable<Integer>,
kv_cold_max_tokens -> Nullable<Integer>,
kv_continued_interval_tokens -> Nullable<Integer>,
}
}
diesel::table! {
sessions (id) {
id -> Integer,
@@ -82,4 +33,4 @@ diesel::table! {
diesel::joinable!(sessions -> projects (project_id));
diesel::joinable!(messages -> sessions (session_id));
diesel::allow_tables_to_appear_in_same_query!(messages, preferences, projects, sessions);
diesel::allow_tables_to_appear_in_same_query!(messages, projects, sessions);