tabby-ai-assistant 1.0.8 → 1.0.9

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 (52) 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 +83 -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/package.json +1 -1
  18. package/src/components/chat/ai-sidebar.component.scss +468 -0
  19. package/src/components/chat/ai-sidebar.component.ts +47 -344
  20. package/src/components/chat/chat-input.component.scss +2 -2
  21. package/src/components/chat/chat-input.component.ts +16 -5
  22. package/src/components/chat/chat-interface.component.html +11 -11
  23. package/src/components/chat/chat-interface.component.scss +410 -4
  24. package/src/components/chat/chat-interface.component.ts +105 -14
  25. package/src/components/chat/chat-message.component.scss +3 -3
  26. package/src/components/chat/chat-message.component.ts +3 -2
  27. package/src/components/chat/chat-settings.component.html +95 -61
  28. package/src/components/chat/chat-settings.component.scss +224 -50
  29. package/src/components/chat/chat-settings.component.ts +56 -30
  30. package/src/components/security/risk-confirm-dialog.component.scss +7 -7
  31. package/src/components/settings/ai-settings-tab.component.html +27 -27
  32. package/src/components/settings/ai-settings-tab.component.scss +34 -20
  33. package/src/components/settings/ai-settings-tab.component.ts +59 -20
  34. package/src/components/settings/general-settings.component.html +69 -40
  35. package/src/components/settings/general-settings.component.scss +151 -58
  36. package/src/components/settings/general-settings.component.ts +168 -55
  37. package/src/components/settings/provider-config.component.html +149 -60
  38. package/src/components/settings/provider-config.component.scss +273 -153
  39. package/src/components/settings/provider-config.component.ts +177 -19
  40. package/src/components/settings/security-settings.component.html +70 -39
  41. package/src/components/settings/security-settings.component.scss +104 -8
  42. package/src/components/settings/security-settings.component.ts +48 -10
  43. package/src/i18n/index.ts +129 -0
  44. package/src/i18n/translations/en-US.ts +193 -0
  45. package/src/i18n/translations/ja-JP.ts +193 -0
  46. package/src/i18n/translations/zh-CN.ts +193 -0
  47. package/src/i18n/types.ts +224 -0
  48. package/src/index.ts +6 -0
  49. package/src/services/chat/ai-sidebar.service.ts +157 -5
  50. package/src/services/core/theme.service.ts +480 -0
  51. package/src/styles/ai-assistant.scss +8 -88
  52. package/src/styles/themes.scss +161 -0
@@ -0,0 +1,161 @@
1
+ /**
2
+ * AI Assistant 主题系统 - 静态样式
3
+ * CSS 变量由 ThemeService 动态注入到 <style> 元素
4
+ * 此文件仅包含主题预览和静态样式
5
+ */
6
+
7
+ // ============================================
8
+ // 主题预览方块样式
9
+ // ============================================
10
+ .theme-preview {
11
+ width: 64px;
12
+ height: 64px;
13
+ border-radius: 8px;
14
+ transition: all 0.3s ease;
15
+ position: relative;
16
+ overflow: hidden;
17
+
18
+ // 浅色
19
+ &[data-theme="light"] {
20
+ background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%) !important;
21
+ border: 1px solid #e0e0e0 !important;
22
+ }
23
+
24
+ // 深色
25
+ &[data-theme="dark"] {
26
+ background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
27
+ border: 1px solid #4a4a4a !important;
28
+ }
29
+
30
+ // 跟随系统
31
+ &[data-theme="auto"] {
32
+ background: linear-gradient(135deg, #f5f5f5 50%, #1a1a1a 50%) !important;
33
+ position: relative;
34
+
35
+ &::after {
36
+ content: '';
37
+ position: absolute;
38
+ top: 50%;
39
+ left: 50%;
40
+ transform: translate(-50%, -50%);
41
+ width: 24px;
42
+ height: 24px;
43
+ background: linear-gradient(135deg, #fff 50%, #333 50%) !important;
44
+ border-radius: 50% !important;
45
+ }
46
+ }
47
+
48
+ // 像素风格
49
+ &[data-theme="pixel"] {
50
+ background: #0f380f !important;
51
+ border: 4px solid #9bbc0f !important;
52
+ border-radius: 0 !important;
53
+
54
+ // 像素网格效果
55
+ background-image:
56
+ linear-gradient(90deg, rgba(155, 188, 15, 0.1) 1px, transparent 1px),
57
+ linear-gradient(rgba(155, 188, 15, 0.1) 1px, transparent 1px) !important;
58
+ background-size: 8px 8px !important;
59
+ }
60
+
61
+ // 科技风格
62
+ &[data-theme="tech"] {
63
+ background: #0a0a0f !important;
64
+ border: 1px solid #00fff9 !important;
65
+ box-shadow: 0 0 10px rgba(0, 255, 249, 0.4) !important;
66
+
67
+ // 扫描线效果
68
+ &::after {
69
+ content: '';
70
+ position: absolute;
71
+ top: 0;
72
+ left: 0;
73
+ right: 0;
74
+ bottom: 0;
75
+ background: repeating-linear-gradient(
76
+ 0deg,
77
+ transparent,
78
+ transparent 2px,
79
+ rgba(0, 255, 249, 0.1) 2px,
80
+ rgba(0, 255, 249, 0.1) 4px
81
+ ) !important;
82
+ }
83
+
84
+ // 角落装饰
85
+ &::before {
86
+ content: '';
87
+ position: absolute;
88
+ top: 4px;
89
+ left: 4px;
90
+ width: 12px;
91
+ height: 12px;
92
+ border-top: 2px solid #00fff9 !important;
93
+ border-left: 2px solid #00fff9 !important;
94
+ }
95
+ }
96
+
97
+ &:hover {
98
+ transform: scale(1.05) !important;
99
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
100
+ }
101
+
102
+ &.active {
103
+ box-shadow: 0 0 0 2px var(--ai-primary, #007bff) !important;
104
+ transform: scale(1.1) !important;
105
+ }
106
+ }
107
+
108
+ // ============================================
109
+ // 主题选择器样式
110
+ // ============================================
111
+ .theme-selector {
112
+ display: flex;
113
+ gap: 0.75rem;
114
+ flex-wrap: wrap;
115
+
116
+ .theme-btn {
117
+ display: flex;
118
+ flex-direction: column;
119
+ align-items: center;
120
+ gap: 0.5rem;
121
+ padding: 0.5rem;
122
+ border: 2px solid var(--ai-border, #dee2e6) !important;
123
+ border-radius: var(--ai-border-radius, 0.375rem) !important;
124
+ background: var(--ai-bg-primary, #ffffff) !important;
125
+ cursor: pointer;
126
+ transition: all 0.2s ease !important;
127
+
128
+ &:hover {
129
+ border-color: var(--ai-primary, #007bff) !important;
130
+ }
131
+
132
+ &.active {
133
+ border-color: var(--ai-primary, #007bff) !important;
134
+ background: var(--ai-bg-secondary, #f8f9fa) !important;
135
+ box-shadow: 0 0 0 2px rgba(var(--ai-primary, #007bff), 0.2) !important;
136
+ }
137
+
138
+ span {
139
+ font-size: 0.75rem;
140
+ color: var(--ai-text-primary, #212529) !important;
141
+ }
142
+ }
143
+ }
144
+
145
+ // ============================================
146
+ // 响应式设计
147
+ // ============================================
148
+ @media (max-width: 768px) {
149
+ .theme-selector {
150
+ justify-content: center;
151
+
152
+ .theme-btn {
153
+ padding: 0.375rem;
154
+
155
+ .theme-preview {
156
+ width: 48px !important;
157
+ height: 48px !important;
158
+ }
159
+ }
160
+ }
161
+ }