@geenius/ai 0.1.0

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 (165) hide show
  1. package/.changeset/config.json +11 -0
  2. package/.env.example +2 -0
  3. package/.github/CODEOWNERS +1 -0
  4. package/.github/ISSUE_TEMPLATE/bug_report.md +16 -0
  5. package/.github/ISSUE_TEMPLATE/feature_request.md +11 -0
  6. package/.github/PULL_REQUEST_TEMPLATE.md +10 -0
  7. package/.github/dependabot.yml +11 -0
  8. package/.github/workflows/ci.yml +23 -0
  9. package/.github/workflows/release.yml +29 -0
  10. package/.node-version +1 -0
  11. package/.nvmrc +1 -0
  12. package/.prettierrc +7 -0
  13. package/.project/ACCOUNT.yaml +4 -0
  14. package/.project/IDEAS.yaml +7 -0
  15. package/.project/PROJECT.yaml +11 -0
  16. package/.project/ROADMAP.yaml +15 -0
  17. package/CHANGELOG.md +15 -0
  18. package/CODE_OF_CONDUCT.md +26 -0
  19. package/CONTRIBUTING.md +61 -0
  20. package/LICENSE +21 -0
  21. package/README.md +1 -0
  22. package/SECURITY.md +18 -0
  23. package/SUPPORT.md +14 -0
  24. package/package.json +75 -0
  25. package/packages/convex/package.json +42 -0
  26. package/packages/convex/src/index.ts +8 -0
  27. package/packages/convex/src/mutations/messages.ts +29 -0
  28. package/packages/convex/src/queries/messages.ts +24 -0
  29. package/packages/convex/src/schema.ts +20 -0
  30. package/packages/convex/tsconfig.json +11 -0
  31. package/packages/convex/tsup.config.ts +17 -0
  32. package/packages/react/README.md +1 -0
  33. package/packages/react/package.json +60 -0
  34. package/packages/react/src/components/AILogTable.tsx +90 -0
  35. package/packages/react/src/components/ChatWindow.tsx +118 -0
  36. package/packages/react/src/components/GenerationCard.tsx +73 -0
  37. package/packages/react/src/components/ImageGenerator.tsx +103 -0
  38. package/packages/react/src/components/ModelSelector.tsx +44 -0
  39. package/packages/react/src/components/ModelTestRunner.tsx +148 -0
  40. package/packages/react/src/components/VoiceSelector.tsx +51 -0
  41. package/packages/react/src/components/index.ts +9 -0
  42. package/packages/react/src/hooks/index.ts +12 -0
  43. package/packages/react/src/hooks/useAI.ts +158 -0
  44. package/packages/react/src/hooks/useAILogs.ts +40 -0
  45. package/packages/react/src/hooks/useAIModels.ts +53 -0
  46. package/packages/react/src/hooks/useChat.ts +141 -0
  47. package/packages/react/src/hooks/useContentManager.ts +108 -0
  48. package/packages/react/src/hooks/useImageGeneration.ts +82 -0
  49. package/packages/react/src/hooks/useMemory.ts +161 -0
  50. package/packages/react/src/hooks/useModelTest.ts +126 -0
  51. package/packages/react/src/hooks/useRealtimeAudio.ts +203 -0
  52. package/packages/react/src/hooks/useSkills.ts +114 -0
  53. package/packages/react/src/hooks/useTextToSpeech.ts +99 -0
  54. package/packages/react/src/hooks/useTranscription.ts +119 -0
  55. package/packages/react/src/hooks/useVideoGeneration.ts +79 -0
  56. package/packages/react/src/index.ts +42 -0
  57. package/packages/react/src/pages/AILogsPage.tsx +98 -0
  58. package/packages/react/src/pages/ChatPage.tsx +42 -0
  59. package/packages/react/src/pages/ModelTestPage.tsx +33 -0
  60. package/packages/react/src/pages/index.ts +5 -0
  61. package/packages/react/tsconfig.json +26 -0
  62. package/packages/react/tsup.config.ts +22 -0
  63. package/packages/react-css/README.md +1 -0
  64. package/packages/react-css/package.json +45 -0
  65. package/packages/react-css/src/ai.css +857 -0
  66. package/packages/react-css/src/components/AILogTable.tsx +90 -0
  67. package/packages/react-css/src/components/ChatWindow.tsx +118 -0
  68. package/packages/react-css/src/components/GenerationCard.tsx +73 -0
  69. package/packages/react-css/src/components/ImageGenerator.tsx +103 -0
  70. package/packages/react-css/src/components/ModelSelector.tsx +44 -0
  71. package/packages/react-css/src/components/ModelTestRunner.tsx +148 -0
  72. package/packages/react-css/src/components/VoiceSelector.tsx +51 -0
  73. package/packages/react-css/src/components/index.ts +9 -0
  74. package/packages/react-css/src/hooks/index.ts +12 -0
  75. package/packages/react-css/src/hooks/useAI.ts +153 -0
  76. package/packages/react-css/src/hooks/useAILogs.ts +40 -0
  77. package/packages/react-css/src/hooks/useAIModels.ts +51 -0
  78. package/packages/react-css/src/hooks/useChat.ts +145 -0
  79. package/packages/react-css/src/hooks/useContentManager.ts +108 -0
  80. package/packages/react-css/src/hooks/useImageGeneration.ts +82 -0
  81. package/packages/react-css/src/hooks/useMemory.ts +161 -0
  82. package/packages/react-css/src/hooks/useModelTest.ts +122 -0
  83. package/packages/react-css/src/hooks/useRealtimeAudio.ts +203 -0
  84. package/packages/react-css/src/hooks/useSkills.ts +114 -0
  85. package/packages/react-css/src/hooks/useTextToSpeech.ts +99 -0
  86. package/packages/react-css/src/hooks/useTranscription.ts +119 -0
  87. package/packages/react-css/src/hooks/useVideoGeneration.ts +79 -0
  88. package/packages/react-css/src/index.ts +35 -0
  89. package/packages/react-css/src/pages/AILogsPage.tsx +98 -0
  90. package/packages/react-css/src/pages/ChatPage.tsx +42 -0
  91. package/packages/react-css/src/pages/ModelTestPage.tsx +33 -0
  92. package/packages/react-css/src/pages/index.ts +5 -0
  93. package/packages/react-css/src/styles.css +127 -0
  94. package/packages/react-css/tsconfig.json +26 -0
  95. package/packages/react-css/tsup.config.ts +2 -0
  96. package/packages/shared/README.md +1 -0
  97. package/packages/shared/package.json +71 -0
  98. package/packages/shared/src/__tests__/ai.test.ts +67 -0
  99. package/packages/shared/src/ai-client.ts +243 -0
  100. package/packages/shared/src/config.ts +235 -0
  101. package/packages/shared/src/content.ts +249 -0
  102. package/packages/shared/src/convex/helpers.ts +163 -0
  103. package/packages/shared/src/convex/index.ts +16 -0
  104. package/packages/shared/src/convex/schemas.ts +146 -0
  105. package/packages/shared/src/convex/validators.ts +136 -0
  106. package/packages/shared/src/index.ts +107 -0
  107. package/packages/shared/src/memory.ts +197 -0
  108. package/packages/shared/src/providers/base.ts +103 -0
  109. package/packages/shared/src/providers/elevenlabs.ts +155 -0
  110. package/packages/shared/src/providers/index.ts +28 -0
  111. package/packages/shared/src/providers/openai-compatible.ts +286 -0
  112. package/packages/shared/src/providers/registry.ts +113 -0
  113. package/packages/shared/src/providers/replicate-fal.ts +230 -0
  114. package/packages/shared/src/skills.ts +273 -0
  115. package/packages/shared/src/types.ts +501 -0
  116. package/packages/shared/tsconfig.json +25 -0
  117. package/packages/shared/tsup.config.ts +22 -0
  118. package/packages/shared/vitest.config.ts +4 -0
  119. package/packages/solidjs/README.md +1 -0
  120. package/packages/solidjs/package.json +59 -0
  121. package/packages/solidjs/src/components/ChatWindow.tsx +78 -0
  122. package/packages/solidjs/src/components/GenerationCard.tsx +62 -0
  123. package/packages/solidjs/src/components/ModelTestRunner.tsx +119 -0
  124. package/packages/solidjs/src/components/index.ts +5 -0
  125. package/packages/solidjs/src/index.ts +32 -0
  126. package/packages/solidjs/src/pages/ChatPage.tsx +22 -0
  127. package/packages/solidjs/src/pages/ModelTestPage.tsx +22 -0
  128. package/packages/solidjs/src/pages/index.ts +4 -0
  129. package/packages/solidjs/src/primitives/createAI.ts +79 -0
  130. package/packages/solidjs/src/primitives/createChat.ts +100 -0
  131. package/packages/solidjs/src/primitives/createContentManager.ts +61 -0
  132. package/packages/solidjs/src/primitives/createImageGeneration.ts +46 -0
  133. package/packages/solidjs/src/primitives/createMemory.ts +127 -0
  134. package/packages/solidjs/src/primitives/createModelTest.ts +89 -0
  135. package/packages/solidjs/src/primitives/createSkills.ts +83 -0
  136. package/packages/solidjs/src/primitives/createTextToSpeech.ts +56 -0
  137. package/packages/solidjs/src/primitives/createVideoGeneration.ts +46 -0
  138. package/packages/solidjs/src/primitives/index.ts +8 -0
  139. package/packages/solidjs/tsconfig.json +27 -0
  140. package/packages/solidjs/tsup.config.ts +21 -0
  141. package/packages/solidjs-css/README.md +1 -0
  142. package/packages/solidjs-css/package.json +44 -0
  143. package/packages/solidjs-css/src/ai.css +857 -0
  144. package/packages/solidjs-css/src/components/ChatWindow.tsx +78 -0
  145. package/packages/solidjs-css/src/components/GenerationCard.tsx +62 -0
  146. package/packages/solidjs-css/src/components/ModelTestRunner.tsx +119 -0
  147. package/packages/solidjs-css/src/components/index.ts +5 -0
  148. package/packages/solidjs-css/src/index.ts +26 -0
  149. package/packages/solidjs-css/src/pages/ChatPage.tsx +22 -0
  150. package/packages/solidjs-css/src/pages/ModelTestPage.tsx +22 -0
  151. package/packages/solidjs-css/src/pages/index.ts +4 -0
  152. package/packages/solidjs-css/src/primitives/createAI.ts +79 -0
  153. package/packages/solidjs-css/src/primitives/createChat.ts +100 -0
  154. package/packages/solidjs-css/src/primitives/createContentManager.ts +61 -0
  155. package/packages/solidjs-css/src/primitives/createImageGeneration.ts +46 -0
  156. package/packages/solidjs-css/src/primitives/createMemory.ts +127 -0
  157. package/packages/solidjs-css/src/primitives/createModelTest.ts +89 -0
  158. package/packages/solidjs-css/src/primitives/createSkills.ts +83 -0
  159. package/packages/solidjs-css/src/primitives/createTextToSpeech.ts +56 -0
  160. package/packages/solidjs-css/src/primitives/createVideoGeneration.ts +46 -0
  161. package/packages/solidjs-css/src/primitives/index.ts +1 -0
  162. package/packages/solidjs-css/src/styles.css +127 -0
  163. package/packages/solidjs-css/tsconfig.json +27 -0
  164. package/packages/solidjs-css/tsup.config.ts +2 -0
  165. package/pnpm-workspace.yaml +2 -0
@@ -0,0 +1,857 @@
1
+ /* ============================================================================
2
+ GEENIUS AI - COMPREHENSIVE CSS
3
+ Component: Chat Interfaces, AI Response Cards, Model Selectors
4
+ Colors: OKLCH, Dark Mode Support, Animations, Streaming Effects
5
+ ============================================================================ */
6
+
7
+ :root {
8
+ /* Base Colors - OKLCH */
9
+ --ai-bg: oklch(0.10 0.01 250);
10
+ --ai-surface: oklch(0.13 0.01 250);
11
+ --ai-surface-2: oklch(0.16 0.01 250);
12
+ --ai-surface-3: oklch(0.19 0.01 250);
13
+ --ai-border: oklch(0.22 0.01 250);
14
+ --ai-border-light: oklch(0.26 0.01 250);
15
+ --ai-border-focus: oklch(0.65 0.22 265);
16
+ --ai-text: oklch(0.95 0.01 250);
17
+ --ai-text-secondary: oklch(0.75 0.01 250);
18
+ --ai-text-muted: oklch(0.65 0.01 250);
19
+ --ai-text-disabled: oklch(0.45 0.01 250);
20
+
21
+ /* Semantic Colors - OKLCH */
22
+ --ai-accent: oklch(0.65 0.22 265);
23
+ --ai-accent-light: oklch(0.75 0.18 265);
24
+ --ai-accent-dark: oklch(0.55 0.24 265);
25
+ --ai-success: oklch(0.72 0.20 145);
26
+ --ai-success-light: oklch(0.82 0.15 145);
27
+ --ai-warning: oklch(0.78 0.18 75);
28
+ --ai-warning-light: oklch(0.88 0.13 75);
29
+ --ai-error: oklch(0.60 0.25 25);
30
+ --ai-error-light: oklch(0.70 0.20 25);
31
+ --ai-info: oklch(0.65 0.20 265);
32
+ --ai-streaming: oklch(0.65 0.22 265);
33
+ --ai-user-msg: oklch(0.65 0.22 265);
34
+ --ai-ai-msg: oklch(0.72 0.20 145);
35
+
36
+ /* Spacing & Layout */
37
+ --ai-radius: 0.75rem;
38
+ --ai-radius-sm: 0.375rem;
39
+ --ai-radius-lg: 1.25rem;
40
+ --ai-spacing-xs: 0.375rem;
41
+ --ai-spacing-sm: 0.5rem;
42
+ --ai-spacing-md: 0.75rem;
43
+ --ai-spacing-lg: 1rem;
44
+ --ai-spacing-xl: 1.5rem;
45
+ --ai-spacing-2xl: 2rem;
46
+
47
+ /* Effects */
48
+ --ai-shadow: 0 4px 24px oklch(0 0 0 / 0.4);
49
+ --ai-shadow-sm: 0 2px 8px oklch(0 0 0 / 0.2);
50
+ --ai-shadow-lg: 0 12px 48px oklch(0 0 0 / 0.5);
51
+ --ai-shadow-focus: 0 0 0 3px oklch(0.65 0.22 265 / 0.15);
52
+ --ai-transition: 200ms ease;
53
+ --ai-transition-slow: 300ms ease;
54
+ --ai-backdrop: oklch(0 0 0 / 0.7);
55
+ }
56
+
57
+ @media (prefers-color-scheme: light) {
58
+ :root {
59
+ --ai-bg: oklch(0.98 0.01 250);
60
+ --ai-surface: oklch(0.96 0.01 250);
61
+ --ai-surface-2: oklch(0.92 0.01 250);
62
+ --ai-text: oklch(0.15 0.01 250);
63
+ --ai-text-muted: oklch(0.50 0.01 250);
64
+ }
65
+ }
66
+
67
+ /* ============================================================================
68
+ CHAT CONTAINER & LAYOUT
69
+ ============================================================================ */
70
+
71
+ .ai__container {
72
+ display: flex;
73
+ flex-direction: column;
74
+ height: 100vh;
75
+ background: var(--ai-bg);
76
+ }
77
+
78
+ .ai__chat-wrapper {
79
+ display: flex;
80
+ flex-direction: column;
81
+ height: 100%;
82
+ overflow: hidden;
83
+ }
84
+
85
+ .ai__header {
86
+ background: var(--ai-surface);
87
+ border-bottom: 1px solid var(--ai-border);
88
+ padding: var(--ai-spacing-lg) var(--ai-spacing-xl);
89
+ display: flex;
90
+ align-items: center;
91
+ justify-content: space-between;
92
+ flex-wrap: wrap;
93
+ gap: var(--ai-spacing-md);
94
+ z-index: 20;
95
+ }
96
+
97
+ .ai__header-left {
98
+ display: flex;
99
+ align-items: center;
100
+ gap: var(--ai-spacing-md);
101
+ }
102
+
103
+ .ai__header-title {
104
+ font-size: 1rem;
105
+ font-weight: 600;
106
+ color: var(--ai-text);
107
+ margin: 0;
108
+ }
109
+
110
+ .ai__header-subtitle {
111
+ font-size: 0.75rem;
112
+ color: var(--ai-text-muted);
113
+ margin: 0;
114
+ }
115
+
116
+ .ai__header-actions {
117
+ display: flex;
118
+ gap: var(--ai-spacing-sm);
119
+ }
120
+
121
+ .ai__chat-area {
122
+ flex: 1;
123
+ overflow-y: auto;
124
+ padding: var(--ai-spacing-xl);
125
+ display: flex;
126
+ flex-direction: column;
127
+ gap: var(--ai-spacing-lg);
128
+ }
129
+
130
+ .ai__input-area {
131
+ padding: var(--ai-spacing-xl);
132
+ background: var(--ai-surface);
133
+ border-top: 1px solid var(--ai-border);
134
+ display: flex;
135
+ flex-direction: column;
136
+ gap: var(--ai-spacing-md);
137
+ }
138
+
139
+ /* ============================================================================
140
+ MESSAGE BUBBLES
141
+ ============================================================================ */
142
+
143
+ .ai__message {
144
+ display: flex;
145
+ gap: var(--ai-spacing-md);
146
+ margin-bottom: var(--ai-spacing-lg);
147
+ animation: ai-fade-in var(--ai-transition);
148
+ }
149
+
150
+ .ai__message--user {
151
+ justify-content: flex-end;
152
+ }
153
+
154
+ .ai__message--assistant {
155
+ justify-content: flex-start;
156
+ }
157
+
158
+ .ai__message-avatar {
159
+ width: 2.5rem;
160
+ height: 2.5rem;
161
+ border-radius: 50%;
162
+ display: flex;
163
+ align-items: center;
164
+ justify-content: center;
165
+ font-weight: 600;
166
+ font-size: 1rem;
167
+ flex-shrink: 0;
168
+ }
169
+
170
+ .ai__message--user .ai__message-avatar {
171
+ background: var(--ai-user-msg);
172
+ color: oklch(1 0 0);
173
+ }
174
+
175
+ .ai__message--assistant .ai__message-avatar {
176
+ background: var(--ai-ai-msg);
177
+ color: oklch(1 0 0);
178
+ }
179
+
180
+ .ai__message-content {
181
+ max-width: 70%;
182
+ display: flex;
183
+ flex-direction: column;
184
+ gap: var(--ai-spacing-sm);
185
+ }
186
+
187
+ .ai__message--user .ai__message-content {
188
+ align-items: flex-end;
189
+ }
190
+
191
+ .ai__message--assistant .ai__message-content {
192
+ align-items: flex-start;
193
+ }
194
+
195
+ .ai__message-bubble {
196
+ padding: var(--ai-spacing-md) var(--ai-spacing-lg);
197
+ border-radius: var(--ai-radius);
198
+ font-size: 0.875rem;
199
+ line-height: 1.5;
200
+ word-wrap: break-word;
201
+ animation: ai-bubble-pop var(--ai-transition);
202
+ }
203
+
204
+ .ai__message--user .ai__message-bubble {
205
+ background: var(--ai-user-msg);
206
+ color: oklch(1 0 0);
207
+ border: 1px solid var(--ai-user-msg);
208
+ border-radius: var(--ai-radius) 0 var(--ai-radius) var(--ai-radius);
209
+ }
210
+
211
+ .ai__message--assistant .ai__message-bubble {
212
+ background: var(--ai-surface);
213
+ color: var(--ai-text);
214
+ border: 1px solid var(--ai-border);
215
+ border-radius: 0 var(--ai-radius) var(--ai-radius) var(--ai-radius);
216
+ }
217
+
218
+ .ai__message-time {
219
+ font-size: 0.75rem;
220
+ color: var(--ai-text-muted);
221
+ margin-top: var(--ai-spacing-xs);
222
+ }
223
+
224
+ .ai__message-actions {
225
+ display: flex;
226
+ gap: var(--ai-spacing-xs);
227
+ margin-top: var(--ai-spacing-xs);
228
+ opacity: 0;
229
+ transition: opacity var(--ai-transition);
230
+ }
231
+
232
+ .ai__message:hover .ai__message-actions {
233
+ opacity: 1;
234
+ }
235
+
236
+ .ai__message-action-btn {
237
+ background: none;
238
+ border: none;
239
+ color: var(--ai-text-muted);
240
+ cursor: pointer;
241
+ padding: var(--ai-spacing-xs);
242
+ border-radius: var(--ai-radius-sm);
243
+ font-size: 0.875rem;
244
+ transition: all var(--ai-transition);
245
+ }
246
+
247
+ .ai__message-action-btn:hover {
248
+ color: var(--ai-text);
249
+ background: var(--ai-surface-2);
250
+ }
251
+
252
+ /* ============================================================================
253
+ STREAMING INDICATORS
254
+ ============================================================================ */
255
+
256
+ .ai__typing-indicator {
257
+ display: flex;
258
+ gap: 0.25rem;
259
+ align-items: center;
260
+ padding: var(--ai-spacing-md) var(--ai-spacing-lg);
261
+ background: var(--ai-surface);
262
+ border: 1px solid var(--ai-border);
263
+ border-radius: var(--ai-radius);
264
+ width: fit-content;
265
+ }
266
+
267
+ .ai__typing-dot {
268
+ width: 0.5rem;
269
+ height: 0.5rem;
270
+ border-radius: 50%;
271
+ background: var(--ai-streaming);
272
+ animation: ai-typing 1.4s infinite;
273
+ }
274
+
275
+ .ai__typing-dot:nth-child(2) {
276
+ animation-delay: 0.2s;
277
+ }
278
+
279
+ .ai__typing-dot:nth-child(3) {
280
+ animation-delay: 0.4s;
281
+ }
282
+
283
+ .ai__streaming-indicator {
284
+ display: inline-flex;
285
+ align-items: center;
286
+ gap: 0.25rem;
287
+ padding: var(--ai-spacing-xs) var(--ai-spacing-md);
288
+ background: var(--ai-streaming);
289
+ background-opacity: 0.1;
290
+ border: 1px solid var(--ai-streaming);
291
+ border-opacity: 0.3;
292
+ border-radius: 9999px;
293
+ font-size: 0.75rem;
294
+ color: var(--ai-streaming);
295
+ font-weight: 500;
296
+ }
297
+
298
+ .ai__streaming-dot {
299
+ width: 0.375rem;
300
+ height: 0.375rem;
301
+ border-radius: 50%;
302
+ background: var(--ai-streaming);
303
+ animation: ai-pulse 1.5s ease-in-out infinite;
304
+ }
305
+
306
+ .ai__streaming-text {
307
+ opacity: 0.8;
308
+ animation: ai-fade-blink 1.5s ease-in-out infinite;
309
+ }
310
+
311
+ /* ============================================================================
312
+ INPUT FORM & CONTROLS
313
+ ============================================================================ */
314
+
315
+ .ai__input-form {
316
+ display: flex;
317
+ gap: var(--ai-spacing-md);
318
+ align-items: flex-end;
319
+ }
320
+
321
+ .ai__input-wrapper {
322
+ flex: 1;
323
+ display: flex;
324
+ flex-direction: column;
325
+ gap: var(--ai-spacing-xs);
326
+ }
327
+
328
+ .ai__input-label {
329
+ font-size: 0.75rem;
330
+ font-weight: 500;
331
+ color: var(--ai-text-muted);
332
+ text-transform: uppercase;
333
+ letter-spacing: 0.05em;
334
+ }
335
+
336
+ .ai__input-textarea {
337
+ background: var(--ai-surface-2);
338
+ border: 1px solid var(--ai-border);
339
+ border-radius: var(--ai-radius-sm);
340
+ padding: var(--ai-spacing-md) var(--ai-spacing-lg);
341
+ color: var(--ai-text);
342
+ font-size: 0.875rem;
343
+ font-family: inherit;
344
+ transition: all var(--ai-transition);
345
+ outline: none;
346
+ width: 100%;
347
+ min-height: 2.5rem;
348
+ max-height: 8rem;
349
+ resize: vertical;
350
+ }
351
+
352
+ .ai__input-textarea:focus {
353
+ border-color: var(--ai-border-focus);
354
+ box-shadow: var(--ai-shadow-focus);
355
+ }
356
+
357
+ .ai__input-textarea::placeholder {
358
+ color: var(--ai-text-disabled);
359
+ }
360
+
361
+ .ai__input-actions {
362
+ display: flex;
363
+ gap: var(--ai-spacing-sm);
364
+ flex-wrap: wrap;
365
+ }
366
+
367
+ .ai__input-btn {
368
+ display: inline-flex;
369
+ align-items: center;
370
+ justify-content: center;
371
+ padding: var(--ai-spacing-sm) var(--ai-spacing-lg);
372
+ border-radius: var(--ai-radius-sm);
373
+ font-size: 0.875rem;
374
+ font-weight: 500;
375
+ cursor: pointer;
376
+ border: none;
377
+ transition: all var(--ai-transition);
378
+ white-space: nowrap;
379
+ }
380
+
381
+ .ai__input-btn--primary {
382
+ background: var(--ai-accent);
383
+ color: oklch(1 0 0);
384
+ }
385
+
386
+ .ai__input-btn--primary:hover:not(:disabled) {
387
+ background: var(--ai-accent-light);
388
+ transform: translateY(-1px);
389
+ }
390
+
391
+ .ai__input-btn--secondary {
392
+ background: var(--ai-surface);
393
+ color: var(--ai-text);
394
+ border: 1px solid var(--ai-border);
395
+ }
396
+
397
+ .ai__input-btn--secondary:hover:not(:disabled) {
398
+ border-color: var(--ai-accent);
399
+ color: var(--ai-accent);
400
+ }
401
+
402
+ .ai__input-btn:disabled {
403
+ opacity: 0.5;
404
+ cursor: not-allowed;
405
+ }
406
+
407
+ /* ============================================================================
408
+ MODEL SELECTOR & TOKEN COUNTER
409
+ ============================================================================ */
410
+
411
+ .ai__model-selector {
412
+ display: flex;
413
+ align-items: center;
414
+ gap: var(--ai-spacing-md);
415
+ padding: var(--ai-spacing-md) var(--ai-spacing-lg);
416
+ background: var(--ai-surface-2);
417
+ border: 1px solid var(--ai-border);
418
+ border-radius: var(--ai-radius-sm);
419
+ margin-bottom: var(--ai-spacing-md);
420
+ }
421
+
422
+ .ai__model-label {
423
+ font-size: 0.8125rem;
424
+ color: var(--ai-text-muted);
425
+ text-transform: uppercase;
426
+ letter-spacing: 0.05em;
427
+ font-weight: 500;
428
+ }
429
+
430
+ .ai__model-select {
431
+ background: none;
432
+ border: none;
433
+ color: var(--ai-text);
434
+ font-size: 0.875rem;
435
+ font-weight: 500;
436
+ cursor: pointer;
437
+ padding: 0;
438
+ flex: 1;
439
+ font-family: inherit;
440
+ }
441
+
442
+ .ai__model-select:focus {
443
+ outline: 1px solid var(--ai-accent);
444
+ outline-offset: 2px;
445
+ }
446
+
447
+ .ai__token-counter {
448
+ display: flex;
449
+ align-items: center;
450
+ gap: var(--ai-spacing-sm);
451
+ padding: var(--ai-spacing-xs) var(--ai-spacing-md);
452
+ background: var(--ai-surface);
453
+ border: 1px solid var(--ai-border);
454
+ border-radius: 9999px;
455
+ font-size: 0.75rem;
456
+ color: var(--ai-text-muted);
457
+ font-family: 'JetBrains Mono', monospace;
458
+ }
459
+
460
+ .ai__token-value {
461
+ font-weight: 600;
462
+ color: var(--ai-accent);
463
+ }
464
+
465
+ .ai__token-max {
466
+ opacity: 0.6;
467
+ }
468
+
469
+ /* ============================================================================
470
+ RESPONSE CARDS & FEATURES
471
+ ============================================================================ */
472
+
473
+ .ai__response-card {
474
+ background: var(--ai-surface);
475
+ border: 1px solid var(--ai-border);
476
+ border-radius: var(--ai-radius);
477
+ padding: var(--ai-spacing-lg);
478
+ margin-bottom: var(--ai-spacing-lg);
479
+ }
480
+
481
+ .ai__response-header {
482
+ display: flex;
483
+ align-items: center;
484
+ justify-content: space-between;
485
+ margin-bottom: var(--ai-spacing-md);
486
+ }
487
+
488
+ .ai__response-title {
489
+ font-size: 0.875rem;
490
+ font-weight: 600;
491
+ color: var(--ai-text);
492
+ margin: 0;
493
+ }
494
+
495
+ .ai__response-meta {
496
+ display: flex;
497
+ gap: var(--ai-spacing-sm);
498
+ font-size: 0.75rem;
499
+ color: var(--ai-text-muted);
500
+ }
501
+
502
+ .ai__response-content {
503
+ font-size: 0.875rem;
504
+ line-height: 1.6;
505
+ color: var(--ai-text);
506
+ margin-bottom: var(--ai-spacing-md);
507
+ }
508
+
509
+ .ai__response-footer {
510
+ display: flex;
511
+ gap: var(--ai-spacing-sm);
512
+ flex-wrap: wrap;
513
+ padding-top: var(--ai-spacing-md);
514
+ border-top: 1px solid var(--ai-border);
515
+ }
516
+
517
+ /* ============================================================================
518
+ PROMPT TEMPLATES
519
+ ============================================================================ */
520
+
521
+ .ai__templates {
522
+ background: var(--ai-surface);
523
+ border: 1px solid var(--ai-border);
524
+ border-radius: var(--ai-radius);
525
+ padding: var(--ai-spacing-lg);
526
+ margin-bottom: var(--ai-spacing-lg);
527
+ }
528
+
529
+ .ai__templates-title {
530
+ font-size: 0.875rem;
531
+ font-weight: 600;
532
+ color: var(--ai-text);
533
+ margin: 0 0 var(--ai-spacing-md);
534
+ }
535
+
536
+ .ai__templates-grid {
537
+ display: grid;
538
+ grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
539
+ gap: var(--ai-spacing-sm);
540
+ }
541
+
542
+ .ai__template-btn {
543
+ padding: var(--ai-spacing-sm) var(--ai-spacing-md);
544
+ background: var(--ai-surface-2);
545
+ border: 1px solid var(--ai-border);
546
+ border-radius: var(--ai-radius-sm);
547
+ color: var(--ai-text);
548
+ font-size: 0.8125rem;
549
+ font-weight: 500;
550
+ cursor: pointer;
551
+ transition: all var(--ai-transition);
552
+ text-align: left;
553
+ white-space: nowrap;
554
+ overflow: hidden;
555
+ text-overflow: ellipsis;
556
+ }
557
+
558
+ .ai__template-btn:hover {
559
+ background: var(--ai-surface-3);
560
+ border-color: var(--ai-accent);
561
+ color: var(--ai-accent);
562
+ }
563
+
564
+ /* ============================================================================
565
+ FEATURE TOGGLES & SETTINGS
566
+ ============================================================================ */
567
+
568
+ .ai__feature-toggle {
569
+ display: flex;
570
+ align-items: center;
571
+ justify-content: space-between;
572
+ padding: var(--ai-spacing-md);
573
+ background: var(--ai-surface-2);
574
+ border: 1px solid var(--ai-border);
575
+ border-radius: var(--ai-radius-sm);
576
+ margin-bottom: var(--ai-spacing-sm);
577
+ }
578
+
579
+ .ai__feature-label {
580
+ font-size: 0.875rem;
581
+ font-weight: 500;
582
+ color: var(--ai-text);
583
+ }
584
+
585
+ .ai__feature-description {
586
+ font-size: 0.75rem;
587
+ color: var(--ai-text-muted);
588
+ margin-top: var(--ai-spacing-xs);
589
+ }
590
+
591
+ .ai__toggle-switch {
592
+ position: relative;
593
+ width: 2.5rem;
594
+ height: 1.5rem;
595
+ background: var(--ai-inactive);
596
+ border-radius: 9999px;
597
+ cursor: pointer;
598
+ transition: background-color var(--ai-transition);
599
+ }
600
+
601
+ .ai__toggle-switch--active {
602
+ background: var(--ai-accent);
603
+ }
604
+
605
+ .ai__toggle-switch-thumb {
606
+ position: absolute;
607
+ top: 0.1875rem;
608
+ left: 0.1875rem;
609
+ width: 1.125rem;
610
+ height: 1.125rem;
611
+ background: oklch(1 0 0);
612
+ border-radius: 50%;
613
+ transition: transform var(--ai-transition);
614
+ }
615
+
616
+ .ai__toggle-switch--active .ai__toggle-switch-thumb {
617
+ transform: translateX(1rem);
618
+ }
619
+
620
+ /* ============================================================================
621
+ CODE BLOCKS & SYNTAX
622
+ ============================================================================ */
623
+
624
+ .ai__code-block {
625
+ background: oklch(0.08 0.01 250);
626
+ border: 1px solid var(--ai-border);
627
+ border-radius: var(--ai-radius-sm);
628
+ padding: var(--ai-spacing-lg);
629
+ margin: var(--ai-spacing-md) 0;
630
+ overflow-x: auto;
631
+ }
632
+
633
+ .ai__code-header {
634
+ display: flex;
635
+ align-items: center;
636
+ justify-content: space-between;
637
+ margin-bottom: var(--ai-spacing-md);
638
+ padding-bottom: var(--ai-spacing-md);
639
+ border-bottom: 1px solid var(--ai-border);
640
+ }
641
+
642
+ .ai__code-lang {
643
+ font-size: 0.75rem;
644
+ color: var(--ai-text-muted);
645
+ font-weight: 500;
646
+ text-transform: uppercase;
647
+ letter-spacing: 0.05em;
648
+ }
649
+
650
+ .ai__code-copy {
651
+ background: none;
652
+ border: none;
653
+ color: var(--ai-text-muted);
654
+ cursor: pointer;
655
+ font-size: 0.75rem;
656
+ font-weight: 500;
657
+ transition: color var(--ai-transition);
658
+ }
659
+
660
+ .ai__code-copy:hover {
661
+ color: var(--ai-accent);
662
+ }
663
+
664
+ .ai__code-text {
665
+ font-family: 'JetBrains Mono', monospace;
666
+ font-size: 0.8125rem;
667
+ color: var(--ai-text);
668
+ line-height: 1.5;
669
+ word-wrap: break-word;
670
+ white-space: pre-wrap;
671
+ }
672
+
673
+ /* ============================================================================
674
+ SIDEBAR & HISTORY
675
+ ============================================================================ */
676
+
677
+ .ai__sidebar {
678
+ width: 16rem;
679
+ background: var(--ai-surface);
680
+ border-right: 1px solid var(--ai-border);
681
+ display: flex;
682
+ flex-direction: column;
683
+ overflow-y: auto;
684
+ }
685
+
686
+ .ai__sidebar-header {
687
+ padding: var(--ai-spacing-lg);
688
+ border-bottom: 1px solid var(--ai-border);
689
+ }
690
+
691
+ .ai__sidebar-title {
692
+ font-size: 0.875rem;
693
+ font-weight: 600;
694
+ color: var(--ai-text);
695
+ margin: 0;
696
+ }
697
+
698
+ .ai__chat-history {
699
+ flex: 1;
700
+ padding: var(--ai-spacing-lg) 0;
701
+ overflow-y: auto;
702
+ }
703
+
704
+ .ai__history-item {
705
+ padding: var(--ai-spacing-md) var(--ai-spacing-lg);
706
+ border-bottom: 1px solid var(--ai-border);
707
+ font-size: 0.875rem;
708
+ color: var(--ai-text-muted);
709
+ cursor: pointer;
710
+ transition: all var(--ai-transition);
711
+ overflow: hidden;
712
+ text-overflow: ellipsis;
713
+ white-space: nowrap;
714
+ }
715
+
716
+ .ai__history-item:hover {
717
+ background: var(--ai-surface-2);
718
+ color: var(--ai-text);
719
+ }
720
+
721
+ .ai__history-item--active {
722
+ background: var(--ai-accent);
723
+ color: oklch(1 0 0);
724
+ }
725
+
726
+ /* ============================================================================
727
+ ANIMATIONS
728
+ ============================================================================ */
729
+
730
+ @keyframes ai-fade-in {
731
+ from {
732
+ opacity: 0;
733
+ }
734
+ to {
735
+ opacity: 1;
736
+ }
737
+ }
738
+
739
+ @keyframes ai-bubble-pop {
740
+ from {
741
+ opacity: 0;
742
+ transform: scale(0.95);
743
+ }
744
+ to {
745
+ opacity: 1;
746
+ transform: scale(1);
747
+ }
748
+ }
749
+
750
+ @keyframes ai-typing {
751
+ 0%, 60%, 100% {
752
+ transform: translateY(0);
753
+ opacity: 0.7;
754
+ }
755
+ 30% {
756
+ transform: translateY(-0.5rem);
757
+ opacity: 1;
758
+ }
759
+ }
760
+
761
+ @keyframes ai-pulse {
762
+ 0%, 100% {
763
+ opacity: 1;
764
+ }
765
+ 50% {
766
+ opacity: 0.5;
767
+ }
768
+ }
769
+
770
+ @keyframes ai-fade-blink {
771
+ 0%, 100% {
772
+ opacity: 0.8;
773
+ }
774
+ 50% {
775
+ opacity: 0.3;
776
+ }
777
+ }
778
+
779
+ /* ============================================================================
780
+ RESPONSIVE DESIGN
781
+ ============================================================================ */
782
+
783
+ @media (max-width: 1024px) {
784
+ .ai__message-content {
785
+ max-width: 80%;
786
+ }
787
+ }
788
+
789
+ @media (max-width: 768px) {
790
+ .ai__container {
791
+ flex-direction: column-reverse;
792
+ }
793
+
794
+ .ai__sidebar {
795
+ width: 100%;
796
+ height: auto;
797
+ max-height: 25vh;
798
+ border-right: none;
799
+ border-top: 1px solid var(--ai-border);
800
+ }
801
+
802
+ .ai__message-content {
803
+ max-width: 90%;
804
+ }
805
+
806
+ .ai__chat-area {
807
+ padding: var(--ai-spacing-lg);
808
+ }
809
+
810
+ .ai__input-area {
811
+ padding: var(--ai-spacing-lg);
812
+ }
813
+
814
+ .ai__templates-grid {
815
+ grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
816
+ }
817
+
818
+ .ai__modal {
819
+ min-width: unset;
820
+ width: calc(100vw - 2rem);
821
+ max-height: calc(100vh - 2rem);
822
+ }
823
+ }
824
+
825
+ @media (max-width: 480px) {
826
+ .ai__header {
827
+ flex-direction: column;
828
+ align-items: flex-start;
829
+ }
830
+
831
+ .ai__message-content {
832
+ max-width: 100%;
833
+ }
834
+
835
+ .ai__input-form {
836
+ flex-direction: column;
837
+ align-items: stretch;
838
+ }
839
+
840
+ .ai__input-btn {
841
+ width: 100%;
842
+ }
843
+
844
+ .ai__model-selector {
845
+ flex-wrap: wrap;
846
+ }
847
+
848
+ .ai__code-block {
849
+ padding: var(--ai-spacing-md);
850
+ }
851
+
852
+ .ai__response-card {
853
+ padding: var(--ai-spacing-md);
854
+ }
855
+ }
856
+
857
+ /* End of ai.css */