tabby-ai-assistant 1.0.8 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/components/chat/ai-sidebar.component.d.ts +16 -3
  2. package/dist/components/chat/chat-input.component.d.ts +4 -0
  3. package/dist/components/chat/chat-interface.component.d.ts +22 -1
  4. package/dist/components/chat/chat-settings.component.d.ts +21 -11
  5. package/dist/components/settings/ai-settings-tab.component.d.ts +14 -4
  6. package/dist/components/settings/general-settings.component.d.ts +43 -12
  7. package/dist/components/settings/provider-config.component.d.ts +110 -5
  8. package/dist/components/settings/security-settings.component.d.ts +14 -4
  9. package/dist/i18n/index.d.ts +48 -0
  10. package/dist/i18n/translations/en-US.d.ts +5 -0
  11. package/dist/i18n/translations/ja-JP.d.ts +5 -0
  12. package/dist/i18n/translations/zh-CN.d.ts +5 -0
  13. package/dist/i18n/types.d.ts +198 -0
  14. package/dist/index.js +1 -1
  15. package/dist/services/chat/ai-sidebar.service.d.ts +23 -1
  16. package/dist/services/core/theme.service.d.ts +53 -0
  17. package/dist/services/core/toast.service.d.ts +15 -0
  18. package/package.json +1 -1
  19. package/src/components/chat/ai-sidebar.component.scss +468 -0
  20. package/src/components/chat/ai-sidebar.component.ts +47 -344
  21. package/src/components/chat/chat-input.component.scss +2 -2
  22. package/src/components/chat/chat-input.component.ts +16 -5
  23. package/src/components/chat/chat-interface.component.html +11 -11
  24. package/src/components/chat/chat-interface.component.scss +410 -4
  25. package/src/components/chat/chat-interface.component.ts +105 -14
  26. package/src/components/chat/chat-message.component.scss +3 -3
  27. package/src/components/chat/chat-message.component.ts +3 -2
  28. package/src/components/chat/chat-settings.component.html +95 -61
  29. package/src/components/chat/chat-settings.component.scss +224 -50
  30. package/src/components/chat/chat-settings.component.ts +56 -30
  31. package/src/components/security/risk-confirm-dialog.component.scss +7 -7
  32. package/src/components/settings/ai-settings-tab.component.html +27 -27
  33. package/src/components/settings/ai-settings-tab.component.scss +34 -20
  34. package/src/components/settings/ai-settings-tab.component.ts +59 -20
  35. package/src/components/settings/general-settings.component.html +69 -40
  36. package/src/components/settings/general-settings.component.scss +151 -58
  37. package/src/components/settings/general-settings.component.ts +168 -55
  38. package/src/components/settings/provider-config.component.html +183 -60
  39. package/src/components/settings/provider-config.component.scss +332 -153
  40. package/src/components/settings/provider-config.component.ts +268 -19
  41. package/src/components/settings/security-settings.component.html +70 -39
  42. package/src/components/settings/security-settings.component.scss +104 -8
  43. package/src/components/settings/security-settings.component.ts +48 -10
  44. package/src/i18n/index.ts +129 -0
  45. package/src/i18n/translations/en-US.ts +193 -0
  46. package/src/i18n/translations/ja-JP.ts +193 -0
  47. package/src/i18n/translations/zh-CN.ts +193 -0
  48. package/src/i18n/types.ts +224 -0
  49. package/src/index.ts +6 -0
  50. package/src/services/chat/ai-sidebar.service.ts +157 -5
  51. package/src/services/core/theme.service.ts +480 -0
  52. package/src/services/core/toast.service.ts +36 -0
  53. package/src/styles/ai-assistant.scss +8 -88
  54. package/src/styles/themes.scss +161 -0
@@ -0,0 +1,198 @@
1
+ /**
2
+ * 翻译键类型定义
3
+ */
4
+ export interface CommonTranslations {
5
+ save: string;
6
+ cancel: string;
7
+ delete: string;
8
+ confirm: string;
9
+ enabled: string;
10
+ disabled: string;
11
+ online: string;
12
+ offline: string;
13
+ testing: string;
14
+ error: string;
15
+ success: string;
16
+ notConfigured: string;
17
+ add: string;
18
+ remove: string;
19
+ close: string;
20
+ yes: string;
21
+ no: string;
22
+ reset: string;
23
+ default: string;
24
+ today: string;
25
+ }
26
+ export interface SettingsTranslations {
27
+ title: string;
28
+ generalTab: string;
29
+ providersTab: string;
30
+ securityTab: string;
31
+ chatTab: string;
32
+ advancedTab: string;
33
+ }
34
+ export interface GeneralTranslations {
35
+ title: string;
36
+ enableAssistant: string;
37
+ enableAssistantDesc: string;
38
+ defaultProvider: string;
39
+ providerCount: string;
40
+ language: string;
41
+ theme: string;
42
+ themeAuto: string;
43
+ themeLight: string;
44
+ themeDark: string;
45
+ themePixel: string;
46
+ themeTech: string;
47
+ shortcuts: string;
48
+ shortcutOpenChat: string;
49
+ shortcutOpenChatDesc: string;
50
+ shortcutGenerate: string;
51
+ shortcutGenerateDesc: string;
52
+ shortcutExplain: string;
53
+ shortcutExplainDesc: string;
54
+ shortcutTip: string;
55
+ }
56
+ export interface ChatSettingsTranslations {
57
+ title: string;
58
+ appearance: string;
59
+ theme: string;
60
+ fontSize: string;
61
+ compactMode: string;
62
+ compactModeDesc: string;
63
+ behavior: string;
64
+ enterToSend: string;
65
+ enterToSendDesc: string;
66
+ showTimestamps: string;
67
+ showTimestampsDesc: string;
68
+ showAvatars: string;
69
+ showAvatarsDesc: string;
70
+ soundEnabled: string;
71
+ soundEnabledDesc: string;
72
+ history: string;
73
+ enableHistory: string;
74
+ enableHistoryDesc: string;
75
+ maxHistory: string;
76
+ maxHistoryUnit: string;
77
+ autoSave: string;
78
+ autoSaveDesc: string;
79
+ exportSettings: string;
80
+ clearHistory: string;
81
+ resetDefaults: string;
82
+ clearHistoryConfirm: string;
83
+ resetConfirm: string;
84
+ }
85
+ export interface SecurityTranslations {
86
+ title: string;
87
+ accessControl: string;
88
+ passwordProtection: string;
89
+ passwordProtectionDesc: string;
90
+ setPassword: string;
91
+ passwordPlaceholder: string;
92
+ riskAssessment: string;
93
+ riskAssessmentDesc: string;
94
+ defaultRiskLevel: string;
95
+ riskLow: string;
96
+ riskMedium: string;
97
+ riskHigh: string;
98
+ userConsent: string;
99
+ rememberConsent: string;
100
+ rememberConsentDesc: string;
101
+ consentExpiryDays: string;
102
+ dangerousPatterns: string;
103
+ addPattern: string;
104
+ patternPlaceholder: string;
105
+ saveSettings: string;
106
+ resetDefaults: string;
107
+ resetConfirm: string;
108
+ }
109
+ export interface ProvidersTranslations {
110
+ title: string;
111
+ cloudProviders: string;
112
+ cloudProvidersDesc: string;
113
+ localProviders: string;
114
+ localProvidersDesc: string;
115
+ configured: string;
116
+ displayName: string;
117
+ status: string;
118
+ apiKey: string;
119
+ baseURL: string;
120
+ model: string;
121
+ saveConfig: string;
122
+ testConnection: string;
123
+ detectService: string;
124
+ delete: string;
125
+ deleteConfirm: string;
126
+ testSuccess: string;
127
+ testFail: string;
128
+ testError: string;
129
+ configSaved: string;
130
+ configDeleted: string;
131
+ }
132
+ export interface ProviderNamesTranslations {
133
+ openai: string;
134
+ anthropic: string;
135
+ minimax: string;
136
+ glm: string;
137
+ openaiCompatible: string;
138
+ ollama: string;
139
+ vllm: string;
140
+ }
141
+ export interface ChatInterfaceTranslations {
142
+ title: string;
143
+ welcomeMessage: string;
144
+ inputPlaceholder: string;
145
+ thinking: string;
146
+ executingTool: string;
147
+ toolComplete: string;
148
+ errorPrefix: string;
149
+ tipCommand: string;
150
+ tipShortcut: string;
151
+ clearChat: string;
152
+ clearChatConfirm: string;
153
+ exportChat: string;
154
+ switchProvider: string;
155
+ providerBadge: string;
156
+ }
157
+ export interface RiskLevelTranslations {
158
+ low: string;
159
+ medium: string;
160
+ high: string;
161
+ unknown: string;
162
+ }
163
+ export interface AdvancedSettingsTranslations {
164
+ title: string;
165
+ configManagement: string;
166
+ validateConfig: string;
167
+ resetDefaults: string;
168
+ logSettings: string;
169
+ logLevel: string;
170
+ logLevels: {
171
+ debug: string;
172
+ info: string;
173
+ warn: string;
174
+ error: string;
175
+ };
176
+ systemInfo: string;
177
+ pluginVersion: string;
178
+ supportedProviders: string;
179
+ currentProvider: string;
180
+ }
181
+ export interface TranslationKeys {
182
+ common: CommonTranslations;
183
+ settings: SettingsTranslations;
184
+ general: GeneralTranslations;
185
+ chatSettings: ChatSettingsTranslations;
186
+ security: SecurityTranslations;
187
+ providers: ProvidersTranslations;
188
+ providerNames: ProviderNamesTranslations;
189
+ chatInterface: ChatInterfaceTranslations;
190
+ riskLevel: RiskLevelTranslations;
191
+ advancedSettings: AdvancedSettingsTranslations;
192
+ }
193
+ export type SupportedLanguage = 'zh-CN' | 'en-US' | 'ja-JP';
194
+ export interface LanguageConfig {
195
+ code: SupportedLanguage;
196
+ label: string;
197
+ flag: string;
198
+ }