@happyvertical/smrt-chat 0.60.15 → 0.60.17
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/dist/chunks/{chat-stream-FDF9I30Z.js → chat-stream-Cl_kkuiU.js} +2 -2
- package/dist/chunks/{chat-stream-FDF9I30Z.js.map → chat-stream-Cl_kkuiU.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/dist/svelte/components/agent/AgentChat.svelte +213 -205
- package/dist/svelte/components/agent/AgentSelector.svelte +72 -70
- package/dist/svelte/components/agent/AgentSessionPanel.svelte +121 -122
- package/dist/svelte/components/agent/ToolCallDisplay.svelte +133 -144
- package/dist/svelte/components/assistant/AssistantChoiceCards.svelte +97 -90
- package/dist/svelte/components/assistant/AssistantComposer.svelte +95 -92
- package/dist/svelte/components/assistant/AssistantDock.svelte +271 -269
- package/dist/svelte/components/assistant/AssistantDock.svelte.d.ts.map +1 -1
- package/dist/svelte/components/assistant/AssistantQuestionForm.svelte +35 -29
- package/dist/svelte/components/assistant/AssistantThreadList.svelte +48 -49
- package/dist/svelte/components/assistant/AssistantThreadList.svelte.d.ts.map +1 -1
- package/dist/svelte/components/assistant/FloatingAssistant.svelte +66 -55
- package/dist/svelte/components/assistant/captions/CaptionOverlay.svelte +21 -15
- package/dist/svelte/components/assistant/captions/HeardCaptions.svelte +43 -9
- package/dist/svelte/components/assistant/captions/SpokenCaptions.svelte +40 -9
- package/dist/svelte/components/dialogs/RoomCreateDialog.svelte +64 -63
- package/dist/svelte/components/dialogs/SearchMessages.svelte +179 -167
- package/dist/svelte/components/helper/HelperControlPanel.svelte +93 -23
- package/dist/svelte/components/layout/ChatLayout.svelte +49 -40
- package/dist/svelte/components/layout/MemberList.svelte +132 -127
- package/dist/svelte/components/layout/RoomHeader.svelte +71 -66
- package/dist/svelte/components/layout/RoomList.svelte +185 -174
- package/dist/svelte/components/messages/MessageInput.svelte +69 -58
- package/dist/svelte/components/messages/MessageItem.svelte +166 -177
- package/dist/svelte/components/messages/MessageList.svelte +20 -15
- package/dist/svelte/components/messages/ThreadPanel.svelte +53 -48
- package/dist/svelte/components/shared/AiUnavailableNotice.svelte +11 -6
- package/dist/svelte/components/shared/FileUpload.svelte +106 -103
- package/dist/svelte/components/shared/LinkPreview.svelte +40 -35
- package/dist/svelte/components/shared/MentionAutocomplete.svelte +34 -28
- package/dist/svelte/components/shared/ReadReceipts.svelte +44 -38
- package/dist/svelte/components/shared/UserPresence.svelte +17 -17
- package/dist/svelte/components/tabs/ChatTab.svelte +72 -68
- package/dist/svelte/components/tabs/ChatTabList.svelte +51 -51
- package/dist/svelte/components/tabs/ChatTabs.svelte +6 -6
- package/dist/svelte/components/tabs/MiniChat.svelte +75 -68
- package/dist/sveltekit.d.ts.map +1 -1
- package/dist/sveltekit.js +3 -2
- package/dist/sveltekit.js.map +1 -1
- package/package.json +21 -21
|
@@ -92,15 +92,14 @@ $effect(() => {
|
|
|
92
92
|
});
|
|
93
93
|
</script>
|
|
94
94
|
|
|
95
|
-
<div class="agent-
|
|
96
|
-
<Form
|
|
95
|
+
<div class="smrt-agent-chat__root" aria-label={t(M['chat.agent_chat.conversation'])} data-smrt-component="AgentChat">
|
|
96
|
+
<Form onsubmit={(e) => handleSubmit(e)}>
|
|
97
97
|
{#if !isActive}
|
|
98
|
-
<div class="agent-
|
|
98
|
+
<div class="smrt-agent-chat__notice" data-smrt-part="status">
|
|
99
99
|
{t(M['chat.agent_chat.inactive_notice'], { status: session.status })}
|
|
100
100
|
</div>
|
|
101
101
|
{:else}
|
|
102
102
|
<Textarea
|
|
103
|
-
class="agent-chat__input"
|
|
104
103
|
placeholder={t(M['chat.agent_chat.input_placeholder'])}
|
|
105
104
|
bind:value={inputValue}
|
|
106
105
|
onkeydown={handleKeydown}
|
|
@@ -110,7 +109,6 @@ $effect(() => {
|
|
|
110
109
|
/>
|
|
111
110
|
<Button
|
|
112
111
|
variant="ghost"
|
|
113
|
-
class="agent-chat__send-btn"
|
|
114
112
|
type="submit"
|
|
115
113
|
disabled={!inputValue.trim() || !isActive}
|
|
116
114
|
aria-label={t(M['chat.agent_chat.send_message'])}
|
|
@@ -123,7 +121,8 @@ $effect(() => {
|
|
|
123
121
|
</Form>
|
|
124
122
|
|
|
125
123
|
<div
|
|
126
|
-
class="agent-chat__messages"
|
|
124
|
+
class="smrt-agent-chat__messages"
|
|
125
|
+
data-smrt-part="body"
|
|
127
126
|
bind:this={messageContainer}
|
|
128
127
|
role="log"
|
|
129
128
|
aria-label={t(M['chat.agent_chat.messages'])}
|
|
@@ -133,37 +132,41 @@ $effect(() => {
|
|
|
133
132
|
{@const isToolCall = msg.messageType === 'tool_call' || msg.messageType === 'tool_result'}
|
|
134
133
|
|
|
135
134
|
{#if isToolCall && msg.toolCallData}
|
|
136
|
-
<div class="agent-chat__tool-
|
|
135
|
+
<div class="smrt-agent-chat__tool" data-smrt-part="panel">
|
|
137
136
|
<ToolCallDisplay toolCall={msg.toolCallData} />
|
|
138
137
|
</div>
|
|
139
138
|
{:else}
|
|
140
139
|
<div
|
|
141
|
-
class="agent-chat__msg"
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
140
|
+
class="smrt-agent-chat__msg"
|
|
141
|
+
data-smrt-part="row"
|
|
142
|
+
|
|
143
|
+
class:smrt-agent-chat__msg--user={isUser}
|
|
144
|
+
class:smrt-agent-chat__msg--agent={!isUser && !isToolCall}
|
|
145
|
+
class:smrt-agent-chat__msg--system={msg.role === 'system'}
|
|
146
|
+
>
|
|
147
|
+
<div class="smrt-agent-chat__bubble" data-smrt-part="body"
|
|
148
|
+
class:smrt-agent-chat__bubble--user={isUser}
|
|
149
|
+
class:smrt-agent-chat__bubble--agent={!isUser}
|
|
150
|
+
>
|
|
151
|
+
<div class="smrt-agent-chat__message" data-smrt-part="message">
|
|
148
152
|
{#if isUser}
|
|
149
153
|
{msg.content}
|
|
150
154
|
{:else}
|
|
151
155
|
{#each parseAgentMessageBlocks(msg.content || '') as block}
|
|
152
156
|
{#if block.type === 'text'}
|
|
153
|
-
<span class="
|
|
157
|
+
<span class="smrt-agent-chat__text" data-smrt-part="message">{block.content}</span>
|
|
154
158
|
{:else if block.type === 'fields'}
|
|
155
|
-
<div class="
|
|
156
|
-
<span class="
|
|
157
|
-
<Button variant="ghost" size="sm"
|
|
159
|
+
<div class="smrt-agent-chat__field-update" data-smrt-part="panel">
|
|
160
|
+
<span class="smrt-agent-chat__badge" data-smrt-part="badge">{t(M['chat.agent_chat.updated_fields'], { count: Object.keys(block.fields).length, plural: Object.keys(block.fields).length !== 1 ? 's' : '' })}</span>
|
|
161
|
+
<Button variant="ghost" size="sm" type="button" onclick={() => showDiff(block.fields)}>Diff</Button>
|
|
158
162
|
</div>
|
|
159
163
|
{:else if block.type === 'markdown'}
|
|
160
|
-
<div class="
|
|
161
|
-
<pre class="
|
|
164
|
+
<div class="smrt-agent-chat__markdown" data-smrt-part="body">
|
|
165
|
+
<pre class="smrt-agent-chat__markdown-content" data-smrt-part="body"><code>{block.content}</code></pre>
|
|
162
166
|
{#if onapplychange}
|
|
163
167
|
<Button
|
|
164
168
|
variant="ghost"
|
|
165
169
|
size="sm"
|
|
166
|
-
class="diff-btn"
|
|
167
170
|
type="button"
|
|
168
171
|
onclick={() => onapplychange(block.content)}
|
|
169
172
|
>
|
|
@@ -175,16 +178,16 @@ $effect(() => {
|
|
|
175
178
|
{/each}
|
|
176
179
|
{/if}
|
|
177
180
|
</div>
|
|
178
|
-
<time class="agent-chat__msg-time">{formatTime(msg.createdAt)}</time>
|
|
181
|
+
<time class="smrt-agent-chat__msg-time" data-smrt-part="time">{formatTime(msg.createdAt)}</time>
|
|
179
182
|
</div>
|
|
180
183
|
</div>
|
|
181
184
|
{/if}
|
|
182
185
|
{/each}
|
|
183
186
|
|
|
184
187
|
{#if loading}
|
|
185
|
-
<div class="agent-chat__msg agent-chat__msg--agent">
|
|
186
|
-
<div class="agent-chat__bubble agent-chat__bubble--agent agent-chat__thinking">
|
|
187
|
-
<span class="
|
|
188
|
+
<div class="smrt-agent-chat__msg smrt-agent-chat__msg--agent" data-smrt-part="row">
|
|
189
|
+
<div class="smrt-agent-chat__bubble smrt-agent-chat__bubble--agent smrt-agent-chat__thinking" data-smrt-part="body">
|
|
190
|
+
<span class="smrt-agent-chat__thinking-dots" data-smrt-part="indicator">
|
|
188
191
|
<span></span><span></span><span></span>
|
|
189
192
|
</span>
|
|
190
193
|
</div>
|
|
@@ -192,25 +195,25 @@ $effect(() => {
|
|
|
192
195
|
{/if}
|
|
193
196
|
|
|
194
197
|
{#if messages.length === 0 && !loading}
|
|
195
|
-
<div class="agent-chat__empty">
|
|
196
|
-
<span class="agent-chat__empty-text">{t(M['chat.agent_chat.empty'])}</span>
|
|
198
|
+
<div class="smrt-agent-chat__empty" data-smrt-part="empty">
|
|
199
|
+
<span class="smrt-agent-chat__empty-text" data-smrt-part="message">{t(M['chat.agent_chat.empty'])}</span>
|
|
197
200
|
</div>
|
|
198
201
|
{/if}
|
|
199
202
|
</div>
|
|
200
203
|
</div>
|
|
201
204
|
|
|
202
205
|
<!-- Diff Modal -->
|
|
203
|
-
<dialog bind:this={diffDialog} class="
|
|
204
|
-
<div class="
|
|
206
|
+
<dialog bind:this={diffDialog} class="smrt-agent-chat__dialog" data-smrt-component="AgentChat">
|
|
207
|
+
<div class="smrt-agent-chat__dialog-header" data-smrt-part="header">
|
|
205
208
|
<h4>{t(M['chat.agent_chat.field_changes'])}</h4>
|
|
206
|
-
<Button variant="ghost" size="sm"
|
|
209
|
+
<Button variant="ghost" size="sm" type="button" onclick={closeDiff}>✕</Button>
|
|
207
210
|
</div>
|
|
208
211
|
{#if diffDialogFields}
|
|
209
|
-
<div class="
|
|
212
|
+
<div class="smrt-agent-chat__dialog-body" data-smrt-part="body">
|
|
210
213
|
{#each Object.entries(diffDialogFields) as [field, value]}
|
|
211
|
-
<div class="
|
|
212
|
-
<span class="
|
|
213
|
-
<pre class="
|
|
214
|
+
<div class="smrt-agent-chat__field" data-smrt-part="field">
|
|
215
|
+
<span class="smrt-agent-chat__field-name" data-smrt-part="label">{field}</span>
|
|
216
|
+
<pre class="smrt-agent-chat__field-value" data-smrt-part="value">{value}</pre>
|
|
214
217
|
</div>
|
|
215
218
|
{/each}
|
|
216
219
|
</div>
|
|
@@ -219,16 +222,13 @@ $effect(() => {
|
|
|
219
222
|
|
|
220
223
|
<style>
|
|
221
224
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
222
|
-
@layer smrt.
|
|
223
|
-
.agent-
|
|
225
|
+
@layer smrt.structure {
|
|
226
|
+
.smrt-agent-chat__root {
|
|
224
227
|
display: flex;
|
|
225
228
|
flex-direction: column;
|
|
226
229
|
height: 100%;
|
|
227
|
-
background: var(--smrt-color-surface);
|
|
228
|
-
color: var(--smrt-color-on-surface);
|
|
229
230
|
}
|
|
230
|
-
|
|
231
|
-
.agent-chat__messages {
|
|
231
|
+
.smrt-agent-chat__messages {
|
|
232
232
|
flex: 1;
|
|
233
233
|
overflow-y: auto;
|
|
234
234
|
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
@@ -236,172 +236,230 @@ $effect(() => {
|
|
|
236
236
|
flex-direction: column-reverse;
|
|
237
237
|
gap: var(--smrt-spacing-2);
|
|
238
238
|
}
|
|
239
|
-
|
|
240
|
-
.agent-chat__msg {
|
|
239
|
+
.smrt-agent-chat__msg {
|
|
241
240
|
display: flex;
|
|
242
241
|
max-width: 95%;
|
|
243
242
|
}
|
|
244
|
-
|
|
245
|
-
.agent-chat__msg--user {
|
|
243
|
+
.smrt-agent-chat__msg--user {
|
|
246
244
|
align-self: flex-end;
|
|
247
245
|
}
|
|
248
|
-
|
|
249
|
-
.agent-chat__msg--agent {
|
|
246
|
+
.smrt-agent-chat__msg--agent {
|
|
250
247
|
align-self: flex-start;
|
|
251
248
|
}
|
|
252
|
-
|
|
253
|
-
.agent-chat__msg--system {
|
|
249
|
+
.smrt-agent-chat__msg--system {
|
|
254
250
|
align-self: center;
|
|
255
251
|
max-width: 90%;
|
|
256
252
|
}
|
|
257
|
-
|
|
258
|
-
.agent-chat__tool-row {
|
|
253
|
+
.smrt-agent-chat__tool {
|
|
259
254
|
width: 100%;
|
|
260
255
|
padding: var(--smrt-spacing-1) 0;
|
|
261
256
|
}
|
|
262
|
-
|
|
263
|
-
.agent-chat__bubble {
|
|
257
|
+
.smrt-agent-chat__bubble {
|
|
264
258
|
display: flex;
|
|
265
259
|
flex-direction: column;
|
|
266
260
|
gap: var(--smrt-spacing-1);
|
|
267
261
|
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
268
|
-
border-radius: var(--smrt-radius-lg);
|
|
269
262
|
word-break: break-word;
|
|
270
|
-
font-size: var(--smrt-typography-body-medium-size, 0.8125rem);
|
|
271
|
-
line-height: var(--smrt-typography-body-medium-line-height, 1.45);
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.agent-chat__bubble--user {
|
|
275
|
-
background: var(--smrt-color-primary-container);
|
|
276
|
-
color: var(--smrt-color-on-primary-container);
|
|
277
|
-
border-bottom-right-radius: var(--smrt-radius-sm);
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.agent-chat__bubble--agent {
|
|
281
|
-
background: var(--smrt-color-surface-container-high);
|
|
282
|
-
color: var(--smrt-color-on-surface);
|
|
283
|
-
border-bottom-left-radius: var(--smrt-radius-sm);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
.agent-chat__msg--system .agent-chat__bubble {
|
|
287
|
-
background: var(--smrt-color-surface-variant);
|
|
288
|
-
color: var(--smrt-color-on-surface-variant);
|
|
289
|
-
font-style: italic;
|
|
290
|
-
text-align: center;
|
|
291
263
|
}
|
|
292
|
-
|
|
293
|
-
.agent-chat__msg-content {
|
|
264
|
+
.smrt-agent-chat__message {
|
|
294
265
|
white-space: pre-wrap;
|
|
295
266
|
}
|
|
296
|
-
|
|
297
|
-
.agent-chat__msg-time {
|
|
298
|
-
font-size: var(--smrt-typography-label-small-size, 0.5625rem);
|
|
299
|
-
color: var(--smrt-color-outline);
|
|
267
|
+
.smrt-agent-chat__msg-time {
|
|
300
268
|
align-self: flex-end;
|
|
301
|
-
line-height: 1;
|
|
302
269
|
}
|
|
303
|
-
|
|
304
|
-
.agent-chat__empty {
|
|
270
|
+
.smrt-agent-chat__empty {
|
|
305
271
|
display: flex;
|
|
306
272
|
align-items: center;
|
|
307
273
|
justify-content: center;
|
|
308
274
|
height: 100%;
|
|
309
275
|
min-height: 80px;
|
|
310
276
|
}
|
|
311
|
-
|
|
312
|
-
.agent-chat__empty-text {
|
|
313
|
-
font-size: var(--smrt-typography-body-medium-size, 0.8125rem);
|
|
314
|
-
color: var(--smrt-color-outline);
|
|
315
|
-
}
|
|
316
|
-
|
|
317
277
|
/* :global() targets the Form primitive's rendered <form> (see #1589 scoping trap). */
|
|
318
|
-
:global(
|
|
278
|
+
:global(:where([data-smrt-component="AgentChat"]) [data-smrt-component="Form"]) {
|
|
319
279
|
display: flex;
|
|
320
280
|
align-items: flex-end;
|
|
321
281
|
gap: var(--smrt-spacing-2);
|
|
322
282
|
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
323
|
-
background: var(--smrt-color-surface);
|
|
324
283
|
flex-shrink: 0;
|
|
325
284
|
}
|
|
326
|
-
|
|
327
|
-
.agent-chat__inactive-notice {
|
|
285
|
+
.smrt-agent-chat__notice {
|
|
328
286
|
flex: 1;
|
|
329
|
-
text-align: center;
|
|
330
287
|
padding: var(--smrt-spacing-2);
|
|
331
|
-
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
332
|
-
color: var(--smrt-color-outline);
|
|
333
|
-
font-style: italic;
|
|
334
288
|
}
|
|
335
|
-
|
|
336
289
|
/* Layout for the Textarea primitive's rendered <textarea> (tokenised styling
|
|
337
|
-
|
|
338
|
-
:global(
|
|
290
|
+
comes from the primitive; this only sizes it within the input bar). */
|
|
291
|
+
:global(:where([data-smrt-component="AgentChat"]) [data-smrt-component="Textarea"]) {
|
|
339
292
|
flex: 1;
|
|
340
293
|
resize: none;
|
|
341
294
|
min-height: 34px;
|
|
342
295
|
max-height: 80px;
|
|
343
296
|
}
|
|
344
|
-
|
|
345
297
|
/* :global() pierces into the Button child's rendered <button> (see #1589).
|
|
346
|
-
|
|
347
|
-
:global(
|
|
298
|
+
The ancestor is the Form primitive's <form>, also global. */
|
|
299
|
+
:global(:where([data-smrt-component="AgentChat"]) [data-smrt-component="Form"] [data-smrt-component="Button"]) {
|
|
348
300
|
width: 34px;
|
|
349
301
|
height: 34px;
|
|
350
302
|
padding: 0;
|
|
351
|
-
background: var(--smrt-color-primary);
|
|
352
|
-
color: var(--smrt-color-on-primary);
|
|
353
|
-
border-radius: var(--smrt-radius-full);
|
|
354
303
|
flex-shrink: 0;
|
|
355
|
-
transition: opacity 150ms;
|
|
356
304
|
}
|
|
357
|
-
|
|
358
|
-
:global(.agent-chat__input-bar .agent-chat__send-btn:not(:disabled):hover) {
|
|
359
|
-
background: var(--smrt-color-primary);
|
|
360
|
-
opacity: 0.85;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.applied-badge {
|
|
305
|
+
.smrt-agent-chat__badge {
|
|
364
306
|
display: inline-flex;
|
|
365
307
|
align-items: center;
|
|
366
308
|
padding: var(--smrt-spacing-1) var(--smrt-spacing-2);
|
|
367
|
-
font-size: var(--smrt-typography-label-small-size, 0.6875rem);
|
|
368
|
-
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
369
|
-
color: var(--smrt-color-on-success-container);
|
|
370
|
-
background: var(--smrt-color-success-container);
|
|
371
|
-
border: 1px solid var(--smrt-color-success);
|
|
372
|
-
border-radius: var(--smrt-radius-full);
|
|
373
309
|
}
|
|
374
|
-
|
|
375
|
-
.field-update-block {
|
|
310
|
+
.smrt-agent-chat__field-update {
|
|
376
311
|
display: flex;
|
|
377
312
|
align-items: center;
|
|
378
313
|
gap: var(--smrt-spacing-2);
|
|
379
314
|
padding: var(--smrt-spacing-1) 0;
|
|
380
315
|
}
|
|
381
|
-
|
|
382
|
-
.markdown-block {
|
|
316
|
+
.smrt-agent-chat__markdown {
|
|
383
317
|
display: flex;
|
|
384
318
|
flex-direction: column;
|
|
385
319
|
gap: var(--smrt-spacing-2);
|
|
386
320
|
padding: var(--smrt-spacing-1) 0;
|
|
387
321
|
}
|
|
388
|
-
|
|
389
|
-
.markdown-block__content {
|
|
322
|
+
.smrt-agent-chat__markdown-content {
|
|
390
323
|
margin: 0;
|
|
391
324
|
padding: var(--smrt-spacing-3);
|
|
392
|
-
border-radius: var(--smrt-radius-lg);
|
|
393
|
-
background: color-mix(in srgb, var(--smrt-color-surface-container-low) 85%, white);
|
|
394
325
|
overflow-x: auto;
|
|
395
326
|
white-space: pre-wrap;
|
|
396
327
|
word-break: break-word;
|
|
328
|
+
}
|
|
329
|
+
/* :global() pierces into each Button's rendered <button> (see #1589). */
|
|
330
|
+
.smrt-agent-chat__field-update :global([data-smrt-component="Button"]),
|
|
331
|
+
.smrt-agent-chat__markdown :global([data-smrt-component="Button"]) {
|
|
332
|
+
padding: var(--smrt-spacing-1) var(--smrt-spacing-2);
|
|
333
|
+
}
|
|
334
|
+
.smrt-agent-chat__dialog {
|
|
335
|
+
padding: 0;
|
|
336
|
+
width: min(420px, 90vw);
|
|
337
|
+
max-height: 60vh;
|
|
338
|
+
}
|
|
339
|
+
.smrt-agent-chat__dialog-header {
|
|
340
|
+
display: flex;
|
|
341
|
+
align-items: center;
|
|
342
|
+
justify-content: space-between;
|
|
343
|
+
padding: var(--smrt-spacing-3) var(--smrt-spacing-4);
|
|
344
|
+
}
|
|
345
|
+
.smrt-agent-chat__dialog-header h4 {
|
|
346
|
+
margin: 0;
|
|
347
|
+
}
|
|
348
|
+
/* :global() pierces into the Button child's rendered <button> (see #1589). */
|
|
349
|
+
.smrt-agent-chat__dialog-header :global([data-smrt-component="Button"]) {
|
|
350
|
+
padding: var(--smrt-spacing-1) var(--smrt-spacing-2);
|
|
351
|
+
}
|
|
352
|
+
.smrt-agent-chat__dialog-body {
|
|
353
|
+
padding: var(--smrt-spacing-3) var(--smrt-spacing-4);
|
|
354
|
+
overflow-y: auto;
|
|
355
|
+
max-height: calc(60vh - 60px);
|
|
356
|
+
}
|
|
357
|
+
.smrt-agent-chat__field {
|
|
358
|
+
margin-bottom: var(--smrt-spacing-3);
|
|
359
|
+
}
|
|
360
|
+
.smrt-agent-chat__field:last-child {
|
|
361
|
+
margin-bottom: 0;
|
|
362
|
+
}
|
|
363
|
+
.smrt-agent-chat__field-name {
|
|
364
|
+
display: block;
|
|
365
|
+
margin-bottom: var(--smrt-spacing-1);
|
|
366
|
+
}
|
|
367
|
+
.smrt-agent-chat__field-value {
|
|
368
|
+
margin: 0;
|
|
369
|
+
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
370
|
+
white-space: pre-wrap;
|
|
371
|
+
word-break: break-word;
|
|
372
|
+
max-height: 200px;
|
|
373
|
+
overflow-y: auto;
|
|
374
|
+
}
|
|
375
|
+
.smrt-agent-chat__thinking {
|
|
376
|
+
padding: var(--smrt-spacing-3) var(--smrt-spacing-4);
|
|
377
|
+
}
|
|
378
|
+
.smrt-agent-chat__thinking-dots {
|
|
379
|
+
display: inline-flex;
|
|
380
|
+
gap: var(--smrt-spacing-1);
|
|
381
|
+
align-items: center;
|
|
382
|
+
}
|
|
383
|
+
.smrt-agent-chat__thinking-dots span {
|
|
384
|
+
width: 6px;
|
|
385
|
+
height: 6px;
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
@layer smrt.theme {
|
|
390
|
+
.smrt-agent-chat__root {
|
|
391
|
+
background: var(--smrt-color-surface);
|
|
392
|
+
color: var(--smrt-color-on-surface);
|
|
393
|
+
}
|
|
394
|
+
.smrt-agent-chat__bubble {
|
|
395
|
+
border-radius: var(--smrt-radius-lg);
|
|
396
|
+
font-size: var(--smrt-typography-body-medium-size, 0.8125rem);
|
|
397
|
+
line-height: var(--smrt-typography-body-medium-line-height, 1.45);
|
|
398
|
+
}
|
|
399
|
+
.smrt-agent-chat__bubble--user {
|
|
400
|
+
background: var(--smrt-color-primary-container);
|
|
401
|
+
color: var(--smrt-color-on-primary-container);
|
|
402
|
+
border-bottom-right-radius: var(--smrt-radius-sm);
|
|
403
|
+
}
|
|
404
|
+
.smrt-agent-chat__bubble--agent {
|
|
405
|
+
background: var(--smrt-color-surface-container-high);
|
|
406
|
+
color: var(--smrt-color-on-surface);
|
|
407
|
+
border-bottom-left-radius: var(--smrt-radius-sm);
|
|
408
|
+
}
|
|
409
|
+
.smrt-agent-chat__msg--system .smrt-agent-chat__bubble {
|
|
410
|
+
background: var(--smrt-color-surface-variant);
|
|
411
|
+
color: var(--smrt-color-on-surface-variant);
|
|
412
|
+
font-style: italic;
|
|
413
|
+
text-align: center;
|
|
414
|
+
}
|
|
415
|
+
.smrt-agent-chat__msg-time {
|
|
416
|
+
font-size: var(--smrt-typography-label-small-size, 0.5625rem);
|
|
417
|
+
color: var(--smrt-color-outline);
|
|
418
|
+
line-height: 1;
|
|
419
|
+
}
|
|
420
|
+
.smrt-agent-chat__empty-text {
|
|
421
|
+
font-size: var(--smrt-typography-body-medium-size, 0.8125rem);
|
|
422
|
+
color: var(--smrt-color-outline);
|
|
423
|
+
}
|
|
424
|
+
/* :global() targets the Form primitive's rendered <form> (see #1589 scoping trap). */
|
|
425
|
+
:global(:where([data-smrt-component="AgentChat"]) [data-smrt-component="Form"]) {
|
|
426
|
+
background: var(--smrt-color-surface);
|
|
427
|
+
}
|
|
428
|
+
.smrt-agent-chat__notice {
|
|
429
|
+
text-align: center;
|
|
430
|
+
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
431
|
+
color: var(--smrt-color-outline);
|
|
432
|
+
font-style: italic;
|
|
433
|
+
}
|
|
434
|
+
/* :global() pierces into the Button child's rendered <button> (see #1589).
|
|
435
|
+
The ancestor is the Form primitive's <form>, also global. */
|
|
436
|
+
:global(:where([data-smrt-component="AgentChat"]) [data-smrt-component="Form"] [data-smrt-component="Button"]) {
|
|
437
|
+
background: var(--smrt-color-primary);
|
|
438
|
+
color: var(--smrt-color-on-primary);
|
|
439
|
+
border-radius: var(--smrt-radius-full);
|
|
440
|
+
transition: opacity 150ms;
|
|
441
|
+
}
|
|
442
|
+
:global(:where([data-smrt-component="AgentChat"]) [data-smrt-component="Form"] [data-smrt-component="Button"]:not(:disabled):hover) {
|
|
443
|
+
background: var(--smrt-color-primary);
|
|
444
|
+
opacity: 0.85;
|
|
445
|
+
}
|
|
446
|
+
.smrt-agent-chat__badge {
|
|
447
|
+
font-size: var(--smrt-typography-label-small-size, 0.6875rem);
|
|
448
|
+
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
449
|
+
color: var(--smrt-color-on-success-container);
|
|
450
|
+
background: var(--smrt-color-success-container);
|
|
451
|
+
border: 1px solid var(--smrt-color-success);
|
|
452
|
+
border-radius: var(--smrt-radius-full);
|
|
453
|
+
}
|
|
454
|
+
.smrt-agent-chat__markdown-content {
|
|
455
|
+
border-radius: var(--smrt-radius-lg);
|
|
456
|
+
background: color-mix(in srgb, var(--smrt-color-surface-container-low) 85%, white);
|
|
397
457
|
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
398
458
|
line-height: var(--smrt-typography-body-medium-line-height, 1.45);
|
|
399
459
|
}
|
|
400
|
-
|
|
401
460
|
/* :global() pierces into each Button's rendered <button> (see #1589). */
|
|
402
|
-
.
|
|
403
|
-
.
|
|
404
|
-
padding: var(--smrt-spacing-1) var(--smrt-spacing-2);
|
|
461
|
+
.smrt-agent-chat__field-update :global([data-smrt-component="Button"]),
|
|
462
|
+
.smrt-agent-chat__markdown :global([data-smrt-component="Button"]) {
|
|
405
463
|
font-size: var(--smrt-typography-label-small-size, 0.625rem);
|
|
406
464
|
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
407
465
|
border: var(--smrt-hairline);
|
|
@@ -409,128 +467,78 @@ $effect(() => {
|
|
|
409
467
|
background: none;
|
|
410
468
|
color: var(--smrt-color-on-surface-variant);
|
|
411
469
|
}
|
|
412
|
-
|
|
413
|
-
.
|
|
414
|
-
.markdown-block :global(.diff-btn:hover) {
|
|
470
|
+
.smrt-agent-chat__field-update :global([data-smrt-component="Button"]:hover),
|
|
471
|
+
.smrt-agent-chat__markdown :global([data-smrt-component="Button"]:hover) {
|
|
415
472
|
background: var(--smrt-color-surface-variant);
|
|
416
473
|
color: var(--smrt-color-primary);
|
|
417
474
|
}
|
|
418
|
-
|
|
419
|
-
.diff-dialog {
|
|
475
|
+
.smrt-agent-chat__dialog {
|
|
420
476
|
border: none;
|
|
421
477
|
border-radius: var(--smrt-radius-lg);
|
|
422
|
-
padding: 0;
|
|
423
|
-
width: min(420px, 90vw);
|
|
424
|
-
max-height: 60vh;
|
|
425
478
|
box-shadow: var(--smrt-elevation-5, 0 8px 32px color-mix(in srgb, var(--smrt-color-shadow) 18%, transparent));
|
|
426
479
|
background: var(--smrt-color-surface);
|
|
427
480
|
color: var(--smrt-color-on-surface);
|
|
428
481
|
}
|
|
429
|
-
|
|
430
|
-
.diff-dialog::backdrop {
|
|
482
|
+
.smrt-agent-chat__dialog::backdrop {
|
|
431
483
|
background: var(--smrt-color-scrim, rgba(0, 0, 0, 0.3));
|
|
432
484
|
}
|
|
433
|
-
|
|
434
|
-
.diff-dialog__header {
|
|
435
|
-
display: flex;
|
|
436
|
-
align-items: center;
|
|
437
|
-
justify-content: space-between;
|
|
438
|
-
padding: var(--smrt-spacing-3) var(--smrt-spacing-4);
|
|
485
|
+
.smrt-agent-chat__dialog-header {
|
|
439
486
|
border-bottom: var(--smrt-hairline);
|
|
440
487
|
}
|
|
441
|
-
|
|
442
|
-
.diff-dialog__header h4 {
|
|
443
|
-
margin: 0;
|
|
488
|
+
.smrt-agent-chat__dialog-header h4 {
|
|
444
489
|
font-size: var(--smrt-typography-title-small-size, 0.875rem);
|
|
445
490
|
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
446
491
|
}
|
|
447
|
-
|
|
448
492
|
/* :global() pierces into the Button child's rendered <button> (see #1589). */
|
|
449
|
-
.
|
|
493
|
+
.smrt-agent-chat__dialog-header :global([data-smrt-component="Button"]) {
|
|
450
494
|
background: none;
|
|
451
495
|
font-size: var(--smrt-typography-body-large-size, 1rem);
|
|
452
496
|
color: var(--smrt-color-outline);
|
|
453
|
-
padding: var(--smrt-spacing-1) var(--smrt-spacing-2);
|
|
454
497
|
border-radius: var(--smrt-radius-sm);
|
|
455
498
|
}
|
|
456
|
-
|
|
457
|
-
.diff-dialog__header :global(.diff-dialog__close:hover) {
|
|
499
|
+
.smrt-agent-chat__dialog-header :global([data-smrt-component="Button"]:hover) {
|
|
458
500
|
background: var(--smrt-color-surface-variant);
|
|
459
501
|
}
|
|
460
|
-
|
|
461
|
-
.diff-dialog__body {
|
|
462
|
-
padding: var(--smrt-spacing-3) var(--smrt-spacing-4);
|
|
463
|
-
overflow-y: auto;
|
|
464
|
-
max-height: calc(60vh - 60px);
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
.diff-field {
|
|
468
|
-
margin-bottom: var(--smrt-spacing-3);
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
.diff-field:last-child {
|
|
472
|
-
margin-bottom: 0;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
.diff-field__name {
|
|
476
|
-
display: block;
|
|
502
|
+
.smrt-agent-chat__field-name {
|
|
477
503
|
font-size: var(--smrt-typography-label-small-size, 0.6875rem);
|
|
478
504
|
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
479
505
|
text-transform: uppercase;
|
|
480
506
|
letter-spacing: var(--smrt-typography-label-small-tracking, 0.04em);
|
|
481
507
|
color: var(--smrt-color-outline);
|
|
482
|
-
margin-bottom: var(--smrt-spacing-1);
|
|
483
508
|
}
|
|
484
|
-
|
|
485
|
-
.diff-field__value {
|
|
486
|
-
margin: 0;
|
|
487
|
-
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
509
|
+
.smrt-agent-chat__field-value {
|
|
488
510
|
font-size: var(--smrt-typography-body-small-size, 0.75rem);
|
|
489
511
|
line-height: var(--smrt-typography-body-small-line-height, 1.5);
|
|
490
512
|
background: var(--smrt-color-surface-container-low);
|
|
491
513
|
border-radius: var(--smrt-radius-md);
|
|
492
|
-
white-space: pre-wrap;
|
|
493
|
-
word-break: break-word;
|
|
494
514
|
font-family: inherit;
|
|
495
|
-
max-height: 200px;
|
|
496
|
-
overflow-y: auto;
|
|
497
|
-
}
|
|
498
|
-
|
|
499
|
-
.agent-chat__thinking {
|
|
500
|
-
padding: var(--smrt-spacing-3) var(--smrt-spacing-4);
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
.thinking-dots {
|
|
504
|
-
display: inline-flex;
|
|
505
|
-
gap: var(--smrt-spacing-1);
|
|
506
|
-
align-items: center;
|
|
507
515
|
}
|
|
508
|
-
|
|
509
|
-
.thinking-dots span {
|
|
510
|
-
width: 6px;
|
|
511
|
-
height: 6px;
|
|
516
|
+
.smrt-agent-chat__thinking-dots span {
|
|
512
517
|
border-radius: var(--smrt-radius-full);
|
|
513
518
|
background: var(--smrt-color-outline);
|
|
514
519
|
animation: thinking-bounce 1.2s ease-in-out infinite;
|
|
515
520
|
}
|
|
516
|
-
|
|
517
|
-
.thinking-dots span:nth-child(2) {
|
|
521
|
+
.smrt-agent-chat__thinking-dots span:nth-child(2) {
|
|
518
522
|
animation-delay: 0.15s;
|
|
519
523
|
}
|
|
520
|
-
|
|
521
|
-
.thinking-dots span:nth-child(3) {
|
|
524
|
+
.smrt-agent-chat__thinking-dots span:nth-child(3) {
|
|
522
525
|
animation-delay: 0.3s;
|
|
523
526
|
}
|
|
524
|
-
|
|
525
527
|
@keyframes thinking-bounce {
|
|
526
|
-
0%, 60%, 100% {
|
|
527
|
-
|
|
528
|
+
0%, 60%, 100% {
|
|
529
|
+
transform: translateY(0);
|
|
530
|
+
opacity: 0.4;
|
|
531
|
+
}
|
|
532
|
+
30% {
|
|
533
|
+
transform: translateY(-4px);
|
|
534
|
+
opacity: 1;
|
|
535
|
+
}
|
|
528
536
|
}
|
|
529
|
-
|
|
530
537
|
@media (prefers-reduced-motion: reduce) {
|
|
531
|
-
.
|
|
538
|
+
.smrt-agent-chat__thinking-dots span {
|
|
532
539
|
animation: none;
|
|
533
540
|
}
|
|
534
541
|
}
|
|
535
542
|
}
|
|
543
|
+
|
|
536
544
|
</style>
|