@digithings-ai/digichat-ui 0.0.0-stage → 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.
- package/README.md +42 -2
- package/package.json +42 -4
- package/src/components/DigiChatMark.tsx +31 -0
- package/src/components/DocumentPane.tsx +62 -0
- package/src/components/MiniMarkdown.tsx +9 -0
- package/src/index.ts +91 -0
- package/src/slash-commands.ts +669 -0
- package/src/styles/cursor.css +59 -0
- package/src/styles/session.css +797 -0
|
@@ -0,0 +1,797 @@
|
|
|
1
|
+
/* Zero radius is the rule for the chrome, not a per-rule decision. Every
|
|
2
|
+
control inherits it from this one declaration; a rounded corner is a
|
|
3
|
+
geometry decision and would have to name its own value. */
|
|
4
|
+
.dc-code-inline,
|
|
5
|
+
.dc-code-block pre,
|
|
6
|
+
.dc-code-copy,
|
|
7
|
+
.dc-msg-copy,
|
|
8
|
+
.dc-textarea,
|
|
9
|
+
.dc-edit-textarea,
|
|
10
|
+
.dc-send,
|
|
11
|
+
.dc-stop,
|
|
12
|
+
.dc-quota-banner,
|
|
13
|
+
.dc-byok-option,
|
|
14
|
+
.dc-byok-input {
|
|
15
|
+
border-radius: 0;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.dc-page {
|
|
19
|
+
/* Page gutter: one ramp each for the inline pad and the bottom air. */
|
|
20
|
+
--dc-page-pad-inline: clamp(0.7rem, 3vw, 1.4rem);
|
|
21
|
+
--dc-page-pad-block-end: clamp(0.7rem, 3vw, 1.2rem);
|
|
22
|
+
|
|
23
|
+
min-height: 100vh;
|
|
24
|
+
padding: calc(var(--dq-nav-h, 62px) + 0.6rem) var(--dc-page-pad-inline)
|
|
25
|
+
var(--dc-page-pad-block-end);
|
|
26
|
+
display: flex;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.dc-session {
|
|
30
|
+
/* Sizing layer for the session chrome. Declared once at the session root so
|
|
31
|
+
the brand strip, transcript, composer, agent chain and doc pane retune from
|
|
32
|
+
one place; the global space and text tokens are used where they match
|
|
33
|
+
exactly. Values are the pre-token measures, so rendering is unchanged. */
|
|
34
|
+
--dc-type-brand: 0.82rem;
|
|
35
|
+
--dc-type-body: 0.8rem;
|
|
36
|
+
--dc-type-sm: 0.78rem;
|
|
37
|
+
--dc-type-xs: 0.74rem;
|
|
38
|
+
--dc-type-chain: 0.72rem;
|
|
39
|
+
--dc-type-micro: 0.7rem;
|
|
40
|
+
--dc-type-2xs: 0.68rem;
|
|
41
|
+
--dc-type-edit: 0.9rem;
|
|
42
|
+
--dc-type-input: 1rem;
|
|
43
|
+
--dc-leading-body: 1.5;
|
|
44
|
+
--dc-leading-chain: 1.45;
|
|
45
|
+
--dc-space-3xs: 0.2rem;
|
|
46
|
+
--dc-space-2xs: 0.35rem;
|
|
47
|
+
--dc-space-xs: 0.4rem;
|
|
48
|
+
--dc-space-sm: 0.55rem;
|
|
49
|
+
--dc-space-md: 0.75rem;
|
|
50
|
+
--dc-brand-pad: var(--dc-space-sm) var(--dc-space-md);
|
|
51
|
+
--dc-thread-pad: 0.85rem var(--dc-space-md);
|
|
52
|
+
--dc-msg-marker-w: 0.85rem;
|
|
53
|
+
--dc-code-pad: 0.7rem 0.8rem;
|
|
54
|
+
--dc-form-pad: var(--space-2) var(--dc-space-md) var(--dc-space-md);
|
|
55
|
+
--dc-pane-pad-block: 0.6rem;
|
|
56
|
+
--dc-pane-pad-inline: 0.7rem;
|
|
57
|
+
--dc-body-indent: 1.6rem;
|
|
58
|
+
--dc-act-max-h: 14rem;
|
|
59
|
+
--dc-gate-max-w: 28rem;
|
|
60
|
+
--dc-source-card-max-w: 16rem;
|
|
61
|
+
--dc-doc-pane-w: minmax(220px, 38%);
|
|
62
|
+
--dc-session-max-w: min(1080px, 96vw);
|
|
63
|
+
--dc-session-h: calc(100vh - var(--dq-nav-h, 62px) - 1.4rem);
|
|
64
|
+
|
|
65
|
+
width: 100%;
|
|
66
|
+
max-width: var(--dc-session-max-w);
|
|
67
|
+
margin: 0 auto;
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
height: var(--dc-session-h);
|
|
71
|
+
min-height: 440px;
|
|
72
|
+
font-family: var(--font-mono);
|
|
73
|
+
background: transparent;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* Opt-in from a full-page embedder (?wide=1 — digithings.ai /chat, /chat/occ):
|
|
77
|
+
drop the 1080px reading-column cap so the session fills its iframe/page. Kept
|
|
78
|
+
separate from .dc-session-embed (a widget-layout concern) — this is purely a
|
|
79
|
+
width override on the same page layout. */
|
|
80
|
+
.dc-session--wide {
|
|
81
|
+
max-width: none;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.dc-session-embed {
|
|
85
|
+
flex: 1;
|
|
86
|
+
min-height: 0;
|
|
87
|
+
max-width: none;
|
|
88
|
+
height: auto;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.dc-brand {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: baseline;
|
|
94
|
+
gap: var(--dc-space-2xs);
|
|
95
|
+
border-bottom: 1px solid var(--hair);
|
|
96
|
+
padding: var(--dc-brand-pad);
|
|
97
|
+
font-size: var(--dc-type-brand);
|
|
98
|
+
font-weight: 600;
|
|
99
|
+
letter-spacing: -0.01em;
|
|
100
|
+
}
|
|
101
|
+
.dc-brand-by {
|
|
102
|
+
font-weight: 400;
|
|
103
|
+
color: var(--ink-mute);
|
|
104
|
+
}
|
|
105
|
+
.dc-brand-link {
|
|
106
|
+
font-weight: 500;
|
|
107
|
+
color: var(--accent);
|
|
108
|
+
text-decoration: none;
|
|
109
|
+
}
|
|
110
|
+
.dc-brand-link:hover {
|
|
111
|
+
text-decoration: underline;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.dc-wordmark-header {
|
|
115
|
+
flex-shrink: 0;
|
|
116
|
+
border-bottom: 1px solid var(--hair);
|
|
117
|
+
padding: var(--dc-brand-pad);
|
|
118
|
+
font-size: var(--dc-type-brand);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.dc-thread {
|
|
122
|
+
flex: 1;
|
|
123
|
+
min-height: 0;
|
|
124
|
+
overflow-y: auto;
|
|
125
|
+
overscroll-behavior: contain;
|
|
126
|
+
scrollbar-width: thin;
|
|
127
|
+
padding: var(--dc-thread-pad);
|
|
128
|
+
display: flex;
|
|
129
|
+
flex-direction: column;
|
|
130
|
+
gap: var(--dc-space-md);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.dc-msg {
|
|
134
|
+
position: relative;
|
|
135
|
+
display: grid;
|
|
136
|
+
grid-template-columns: var(--dc-msg-marker-w) minmax(0, 1fr);
|
|
137
|
+
gap: var(--space-2);
|
|
138
|
+
align-items: start;
|
|
139
|
+
font-size: var(--dc-type-body);
|
|
140
|
+
line-height: var(--leading, 1.55);
|
|
141
|
+
}
|
|
142
|
+
.dc-who {
|
|
143
|
+
color: var(--accent);
|
|
144
|
+
font-weight: 600;
|
|
145
|
+
user-select: none;
|
|
146
|
+
}
|
|
147
|
+
.dc-user .dc-who {
|
|
148
|
+
color: var(--accent);
|
|
149
|
+
font-weight: 700;
|
|
150
|
+
}
|
|
151
|
+
.dc-body {
|
|
152
|
+
min-width: 0;
|
|
153
|
+
color: var(--ink-soft);
|
|
154
|
+
word-break: break-word;
|
|
155
|
+
}
|
|
156
|
+
.dc-user .dc-body,
|
|
157
|
+
.dc-intro .dc-body {
|
|
158
|
+
color: var(--ink);
|
|
159
|
+
white-space: pre-wrap;
|
|
160
|
+
}
|
|
161
|
+
.dc-intro-body {
|
|
162
|
+
font-size: var(--dc-type-sm);
|
|
163
|
+
line-height: var(--dc-leading-body);
|
|
164
|
+
}
|
|
165
|
+
.dc-intro .dc-body {
|
|
166
|
+
color: var(--ink-soft);
|
|
167
|
+
}
|
|
168
|
+
.dc-out-dim {
|
|
169
|
+
color: var(--ink-mute);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/* Busy turn: one bare <ChatStreamCursor> under the chain / answer. Tool rows
|
|
173
|
+
carry running/ok themselves — no typed TerminalStepCaret status line. */
|
|
174
|
+
.dc-body > .tl-line {
|
|
175
|
+
color: var(--ink-mute);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.dc-body a {
|
|
179
|
+
color: var(--accent);
|
|
180
|
+
text-underline-offset: 2px;
|
|
181
|
+
}
|
|
182
|
+
.dc-code-inline {
|
|
183
|
+
font-family: var(--font-mono);
|
|
184
|
+
font-size: 0.82em;
|
|
185
|
+
background: color-mix(in srgb, var(--ink) 9%, transparent);
|
|
186
|
+
padding: 0.05rem 0.3rem;
|
|
187
|
+
}
|
|
188
|
+
.dc-code-block {
|
|
189
|
+
position: relative;
|
|
190
|
+
margin: 0.6rem 0;
|
|
191
|
+
}
|
|
192
|
+
.dc-code-block pre {
|
|
193
|
+
margin: 0;
|
|
194
|
+
background: color-mix(in srgb, var(--ink) 7%, transparent);
|
|
195
|
+
border: 1px solid var(--hair);
|
|
196
|
+
padding: var(--dc-code-pad);
|
|
197
|
+
overflow-x: auto;
|
|
198
|
+
}
|
|
199
|
+
.dc-code-block code {
|
|
200
|
+
font-family: var(--font-mono);
|
|
201
|
+
font-size: var(--dc-type-xs);
|
|
202
|
+
color: var(--ink);
|
|
203
|
+
white-space: pre;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.dc-code-copy,
|
|
207
|
+
.dc-msg-copy {
|
|
208
|
+
font: inherit;
|
|
209
|
+
font-size: var(--dc-type-micro);
|
|
210
|
+
color: var(--ink-mute);
|
|
211
|
+
background: color-mix(in srgb, var(--surface) 80%, transparent);
|
|
212
|
+
border: 1px solid var(--hair);
|
|
213
|
+
padding: 0.12rem var(--dc-space-xs);
|
|
214
|
+
cursor: pointer;
|
|
215
|
+
opacity: 0;
|
|
216
|
+
transition: opacity var(--dur-fast) var(--ease);
|
|
217
|
+
}
|
|
218
|
+
.dc-code-copy {
|
|
219
|
+
position: absolute;
|
|
220
|
+
top: var(--dc-space-xs);
|
|
221
|
+
right: var(--dc-space-xs);
|
|
222
|
+
}
|
|
223
|
+
.dc-msg-actions {
|
|
224
|
+
display: inline-flex;
|
|
225
|
+
flex-wrap: wrap;
|
|
226
|
+
gap: var(--dc-space-2xs);
|
|
227
|
+
margin-top: var(--dc-space-xs);
|
|
228
|
+
}
|
|
229
|
+
.dc-msg-actions-visible .dc-msg-copy {
|
|
230
|
+
opacity: 1;
|
|
231
|
+
}
|
|
232
|
+
.dc-msg-copy {
|
|
233
|
+
position: static;
|
|
234
|
+
display: inline-block;
|
|
235
|
+
margin-top: 0;
|
|
236
|
+
}
|
|
237
|
+
.dc-edit-last {
|
|
238
|
+
display: flex;
|
|
239
|
+
flex-direction: column;
|
|
240
|
+
gap: var(--dc-space-2xs);
|
|
241
|
+
width: 100%;
|
|
242
|
+
}
|
|
243
|
+
.dc-edit-textarea {
|
|
244
|
+
width: 100%;
|
|
245
|
+
min-height: 4.5rem;
|
|
246
|
+
resize: vertical;
|
|
247
|
+
font: inherit;
|
|
248
|
+
font-size: var(--dc-type-edit);
|
|
249
|
+
color: var(--ink);
|
|
250
|
+
background: var(--surface);
|
|
251
|
+
border: 1px solid var(--hair);
|
|
252
|
+
padding: 0.45rem var(--dc-space-sm);
|
|
253
|
+
box-sizing: border-box;
|
|
254
|
+
}
|
|
255
|
+
.dc-code-block:hover .dc-code-copy,
|
|
256
|
+
.dc-body:hover .dc-msg-copy,
|
|
257
|
+
.dc-code-copy:focus-visible,
|
|
258
|
+
.dc-msg-copy:focus-visible {
|
|
259
|
+
opacity: 1;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.dc-suggest {
|
|
263
|
+
display: flex;
|
|
264
|
+
flex-wrap: wrap;
|
|
265
|
+
gap: 0.45rem;
|
|
266
|
+
padding-left: var(--dc-body-indent);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.dc-form {
|
|
270
|
+
display: grid;
|
|
271
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
272
|
+
align-items: end;
|
|
273
|
+
gap: var(--space-2);
|
|
274
|
+
padding: var(--dc-form-pad);
|
|
275
|
+
border-top: 1px solid var(--hair);
|
|
276
|
+
background: transparent;
|
|
277
|
+
position: relative;
|
|
278
|
+
}
|
|
279
|
+
.dc-slash {
|
|
280
|
+
grid-column: 1 / -1;
|
|
281
|
+
list-style: none;
|
|
282
|
+
margin: 0;
|
|
283
|
+
padding: 0.15rem 0 var(--dc-space-2xs);
|
|
284
|
+
border-bottom: 1px solid var(--hair);
|
|
285
|
+
}
|
|
286
|
+
.dc-slash-item {
|
|
287
|
+
display: flex;
|
|
288
|
+
gap: var(--dc-space-md);
|
|
289
|
+
width: 100%;
|
|
290
|
+
border: 0;
|
|
291
|
+
background: transparent;
|
|
292
|
+
color: inherit;
|
|
293
|
+
font: inherit;
|
|
294
|
+
font-size: var(--dc-type-sm);
|
|
295
|
+
text-align: left;
|
|
296
|
+
padding: 0.28rem 0;
|
|
297
|
+
cursor: pointer;
|
|
298
|
+
}
|
|
299
|
+
.dc-slash-item:hover,
|
|
300
|
+
.dc-slash-item:focus-visible,
|
|
301
|
+
.dc-slash-item-active {
|
|
302
|
+
color: var(--accent);
|
|
303
|
+
}
|
|
304
|
+
.dc-slash-cmd {
|
|
305
|
+
font-family: var(--font-mono);
|
|
306
|
+
min-width: 5.5rem;
|
|
307
|
+
}
|
|
308
|
+
.dc-slash-hint {
|
|
309
|
+
color: var(--ink-mute);
|
|
310
|
+
}
|
|
311
|
+
.dc-slash-note pre {
|
|
312
|
+
margin: 0;
|
|
313
|
+
font: inherit;
|
|
314
|
+
font-size: var(--dc-type-sm);
|
|
315
|
+
white-space: pre-wrap;
|
|
316
|
+
color: var(--ink-mute);
|
|
317
|
+
}
|
|
318
|
+
.dc-textarea {
|
|
319
|
+
font: inherit;
|
|
320
|
+
font-size: var(--dc-type-body);
|
|
321
|
+
line-height: var(--dc-leading-chain);
|
|
322
|
+
background: transparent;
|
|
323
|
+
border: 0;
|
|
324
|
+
color: var(--ink);
|
|
325
|
+
width: 100%;
|
|
326
|
+
resize: none;
|
|
327
|
+
max-height: 140px;
|
|
328
|
+
padding: var(--dc-space-2xs) 0;
|
|
329
|
+
}
|
|
330
|
+
/* iOS Safari auto-zooms the page on focusing any input/textarea under 16px —
|
|
331
|
+
* there is no CSS opt-out for that behavior, only staying above the
|
|
332
|
+
* threshold. Width alone is the wrong test: the popup launcher embeds this
|
|
333
|
+
* session in a ~400px iframe on a desktop, where the 16px input towered over
|
|
334
|
+
* the 0.8rem transcript beside it. `pointer: coarse` is what separates a phone
|
|
335
|
+
* from a narrow frame, and a phone is the only place the zoom happens. */
|
|
336
|
+
@media (max-width: 640px) and (pointer: coarse) {
|
|
337
|
+
.dc-textarea {
|
|
338
|
+
font-size: var(--dc-type-input);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
.dc-textarea::placeholder {
|
|
342
|
+
color: var(--ink-soft);
|
|
343
|
+
}
|
|
344
|
+
/* The canon focus state for the controls this sheet owns: 2px accent outline.
|
|
345
|
+
These rules used to switch the indicator off — or paint a 1px 50% one —
|
|
346
|
+
which left the composer with no visible focus at all. */
|
|
347
|
+
.dc-textarea:focus-visible,
|
|
348
|
+
.dc-byok-input:focus-visible,
|
|
349
|
+
.dc-byok-option-list:focus-visible {
|
|
350
|
+
outline: 2px solid var(--accent);
|
|
351
|
+
outline-offset: 2px;
|
|
352
|
+
}
|
|
353
|
+
.dc-send,
|
|
354
|
+
.dc-stop {
|
|
355
|
+
font: inherit;
|
|
356
|
+
align-self: stretch;
|
|
357
|
+
border: 1px solid var(--hair);
|
|
358
|
+
cursor: pointer;
|
|
359
|
+
padding: 0.3rem 0.65rem;
|
|
360
|
+
transition: background var(--duration-hover) var(--ease), color var(--duration-hover) var(--ease);
|
|
361
|
+
}
|
|
362
|
+
.dc-send {
|
|
363
|
+
font-size: var(--dc-type-input);
|
|
364
|
+
background: var(--ink);
|
|
365
|
+
color: var(--bg);
|
|
366
|
+
border-color: var(--ink);
|
|
367
|
+
}
|
|
368
|
+
.dc-stop {
|
|
369
|
+
font-size: var(--dc-type-body);
|
|
370
|
+
color: var(--ink-soft);
|
|
371
|
+
background: transparent;
|
|
372
|
+
}
|
|
373
|
+
.dc-send:hover:not(:disabled) {
|
|
374
|
+
background: var(--ink);
|
|
375
|
+
color: var(--bg);
|
|
376
|
+
}
|
|
377
|
+
.dc-stop:hover {
|
|
378
|
+
background: color-mix(in srgb, var(--ink) 8%, transparent);
|
|
379
|
+
}
|
|
380
|
+
.dc-send:disabled {
|
|
381
|
+
opacity: 0.4;
|
|
382
|
+
cursor: default;
|
|
383
|
+
}
|
|
384
|
+
@media (prefers-reduced-motion: reduce) {
|
|
385
|
+
.dc-code-copy,
|
|
386
|
+
.dc-msg-copy,
|
|
387
|
+
.dc-send,
|
|
388
|
+
.dc-stop {
|
|
389
|
+
transition: none;
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/* ---------------------------------------------------------------------------
|
|
394
|
+
* Agent chain (#1418 gap 6).
|
|
395
|
+
*
|
|
396
|
+
* The rows themselves are the shared chat primitives (ChatToolCall /
|
|
397
|
+
* ChatThinking / ChatWidgetFrame / ChatMessage from @digithings-ai/ui), which
|
|
398
|
+
* carry their own token utilities — generated by each consumer's
|
|
399
|
+
* `@source ".../packages/ui/src/components/chat"`. What lives here is only the
|
|
400
|
+
* chain container and the content ChatActivities nests INSIDE a primitive
|
|
401
|
+
* (the source list, the reasoning blob, the brief body): no consumer @sources
|
|
402
|
+
* this package, so utilities written in its .tsx would never generate.
|
|
403
|
+
*
|
|
404
|
+
* The pre-canon bordered `.dc-activities` box is gone — the canon reads as a
|
|
405
|
+
* flowing chain of fold-away rows (the Claude Code / opencode pattern), not a
|
|
406
|
+
* panel. The selector stays (consumed API); only its dress changed.
|
|
407
|
+
* ------------------------------------------------------------------------- */
|
|
408
|
+
.dc-activities {
|
|
409
|
+
display: flex;
|
|
410
|
+
flex-direction: column;
|
|
411
|
+
gap: 0.15rem;
|
|
412
|
+
margin-bottom: var(--dc-space-sm);
|
|
413
|
+
font-size: var(--dc-type-chain);
|
|
414
|
+
line-height: var(--dc-leading-chain);
|
|
415
|
+
}
|
|
416
|
+
/* System aside (`·` ChatMessage) — sits at the chain's text size rather than
|
|
417
|
+
the transcript's, so it reads as chain chrome and not as an answer. */
|
|
418
|
+
.dc-act-status {
|
|
419
|
+
font-size: var(--dc-type-chain);
|
|
420
|
+
}
|
|
421
|
+
.dc-act-hits {
|
|
422
|
+
margin: 0.1rem 0 0;
|
|
423
|
+
padding-left: 0.9rem;
|
|
424
|
+
list-style: disc;
|
|
425
|
+
font-size: var(--dc-type-xs);
|
|
426
|
+
line-height: var(--dc-leading-body);
|
|
427
|
+
/* Cap so a 5-note search with 4-line snippets can't own the transcript —
|
|
428
|
+
same scroll grammar as `.dc-act-reasoning-text`. */
|
|
429
|
+
max-height: var(--dc-act-max-h);
|
|
430
|
+
overflow-y: auto;
|
|
431
|
+
overscroll-behavior: contain;
|
|
432
|
+
}
|
|
433
|
+
.dc-act-hits li {
|
|
434
|
+
margin: 0.12rem 0;
|
|
435
|
+
color: var(--ink-mute);
|
|
436
|
+
}
|
|
437
|
+
.dc-act-hits li::marker {
|
|
438
|
+
color: var(--accent);
|
|
439
|
+
}
|
|
440
|
+
.dc-act-hit-title {
|
|
441
|
+
color: var(--ink-soft);
|
|
442
|
+
}
|
|
443
|
+
.dc-act-hit-path {
|
|
444
|
+
margin-left: var(--dc-space-2xs);
|
|
445
|
+
color: var(--ink-mute);
|
|
446
|
+
font-size: 0.92em;
|
|
447
|
+
}
|
|
448
|
+
.dc-act-hit-tier,
|
|
449
|
+
.dc-act-hit-year {
|
|
450
|
+
margin-left: var(--dc-space-2xs);
|
|
451
|
+
color: var(--ink-mute);
|
|
452
|
+
font-size: 0.88em;
|
|
453
|
+
}
|
|
454
|
+
/* Snippet disclosure — closed by default so a 5-note search shows titles
|
|
455
|
+
only; click a title to read the chunk. Native <details>, no JS. */
|
|
456
|
+
.dc-act-hit {
|
|
457
|
+
display: block;
|
|
458
|
+
}
|
|
459
|
+
.dc-act-hit-summary {
|
|
460
|
+
cursor: pointer;
|
|
461
|
+
list-style: none;
|
|
462
|
+
}
|
|
463
|
+
.dc-act-hit-summary::-webkit-details-marker {
|
|
464
|
+
display: none;
|
|
465
|
+
}
|
|
466
|
+
.dc-act-hit-snippet {
|
|
467
|
+
margin: var(--dc-space-3xs) 0 0;
|
|
468
|
+
color: var(--ink-mute);
|
|
469
|
+
display: -webkit-box;
|
|
470
|
+
-webkit-line-clamp: 4;
|
|
471
|
+
-webkit-box-orient: vertical;
|
|
472
|
+
overflow: hidden;
|
|
473
|
+
}
|
|
474
|
+
/* Reasoning blob inside the ChatThinking disclosure. Wraps rather than
|
|
475
|
+
scrolls sideways — the embed runs down to 375px. */
|
|
476
|
+
.dc-act-reasoning-text {
|
|
477
|
+
margin: 0;
|
|
478
|
+
max-height: var(--dc-act-max-h);
|
|
479
|
+
overflow-y: auto;
|
|
480
|
+
overscroll-behavior: contain;
|
|
481
|
+
white-space: pre-wrap;
|
|
482
|
+
word-break: break-word;
|
|
483
|
+
color: var(--ink-mute);
|
|
484
|
+
font-family: var(--font-mono);
|
|
485
|
+
font-size: var(--dc-type-chain);
|
|
486
|
+
line-height: var(--leading, 1.55);
|
|
487
|
+
}
|
|
488
|
+
/* Research brief — a ChatWidgetFrame card; the frame is unpadded by contract,
|
|
489
|
+
so the body owns its padding. */
|
|
490
|
+
.dc-act-brief {
|
|
491
|
+
margin: var(--space-1) 0;
|
|
492
|
+
}
|
|
493
|
+
.dc-act-brief-body {
|
|
494
|
+
padding: 0.6rem 0.8rem;
|
|
495
|
+
font-size: var(--dc-type-xs);
|
|
496
|
+
line-height: var(--dc-leading-body);
|
|
497
|
+
color: var(--ink-mute);
|
|
498
|
+
}
|
|
499
|
+
.dc-act-brief-themes {
|
|
500
|
+
margin: 0;
|
|
501
|
+
padding-left: var(--space-3);
|
|
502
|
+
}
|
|
503
|
+
.dc-act-brief-label {
|
|
504
|
+
color: var(--ink-soft);
|
|
505
|
+
font-weight: 600;
|
|
506
|
+
}
|
|
507
|
+
.dc-act-brief-questions {
|
|
508
|
+
margin-top: var(--dc-space-xs);
|
|
509
|
+
}
|
|
510
|
+
.dc-act-brief-q-heading {
|
|
511
|
+
margin: 0 0 var(--dc-space-3xs);
|
|
512
|
+
font-size: 0.85em;
|
|
513
|
+
color: var(--ink-mute);
|
|
514
|
+
}
|
|
515
|
+
.dc-act-brief-questions ol {
|
|
516
|
+
margin: 0;
|
|
517
|
+
padding-left: 1.1rem;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
.dc-inline-link {
|
|
521
|
+
font: inherit;
|
|
522
|
+
font-size: inherit;
|
|
523
|
+
color: var(--accent-digichat, var(--accent));
|
|
524
|
+
background: none;
|
|
525
|
+
border: 0;
|
|
526
|
+
padding: 0;
|
|
527
|
+
cursor: pointer;
|
|
528
|
+
text-decoration: underline;
|
|
529
|
+
text-underline-offset: 2px;
|
|
530
|
+
font-weight: 500;
|
|
531
|
+
}
|
|
532
|
+
.dc-inline-link:hover {
|
|
533
|
+
color: var(--ink);
|
|
534
|
+
}
|
|
535
|
+
.dc-intro-byok {
|
|
536
|
+
display: inline;
|
|
537
|
+
margin: 0;
|
|
538
|
+
color: var(--ink-soft);
|
|
539
|
+
}
|
|
540
|
+
.dc-quota-banner {
|
|
541
|
+
margin: var(--dc-space-3xs) 0 0 var(--dc-body-indent);
|
|
542
|
+
padding: 0.45rem 0.65rem;
|
|
543
|
+
border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--hair));
|
|
544
|
+
background: color-mix(in srgb, var(--warn) 8%, transparent);
|
|
545
|
+
font-size: var(--dc-type-xs);
|
|
546
|
+
color: var(--ink-soft);
|
|
547
|
+
}
|
|
548
|
+
.dc-quota-banner p {
|
|
549
|
+
margin: 0;
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
/* Inline BYOK terminal flow (session-only keys) */
|
|
554
|
+
.dc-byok-flow {
|
|
555
|
+
margin-top: var(--space-3);
|
|
556
|
+
}
|
|
557
|
+
.dc-byok-prompt {
|
|
558
|
+
margin: 0 0 var(--dc-space-xs);
|
|
559
|
+
font-family: var(--font-family-mono);
|
|
560
|
+
font-size: var(--type-meta);
|
|
561
|
+
color: var(--ink-soft);
|
|
562
|
+
}
|
|
563
|
+
.dc-byok-option-list {
|
|
564
|
+
list-style: none;
|
|
565
|
+
margin: 0;
|
|
566
|
+
padding: 0;
|
|
567
|
+
max-width: var(--dc-gate-max-w);
|
|
568
|
+
}
|
|
569
|
+
.dc-byok-option {
|
|
570
|
+
display: flex;
|
|
571
|
+
align-items: center;
|
|
572
|
+
gap: var(--dc-space-xs);
|
|
573
|
+
width: 100%;
|
|
574
|
+
margin: 0;
|
|
575
|
+
padding: var(--dc-space-3xs) var(--dc-space-2xs);
|
|
576
|
+
border: 0;
|
|
577
|
+
background: transparent;
|
|
578
|
+
color: var(--ink);
|
|
579
|
+
font: inherit;
|
|
580
|
+
text-align: left;
|
|
581
|
+
cursor: pointer;
|
|
582
|
+
}
|
|
583
|
+
.dc-byok-option:hover,
|
|
584
|
+
.dc-byok-option-active {
|
|
585
|
+
background: color-mix(in srgb, var(--accent) 14%, transparent);
|
|
586
|
+
}
|
|
587
|
+
.dc-byok-option-cursor {
|
|
588
|
+
display: inline-block;
|
|
589
|
+
width: 1ch;
|
|
590
|
+
color: var(--accent);
|
|
591
|
+
font-family: var(--font-mono);
|
|
592
|
+
}
|
|
593
|
+
.dc-byok-input {
|
|
594
|
+
display: block;
|
|
595
|
+
width: 100%;
|
|
596
|
+
max-width: var(--dc-gate-max-w);
|
|
597
|
+
margin-top: var(--space-1);
|
|
598
|
+
padding: var(--dc-space-xs) var(--dc-space-sm);
|
|
599
|
+
border: 1px solid var(--hair);
|
|
600
|
+
background: var(--term-bg);
|
|
601
|
+
color: var(--ink);
|
|
602
|
+
font-family: var(--font-family-mono);
|
|
603
|
+
font-size: var(--text-sm);
|
|
604
|
+
}
|
|
605
|
+
.dc-byok-input:focus {
|
|
606
|
+
border-color: var(--accent);
|
|
607
|
+
}
|
|
608
|
+
.dc-byok-actions {
|
|
609
|
+
display: flex;
|
|
610
|
+
flex-wrap: wrap;
|
|
611
|
+
gap: var(--dc-space-md);
|
|
612
|
+
}
|
|
613
|
+
.dc-byok-action {
|
|
614
|
+
margin: 0;
|
|
615
|
+
padding: 0;
|
|
616
|
+
border: 0;
|
|
617
|
+
background: none;
|
|
618
|
+
color: var(--ink-soft);
|
|
619
|
+
font-family: var(--font-family-mono);
|
|
620
|
+
font-size: var(--text-xs);
|
|
621
|
+
cursor: pointer;
|
|
622
|
+
text-decoration: underline;
|
|
623
|
+
text-underline-offset: 2px;
|
|
624
|
+
}
|
|
625
|
+
.dc-byok-action:hover {
|
|
626
|
+
color: var(--ink);
|
|
627
|
+
}
|
|
628
|
+
.dc-byok-action-danger {
|
|
629
|
+
/* State red; `--down` is the market direction. */
|
|
630
|
+
color: var(--danger);
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
.dc-session-main {
|
|
634
|
+
display: flex;
|
|
635
|
+
flex: 1;
|
|
636
|
+
min-height: 0;
|
|
637
|
+
}
|
|
638
|
+
.dc-session-with-pane .dc-session-main {
|
|
639
|
+
display: grid;
|
|
640
|
+
grid-template-columns: minmax(0, 1fr) var(--dc-doc-pane-w);
|
|
641
|
+
}
|
|
642
|
+
.dc-session-main .dc-thread {
|
|
643
|
+
flex: 1;
|
|
644
|
+
min-width: 0;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
.dc-source-cards {
|
|
648
|
+
list-style: none;
|
|
649
|
+
margin: var(--dc-space-sm) 0 0;
|
|
650
|
+
padding: 0;
|
|
651
|
+
display: flex;
|
|
652
|
+
flex-wrap: wrap;
|
|
653
|
+
gap: var(--dc-space-xs);
|
|
654
|
+
}
|
|
655
|
+
.dc-source-card {
|
|
656
|
+
display: flex;
|
|
657
|
+
flex-direction: column;
|
|
658
|
+
align-items: flex-start;
|
|
659
|
+
gap: 0.1rem;
|
|
660
|
+
max-width: var(--dc-source-card-max-w);
|
|
661
|
+
border: 1px solid var(--hair);
|
|
662
|
+
background: transparent;
|
|
663
|
+
color: inherit;
|
|
664
|
+
font: inherit;
|
|
665
|
+
font-size: var(--dc-type-xs);
|
|
666
|
+
text-align: left;
|
|
667
|
+
padding: var(--dc-space-2xs) var(--space-2);
|
|
668
|
+
cursor: pointer;
|
|
669
|
+
}
|
|
670
|
+
.dc-source-card:hover,
|
|
671
|
+
.dc-source-card:focus-visible {
|
|
672
|
+
border-color: var(--accent);
|
|
673
|
+
}
|
|
674
|
+
.dc-source-card-title {
|
|
675
|
+
color: var(--accent);
|
|
676
|
+
}
|
|
677
|
+
.dc-source-card-path {
|
|
678
|
+
color: var(--ink-mute);
|
|
679
|
+
font-size: var(--dc-type-2xs);
|
|
680
|
+
overflow: hidden;
|
|
681
|
+
text-overflow: ellipsis;
|
|
682
|
+
max-width: 100%;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
.dc-act-hit-open {
|
|
686
|
+
border: 0;
|
|
687
|
+
background: none;
|
|
688
|
+
padding: 0;
|
|
689
|
+
font: inherit;
|
|
690
|
+
color: var(--accent);
|
|
691
|
+
cursor: pointer;
|
|
692
|
+
text-align: left;
|
|
693
|
+
}
|
|
694
|
+
.dc-act-hit-open:hover,
|
|
695
|
+
.dc-act-hit-open:focus-visible {
|
|
696
|
+
text-decoration: underline;
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
.dc-doc-pane {
|
|
700
|
+
display: flex;
|
|
701
|
+
flex-direction: column;
|
|
702
|
+
min-width: 0;
|
|
703
|
+
border-left: 1px solid var(--hair);
|
|
704
|
+
background: var(--bg);
|
|
705
|
+
}
|
|
706
|
+
.dc-doc-pane-head {
|
|
707
|
+
display: flex;
|
|
708
|
+
align-items: start;
|
|
709
|
+
gap: var(--space-2);
|
|
710
|
+
padding: var(--dc-space-sm) var(--dc-pane-pad-inline);
|
|
711
|
+
border-bottom: 1px solid var(--hair);
|
|
712
|
+
}
|
|
713
|
+
.dc-doc-pane-title {
|
|
714
|
+
flex: 1;
|
|
715
|
+
font-size: var(--dc-type-brand);
|
|
716
|
+
}
|
|
717
|
+
.dc-doc-pane-close {
|
|
718
|
+
/* kit IconButton (nb-icon) sizes the glyph at 2rem; the doc-pane header is a
|
|
719
|
+
compact strip, so the dress keeps its original auto footprint. */
|
|
720
|
+
width: auto;
|
|
721
|
+
height: auto;
|
|
722
|
+
border: 1px solid var(--hair);
|
|
723
|
+
background: transparent;
|
|
724
|
+
color: inherit;
|
|
725
|
+
cursor: pointer;
|
|
726
|
+
font: inherit;
|
|
727
|
+
line-height: 1;
|
|
728
|
+
padding: 0.1rem var(--dc-space-xs);
|
|
729
|
+
}
|
|
730
|
+
.dc-doc-pane-path,
|
|
731
|
+
.dc-doc-pane-snippet,
|
|
732
|
+
.dc-doc-pane-empty {
|
|
733
|
+
margin: 0;
|
|
734
|
+
padding: var(--space-2) var(--dc-pane-pad-inline);
|
|
735
|
+
font-size: var(--dc-type-xs);
|
|
736
|
+
color: var(--ink-mute);
|
|
737
|
+
}
|
|
738
|
+
.dc-doc-pane-body,
|
|
739
|
+
.dc-doc-pane-frame {
|
|
740
|
+
flex: 1;
|
|
741
|
+
min-height: 0;
|
|
742
|
+
overflow: auto;
|
|
743
|
+
padding: var(--dc-pane-pad-block) var(--dc-pane-pad-inline);
|
|
744
|
+
}
|
|
745
|
+
.dc-doc-pane-frame {
|
|
746
|
+
width: 100%;
|
|
747
|
+
border: 0;
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
/* ---------------------------------------------------------------------------
|
|
751
|
+
* Print transcript (#3510). Hide interactive chrome — composer, slash rows,
|
|
752
|
+
* stop/copy/regen toolbars, BYOK banners, searching chain — and keep turn
|
|
753
|
+
* text + optional Sources cards. Browser Save as PDF is the PDF path.
|
|
754
|
+
* ------------------------------------------------------------------------- */
|
|
755
|
+
@media print {
|
|
756
|
+
.dc-form,
|
|
757
|
+
.dc-slash,
|
|
758
|
+
.dc-slash-note,
|
|
759
|
+
.dc-msg-actions,
|
|
760
|
+
.dc-msg-copy,
|
|
761
|
+
.dc-code-copy,
|
|
762
|
+
.dc-stop,
|
|
763
|
+
.dc-send,
|
|
764
|
+
.dc-suggest,
|
|
765
|
+
.dc-quota-banner,
|
|
766
|
+
.dc-byok-flow,
|
|
767
|
+
.dc-intro-byok,
|
|
768
|
+
.dc-activities,
|
|
769
|
+
.dc-doc-pane,
|
|
770
|
+
.dc-msg[aria-busy="true"],
|
|
771
|
+
.dt-cur {
|
|
772
|
+
display: none !important;
|
|
773
|
+
}
|
|
774
|
+
.dc-page,
|
|
775
|
+
.dc-session {
|
|
776
|
+
display: block;
|
|
777
|
+
height: auto;
|
|
778
|
+
min-height: 0;
|
|
779
|
+
max-width: none;
|
|
780
|
+
}
|
|
781
|
+
.dc-session-main {
|
|
782
|
+
display: block;
|
|
783
|
+
}
|
|
784
|
+
.dc-thread {
|
|
785
|
+
overflow: visible;
|
|
786
|
+
display: block;
|
|
787
|
+
}
|
|
788
|
+
.dc-msg {
|
|
789
|
+
break-inside: avoid;
|
|
790
|
+
}
|
|
791
|
+
.dc-session,
|
|
792
|
+
.dc-body,
|
|
793
|
+
.dc-user .dc-body,
|
|
794
|
+
.dc-intro .dc-body {
|
|
795
|
+
color: #000;
|
|
796
|
+
}
|
|
797
|
+
}
|