cc-switch-tui 0.1.2

All-in-One Assistant for Claude Code, Codex, Gemini, OpenCode, OpenClaw & Hermes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
use super::is_chinese;

pub fn tui_claude_api_format_popup_title() -> &'static str {
    if is_chinese() {
        "API 格式"
    } else {
        "API Format"
    }
}

pub fn tui_label_claude_model_config() -> &'static str {
    if is_chinese() {
        "Claude 模型配置"
    } else {
        "Claude Model Config"
    }
}

pub fn tui_label_provider_package() -> &'static str {
    if is_chinese() {
        "Provider / npm 包"
    } else {
        "Provider / npm"
    }
}

pub fn tui_label_opencode_model_id() -> &'static str {
    if is_chinese() {
        "主模型 ID"
    } else {
        "Main Model ID"
    }
}

pub fn tui_label_opencode_model_name() -> &'static str {
    if is_chinese() {
        "主模型名称"
    } else {
        "Main Model Name"
    }
}

pub fn tui_label_context_limit() -> &'static str {
    if is_chinese() {
        "上下文限制"
    } else {
        "Context Limit"
    }
}

pub fn tui_label_output_limit() -> &'static str {
    if is_chinese() {
        "输出限制"
    } else {
        "Output Limit"
    }
}

pub fn tui_label_command() -> &'static str {
    if is_chinese() {
        "命令"
    } else {
        "Command"
    }
}

pub fn tui_label_mcp_type() -> &'static str {
    if is_chinese() {
        "连接类型"
    } else {
        "Transport"
    }
}

pub fn tui_label_url() -> &'static str {
    if is_chinese() {
        "URL"
    } else {
        "URL"
    }
}

pub fn tui_label_args() -> &'static str {
    if is_chinese() {
        "参数"
    } else {
        "Args"
    }
}

pub fn tui_label_env() -> &'static str {
    if is_chinese() {
        "环境变量"
    } else {
        "Env"
    }
}

pub fn tui_mcp_env_entry_count(count: usize) -> String {
    if is_chinese() {
        format!("{count}")
    } else if count == 1 {
        "1 entry".to_string()
    } else {
        format!("{count} entries")
    }
}

pub fn tui_mcp_env_editor_hint() -> &'static str {
    if is_chinese() {
        "按 Enter 管理环境变量"
    } else {
        "Press Enter to manage env entries"
    }
}

pub fn tui_mcp_type_editor_hint() -> &'static str {
    if is_chinese() {
        "按 Enter 选择连接类型"
    } else {
        "Press Enter to choose transport"
    }
}

pub fn tui_mcp_type_title() -> &'static str {
    if is_chinese() {
        "选择 MCP 连接类型"
    } else {
        "Select MCP Transport"
    }
}

pub fn tui_mcp_env_key_label() -> &'static str {
    if is_chinese() {
        ""
    } else {
        "Key"
    }
}

pub fn tui_mcp_env_value_label() -> &'static str {
    if is_chinese() {
        ""
    } else {
        "Value"
    }
}

pub fn tui_label_app_claude() -> &'static str {
    if is_chinese() {
        "应用: Claude"
    } else {
        "App: Claude"
    }
}

pub fn tui_label_app_codex() -> &'static str {
    if is_chinese() {
        "应用: Codex"
    } else {
        "App: Codex"
    }
}

pub fn tui_label_app_gemini() -> &'static str {
    if is_chinese() {
        "应用: Gemini"
    } else {
        "App: Gemini"
    }
}

pub fn tui_label_app_opencode() -> &'static str {
    if is_chinese() {
        "应用: OpenCode"
    } else {
        "App: OpenCode"
    }
}

pub fn tui_label_app_openclaw() -> &'static str {
    if is_chinese() {
        "应用: OpenClaw"
    } else {
        "App: OpenClaw"
    }
}

pub fn tui_label_app_hermes() -> &'static str {
    if is_chinese() {
        "应用: Hermes"
    } else {
        "App: Hermes"
    }
}

pub fn tui_form_templates_title() -> &'static str {
    if is_chinese() {
        "模板"
    } else {
        "Templates"
    }
}

pub fn tui_form_common_config_button() -> &'static str {
    if is_chinese() {
        "通用配置"
    } else {
        "Common Config"
    }
}

pub fn tui_form_attach_common_config() -> &'static str {
    if is_chinese() {
        "添加通用配置"
    } else {
        "Attach Common Config"
    }
}

pub fn tui_form_fields_title() -> &'static str {
    if is_chinese() {
        "字段"
    } else {
        "Fields"
    }
}

pub fn tui_form_json_title() -> &'static str {
    "JSON"
}

pub fn tui_codex_auth_json_title() -> &'static str {
    if is_chinese() {
        "auth.json (JSON) *"
    } else {
        "auth.json (JSON) *"
    }
}

pub fn tui_codex_config_toml_title() -> &'static str {
    if is_chinese() {
        "config.toml (TOML)"
    } else {
        "config.toml (TOML)"
    }
}

pub fn tui_form_input_title() -> &'static str {
    if is_chinese() {
        "输入"
    } else {
        "Input"
    }
}

pub fn tui_form_editing_title() -> &'static str {
    if is_chinese() {
        "编辑中"
    } else {
        "Editing"
    }
}

pub fn tui_claude_model_config_popup_title() -> &'static str {
    if is_chinese() {
        "Claude 模型配置"
    } else {
        "Claude Model Configuration"
    }
}

pub fn tui_claude_model_main_label() -> &'static str {
    if is_chinese() {
        "主模型"
    } else {
        "Main Model"
    }
}

pub fn tui_claude_reasoning_model_label() -> &'static str {
    if is_chinese() {
        "推理模型 (Thinking)"
    } else {
        "Reasoning Model (Thinking)"
    }
}

pub fn tui_claude_default_haiku_model_label() -> &'static str {
    if is_chinese() {
        "默认 Haiku 模型"
    } else {
        "Default Haiku Model"
    }
}

pub fn tui_claude_default_sonnet_model_label() -> &'static str {
    if is_chinese() {
        "默认 Sonnet 模型"
    } else {
        "Default Sonnet Model"
    }
}

pub fn tui_claude_default_opus_model_label() -> &'static str {
    if is_chinese() {
        "默认 Opus 模型"
    } else {
        "Default Opus Model"
    }
}

pub fn tui_claude_model_config_summary(configured_count: usize) -> String {
    if is_chinese() {
        format!("已配置 {configured_count}/5")
    } else {
        format!("Configured {configured_count}/5")
    }
}

pub fn tui_claude_model_config_open_hint() -> &'static str {
    if is_chinese() {
        "按 Enter 配置 Claude 模型"
    } else {
        "Press Enter to configure Claude models"
    }
}

pub fn tui_hint_press() -> &'static str {
    if is_chinese() {
        ""
    } else {
        "Press "
    }
}

pub fn tui_hint_auto_fetch_models_from_api() -> &'static str {
    if is_chinese() {
        " 从 API 自动获取模型。"
    } else {
        " to auto-fetch models from API."
    }
}

pub fn tui_model_fetch_popup_title(fetching: bool) -> String {
    if is_chinese() {
        if fetching {
            "选择模型 (获取中...)".to_string()
        } else {
            "选择模型".to_string()
        }
    } else {
        if fetching {
            "Select Model (Fetching...)".to_string()
        } else {
            "Select Model".to_string()
        }
    }
}

pub fn tui_model_fetch_search_placeholder() -> &'static str {
    if is_chinese() {
        "输入过滤 或 直接回车使用输入值..."
    } else {
        "Type to filter, or press Enter to use input..."
    }
}

pub fn tui_model_fetch_search_title() -> &'static str {
    if is_chinese() {
        "模型搜索"
    } else {
        "Model Search"
    }
}

pub fn tui_model_fetch_no_models() -> &'static str {
    if is_chinese() {
        "没有获取到模型 (可直接输入并在此回车)"
    } else {
        "No models found (type custom and press Enter)"
    }
}

pub fn tui_model_fetch_no_matches() -> &'static str {
    if is_chinese() {
        "没有匹配结果 (可直接输入并在此回车)"
    } else {
        "No matching models (press Enter to use input)"
    }
}

pub fn tui_model_fetch_error_hint(err: &str) -> String {
    if is_chinese() {
        format!("获取失败: {}", err)
    } else {
        format!("Fetch failed: {}", err)
    }
}

pub fn tui_provider_not_found() -> &'static str {
    if is_chinese() {
        "未找到该供应商。"
    } else {
        "Provider not found."
    }
}

pub fn tui_provider_title() -> &'static str {
    if is_chinese() {
        "供应商"
    } else {
        "Provider"
    }
}

pub fn tui_provider_detail_title() -> &'static str {
    if is_chinese() {
        "供应商详情"
    } else {
        "Provider Detail"
    }
}

pub fn tui_provider_add_title() -> &'static str {
    if is_chinese() {
        "新增供应商"
    } else {
        "Add Provider"
    }
}

pub fn tui_provider_empty_title() -> &'static str {
    if is_chinese() {
        "还没有添加任何供应商"
    } else {
        "No providers have been added yet"
    }
}

pub fn tui_provider_empty_subtitle() -> &'static str {
    if is_chinese() {
        "如果你已有配置,请点击\"导入当前配置\",所有数据将安全保存在 default 供应商中"
    } else {
        "If you already have a config, use \"Import Current Config\". Everything will be safely stored in the default provider."
    }
}

pub fn tui_key_import_current_config() -> &'static str {
    if is_chinese() {
        "导入当前配置"
    } else {
        "import current config"
    }
}

pub fn tui_key_add_provider() -> &'static str {
    if is_chinese() {
        "添加供应商"
    } else {
        "add provider"
    }
}

pub fn tui_codex_official_no_api_key_tip() -> &'static str {
    if is_chinese() {
        "官方无需填写 API Key,直接保存即可。"
    } else {
        "Official provider doesn't require an API key. Just save."
    }
}

pub fn tui_toast_codex_official_auth_json_disabled() -> &'static str {
    if is_chinese() {
        "官方模式下不支持编辑 auth.json(切换时会移除)。"
    } else {
        "auth.json editing is disabled for the official provider (it will be removed on switch)."
    }
}

pub fn tui_provider_edit_title(name: &str) -> String {
    if is_chinese() {
        format!("编辑供应商: {name}")
    } else {
        format!("Edit Provider: {name}")
    }
}

pub fn tui_provider_detail_keys() -> &'static str {
    if is_chinese() {
        "按键:Space=切换  e=编辑  t=测试"
    } else {
        "Keys: Space=switch  e=edit  t=test"
    }
}

pub fn tui_key_switch() -> &'static str {
    if is_chinese() {
        "切换"
    } else {
        "switch"
    }
}

pub fn tui_key_edit() -> &'static str {
    if is_chinese() {
        "编辑"
    } else {
        "edit"
    }
}

pub fn tui_key_speedtest() -> &'static str {
    if is_chinese() {
        "测速"
    } else {
        "speedtest"
    }
}

pub fn tui_key_test() -> &'static str {
    if is_chinese() {
        "测试"
    } else {
        "test"
    }
}

pub fn tui_key_stream_check() -> &'static str {
    if is_chinese() {
        "健康检查"
    } else {
        "stream check"
    }
}

pub fn tui_key_launch_temp() -> &'static str {
    if is_chinese() {
        "临时启动"
    } else {
        "launch temp"
    }
}

pub fn tui_temp_launch_failed(message: &str) -> String {
    if is_chinese() {
        format!("临时启动失败: {message}")
    } else {
        format!("Temporary launch failed: {message}")
    }
}

pub fn tui_stream_check_status_operational() -> &'static str {
    if is_chinese() {
        "正常"
    } else {
        "operational"
    }
}

pub fn tui_stream_check_status_degraded() -> &'static str {
    if is_chinese() {
        "降级"
    } else {
        "degraded"
    }
}

pub fn tui_stream_check_status_failed() -> &'static str {
    if is_chinese() {
        "失败"
    } else {
        "failed"
    }
}

pub fn tui_key_details() -> &'static str {
    if is_chinese() {
        "详情"
    } else {
        "details"
    }
}

pub fn tui_key_view() -> &'static str {
    if is_chinese() {
        "查看"
    } else {
        "view"
    }
}

pub fn tui_key_add() -> &'static str {
    if is_chinese() {
        "新增"
    } else {
        "add"
    }
}

pub fn tui_key_delete() -> &'static str {
    if is_chinese() {
        "删除"
    } else {
        "delete"
    }
}

pub fn tui_key_import() -> &'static str {
    if is_chinese() {
        "导入"
    } else {
        "import"
    }
}

pub fn tui_key_failover() -> &'static str {
    if is_chinese() {
        "管理故障转移"
    } else {
        "manage failover"
    }
}

pub fn tui_key_install() -> &'static str {
    if is_chinese() {
        "安装"
    } else {
        "install"
    }
}

pub fn tui_key_uninstall() -> &'static str {
    if is_chinese() {
        "卸载"
    } else {
        "uninstall"
    }
}

pub fn tui_key_discover() -> &'static str {
    if is_chinese() {
        "发现"
    } else {
        "discover"
    }
}

pub fn tui_key_unmanaged() -> &'static str {
    if is_chinese() {
        "已有"
    } else {
        "existing"
    }
}

pub fn tui_key_repos() -> &'static str {
    if is_chinese() {
        "仓库"
    } else {
        "repos"
    }
}

pub fn tui_key_sync() -> &'static str {
    if is_chinese() {
        "同步"
    } else {
        "sync"
    }
}

pub fn tui_key_sync_method() -> &'static str {
    if is_chinese() {
        "同步方式"
    } else {
        "sync method"
    }
}

pub fn tui_key_search() -> &'static str {
    if is_chinese() {
        "搜索"
    } else {
        "search"
    }
}

pub fn tui_key_refresh() -> &'static str {
    if is_chinese() {
        "刷新"
    } else {
        "refresh"
    }
}

pub fn tui_key_rename() -> &'static str {
    if is_chinese() {
        "重命名"
    } else {
        "rename"
    }
}

pub fn tui_key_start_proxy() -> &'static str {
    if is_chinese() {
        "启动代理"
    } else {
        "start proxy"
    }
}

pub fn tui_key_stop_proxy() -> &'static str {
    if is_chinese() {
        "停止代理"
    } else {
        "stop proxy"
    }
}

pub fn tui_key_proxy_on() -> &'static str {
    if is_chinese() {
        "代理开"
    } else {
        "proxy on"
    }
}

pub fn tui_key_proxy_off() -> &'static str {
    if is_chinese() {
        "代理关"
    } else {
        "proxy off"
    }
}

pub fn tui_key_focus() -> &'static str {
    if is_chinese() {
        "切换窗口"
    } else {
        "next pane"
    }
}

pub fn tui_key_toggle() -> &'static str {
    if is_chinese() {
        "启用/禁用"
    } else {
        "toggle"
    }
}

pub fn tui_key_apps() -> &'static str {
    if is_chinese() {
        "应用"
    } else {
        "apps"
    }
}

pub fn tui_key_activate() -> &'static str {
    if is_chinese() {
        "激活"
    } else {
        "activate"
    }
}

pub fn tui_key_deactivate() -> &'static str {
    if is_chinese() {
        "取消激活"
    } else {
        "deactivate"
    }
}

pub fn tui_key_open() -> &'static str {
    if is_chinese() {
        "打开"
    } else {
        "open"
    }
}

pub fn tui_key_apply() -> &'static str {
    if is_chinese() {
        "应用"
    } else {
        "apply"
    }
}

pub fn tui_key_edit_snippet() -> &'static str {
    if is_chinese() {
        "编辑片段"
    } else {
        "edit snippet"
    }
}

pub fn tui_key_close() -> &'static str {
    if is_chinese() {
        "关闭"
    } else {
        "close"
    }
}

pub fn tui_key_exit() -> &'static str {
    if is_chinese() {
        "退出"
    } else {
        "exit"
    }
}

pub fn tui_key_cancel() -> &'static str {
    if is_chinese() {
        "取消"
    } else {
        "cancel"
    }
}

pub fn tui_key_submit() -> &'static str {
    if is_chinese() {
        "提交"
    } else {
        "submit"
    }
}

pub fn tui_key_yes() -> &'static str {
    if is_chinese() {
        "确认"
    } else {
        "confirm"
    }
}

pub fn tui_key_no() -> &'static str {
    if is_chinese() {
        "返回"
    } else {
        "back"
    }
}

pub fn tui_key_scroll() -> &'static str {
    if is_chinese() {
        "滚动"
    } else {
        "scroll"
    }
}

pub fn tui_key_restore() -> &'static str {
    if is_chinese() {
        "恢复"
    } else {
        "restore"
    }
}

pub fn tui_key_takeover() -> &'static str {
    if is_chinese() {
        "接管"
    } else {
        "take over"
    }
}

pub fn tui_key_save() -> &'static str {
    if is_chinese() {
        "保存"
    } else {
        "save"
    }
}

pub fn tui_key_external_editor() -> &'static str {
    if is_chinese() {
        "外部编辑器"
    } else {
        "external editor"
    }
}

pub fn tui_key_save_and_exit() -> &'static str {
    if is_chinese() {
        "保存并退出"
    } else {
        "save & exit"
    }
}

pub fn tui_key_exit_without_save() -> &'static str {
    if is_chinese() {
        "不保存退出"
    } else {
        "exit w/o save"
    }
}

pub fn tui_key_edit_mode() -> &'static str {
    if is_chinese() {
        "编辑"
    } else {
        "edit"
    }
}

pub fn tui_key_clear() -> &'static str {
    if is_chinese() {
        "清除"
    } else {
        "clear"
    }
}

pub fn tui_key_move() -> &'static str {
    if is_chinese() {
        "移动"
    } else {
        "move"
    }
}

pub fn tui_key_exit_edit() -> &'static str {
    if is_chinese() {
        "退出编辑"
    } else {
        "exit edit"
    }
}

pub fn tui_key_select() -> &'static str {
    if is_chinese() {
        "选择"
    } else {
        "select"
    }
}

pub fn tui_key_edges() -> &'static str {
    if is_chinese() {
        "首尾"
    } else {
        "top/end"
    }
}

pub fn tui_key_fetch_model() -> &'static str {
    if is_chinese() {
        "获取模型"
    } else {
        "fetch model"
    }
}

pub fn tui_key_deactivate_active() -> &'static str {
    if is_chinese() {
        "取消激活(当前)"
    } else {
        "deactivate active"
    }
}

pub fn tui_provider_list_keys() -> &'static str {
    if is_chinese() {
        "按键:a=新增  e=编辑  Enter=详情  s=切换  /=搜索"
    } else {
        "Keys: a=add  e=edit  Enter=details  s=switch  /=filter"
    }
}

pub fn tui_home_ascii_logo() -> &'static str {
    // Same ASCII art across languages.
    r#"                                  _  _         _
   ___  ___        ___ __      __(_)| |_  ___ | |__
  / __|/ __|_____ / __|\ \ /\ / /| || __|/ __|| '_ \
 | (__| (__|_____|\__ \ \ V  V / | || |_| (__ | | | |
  \___|\___|      |___/  \_/\_/  |_| \__|\___||_| |_|
                                                  "#
}

pub fn tui_common_snippet_keys() -> &'static str {
    if is_chinese() {
        "按键:e=编辑  c=清除  a=应用  Esc=返回"
    } else {
        "Keys: e=edit  c=clear  a=apply  Esc=back"
    }
}

pub fn tui_view_config_app(app: &str) -> String {
    if is_chinese() {
        format!("应用: {}", app)
    } else {
        format!("App: {}", app)
    }
}

pub fn tui_view_config_provider(provider: &str) -> String {
    if is_chinese() {
        format!("供应商: {}", provider)
    } else {
        format!("Provider: {}", provider)
    }
}

pub fn tui_view_config_api_url(url: &str) -> String {
    if is_chinese() {
        format!("API URL:  {}", url)
    } else {
        format!("API URL:  {}", url)
    }
}

pub fn tui_view_config_mcp_servers(enabled: usize, total: usize) -> String {
    if is_chinese() {
        format!("MCP 服务器: {} 启用 / {} 总数", enabled, total)
    } else {
        format!("MCP servers: {} enabled / {} total", enabled, total)
    }
}

pub fn tui_view_config_prompts(active: &str) -> String {
    if is_chinese() {
        format!("提示词: {}", active)
    } else {
        format!("Prompts: {}", active)
    }
}

pub fn tui_view_config_config_file(path: &str) -> String {
    if is_chinese() {
        format!("配置文件: {}", path)
    } else {
        format!("Config file: {}", path)
    }
}

pub fn tui_settings_header_language() -> &'static str {
    if is_chinese() {
        "语言"
    } else {
        "Language"
    }
}

pub fn tui_settings_header_setting() -> &'static str {
    if is_chinese() {
        "设置项"
    } else {
        "Setting"
    }
}

pub fn tui_settings_header_value() -> &'static str {
    if is_chinese() {
        ""
    } else {
        "Value"
    }
}

pub fn tui_settings_title() -> &'static str {
    if is_chinese() {
        "设置"
    } else {
        "Settings"
    }
}

pub fn tui_settings_proxy_title() -> &'static str {
    if is_chinese() {
        "本地代理"
    } else {
        "Local Proxy"
    }
}

pub fn tui_settings_proxy_listen_address_label() -> &'static str {
    if is_chinese() {
        "监听地址"
    } else {
        "Listen Address"
    }
}

pub fn tui_settings_proxy_listen_port_label() -> &'static str {
    if is_chinese() {
        "监听端口"
    } else {
        "Listen Port"
    }
}

pub fn tui_settings_proxy_listen_address_prompt() -> &'static str {
    if is_chinese() {
        "输入监听地址(如 127.0.0.1 / localhost / 0.0.0.0)"
    } else {
        "Enter listen address (for example 127.0.0.1 / localhost / 0.0.0.0)"
    }
}

pub fn tui_settings_proxy_listen_port_prompt() -> &'static str {
    if is_chinese() {
        "输入监听端口(1024-65535)"
    } else {
        "Enter listen port (1024-65535)"
    }
}

pub fn tui_settings_openclaw_config_dir_label() -> &'static str {
    if is_chinese() {
        "OpenClaw 配置目录"
    } else {
        "OpenClaw Config Directory"
    }
}

pub fn tui_settings_openclaw_config_dir_prompt() -> &'static str {
    if is_chinese() {
        "输入 OpenClaw 配置目录;留空恢复默认 ~/.openclaw"
    } else {
        "Enter the OpenClaw config directory; leave empty to use ~/.openclaw"
    }
}

pub fn tui_settings_openclaw_config_dir_default_value() -> &'static str {
    "Default (~/.openclaw)"
}