@@ -20,32 +20,34 @@ func (e *ErrValidation) Error() string { return e.Msg }
2020
2121// allowedKeys 是用户可配置的 key 集合及其默认值。
2222var allowedKeys = map [string ]string {
23- "chat.file_mode" : "auto" ,
24- "chat.send_on_enter" : "enter" ,
25- "chat.show_token_usage" : "true" ,
26- "chat.show_model_info" : "true" ,
27- "chat.show_latency" : "true" ,
28- "chat.show_billing_cost" : "true" ,
29- "chat.default_model" : "" ,
30- "chat.auto_generate_title" : "true" ,
31- "chat.context_compact_auto" : "true" ,
32- "chat.markdown_render" : "true" ,
33- "chat.restore_draft_on_failure" : "true" ,
34- "chat.preserve_conversation_drafts" : "true" ,
35- "chat.input_height" : "standard" ,
23+ "chat.file_mode" : "auto" ,
24+ "chat.send_on_enter" : "enter" ,
25+ "chat.show_token_usage" : "true" ,
26+ "chat.show_model_info" : "true" ,
27+ "chat.show_latency" : "true" ,
28+ "chat.show_billing_cost" : "true" ,
29+ "chat.default_model" : "" ,
30+ "chat.auto_generate_title" : "true" ,
31+ "chat.delete_conversation_files_by_default" : "false" ,
32+ "chat.context_compact_auto" : "true" ,
33+ "chat.markdown_render" : "true" ,
34+ "chat.restore_draft_on_failure" : "true" ,
35+ "chat.preserve_conversation_drafts" : "true" ,
36+ "chat.input_height" : "standard" ,
3637}
3738
3839// boolKeys 取值只能是 "true" / "false"。
3940var boolKeys = map [string ]bool {
40- "chat.show_token_usage" : true ,
41- "chat.show_model_info" : true ,
42- "chat.show_latency" : true ,
43- "chat.show_billing_cost" : true ,
44- "chat.auto_generate_title" : true ,
45- "chat.context_compact_auto" : true ,
46- "chat.markdown_render" : true ,
47- "chat.restore_draft_on_failure" : true ,
48- "chat.preserve_conversation_drafts" : true ,
41+ "chat.show_token_usage" : true ,
42+ "chat.show_model_info" : true ,
43+ "chat.show_latency" : true ,
44+ "chat.show_billing_cost" : true ,
45+ "chat.auto_generate_title" : true ,
46+ "chat.delete_conversation_files_by_default" : true ,
47+ "chat.context_compact_auto" : true ,
48+ "chat.markdown_render" : true ,
49+ "chat.restore_draft_on_failure" : true ,
50+ "chat.preserve_conversation_drafts" : true ,
4951}
5052
5153// enumKeys 枚举 key 的合法值集合。
0 commit comments