@tanstack/ai-devtools-core 0.0.1

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 (103) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +131 -0
  3. package/dist/esm/components/ConversationDetails.d.ts +2 -0
  4. package/dist/esm/components/ConversationDetails.js +134 -0
  5. package/dist/esm/components/ConversationDetails.js.map +1 -0
  6. package/dist/esm/components/ConversationsList.d.ts +2 -0
  7. package/dist/esm/components/ConversationsList.js +30 -0
  8. package/dist/esm/components/ConversationsList.js.map +1 -0
  9. package/dist/esm/components/Shell.d.ts +1 -0
  10. package/dist/esm/components/Shell.js +94 -0
  11. package/dist/esm/components/Shell.js.map +1 -0
  12. package/dist/esm/components/conversation/ChunkBadges.d.ts +7 -0
  13. package/dist/esm/components/conversation/ChunkBadges.js +54 -0
  14. package/dist/esm/components/conversation/ChunkBadges.js.map +1 -0
  15. package/dist/esm/components/conversation/ChunkItem.d.ts +9 -0
  16. package/dist/esm/components/conversation/ChunkItem.js +247 -0
  17. package/dist/esm/components/conversation/ChunkItem.js.map +1 -0
  18. package/dist/esm/components/conversation/ChunksCollapsible.d.ts +7 -0
  19. package/dist/esm/components/conversation/ChunksCollapsible.js +77 -0
  20. package/dist/esm/components/conversation/ChunksCollapsible.js.map +1 -0
  21. package/dist/esm/components/conversation/ChunksTab.d.ts +8 -0
  22. package/dist/esm/components/conversation/ChunksTab.js +87 -0
  23. package/dist/esm/components/conversation/ChunksTab.js.map +1 -0
  24. package/dist/esm/components/conversation/ConversationHeader.d.ts +7 -0
  25. package/dist/esm/components/conversation/ConversationHeader.js +187 -0
  26. package/dist/esm/components/conversation/ConversationHeader.js.map +1 -0
  27. package/dist/esm/components/conversation/ConversationTabs.d.ts +10 -0
  28. package/dist/esm/components/conversation/ConversationTabs.js +88 -0
  29. package/dist/esm/components/conversation/ConversationTabs.js.map +1 -0
  30. package/dist/esm/components/conversation/EmbeddingsTab.d.ts +7 -0
  31. package/dist/esm/components/conversation/EmbeddingsTab.js +90 -0
  32. package/dist/esm/components/conversation/EmbeddingsTab.js.map +1 -0
  33. package/dist/esm/components/conversation/MessageCard.d.ts +7 -0
  34. package/dist/esm/components/conversation/MessageCard.js +152 -0
  35. package/dist/esm/components/conversation/MessageCard.js.map +1 -0
  36. package/dist/esm/components/conversation/MessageGroup.d.ts +15 -0
  37. package/dist/esm/components/conversation/MessageGroup.js +119 -0
  38. package/dist/esm/components/conversation/MessageGroup.js.map +1 -0
  39. package/dist/esm/components/conversation/MessagesTab.d.ts +7 -0
  40. package/dist/esm/components/conversation/MessagesTab.js +37 -0
  41. package/dist/esm/components/conversation/MessagesTab.js.map +1 -0
  42. package/dist/esm/components/conversation/SummariesTab.d.ts +7 -0
  43. package/dist/esm/components/conversation/SummariesTab.js +110 -0
  44. package/dist/esm/components/conversation/SummariesTab.js.map +1 -0
  45. package/dist/esm/components/conversation/ToolCallDisplay.d.ts +7 -0
  46. package/dist/esm/components/conversation/ToolCallDisplay.js +123 -0
  47. package/dist/esm/components/conversation/ToolCallDisplay.js.map +1 -0
  48. package/dist/esm/components/conversation/index.d.ts +7 -0
  49. package/dist/esm/components/list/ConversationRow.d.ts +7 -0
  50. package/dist/esm/components/list/ConversationRow.js +122 -0
  51. package/dist/esm/components/list/ConversationRow.js.map +1 -0
  52. package/dist/esm/components/list/index.d.ts +1 -0
  53. package/dist/esm/components/utils/format.d.ts +6 -0
  54. package/dist/esm/components/utils/format.js +68 -0
  55. package/dist/esm/components/utils/format.js.map +1 -0
  56. package/dist/esm/components/utils/index.d.ts +1 -0
  57. package/dist/esm/core.d.ts +18 -0
  58. package/dist/esm/core.js +9 -0
  59. package/dist/esm/core.js.map +1 -0
  60. package/dist/esm/index.d.ts +9 -0
  61. package/dist/esm/index.js +6 -0
  62. package/dist/esm/index.js.map +1 -0
  63. package/dist/esm/production.d.ts +2 -0
  64. package/dist/esm/production.js +5 -0
  65. package/dist/esm/production.js.map +1 -0
  66. package/dist/esm/store/ai-context.d.ts +126 -0
  67. package/dist/esm/store/ai-context.js +1081 -0
  68. package/dist/esm/store/ai-context.js.map +1 -0
  69. package/dist/esm/store/ai-store.d.ts +1 -0
  70. package/dist/esm/styles/tokens.d.ts +298 -0
  71. package/dist/esm/styles/tokens.js +107 -0
  72. package/dist/esm/styles/tokens.js.map +1 -0
  73. package/dist/esm/styles/use-styles.d.ts +226 -0
  74. package/dist/esm/styles/use-styles.js +1538 -0
  75. package/dist/esm/styles/use-styles.js.map +1 -0
  76. package/package.json +61 -0
  77. package/src/components/ConversationDetails.tsx +89 -0
  78. package/src/components/ConversationsList.tsx +21 -0
  79. package/src/components/Shell.tsx +93 -0
  80. package/src/components/conversation/ChunkBadges.tsx +51 -0
  81. package/src/components/conversation/ChunkItem.tsx +273 -0
  82. package/src/components/conversation/ChunksCollapsible.tsx +58 -0
  83. package/src/components/conversation/ChunksTab.tsx +85 -0
  84. package/src/components/conversation/ConversationHeader.tsx +130 -0
  85. package/src/components/conversation/ConversationTabs.tsx +104 -0
  86. package/src/components/conversation/EmbeddingsTab.tsx +80 -0
  87. package/src/components/conversation/MessageCard.tsx +137 -0
  88. package/src/components/conversation/MessageGroup.tsx +101 -0
  89. package/src/components/conversation/MessagesTab.tsx +30 -0
  90. package/src/components/conversation/SummariesTab.tsx +91 -0
  91. package/src/components/conversation/ToolCallDisplay.tsx +99 -0
  92. package/src/components/conversation/index.ts +8 -0
  93. package/src/components/list/ConversationRow.tsx +85 -0
  94. package/src/components/list/index.ts +1 -0
  95. package/src/components/utils/format.ts +61 -0
  96. package/src/components/utils/index.ts +1 -0
  97. package/src/core.tsx +10 -0
  98. package/src/index.ts +8 -0
  99. package/src/production.ts +3 -0
  100. package/src/store/ai-context.tsx +1784 -0
  101. package/src/store/ai-store.ts +2 -0
  102. package/src/styles/tokens.ts +305 -0
  103. package/src/styles/use-styles.ts +1537 -0
@@ -0,0 +1,1537 @@
1
+ import * as goober from 'goober'
2
+ import { createEffect, createSignal } from 'solid-js'
3
+ import { useTheme } from '@tanstack/devtools-ui'
4
+ import { tokens } from './tokens'
5
+
6
+ const stylesFactory = (theme: 'light' | 'dark') => {
7
+ const { colors, font, size, alpha, border } = tokens
8
+ const { fontFamily, size: fontSize } = font
9
+ const css = goober.css
10
+ const t = (light: string, dark: string) => (theme === 'light' ? light : dark)
11
+
12
+ return {
13
+ mainContainer: css`
14
+ display: flex;
15
+ flex: 1;
16
+ min-height: 80%;
17
+ overflow: hidden;
18
+ padding: ${size[2]};
19
+ `,
20
+ dragHandle: css`
21
+ width: 8px;
22
+ background: ${t(colors.gray[300], colors.darkGray[600])};
23
+ cursor: col-resize;
24
+ position: relative;
25
+ transition: all 0.2s ease;
26
+ user-select: none;
27
+ pointer-events: all;
28
+ margin: 0 ${size[1]};
29
+ border-radius: 2px;
30
+
31
+ &:hover {
32
+ background: ${t(colors.blue[600], colors.blue[500])};
33
+ margin: 0 ${size[1]};
34
+ }
35
+
36
+ &.dragging {
37
+ background: ${t(colors.blue[700], colors.blue[600])};
38
+ margin: 0 ${size[1]};
39
+ }
40
+
41
+ &::after {
42
+ content: '';
43
+ position: absolute;
44
+ top: 50%;
45
+ left: 50%;
46
+ transform: translate(-50%, -50%);
47
+ width: 2px;
48
+ height: 20px;
49
+ background: ${t(colors.gray[400], colors.darkGray[400])};
50
+ border-radius: 1px;
51
+ pointer-events: none;
52
+ }
53
+
54
+ &:hover::after,
55
+ &.dragging::after {
56
+ background: ${t(colors.blue[500], colors.blue[300])};
57
+ }
58
+ `,
59
+ leftPanel: css`
60
+ background: ${t(colors.gray[100], colors.darkGray[800])};
61
+ border-radius: ${border.radius.lg};
62
+ border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
63
+ display: flex;
64
+ flex-direction: column;
65
+ overflow: hidden;
66
+ min-height: 0;
67
+ flex-shrink: 0;
68
+ `,
69
+ rightPanel: css`
70
+ background: ${t(colors.gray[100], colors.darkGray[800])};
71
+ border-radius: ${border.radius.lg};
72
+ border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
73
+ display: flex;
74
+ flex-direction: column;
75
+ overflow: hidden;
76
+ min-height: 0;
77
+ flex: 1;
78
+ `,
79
+ panelHeader: css`
80
+ font-size: ${fontSize.md};
81
+ font-weight: ${font.weight.bold};
82
+ color: ${t(colors.blue[700], colors.blue[400])};
83
+ padding: ${size[2]};
84
+ border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
85
+ background: ${t(colors.gray[100], colors.darkGray[800])};
86
+ flex-shrink: 0;
87
+ `,
88
+ utilList: css`
89
+ flex: 1;
90
+ overflow-y: auto;
91
+ padding: ${size[1]};
92
+ min-height: 0;
93
+ `,
94
+ utilGroup: css`
95
+ margin-bottom: ${size[2]};
96
+ `,
97
+ utilGroupHeader: css`
98
+ font-size: ${fontSize.xs};
99
+ font-weight: ${font.weight.semibold};
100
+ color: ${t(colors.gray[600], colors.gray[400])};
101
+ text-transform: uppercase;
102
+ letter-spacing: 0.05em;
103
+ margin-bottom: ${size[1]};
104
+ padding: ${size[1]} ${size[2]};
105
+ background: ${t(colors.gray[200], colors.darkGray[700])};
106
+ border-radius: ${border.radius.md};
107
+ `,
108
+ utilRow: css`
109
+ display: flex;
110
+ justify-content: space-between;
111
+ align-items: center;
112
+ padding: ${size[2]};
113
+ margin-bottom: ${size[1]};
114
+ background: ${t(colors.gray[200], colors.darkGray[700])};
115
+ border-radius: ${border.radius.md};
116
+ cursor: pointer;
117
+ transition: all 0.2s ease;
118
+ border: 1px solid transparent;
119
+
120
+ &:hover {
121
+ background: ${t(colors.gray[300], colors.darkGray[600])};
122
+ border-color: ${t(colors.gray[400], colors.darkGray[500])};
123
+ }
124
+ `,
125
+ utilRowSelected: css`
126
+ background: ${t(colors.blue[100], colors.blue[900] + alpha[20])};
127
+ border-color: ${t(colors.blue[600], colors.blue[500])};
128
+ box-shadow: 0 0 0 1px
129
+ ${t(colors.blue[600] + alpha[30], colors.blue[500] + alpha[30])};
130
+ `,
131
+ utilKey: css`
132
+ font-family: ${fontFamily.mono};
133
+ font-size: ${fontSize.xs};
134
+ color: ${t(colors.gray[900], colors.gray[100])};
135
+ flex: 1;
136
+ overflow: hidden;
137
+ text-overflow: ellipsis;
138
+ white-space: nowrap;
139
+ `,
140
+ utilStatus: css`
141
+ font-size: ${fontSize.xs};
142
+ color: ${t(colors.gray[600], colors.gray[400])};
143
+ text-transform: uppercase;
144
+ letter-spacing: 0.05em;
145
+ padding: ${size[1]} ${size[1]};
146
+ background: ${t(colors.gray[300], colors.darkGray[600])};
147
+ border-radius: ${border.radius.sm};
148
+ margin-left: ${size[1]};
149
+ `,
150
+ stateDetails: css`
151
+ flex: 1;
152
+ overflow-y: auto;
153
+ padding: ${size[2]};
154
+ min-height: 0;
155
+ `,
156
+ stateHeader: css`
157
+ margin-bottom: ${size[2]};
158
+ padding-bottom: ${size[2]};
159
+ border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
160
+ `,
161
+ stateTitle: css`
162
+ font-size: ${fontSize.md};
163
+ font-weight: ${font.weight.bold};
164
+ color: ${t(colors.blue[700], colors.blue[400])};
165
+ margin-bottom: ${size[1]};
166
+ `,
167
+ stateKey: css`
168
+ font-family: ${fontFamily.mono};
169
+ font-size: ${fontSize.xs};
170
+ color: ${t(colors.gray[600], colors.gray[400])};
171
+ word-break: break-all;
172
+ `,
173
+ stateContent: css`
174
+ background: ${t(colors.gray[100], colors.darkGray[700])};
175
+ border-radius: ${border.radius.md};
176
+ padding: ${size[2]};
177
+ border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
178
+ `,
179
+ detailsGrid: css`
180
+ display: grid;
181
+ grid-template-columns: 1fr;
182
+ gap: ${size[2]};
183
+ align-items: start;
184
+ `,
185
+ detailSection: css`
186
+ background: ${t(colors.white, colors.darkGray[700])};
187
+ border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
188
+ border-radius: ${border.radius.md};
189
+ padding: ${size[2]};
190
+ `,
191
+ detailSectionHeader: css`
192
+ font-size: ${fontSize.sm};
193
+ font-weight: ${font.weight.bold};
194
+ color: ${t(colors.gray[800], colors.gray[200])};
195
+ margin-bottom: ${size[1]};
196
+ text-transform: uppercase;
197
+ letter-spacing: 0.04em;
198
+ `,
199
+ actionsRow: css`
200
+ display: flex;
201
+ flex-wrap: wrap;
202
+ gap: ${size[2]};
203
+ `,
204
+ actionButton: css`
205
+ display: inline-flex;
206
+ align-items: center;
207
+ gap: ${size[1]};
208
+ padding: ${size[1]} ${size[2]};
209
+ border-radius: ${border.radius.md};
210
+ border: 1px solid ${t(colors.gray[300], colors.darkGray[500])};
211
+ background: ${t(colors.gray[200], colors.darkGray[600])};
212
+ color: ${t(colors.gray[900], colors.gray[100])};
213
+ font-size: ${fontSize.xs};
214
+ cursor: pointer;
215
+ user-select: none;
216
+ transition:
217
+ background 0.15s,
218
+ border-color 0.15s;
219
+ &:hover {
220
+ background: ${t(colors.gray[300], colors.darkGray[500])};
221
+ border-color: ${t(colors.gray[400], colors.darkGray[400])};
222
+ }
223
+ &:disabled {
224
+ opacity: 0.5;
225
+ cursor: not-allowed;
226
+ &:hover {
227
+ background: ${t(colors.gray[200], colors.darkGray[600])};
228
+ border-color: ${t(colors.gray[300], colors.darkGray[500])};
229
+ }
230
+ }
231
+ `,
232
+ actionDotBlue: css`
233
+ width: 6px;
234
+ height: 6px;
235
+ border-radius: 9999px;
236
+ background: ${colors.blue[400]};
237
+ `,
238
+ actionDotGreen: css`
239
+ width: 6px;
240
+ height: 6px;
241
+ border-radius: 9999px;
242
+ background: ${colors.green[400]};
243
+ `,
244
+ actionDotRed: css`
245
+ width: 6px;
246
+ height: 6px;
247
+ border-radius: 9999px;
248
+ background: ${colors.red[400]};
249
+ `,
250
+ actionDotYellow: css`
251
+ width: 6px;
252
+ height: 6px;
253
+ border-radius: 9999px;
254
+ background: ${colors.yellow[400]};
255
+ `,
256
+ actionDotOrange: css`
257
+ width: 6px;
258
+ height: 6px;
259
+ border-radius: 9999px;
260
+ background: ${colors.pink[400]};
261
+ `,
262
+ actionDotPurple: css`
263
+ width: 6px;
264
+ height: 6px;
265
+ border-radius: 9999px;
266
+ background: ${colors.purple[400]};
267
+ `,
268
+ infoGrid: css`
269
+ display: grid;
270
+ grid-template-columns: auto 1fr;
271
+ gap: ${size[1]};
272
+ row-gap: ${size[1]};
273
+ align-items: center;
274
+ `,
275
+ infoLabel: css`
276
+ color: ${t(colors.gray[600], colors.gray[400])};
277
+ font-size: ${fontSize.xs};
278
+ text-transform: uppercase;
279
+ letter-spacing: 0.05em;
280
+ `,
281
+ infoValueMono: css`
282
+ font-family: ${fontFamily.mono};
283
+ font-size: ${fontSize.xs};
284
+ color: ${t(colors.gray[900], colors.gray[100])};
285
+ word-break: break-all;
286
+ `,
287
+ noSelection: css`
288
+ flex: 1;
289
+ display: flex;
290
+ align-items: center;
291
+ justify-content: center;
292
+ color: ${t(colors.gray[500], colors.gray[500])};
293
+ font-style: italic;
294
+ text-align: center;
295
+ padding: ${size[4]};
296
+ `,
297
+ // Keep existing styles for backward compatibility
298
+ sectionContainer: css`
299
+ display: flex;
300
+ flex-wrap: wrap;
301
+ gap: ${size[4]};
302
+ `,
303
+ section: css`
304
+ background: ${t(colors.gray[100], colors.darkGray[800])};
305
+ border-radius: ${border.radius.lg};
306
+ box-shadow: ${tokens.shadow.md(
307
+ t(colors.gray[400] + alpha[80], colors.black + alpha[80]),
308
+ )};
309
+ padding: ${size[4]};
310
+ margin-bottom: ${size[4]};
311
+ border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
312
+ min-width: 0;
313
+ max-width: 33%;
314
+ max-height: fit-content;
315
+ `,
316
+ sectionHeader: css`
317
+ font-size: ${fontSize.lg};
318
+ font-weight: ${font.weight.bold};
319
+ margin-bottom: ${size[2]};
320
+ color: ${t(colors.blue[600], colors.blue[400])};
321
+ letter-spacing: 0.01em;
322
+ display: flex;
323
+ align-items: center;
324
+ gap: ${size[2]};
325
+ `,
326
+ sectionEmpty: css`
327
+ color: ${t(colors.gray[500], colors.gray[500])};
328
+ font-size: ${fontSize.sm};
329
+ font-style: italic;
330
+ margin: ${size[2]} 0;
331
+ `,
332
+ instanceList: css`
333
+ display: flex;
334
+ flex-direction: column;
335
+ gap: ${size[2]};
336
+ background: ${t(colors.gray[200], colors.darkGray[700])};
337
+ border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
338
+ `,
339
+ instanceCard: css`
340
+ background: ${t(colors.gray[200], colors.darkGray[700])};
341
+ border-radius: ${border.radius.md};
342
+ padding: ${size[3]};
343
+ border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
344
+ font-size: ${fontSize.sm};
345
+ color: ${t(colors.gray[900], colors.gray[100])};
346
+ font-family: ${fontFamily.mono};
347
+ overflow-x: auto;
348
+ transition:
349
+ box-shadow 0.3s,
350
+ background 0.3s;
351
+ `,
352
+ // Shell component styles
353
+ shell: {
354
+ sectionHeader: css`
355
+ padding: ${size[3]} ${size[4]};
356
+ font-size: ${fontSize.sm};
357
+ font-weight: ${font.weight.semibold};
358
+ color: ${t(colors.gray[100], colors.gray[200])};
359
+ text-transform: uppercase;
360
+ letter-spacing: 0.5px;
361
+ text-align: center;
362
+ background: ${t(colors.gray[700], colors.darkGray[600])};
363
+ border-bottom: 1px solid ${t(colors.gray[600], colors.darkGray[500])};
364
+ `,
365
+ filterContainer: css`
366
+ display: flex;
367
+ flex-direction: column;
368
+ gap: ${size[2]};
369
+ padding: ${size[3]};
370
+ border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
371
+ `,
372
+ filterButtonsRow: css`
373
+ display: flex;
374
+ gap: ${size[1.5]};
375
+ flex-wrap: wrap;
376
+ `,
377
+ filterButton: css`
378
+ display: inline-flex;
379
+ align-items: center;
380
+ gap: ${size[1]};
381
+ padding: ${size[1]} ${size[2]};
382
+ border-radius: ${border.radius.md};
383
+ border: 1px solid ${t(colors.gray[300], colors.darkGray[500])};
384
+ background: ${t(colors.gray[200], colors.darkGray[600])};
385
+ color: ${t(colors.gray[900], colors.gray[100])};
386
+ font-size: ${fontSize.xs};
387
+ cursor: pointer;
388
+ user-select: none;
389
+ transition:
390
+ background 0.15s,
391
+ border-color 0.15s;
392
+ &:hover {
393
+ background: ${t(colors.gray[300], colors.darkGray[500])};
394
+ border-color: ${t(colors.gray[400], colors.darkGray[400])};
395
+ }
396
+ `,
397
+ filterButtonActive: css`
398
+ background: ${colors.pink[400]};
399
+ color: ${colors.white};
400
+ border-color: ${colors.pink[400]};
401
+ &:hover {
402
+ background: ${colors.pink[500]};
403
+ border-color: ${colors.pink[500]};
404
+ }
405
+ `,
406
+ actionsRow: css`
407
+ display: flex;
408
+ gap: ${size[1.5]};
409
+ `,
410
+ clearAllButton: css`
411
+ flex: 1;
412
+ font-size: ${fontSize.xs};
413
+ `,
414
+ },
415
+ // ConversationsList component styles
416
+ conversationsList: {
417
+ rowMain: css`
418
+ display: flex;
419
+ flex-direction: column;
420
+ gap: 4px;
421
+ flex: 1;
422
+ min-width: 0;
423
+ `,
424
+ rowTop: css`
425
+ display: flex;
426
+ align-items: center;
427
+ justify-content: space-between;
428
+ gap: ${size[2]};
429
+ `,
430
+ rowRight: css`
431
+ display: flex;
432
+ align-items: center;
433
+ gap: ${size[1]};
434
+ flex-shrink: 0;
435
+ `,
436
+ rowContent: css`
437
+ display: flex;
438
+ align-items: center;
439
+ gap: ${size[2]};
440
+ flex: 1;
441
+ `,
442
+ rowInfo: css`
443
+ display: flex;
444
+ align-items: center;
445
+ gap: ${size[1]};
446
+ min-width: 0;
447
+ flex: 1;
448
+ `,
449
+ typeDot: css`
450
+ width: 8px;
451
+ height: 8px;
452
+ border-radius: 50%;
453
+ `,
454
+ label: css`
455
+ font-weight: ${font.weight.semibold};
456
+ `,
457
+ toolCallsBadge: css`
458
+ display: flex;
459
+ align-items: center;
460
+ gap: 3px;
461
+ padding: 2px 6px;
462
+ border-radius: ${border.radius.sm};
463
+ background: oklch(0.35 0.1 280);
464
+ color: oklch(0.8 0.12 280);
465
+ font-size: ${fontSize.xs};
466
+ font-weight: ${font.weight.semibold};
467
+ `,
468
+ statusDot: css`
469
+ width: 6px;
470
+ height: 6px;
471
+ border-radius: 50%;
472
+ margin-left: auto;
473
+ `,
474
+ stats: css`
475
+ display: flex;
476
+ align-items: center;
477
+ gap: ${size[2]};
478
+ font-size: 10px;
479
+ opacity: 0.7;
480
+ flex-wrap: wrap;
481
+ `,
482
+ statItem: css`
483
+ display: flex;
484
+ align-items: center;
485
+ gap: 2px;
486
+ white-space: nowrap;
487
+ `,
488
+ tokensBadge: css`
489
+ display: flex;
490
+ align-items: center;
491
+ gap: 2px;
492
+ padding: 1px 5px;
493
+ border-radius: ${border.radius.sm};
494
+ background: oklch(0.35 0.08 220);
495
+ color: oklch(0.75 0.12 220);
496
+ font-size: 10px;
497
+ font-weight: ${font.weight.semibold};
498
+ white-space: nowrap;
499
+ `,
500
+ loadingIndicator: css`
501
+ font-size: 12px;
502
+ color: oklch(0.7 0.17 142);
503
+ animation: spin 1s linear infinite;
504
+ @keyframes spin {
505
+ from {
506
+ transform: rotate(0deg);
507
+ }
508
+ to {
509
+ transform: rotate(360deg);
510
+ }
511
+ }
512
+ `,
513
+ },
514
+ // ConversationDetails component styles
515
+ conversationDetails: {
516
+ emptyState: css`
517
+ display: flex;
518
+ align-items: center;
519
+ justify-content: center;
520
+ height: 100%;
521
+ color: ${t(colors.gray[500], colors.gray[500])};
522
+ font-size: ${fontSize.sm};
523
+ `,
524
+ container: css`
525
+ display: flex;
526
+ flex-direction: column;
527
+ height: 100%;
528
+ `,
529
+ headerContent: css`
530
+ display: flex;
531
+ flex-direction: column;
532
+ gap: ${size[1]};
533
+ `,
534
+ headerRow: css`
535
+ display: flex;
536
+ align-items: center;
537
+ gap: ${size[3]};
538
+ `,
539
+ headerLabel: css`
540
+ font-weight: ${font.weight.semibold};
541
+ font-size: ${fontSize.sm};
542
+ `,
543
+ statusBadge: css`
544
+ font-size: ${fontSize.xs};
545
+ padding: 2px ${size[2]};
546
+ border-radius: ${border.radius.sm};
547
+ `,
548
+ statusActive: css`
549
+ background: ${colors.blue[500]}20;
550
+ color: ${colors.blue[500]};
551
+ `,
552
+ statusCompleted: css`
553
+ background: ${colors.green[500]}20;
554
+ color: ${colors.green[500]};
555
+ `,
556
+ statusError: css`
557
+ background: ${colors.red[500]}20;
558
+ color: ${colors.red[500]};
559
+ `,
560
+ metaInfo: css`
561
+ font-size: ${fontSize.xs};
562
+ color: ${t(colors.gray[600], colors.gray[400])};
563
+ `,
564
+ usageInfo: css`
565
+ font-size: ${fontSize.xs};
566
+ color: ${t(colors.gray[600], colors.gray[400])};
567
+ display: flex;
568
+ align-items: center;
569
+ gap: ${size[2]};
570
+ `,
571
+ usageLabel: css`
572
+ font-weight: ${font.weight.semibold};
573
+ color: ${colors.blue[500]};
574
+ `,
575
+ usageBold: css`
576
+ font-weight: ${font.weight.semibold};
577
+ `,
578
+ toolsRow: css`
579
+ display: flex;
580
+ align-items: flex-start;
581
+ gap: ${size[2]};
582
+ margin-top: ${size[2]};
583
+ `,
584
+ toolsLabel: css`
585
+ font-size: ${fontSize.sm};
586
+ flex-shrink: 0;
587
+ `,
588
+ optionsRow: css`
589
+ display: flex;
590
+ align-items: flex-start;
591
+ gap: ${size[2]};
592
+ margin-top: ${size[1]};
593
+ `,
594
+ optionsLabel: css`
595
+ font-size: ${fontSize.xs};
596
+ color: ${t(colors.gray[600], colors.gray[400])};
597
+ flex-shrink: 0;
598
+ white-space: nowrap;
599
+ `,
600
+ optionsCompact: css`
601
+ display: flex;
602
+ flex-wrap: wrap;
603
+ gap: 4px;
604
+ `,
605
+ optionBadge: css`
606
+ display: inline-flex;
607
+ align-items: center;
608
+ padding: 1px 6px;
609
+ background: ${t(colors.gray[200], colors.darkGray[700])};
610
+ color: ${t(colors.gray[700], colors.gray[300])};
611
+ border-radius: ${border.radius.sm};
612
+ font-size: 10px;
613
+ font-family: ${fontFamily.mono};
614
+ max-width: 200px;
615
+ overflow: hidden;
616
+ text-overflow: ellipsis;
617
+ white-space: nowrap;
618
+ `,
619
+ toggleButton: css`
620
+ background: transparent;
621
+ border: 1px solid ${t(colors.gray[300], colors.darkGray[600])};
622
+ color: ${t(colors.gray[600], colors.gray[400])};
623
+ padding: ${size[1]} ${size[2]};
624
+ border-radius: ${border.radius.sm};
625
+ font-size: ${fontSize.xs};
626
+ cursor: pointer;
627
+ transition: all 0.15s ease;
628
+ margin-top: ${size[2]};
629
+ &:hover {
630
+ background: ${t(colors.gray[100], colors.darkGray[700])};
631
+ color: ${t(colors.gray[700], colors.gray[300])};
632
+ }
633
+ `,
634
+ extendedInfo: css`
635
+ margin-top: ${size[3]};
636
+ padding: ${size[3]};
637
+ background: ${t(colors.gray[50], colors.darkGray[800])};
638
+ border-radius: ${border.radius.md};
639
+ border: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
640
+ `,
641
+ infoSection: css`
642
+ margin-bottom: ${size[3]};
643
+ &:last-child {
644
+ margin-bottom: 0;
645
+ }
646
+ `,
647
+ infoLabel: css`
648
+ font-weight: ${font.weight.semibold};
649
+ font-size: ${fontSize.xs};
650
+ color: ${t(colors.gray[700], colors.gray[300])};
651
+ display: block;
652
+ margin-bottom: ${size[1]};
653
+ `,
654
+ toolsList: css`
655
+ display: flex;
656
+ flex-wrap: wrap;
657
+ gap: ${size[1]};
658
+ `,
659
+ toolBadge: css`
660
+ display: inline-flex;
661
+ align-items: center;
662
+ padding: 2px ${size[2]};
663
+ background: ${colors.purple[500]}20;
664
+ color: ${colors.purple[400]};
665
+ border-radius: ${border.radius.sm};
666
+ font-size: ${fontSize.xs};
667
+ font-family: ${fontFamily.mono};
668
+ `,
669
+ jsonPreview: css`
670
+ margin: 0;
671
+ padding: ${size[2]};
672
+ background: ${t(colors.gray[100], colors.darkGray[900])};
673
+ border-radius: ${border.radius.sm};
674
+ font-size: ${fontSize.xs};
675
+ font-family: ${fontFamily.mono};
676
+ overflow-x: auto;
677
+ max-height: 200px;
678
+ overflow-y: auto;
679
+ color: ${t(colors.gray[700], colors.gray[300])};
680
+ white-space: pre-wrap;
681
+ word-break: break-word;
682
+ `,
683
+ tabsContainer: css`
684
+ display: flex;
685
+ gap: ${size[2]};
686
+ padding: ${size[3]};
687
+ border-bottom: 1px solid ${t(colors.gray[200], colors.darkGray[700])};
688
+ `,
689
+ tabButtonActive: css`
690
+ background: ${colors.pink[400]};
691
+ color: ${colors.white};
692
+ border-color: ${colors.pink[400]};
693
+ `,
694
+ contentArea: css`
695
+ flex: 1;
696
+ overflow: auto;
697
+ padding: ${size[3]};
698
+ `,
699
+ emptyMessages: css`
700
+ padding: ${size[6]};
701
+ color: ${t(colors.gray[500], colors.gray[500])};
702
+ font-size: ${fontSize.sm};
703
+ text-align: center;
704
+ `,
705
+ messagesList: css`
706
+ display: flex;
707
+ flex-direction: column;
708
+ gap: ${size[3]};
709
+ `,
710
+ messageCard: css`
711
+ border-radius: ${border.radius.lg};
712
+ overflow: hidden;
713
+ `,
714
+ messageCardUser: css`
715
+ padding: ${size[4]};
716
+ border: 1.5px solid oklch(0.45 0.12 260);
717
+ `,
718
+ messageCardAssistant: css`
719
+ padding: ${size[4]};
720
+ border: 1.5px solid oklch(0.45 0.12 142);
721
+ `,
722
+ messageCardClient: css`
723
+ border: 2px solid oklch(0.45 0.15 142);
724
+ `,
725
+ messageCardServer: css`
726
+ border: 2px solid oklch(0.45 0.12 45);
727
+ `,
728
+ messageHeader: css`
729
+ display: flex;
730
+ align-items: center;
731
+ gap: 10px;
732
+ margin-bottom: ${size[3]};
733
+ `,
734
+ avatarUser: css`
735
+ width: 28px;
736
+ height: 28px;
737
+ border-radius: 50%;
738
+ background: oklch(0.5 0.2 260);
739
+ display: flex;
740
+ align-items: center;
741
+ justify-content: center;
742
+ font-weight: ${font.weight.bold};
743
+ font-size: ${fontSize.sm};
744
+ color: ${colors.white};
745
+ flex-shrink: 0;
746
+ `,
747
+ avatarAssistant: css`
748
+ width: 28px;
749
+ height: 28px;
750
+ border-radius: 50%;
751
+ background: oklch(0.5 0.2 142);
752
+ display: flex;
753
+ align-items: center;
754
+ justify-content: center;
755
+ font-weight: ${font.weight.bold};
756
+ font-size: ${fontSize.sm};
757
+ color: ${colors.white};
758
+ flex-shrink: 0;
759
+ `,
760
+ avatarClient: css`
761
+ width: 28px;
762
+ height: 28px;
763
+ border-radius: 50%;
764
+ background: oklch(0.5 0.22 142);
765
+ display: flex;
766
+ align-items: center;
767
+ justify-content: center;
768
+ font-weight: ${font.weight.bold};
769
+ font-size: ${fontSize.sm};
770
+ color: ${colors.white};
771
+ flex-shrink: 0;
772
+ `,
773
+ avatarServer: css`
774
+ width: 28px;
775
+ height: 28px;
776
+ border-radius: 50%;
777
+ background: oklch(0.55 0.18 45);
778
+ display: flex;
779
+ align-items: center;
780
+ justify-content: center;
781
+ font-weight: ${font.weight.bold};
782
+ font-size: ${fontSize.sm};
783
+ color: ${colors.white};
784
+ flex-shrink: 0;
785
+ `,
786
+ roleLabel: css`
787
+ flex: 1;
788
+ `,
789
+ roleLabelUser: css`
790
+ font-weight: ${font.weight.semibold};
791
+ font-size: ${fontSize.sm};
792
+ color: oklch(0.7 0.15 260);
793
+ text-transform: capitalize;
794
+ `,
795
+ roleLabelAssistant: css`
796
+ font-weight: ${font.weight.semibold};
797
+ font-size: ${fontSize.sm};
798
+ color: oklch(0.7 0.15 142);
799
+ text-transform: capitalize;
800
+ `,
801
+ roleLabelClient: css`
802
+ font-weight: ${font.weight.semibold};
803
+ font-size: ${fontSize.sm};
804
+ color: oklch(0.75 0.18 142);
805
+ text-transform: capitalize;
806
+ `,
807
+ roleLabelServer: css`
808
+ font-weight: ${font.weight.semibold};
809
+ font-size: ${fontSize.sm};
810
+ color: oklch(0.75 0.15 45);
811
+ text-transform: capitalize;
812
+ `,
813
+ sourceBanner: css`
814
+ display: flex;
815
+ align-items: center;
816
+ gap: 8px;
817
+ padding: 6px 12px;
818
+ font-size: 10px;
819
+ font-weight: ${font.weight.medium};
820
+ text-transform: uppercase;
821
+ letter-spacing: 0.5px;
822
+ `,
823
+ sourceBannerClient: css`
824
+ background: oklch(0.25 0.04 142);
825
+ color: oklch(0.7 0.08 142);
826
+ `,
827
+ sourceBannerServer: css`
828
+ background: oklch(0.25 0.04 45);
829
+ color: oklch(0.7 0.06 45);
830
+ `,
831
+ sourceBannerIcon: css`
832
+ font-size: 14px;
833
+ `,
834
+ sourceBannerText: css`
835
+ flex: 1;
836
+ `,
837
+ messageCardContent: css`
838
+ padding: ${size[4]};
839
+ padding-top: ${size[3]};
840
+ `,
841
+ sourceBadge: css`
842
+ font-size: 10px;
843
+ padding: 2px 6px;
844
+ border-radius: 4px;
845
+ font-family: ${fontFamily.mono};
846
+ font-weight: ${font.weight.medium};
847
+ `,
848
+ sourceBadgeClient: css`
849
+ background: oklch(0.25 0.08 260);
850
+ color: oklch(0.75 0.12 260);
851
+ `,
852
+ sourceBadgeServer: css`
853
+ background: oklch(0.25 0.08 45);
854
+ color: oklch(0.75 0.12 45);
855
+ `,
856
+ timestamp: css`
857
+ font-size: 10px;
858
+ color: oklch(0.6 0.05 260);
859
+ font-family: ${fontFamily.mono};
860
+ `,
861
+ messageUsage: css`
862
+ display: flex;
863
+ align-items: center;
864
+ gap: 4px;
865
+ font-size: 10px;
866
+ font-family: ${fontFamily.mono};
867
+ color: oklch(0.65 0.12 142);
868
+ margin-left: auto;
869
+ padding: 2px 6px;
870
+ background: oklch(0.2 0.03 142);
871
+ border-radius: 4px;
872
+ `,
873
+ messageUsageIcon: css`
874
+ font-size: 10px;
875
+ `,
876
+ thinkingDetails: css`
877
+ margin-bottom: ${size[2]};
878
+ border: 1px solid oklch(0.35 0.1 280);
879
+ border-radius: 6px;
880
+ background: oklch(0.18 0.02 280);
881
+ overflow: hidden;
882
+ `,
883
+ thinkingSummary: css`
884
+ padding: ${size[2]};
885
+ cursor: pointer;
886
+ font-size: ${fontSize.sm};
887
+ color: oklch(0.75 0.1 280);
888
+ font-weight: ${font.weight.semibold};
889
+ &:hover {
890
+ background: oklch(0.22 0.03 280);
891
+ }
892
+ `,
893
+ thinkingContent: css`
894
+ padding: ${size[2]};
895
+ font-size: ${fontSize.xs};
896
+ line-height: 1.5;
897
+ white-space: pre-wrap;
898
+ word-break: break-word;
899
+ color: oklch(0.7 0.05 280);
900
+ font-family: ${fontFamily.mono};
901
+ border-top: 1px solid oklch(0.3 0.05 280);
902
+ max-height: 300px;
903
+ overflow-y: auto;
904
+ `,
905
+ messageContent: css`
906
+ font-size: ${fontSize.sm};
907
+ line-height: 1.6;
908
+ white-space: pre-wrap;
909
+ word-break: break-word;
910
+ color: oklch(0.85 0.02 260);
911
+ font-family:
912
+ system-ui,
913
+ -apple-system,
914
+ sans-serif;
915
+ `,
916
+ toolCallsContainer: css`
917
+ margin-top: ${size[3]};
918
+ display: flex;
919
+ flex-direction: column;
920
+ gap: 8px;
921
+ `,
922
+ toolCall: css`
923
+ border-radius: 8px;
924
+ font-size: ${fontSize.xs};
925
+ overflow: hidden;
926
+ `,
927
+ toolCallNormal: css`
928
+ background: oklch(0.22 0.02 260);
929
+ border: 1px solid oklch(0.3 0.05 280);
930
+ `,
931
+ toolCallApproval: css`
932
+ background: oklch(0.22 0.08 60);
933
+ border: 1px solid oklch(0.4 0.12 60);
934
+ `,
935
+ toolCallHeader: css`
936
+ display: flex;
937
+ align-items: center;
938
+ gap: 6px;
939
+ padding: 10px 12px;
940
+ cursor: pointer;
941
+ list-style: none;
942
+ &::-webkit-details-marker {
943
+ display: none;
944
+ }
945
+ &::before {
946
+ content: '▶';
947
+ font-size: 10px;
948
+ color: oklch(0.6 0.1 280);
949
+ transition: transform 0.2s ease;
950
+ }
951
+ details[open] > &::before {
952
+ transform: rotate(90deg);
953
+ }
954
+ &:hover {
955
+ background: oklch(0.25 0.04 280);
956
+ }
957
+ `,
958
+ toolCallContent: css`
959
+ padding: ${size[2]} ${size[3]} ${size[3]};
960
+ border-top: 1px solid oklch(0.3 0.05 280);
961
+ `,
962
+ toolCallName: css`
963
+ font-weight: ${font.weight.semibold};
964
+ `,
965
+ toolCallNameNormal: css`
966
+ color: oklch(0.75 0.15 280);
967
+ `,
968
+ toolCallNameApproval: css`
969
+ color: oklch(0.75 0.15 60);
970
+ `,
971
+ toolStateBadge: css`
972
+ font-size: 10px;
973
+ padding: 2px 6px;
974
+ border-radius: 3px;
975
+ `,
976
+ toolStateBadgeNormal: css`
977
+ background: oklch(0.35 0.1 280);
978
+ color: oklch(0.8 0.1 280);
979
+ `,
980
+ toolStateBadgeApproval: css`
981
+ background: oklch(0.35 0.12 60);
982
+ color: oklch(0.85 0.1 60);
983
+ `,
984
+ approvalRequiredBadge: css`
985
+ font-size: 10px;
986
+ padding: 2px 6px;
987
+ border-radius: 3px;
988
+ background: oklch(0.45 0.15 30);
989
+ color: oklch(0.95 0.05 60);
990
+ font-weight: ${font.weight.semibold};
991
+ `,
992
+ toolArguments: css`
993
+ font-family: ${fontFamily.mono};
994
+ font-size: ${fontSize.xs};
995
+ color: oklch(0.7 0.05 260);
996
+ white-space: pre-wrap;
997
+ word-break: break-all;
998
+ `,
999
+ toolSection: css`
1000
+ margin-top: ${size[2]};
1001
+ border-top: 1px solid oklch(0.28 0.03 260);
1002
+ padding-top: ${size[2]};
1003
+ `,
1004
+ toolSectionLabel: css`
1005
+ font-size: 10px;
1006
+ font-weight: ${font.weight.semibold};
1007
+ color: oklch(0.6 0.08 260);
1008
+ text-transform: uppercase;
1009
+ letter-spacing: 0.05em;
1010
+ margin-bottom: ${size[1]};
1011
+ `,
1012
+ toolJsonContainer: css`
1013
+ font-family: ${fontFamily.mono};
1014
+ font-size: ${fontSize.xs};
1015
+ color: oklch(0.8 0.05 260);
1016
+ background: oklch(0.18 0.02 260);
1017
+ border-radius: 4px;
1018
+ padding: ${size[4]};
1019
+ padding-left: ${size[8]};
1020
+ `,
1021
+ chunksDetails: css`
1022
+ margin-top: ${size[3]};
1023
+ `,
1024
+ chunksSummary: css`
1025
+ cursor: pointer;
1026
+ font-size: ${fontSize.xs};
1027
+ font-weight: ${font.weight.semibold};
1028
+ color: oklch(0.65 0.08 260);
1029
+ padding: ${size[2]};
1030
+ background: oklch(0.2 0.02 260);
1031
+ border-radius: 6px;
1032
+ border: 1px solid oklch(0.28 0.03 260);
1033
+ user-select: none;
1034
+ list-style: none;
1035
+ &::-webkit-details-marker {
1036
+ display: none;
1037
+ }
1038
+ &::marker {
1039
+ display: none;
1040
+ }
1041
+ details[open] > & .chunks-arrow {
1042
+ transform: rotate(90deg);
1043
+ }
1044
+ `,
1045
+ chunksSummaryRow: css`
1046
+ display: flex;
1047
+ align-items: center;
1048
+ gap: ${size[1]};
1049
+ `,
1050
+ chunksSummaryArrow: css`
1051
+ font-size: 8px;
1052
+ transition: transform 0.15s ease;
1053
+ color: oklch(0.5 0.05 260);
1054
+ details[open] > summary > div > & {
1055
+ transform: rotate(90deg);
1056
+ }
1057
+ `,
1058
+ chunksSummaryTitle: css`
1059
+ margin-right: ${size[1]};
1060
+ `,
1061
+ chunksSummaryContent: css`
1062
+ display: flex;
1063
+ flex-direction: column;
1064
+ gap: 6px;
1065
+ `,
1066
+ chunksSummaryHeader: css`
1067
+ display: flex;
1068
+ align-items: center;
1069
+ gap: ${size[2]};
1070
+ `,
1071
+ chunkBadge: css`
1072
+ padding: 2px 6px;
1073
+ border-radius: 3px;
1074
+ font-size: 9px;
1075
+ `,
1076
+ chunkBadgeTool: css`
1077
+ background: oklch(0.3 0.1 280);
1078
+ color: oklch(0.75 0.12 280);
1079
+ `,
1080
+ chunkBadgeError: css`
1081
+ background: oklch(0.3 0.15 25);
1082
+ color: oklch(0.75 0.2 25);
1083
+ `,
1084
+ chunkBadgeSuccess: css`
1085
+ background: oklch(0.3 0.1 142);
1086
+ color: oklch(0.75 0.15 142);
1087
+ `,
1088
+ chunkBadgeApproval: css`
1089
+ background: oklch(0.3 0.15 50);
1090
+ color: oklch(0.75 0.2 50);
1091
+ `,
1092
+ chunkBadgeCount: css`
1093
+ background: oklch(0.3 0.08 260);
1094
+ color: oklch(0.75 0.1 260);
1095
+ font-weight: ${font.weight.semibold};
1096
+ `,
1097
+ contentPreview: css`
1098
+ font-family: ${fontFamily.mono};
1099
+ font-size: 10px;
1100
+ color: oklch(0.75 0.05 260);
1101
+ white-space: pre-wrap;
1102
+ word-break: break-word;
1103
+ max-width: 100%;
1104
+ font-weight: ${font.weight.normal};
1105
+ margin-top: 2px;
1106
+ `,
1107
+ chunksContainer: css`
1108
+ margin-top: ${size[2]};
1109
+ padding: ${size[2]};
1110
+ background: oklch(0.18 0.02 260);
1111
+ border-radius: 6px;
1112
+ border: 1px solid oklch(0.25 0.03 260);
1113
+ `,
1114
+ chunksList: css`
1115
+ display: flex;
1116
+ flex-direction: column;
1117
+ gap: ${size[1]};
1118
+ `,
1119
+ chunkItem: css`
1120
+ padding: 6px ${size[2]};
1121
+ border-radius: ${border.radius.sm};
1122
+ background: oklch(0.22 0.02 260);
1123
+ border: 1px solid oklch(0.28 0.03 260);
1124
+ font-size: 10px;
1125
+ `,
1126
+ chunkItemLarge: css`
1127
+ padding: ${size[2]} 10px;
1128
+ border-radius: 6px;
1129
+ background: oklch(0.22 0.02 260);
1130
+ border: 1px solid oklch(0.28 0.03 260);
1131
+ font-size: ${fontSize.xs};
1132
+ `,
1133
+ chunkHeader: css`
1134
+ display: flex;
1135
+ align-items: center;
1136
+ gap: 6px;
1137
+ margin-bottom: ${size[1]};
1138
+ `,
1139
+ chunkHeaderLarge: css`
1140
+ display: flex;
1141
+ align-items: center;
1142
+ gap: ${size[2]};
1143
+ margin-bottom: 6px;
1144
+ `,
1145
+ chunkNumber: css`
1146
+ font-size: 9px;
1147
+ font-weight: ${font.weight.semibold};
1148
+ color: oklch(0.6 0.05 260);
1149
+ min-width: 24px;
1150
+ `,
1151
+ chunkNumberLarge: css`
1152
+ font-size: 10px;
1153
+ font-weight: ${font.weight.semibold};
1154
+ color: oklch(0.6 0.05 260);
1155
+ min-width: 32px;
1156
+ `,
1157
+ chunkTypeBadge: css`
1158
+ display: flex;
1159
+ align-items: center;
1160
+ gap: 3px;
1161
+ `,
1162
+ chunkTypeBadgeLarge: css`
1163
+ display: flex;
1164
+ align-items: center;
1165
+ gap: ${size[1]};
1166
+ `,
1167
+ chunkTypeDot: css`
1168
+ width: 5px;
1169
+ height: 5px;
1170
+ border-radius: 50%;
1171
+ `,
1172
+ chunkTypeDotLarge: css`
1173
+ width: 6px;
1174
+ height: 6px;
1175
+ border-radius: 50%;
1176
+ `,
1177
+ chunkTypeLabel: css`
1178
+ font-weight: ${font.weight.semibold};
1179
+ color: oklch(0.7 0.08 260);
1180
+ `,
1181
+ chunkTypeLabelLarge: css`
1182
+ font-weight: ${font.weight.semibold};
1183
+ color: oklch(0.75 0.08 260);
1184
+ `,
1185
+ chunkToolBadge: css`
1186
+ padding: 1px ${size[1]};
1187
+ border-radius: 3px;
1188
+ background: oklch(0.3 0.1 280);
1189
+ color: oklch(0.75 0.12 280);
1190
+ font-size: 9px;
1191
+ font-weight: ${font.weight.semibold};
1192
+ `,
1193
+ chunkToolBadgeLarge: css`
1194
+ padding: 2px 6px;
1195
+ border-radius: 3px;
1196
+ background: oklch(0.3 0.1 280);
1197
+ color: oklch(0.75 0.12 280);
1198
+ font-size: 10px;
1199
+ font-weight: ${font.weight.semibold};
1200
+ `,
1201
+ chunkTimestamp: css`
1202
+ margin-left: auto;
1203
+ color: ${t(colors.gray[500], colors.gray[500])};
1204
+ font-size: 9px;
1205
+ `,
1206
+ chunkTimestampLarge: css`
1207
+ margin-left: auto;
1208
+ color: ${t(colors.gray[500], colors.gray[500])};
1209
+ font-size: 10px;
1210
+ `,
1211
+ rawJsonButton: css`
1212
+ padding: 1px ${size[1]};
1213
+ border-radius: 2px;
1214
+ border: 1px solid oklch(0.32 0.05 260);
1215
+ color: oklch(0.7 0.08 260);
1216
+ font-size: 8px;
1217
+ cursor: pointer;
1218
+ font-family: ${fontFamily.mono};
1219
+ font-weight: ${font.weight.semibold};
1220
+ `,
1221
+ rawJsonButtonInactive: css`
1222
+ background: oklch(0.28 0.03 260);
1223
+ `,
1224
+ rawJsonButtonActive: css`
1225
+ background: oklch(0.35 0.1 260);
1226
+ `,
1227
+ rawJsonButtonLarge: css`
1228
+ padding: 2px 6px;
1229
+ border-radius: 3px;
1230
+ border: 1px solid oklch(0.32 0.05 260);
1231
+ color: oklch(0.7 0.08 260);
1232
+ font-size: 10px;
1233
+ cursor: pointer;
1234
+ font-family: ${fontFamily.mono};
1235
+ font-weight: ${font.weight.semibold};
1236
+ `,
1237
+ chunkContent: css`
1238
+ font-family: ${fontFamily.mono};
1239
+ white-space: pre-wrap;
1240
+ word-break: break-word;
1241
+ padding: ${size[1]} 6px;
1242
+ background: oklch(0.2 0.01 260);
1243
+ border-radius: 3px;
1244
+ color: oklch(0.8 0.05 260);
1245
+ font-size: 10px;
1246
+ `,
1247
+ chunkContentLarge: css`
1248
+ font-family: ${fontFamily.mono};
1249
+ white-space: pre-wrap;
1250
+ word-break: break-word;
1251
+ padding: 6px ${size[2]};
1252
+ background: oklch(0.2 0.01 260);
1253
+ border-radius: ${border.radius.sm};
1254
+ color: oklch(0.8 0.05 260);
1255
+ font-size: ${fontSize.xs};
1256
+ `,
1257
+ chunkError: css`
1258
+ color: oklch(0.65 0.2 25);
1259
+ font-family: ${fontFamily.mono};
1260
+ padding: ${size[1]} 6px;
1261
+ background: oklch(0.2 0.05 25);
1262
+ border-radius: 3px;
1263
+ `,
1264
+ chunkErrorLarge: css`
1265
+ color: oklch(0.65 0.2 25);
1266
+ font-family: ${fontFamily.mono};
1267
+ padding: 6px ${size[2]};
1268
+ background: oklch(0.2 0.05 25);
1269
+ border-radius: ${border.radius.sm};
1270
+ `,
1271
+ chunkFinish: css`
1272
+ color: oklch(0.7 0.12 142);
1273
+ padding: ${size[1]} 6px;
1274
+ background: oklch(0.2 0.03 142);
1275
+ border-radius: 3px;
1276
+ font-weight: ${font.weight.semibold};
1277
+ `,
1278
+ chunkFinishLarge: css`
1279
+ color: oklch(0.7 0.12 142);
1280
+ padding: 6px ${size[2]};
1281
+ background: oklch(0.2 0.03 142);
1282
+ border-radius: ${border.radius.sm};
1283
+ font-weight: ${font.weight.semibold};
1284
+ `,
1285
+ chunkApproval: css`
1286
+ padding: 6px ${size[2]};
1287
+ background: oklch(0.25 0.12 50);
1288
+ border-radius: ${border.radius.sm};
1289
+ border: 1px solid oklch(0.35 0.15 50);
1290
+ `,
1291
+ chunkApprovalLarge: css`
1292
+ padding: ${size[2]};
1293
+ background: oklch(0.25 0.12 50);
1294
+ border-radius: 6px;
1295
+ border: 1px solid oklch(0.35 0.15 50);
1296
+ `,
1297
+ chunkApprovalTitle: css`
1298
+ color: oklch(0.75 0.15 50);
1299
+ font-weight: ${font.weight.semibold};
1300
+ margin-bottom: ${size[1]};
1301
+ font-size: 10px;
1302
+ `,
1303
+ chunkApprovalTitleLarge: css`
1304
+ color: oklch(0.75 0.15 50);
1305
+ font-weight: ${font.weight.semibold};
1306
+ margin-bottom: 6px;
1307
+ font-size: ${fontSize.xs};
1308
+ `,
1309
+ chunkApprovalInput: css`
1310
+ font-family: ${fontFamily.mono};
1311
+ font-size: 9px;
1312
+ color: oklch(0.7 0.08 50);
1313
+ white-space: pre-wrap;
1314
+ word-break: break-word;
1315
+ `,
1316
+ chunkApprovalInputLarge: css`
1317
+ font-family: ${fontFamily.mono};
1318
+ font-size: 10px;
1319
+ color: oklch(0.7 0.08 50);
1320
+ white-space: pre-wrap;
1321
+ word-break: break-word;
1322
+ `,
1323
+ chunkToolCall: css`
1324
+ padding: ${size[2]} ${size[3]};
1325
+ background: oklch(0.22 0.08 280);
1326
+ border-radius: ${border.radius.sm};
1327
+ border: 1px solid oklch(0.32 0.1 280);
1328
+ margin-top: ${size[1]};
1329
+ `,
1330
+ chunkToolCallHeader: css`
1331
+ display: flex;
1332
+ align-items: center;
1333
+ justify-content: space-between;
1334
+ margin-bottom: ${size[2]};
1335
+ `,
1336
+ chunkToolCallTitle: css`
1337
+ color: oklch(0.75 0.12 280);
1338
+ font-weight: ${font.weight.semibold};
1339
+ font-size: 10px;
1340
+ `,
1341
+ chunkToolResult: css`
1342
+ padding: ${size[2]} ${size[3]};
1343
+ background: oklch(0.22 0.08 160);
1344
+ border-radius: ${border.radius.sm};
1345
+ border: 1px solid oklch(0.32 0.1 160);
1346
+ margin-top: ${size[1]};
1347
+ `,
1348
+ chunkToolResultHeader: css`
1349
+ display: flex;
1350
+ align-items: center;
1351
+ justify-content: space-between;
1352
+ margin-bottom: ${size[2]};
1353
+ `,
1354
+ chunkToolResultTitle: css`
1355
+ color: oklch(0.75 0.12 160);
1356
+ font-weight: ${font.weight.semibold};
1357
+ font-size: 10px;
1358
+ `,
1359
+ rawJson: css`
1360
+ font-family: ${fontFamily.mono};
1361
+ white-space: pre-wrap;
1362
+ word-break: break-word;
1363
+ padding: 6px;
1364
+ background: oklch(0.16 0.01 260);
1365
+ border-radius: 3px;
1366
+ color: oklch(0.75 0.08 260);
1367
+ font-size: 9px;
1368
+ max-height: 200px;
1369
+ overflow-y: auto;
1370
+ `,
1371
+ rawJsonLarge: css`
1372
+ font-family: ${fontFamily.mono};
1373
+ white-space: pre-wrap;
1374
+ word-break: break-word;
1375
+ padding: ${size[2]};
1376
+ background: oklch(0.16 0.01 260);
1377
+ border-radius: ${border.radius.sm};
1378
+ color: oklch(0.75 0.08 260);
1379
+ font-size: 10px;
1380
+ max-height: 300px;
1381
+ overflow-y: auto;
1382
+ `,
1383
+ noChunks: css`
1384
+ padding: ${size[3]};
1385
+ color: ${t(colors.gray[500], colors.gray[500])};
1386
+ font-size: ${fontSize.xs};
1387
+ `,
1388
+ streamContainer: css`
1389
+ padding: ${size[3]};
1390
+ background: oklch(0.18 0.02 260);
1391
+ border-radius: ${border.radius.lg};
1392
+ border: 1px solid oklch(0.25 0.03 260);
1393
+ `,
1394
+ streamHeader: css`
1395
+ margin-bottom: ${size[3]};
1396
+ padding-bottom: ${size[2]};
1397
+ border-bottom: 1px solid oklch(0.25 0.03 260);
1398
+ `,
1399
+ streamHeaderRow: css`
1400
+ display: flex;
1401
+ align-items: center;
1402
+ gap: ${size[2]};
1403
+ margin-bottom: ${size[1]};
1404
+ `,
1405
+ streamTitle: css`
1406
+ font-weight: ${font.weight.semibold};
1407
+ font-size: ${fontSize.sm};
1408
+ color: oklch(0.8 0.05 260);
1409
+ `,
1410
+ streamSubtitle: css`
1411
+ font-size: ${fontSize.xs};
1412
+ color: ${t(colors.gray[500], colors.gray[500])};
1413
+ `,
1414
+ messageGroups: css`
1415
+ display: flex;
1416
+ flex-direction: column;
1417
+ gap: ${size[2]};
1418
+ `,
1419
+ messageGroupDetails: css`
1420
+ margin-bottom: ${size[1]};
1421
+ `,
1422
+ messageGroupSummary: css`
1423
+ cursor: pointer;
1424
+ font-size: ${fontSize.xs};
1425
+ font-weight: ${font.weight.semibold};
1426
+ color: oklch(0.65 0.08 260);
1427
+ padding: 10px;
1428
+ background: oklch(0.2 0.02 260);
1429
+ border-radius: 6px;
1430
+ border: 1px solid oklch(0.28 0.03 260);
1431
+ user-select: none;
1432
+ `,
1433
+ messageGroupContent: css`
1434
+ display: flex;
1435
+ flex-direction: column;
1436
+ gap: 6px;
1437
+ `,
1438
+ messageGroupHeader: css`
1439
+ display: flex;
1440
+ align-items: center;
1441
+ gap: ${size[2]};
1442
+ `,
1443
+ messageId: css`
1444
+ font-family: ${fontFamily.mono};
1445
+ font-size: 9px;
1446
+ color: oklch(0.6 0.05 260);
1447
+ font-weight: ${font.weight.normal};
1448
+ `,
1449
+ // Embedding and Summarize operation styles
1450
+ operationCard: css`
1451
+ padding: ${size[4]};
1452
+ border-radius: ${border.radius.lg};
1453
+ background: linear-gradient(
1454
+ 135deg,
1455
+ oklch(0.25 0.04 200) 0%,
1456
+ oklch(0.22 0.03 200) 100%
1457
+ );
1458
+ border: 1.5px solid oklch(0.5 0.15 200);
1459
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
1460
+ `,
1461
+ operationHeader: css`
1462
+ display: flex;
1463
+ align-items: center;
1464
+ gap: ${size[2]};
1465
+ margin-bottom: ${size[3]};
1466
+ `,
1467
+ operationIcon: css`
1468
+ font-size: ${fontSize.lg};
1469
+ `,
1470
+ operationTitle: css`
1471
+ font-weight: ${font.weight.semibold};
1472
+ font-size: ${fontSize.sm};
1473
+ color: oklch(0.85 0.1 200);
1474
+ flex: 1;
1475
+ `,
1476
+ operationStatus: css`
1477
+ font-size: ${fontSize.xs};
1478
+ padding: 2px ${size[2]};
1479
+ border-radius: ${border.radius.sm};
1480
+ `,
1481
+ operationStatusCompleted: css`
1482
+ background: ${colors.green[500]}20;
1483
+ color: ${colors.green[400]};
1484
+ `,
1485
+ operationStatusPending: css`
1486
+ background: ${colors.yellow[500]}20;
1487
+ color: ${colors.yellow[400]};
1488
+ `,
1489
+ durationBadge: css`
1490
+ font-size: ${fontSize.xs};
1491
+ padding: 2px ${size[2]};
1492
+ border-radius: ${border.radius.sm};
1493
+ background: oklch(0.3 0.1 280);
1494
+ color: oklch(0.8 0.1 280);
1495
+ font-family: ${fontFamily.mono};
1496
+ `,
1497
+ operationDetails: css`
1498
+ display: flex;
1499
+ flex-direction: column;
1500
+ gap: ${size[2]};
1501
+ `,
1502
+ operationDetail: css`
1503
+ display: flex;
1504
+ align-items: center;
1505
+ gap: ${size[2]};
1506
+ font-size: ${fontSize.xs};
1507
+ `,
1508
+ operationLabel: css`
1509
+ color: oklch(0.65 0.08 200);
1510
+ font-weight: ${font.weight.semibold};
1511
+ min-width: 70px;
1512
+ `,
1513
+ operationValue: css`
1514
+ color: oklch(0.8 0.05 200);
1515
+ font-family: ${fontFamily.mono};
1516
+ `,
1517
+ // Iteration badge
1518
+ iterationBadge: css`
1519
+ font-size: ${fontSize.xs};
1520
+ padding: 2px ${size[2]};
1521
+ border-radius: ${border.radius.sm};
1522
+ background: ${colors.purple[500]}20;
1523
+ color: ${colors.purple[400]};
1524
+ font-weight: ${font.weight.semibold};
1525
+ `,
1526
+ },
1527
+ }
1528
+ }
1529
+
1530
+ export function useStyles() {
1531
+ const { theme } = useTheme()
1532
+ const [styles, setStyles] = createSignal(stylesFactory(theme()))
1533
+ createEffect(() => {
1534
+ setStyles(stylesFactory(theme()))
1535
+ })
1536
+ return styles
1537
+ }