@happyvertical/smrt-chat 0.60.16 → 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-Bdvah1X7.js → chat-stream-Cl_kkuiU.js} +2 -2
- package/dist/chunks/{chat-stream-Bdvah1X7.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.js +1 -1
- package/package.json +21 -21
|
@@ -24,16 +24,16 @@ const { tabs, onselect, onclose }: Props = $props();
|
|
|
24
24
|
</script>
|
|
25
25
|
|
|
26
26
|
{#if tabs.length > 0}
|
|
27
|
-
<nav class="tab-
|
|
27
|
+
<nav class="smrt-chat-tab-list__root" aria-label={t(M['chat.chat_tab_list.minimized_chats'])} data-smrt-component="ChatTabList">
|
|
28
28
|
{#each tabs as tab (tab.roomId)}
|
|
29
|
-
<div class="tab-list__item">
|
|
29
|
+
<div class="smrt-chat-tab-list__item" data-smrt-part="item">
|
|
30
30
|
<!-- raw-primitive-allow: pressable circular avatar tab wrapping rich content (room avatar component and overlaid unread badge) that opens the chat on click; no Button primitive owns this structural avatar-tab pattern -->
|
|
31
31
|
<button
|
|
32
|
-
class="tab-
|
|
32
|
+
class="smrt-chat-tab-list__tab"
|
|
33
33
|
type="button"
|
|
34
34
|
onclick={() => onselect(tab.roomId)}
|
|
35
35
|
aria-label={t(M['chat.chat_tab_list.open_chat_with'], { name: tab.room.name })}
|
|
36
|
-
title={tab.room.name}
|
|
36
|
+
title={tab.room.name} data-smrt-part="trigger"
|
|
37
37
|
>
|
|
38
38
|
<Avatar
|
|
39
39
|
name={tab.room.name}
|
|
@@ -41,7 +41,7 @@ const { tabs, onselect, onclose }: Props = $props();
|
|
|
41
41
|
size="sm"
|
|
42
42
|
/>
|
|
43
43
|
{#if tab.unreadCount > 0}
|
|
44
|
-
<span class="tab-list__badge" aria-label={t(M['chat.chat_tab_list.unread'], { count: tab.unreadCount })}>
|
|
44
|
+
<span class="smrt-chat-tab-list__badge" data-smrt-part="badge" aria-label={t(M['chat.chat_tab_list.unread'], { count: tab.unreadCount })}>
|
|
45
45
|
{tab.unreadCount > 99 ? '99+' : tab.unreadCount}
|
|
46
46
|
</span>
|
|
47
47
|
{/if}
|
|
@@ -49,7 +49,6 @@ const { tabs, onselect, onclose }: Props = $props();
|
|
|
49
49
|
<Button
|
|
50
50
|
variant="ghost"
|
|
51
51
|
size="sm"
|
|
52
|
-
class="tab-list__close"
|
|
53
52
|
type="button"
|
|
54
53
|
onclick={(e) => { e.stopPropagation(); onclose(tab.roomId); }}
|
|
55
54
|
aria-label={t(M['chat.chat_tab_list.close_chat_with'], { name: tab.room.name })}
|
|
@@ -66,56 +65,76 @@ const { tabs, onselect, onclose }: Props = $props();
|
|
|
66
65
|
|
|
67
66
|
<style>
|
|
68
67
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
69
|
-
@layer smrt.
|
|
70
|
-
.tab-
|
|
68
|
+
@layer smrt.structure {
|
|
69
|
+
.smrt-chat-tab-list__root {
|
|
71
70
|
display: flex;
|
|
72
71
|
align-items: flex-end;
|
|
73
72
|
gap: var(--smrt-spacing-1);
|
|
74
73
|
pointer-events: auto;
|
|
75
74
|
}
|
|
76
|
-
|
|
77
|
-
.tab-list__item {
|
|
75
|
+
.smrt-chat-tab-list__item {
|
|
78
76
|
position: relative;
|
|
79
77
|
display: flex;
|
|
80
78
|
flex-direction: column;
|
|
81
79
|
align-items: center;
|
|
82
80
|
}
|
|
83
|
-
|
|
84
|
-
.tab-list__btn {
|
|
81
|
+
.smrt-chat-tab-list__tab {
|
|
85
82
|
position: relative;
|
|
86
83
|
display: inline-flex;
|
|
87
84
|
align-items: center;
|
|
88
85
|
justify-content: center;
|
|
89
86
|
padding: var(--smrt-spacing-2);
|
|
87
|
+
cursor: pointer;
|
|
88
|
+
}
|
|
89
|
+
.smrt-chat-tab-list__badge {
|
|
90
|
+
position: absolute;
|
|
91
|
+
top: -2px;
|
|
92
|
+
right: -2px;
|
|
93
|
+
display: inline-flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
min-width: 16px;
|
|
97
|
+
height: 16px;
|
|
98
|
+
padding: 0 var(--smrt-spacing-1);
|
|
99
|
+
}
|
|
100
|
+
/* :global() pierces into the Button child's rendered <button> (see #1589). */
|
|
101
|
+
.smrt-chat-tab-list__item :global([data-smrt-component="Button"]) {
|
|
102
|
+
display: none;
|
|
103
|
+
position: absolute;
|
|
104
|
+
top: -4px;
|
|
105
|
+
right: -4px;
|
|
106
|
+
width: 18px;
|
|
107
|
+
height: 18px;
|
|
108
|
+
padding: 0;
|
|
109
|
+
}
|
|
110
|
+
.smrt-chat-tab-list__item:hover :global([data-smrt-component="Button"]),
|
|
111
|
+
.smrt-chat-tab-list__item:focus-within :global([data-smrt-component="Button"]) {
|
|
112
|
+
display: inline-flex;
|
|
113
|
+
}
|
|
114
|
+
.smrt-chat-tab-list__item:hover .smrt-chat-tab-list__badge,
|
|
115
|
+
.smrt-chat-tab-list__item:focus-within .smrt-chat-tab-list__badge {
|
|
116
|
+
display: none;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@layer smrt.theme {
|
|
121
|
+
.smrt-chat-tab-list__tab {
|
|
90
122
|
border: none;
|
|
91
123
|
background: var(--smrt-color-surface-container);
|
|
92
124
|
border-radius: var(--smrt-radius-full);
|
|
93
|
-
cursor: pointer;
|
|
94
125
|
transition: background var(--smrt-duration-short2, 150ms),
|
|
95
126
|
box-shadow var(--smrt-duration-short2, 150ms);
|
|
96
127
|
box-shadow: var(--smrt-elevation-1, 0 1px 3px rgba(0, 0, 0, 0.1));
|
|
97
128
|
}
|
|
98
|
-
|
|
99
|
-
.tab-list__btn:hover {
|
|
129
|
+
.smrt-chat-tab-list__tab:hover {
|
|
100
130
|
background: var(--smrt-color-surface-container-high);
|
|
101
131
|
box-shadow: var(--smrt-elevation-2, 0 2px 6px rgba(0, 0, 0, 0.15));
|
|
102
132
|
}
|
|
103
|
-
|
|
104
|
-
.tab-list__btn:focus-visible {
|
|
133
|
+
.smrt-chat-tab-list__tab:focus-visible {
|
|
105
134
|
outline: 2px solid var(--smrt-color-primary);
|
|
106
135
|
outline-offset: 2px;
|
|
107
136
|
}
|
|
108
|
-
|
|
109
|
-
.tab-list__badge {
|
|
110
|
-
position: absolute;
|
|
111
|
-
top: -2px;
|
|
112
|
-
right: -2px;
|
|
113
|
-
display: inline-flex;
|
|
114
|
-
align-items: center;
|
|
115
|
-
justify-content: center;
|
|
116
|
-
min-width: 16px;
|
|
117
|
-
height: 16px;
|
|
118
|
-
padding: 0 var(--smrt-spacing-1);
|
|
137
|
+
.smrt-chat-tab-list__badge {
|
|
119
138
|
border-radius: var(--smrt-radius-full);
|
|
120
139
|
background: var(--smrt-color-error);
|
|
121
140
|
color: var(--smrt-color-on-error);
|
|
@@ -124,41 +143,22 @@ const { tabs, onselect, onclose }: Props = $props();
|
|
|
124
143
|
line-height: 1;
|
|
125
144
|
border: 2px solid var(--smrt-color-surface);
|
|
126
145
|
}
|
|
127
|
-
|
|
128
146
|
/* :global() pierces into the Button child's rendered <button> (see #1589). */
|
|
129
|
-
.tab-list__item :global(
|
|
130
|
-
display: none;
|
|
131
|
-
position: absolute;
|
|
132
|
-
top: -4px;
|
|
133
|
-
right: -4px;
|
|
134
|
-
width: 18px;
|
|
135
|
-
height: 18px;
|
|
147
|
+
.smrt-chat-tab-list__item :global([data-smrt-component="Button"]) {
|
|
136
148
|
background: var(--smrt-color-surface-variant);
|
|
137
149
|
color: var(--smrt-color-on-surface-variant);
|
|
138
150
|
border-radius: var(--smrt-radius-full);
|
|
139
|
-
padding: 0;
|
|
140
151
|
font-size: 0;
|
|
141
152
|
}
|
|
142
|
-
|
|
143
|
-
.tab-list__item:hover :global(.tab-list__close),
|
|
144
|
-
.tab-list__item:focus-within :global(.tab-list__close) {
|
|
145
|
-
display: inline-flex;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.tab-list__item:hover .tab-list__badge,
|
|
149
|
-
.tab-list__item:focus-within .tab-list__badge {
|
|
150
|
-
display: none;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
.tab-list__item :global(.tab-list__close:hover) {
|
|
153
|
+
.smrt-chat-tab-list__item :global([data-smrt-component="Button"]:hover) {
|
|
154
154
|
background: var(--smrt-color-error-container);
|
|
155
155
|
color: var(--smrt-color-on-error-container);
|
|
156
156
|
}
|
|
157
|
-
|
|
158
157
|
@media (prefers-reduced-motion: reduce) {
|
|
159
|
-
.tab-
|
|
158
|
+
.smrt-chat-tab-list__tab {
|
|
160
159
|
transition: none;
|
|
161
160
|
}
|
|
162
161
|
}
|
|
163
162
|
}
|
|
163
|
+
|
|
164
164
|
</style>
|
|
@@ -42,8 +42,8 @@ const expandedTabs = $derived(tabs.filter((t) => t.isExpanded));
|
|
|
42
42
|
const collapsedTabs = $derived(tabs.filter((t) => !t.isExpanded));
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
|
-
<div class="chat-
|
|
46
|
-
<div class="chat-tabs__expanded">
|
|
45
|
+
<div class="smrt-chat-tabs__root" aria-label={t(M['chat.chat_tabs.tabs_label'])} data-smrt-component="ChatTabs">
|
|
46
|
+
<div class="smrt-chat-tabs__expanded" data-smrt-part="body">
|
|
47
47
|
{#each expandedTabs as tab (tab.roomId)}
|
|
48
48
|
<ChatTab
|
|
49
49
|
{tab}
|
|
@@ -68,8 +68,8 @@ const collapsedTabs = $derived(tabs.filter((t) => !t.isExpanded));
|
|
|
68
68
|
|
|
69
69
|
<style>
|
|
70
70
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
71
|
-
@layer smrt.
|
|
72
|
-
.chat-
|
|
71
|
+
@layer smrt.structure {
|
|
72
|
+
.smrt-chat-tabs__root {
|
|
73
73
|
position: fixed;
|
|
74
74
|
bottom: 0;
|
|
75
75
|
right: 0;
|
|
@@ -80,12 +80,12 @@ const collapsedTabs = $derived(tabs.filter((t) => !t.isExpanded));
|
|
|
80
80
|
z-index: var(--smrt-z-index-sticky, 1100);
|
|
81
81
|
pointer-events: none;
|
|
82
82
|
}
|
|
83
|
-
|
|
84
|
-
.chat-tabs__expanded {
|
|
83
|
+
.smrt-chat-tabs__expanded {
|
|
85
84
|
display: flex;
|
|
86
85
|
align-items: flex-end;
|
|
87
86
|
gap: var(--smrt-spacing-2);
|
|
88
87
|
pointer-events: auto;
|
|
89
88
|
}
|
|
90
89
|
}
|
|
90
|
+
|
|
91
91
|
</style>
|
|
@@ -56,9 +56,10 @@ $effect(() => {
|
|
|
56
56
|
});
|
|
57
57
|
</script>
|
|
58
58
|
|
|
59
|
-
<div class="mini-
|
|
59
|
+
<div class="smrt-mini-chat__root" data-smrt-component="MiniChat">
|
|
60
60
|
<div
|
|
61
|
-
class="mini-chat__messages"
|
|
61
|
+
class="smrt-mini-chat__messages"
|
|
62
|
+
data-smrt-part="body"
|
|
62
63
|
style:max-height="{maxHeight}px"
|
|
63
64
|
bind:this={messageContainer}
|
|
64
65
|
role="log"
|
|
@@ -66,30 +67,33 @@ $effect(() => {
|
|
|
66
67
|
>
|
|
67
68
|
{#each messages as msg (msg.id)}
|
|
68
69
|
{@const isOwn = msg.senderProfileId === currentProfileId}
|
|
69
|
-
<div class="mini-chat__msg"
|
|
70
|
+
<div class="smrt-mini-chat__msg" data-smrt-part="row"
|
|
71
|
+
class:smrt-mini-chat__msg--own={isOwn}
|
|
72
|
+
>
|
|
70
73
|
{#if !isOwn}
|
|
71
74
|
<Avatar name={msg.senderName} avatarUrl={msg.senderAvatarUrl} size="sm" />
|
|
72
75
|
{/if}
|
|
73
|
-
<div class="mini-chat__bubble"
|
|
76
|
+
<div class="smrt-mini-chat__bubble" data-smrt-part="body"
|
|
77
|
+
class:smrt-mini-chat__bubble--own={isOwn}
|
|
78
|
+
>
|
|
74
79
|
{#if !isOwn}
|
|
75
|
-
<span class="mini-chat__sender">{msg.senderName}</span>
|
|
80
|
+
<span class="smrt-mini-chat__sender" data-smrt-part="label">{msg.senderName}</span>
|
|
76
81
|
{/if}
|
|
77
|
-
<span class="mini-chat__text">{msg.content}</span>
|
|
78
|
-
<time class="mini-chat__time">{formatTime(msg.createdAt)}</time>
|
|
82
|
+
<span class="smrt-mini-chat__text" data-smrt-part="message">{msg.content}</span>
|
|
83
|
+
<time class="smrt-mini-chat__time" data-smrt-part="meta">{formatTime(msg.createdAt)}</time>
|
|
79
84
|
</div>
|
|
80
85
|
</div>
|
|
81
86
|
{/each}
|
|
82
87
|
|
|
83
88
|
{#if messages.length === 0}
|
|
84
|
-
<div class="mini-chat__empty">
|
|
85
|
-
<span class="mini-chat__empty-text">{t(M['chat.mini_chat.no_messages'])}</span>
|
|
89
|
+
<div class="smrt-mini-chat__empty" data-smrt-part="empty">
|
|
90
|
+
<span class="smrt-mini-chat__empty-text" data-smrt-part="message">{t(M['chat.mini_chat.no_messages'])}</span>
|
|
86
91
|
</div>
|
|
87
92
|
{/if}
|
|
88
93
|
</div>
|
|
89
94
|
|
|
90
|
-
<Form
|
|
95
|
+
<Form onsubmit={handleSubmit}>
|
|
91
96
|
<Input
|
|
92
|
-
class="mini-chat__input"
|
|
93
97
|
type="text"
|
|
94
98
|
placeholder={t(M['chat.mini_chat.placeholder'])}
|
|
95
99
|
bind:value={inputValue}
|
|
@@ -98,7 +102,6 @@ $effect(() => {
|
|
|
98
102
|
/>
|
|
99
103
|
<Button
|
|
100
104
|
variant="ghost"
|
|
101
|
-
class="mini-chat__send-btn"
|
|
102
105
|
type="submit"
|
|
103
106
|
disabled={!inputValue.trim()}
|
|
104
107
|
aria-label={t(M['chat.mini_chat.send'])}
|
|
@@ -112,129 +115,133 @@ $effect(() => {
|
|
|
112
115
|
|
|
113
116
|
<style>
|
|
114
117
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
115
|
-
@layer smrt.
|
|
116
|
-
.mini-
|
|
118
|
+
@layer smrt.structure {
|
|
119
|
+
.smrt-mini-chat__root {
|
|
117
120
|
display: flex;
|
|
118
121
|
flex-direction: column;
|
|
119
122
|
height: 100%;
|
|
120
123
|
}
|
|
121
|
-
|
|
122
|
-
.mini-chat__messages {
|
|
124
|
+
.smrt-mini-chat__messages {
|
|
123
125
|
flex: 1;
|
|
124
126
|
overflow-y: auto;
|
|
125
127
|
padding: var(--smrt-spacing-2);
|
|
126
128
|
display: flex;
|
|
127
129
|
flex-direction: column;
|
|
128
130
|
gap: var(--smrt-spacing-2);
|
|
129
|
-
scroll-behavior: smooth;
|
|
130
131
|
}
|
|
131
|
-
|
|
132
|
-
.mini-chat__msg {
|
|
132
|
+
.smrt-mini-chat__msg {
|
|
133
133
|
display: flex;
|
|
134
134
|
align-items: flex-end;
|
|
135
135
|
gap: var(--smrt-spacing-2);
|
|
136
136
|
max-width: 85%;
|
|
137
137
|
}
|
|
138
|
-
|
|
139
|
-
.mini-chat__msg--own {
|
|
138
|
+
.smrt-mini-chat__msg--own {
|
|
140
139
|
align-self: flex-end;
|
|
141
140
|
flex-direction: row-reverse;
|
|
142
141
|
}
|
|
143
|
-
|
|
144
|
-
.mini-chat__bubble {
|
|
142
|
+
.smrt-mini-chat__bubble {
|
|
145
143
|
display: flex;
|
|
146
144
|
flex-direction: column;
|
|
147
145
|
gap: var(--smrt-spacing-1);
|
|
148
146
|
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
147
|
+
word-break: break-word;
|
|
148
|
+
}
|
|
149
|
+
.smrt-mini-chat__time {
|
|
150
|
+
align-self: flex-end;
|
|
151
|
+
}
|
|
152
|
+
.smrt-mini-chat__empty {
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: center;
|
|
155
|
+
justify-content: center;
|
|
156
|
+
height: 100%;
|
|
157
|
+
min-height: 80px;
|
|
158
|
+
}
|
|
159
|
+
/* :global() targets the Form primitive's rendered <form> (see #1589 scoping trap). */
|
|
160
|
+
:global(:where([data-smrt-component="MiniChat"]) [data-smrt-component="Form"]) {
|
|
161
|
+
display: flex;
|
|
162
|
+
align-items: center;
|
|
163
|
+
gap: var(--smrt-spacing-1);
|
|
164
|
+
padding: var(--smrt-spacing-2);
|
|
165
|
+
}
|
|
166
|
+
/* Layout for the Input primitive's rendered <input> (tokenised styling comes
|
|
167
|
+
from the primitive; this only sizes/shapes it within the input bar). */
|
|
168
|
+
:global(:where([data-smrt-component="MiniChat"]) [data-smrt-component="Input"]) {
|
|
169
|
+
flex: 1;
|
|
170
|
+
}
|
|
171
|
+
/* :global() pierces into the Button child's rendered <button> (see #1589).
|
|
172
|
+
The ancestor is the Form primitive's <form>, also global. */
|
|
173
|
+
:global(:where([data-smrt-component="MiniChat"]) [data-smrt-component="Form"] [data-smrt-component="Button"]) {
|
|
174
|
+
width: 32px;
|
|
175
|
+
height: 32px;
|
|
176
|
+
padding: 0;
|
|
177
|
+
flex-shrink: 0;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@layer smrt.theme {
|
|
182
|
+
.smrt-mini-chat__messages {
|
|
183
|
+
scroll-behavior: smooth;
|
|
184
|
+
}
|
|
185
|
+
.smrt-mini-chat__bubble {
|
|
149
186
|
border-radius: var(--smrt-radius-medium);
|
|
150
187
|
background: var(--smrt-color-surface-container);
|
|
151
188
|
color: var(--smrt-color-on-surface);
|
|
152
|
-
word-break: break-word;
|
|
153
189
|
}
|
|
154
|
-
|
|
155
|
-
.mini-chat__bubble--own {
|
|
190
|
+
.smrt-mini-chat__bubble--own {
|
|
156
191
|
background: var(--smrt-color-primary-container);
|
|
157
192
|
color: var(--smrt-color-on-primary-container);
|
|
158
193
|
}
|
|
159
|
-
|
|
160
|
-
.mini-chat__sender {
|
|
194
|
+
.smrt-mini-chat__sender {
|
|
161
195
|
font-size: var(--smrt-typography-label-small-size, 0.6875rem);
|
|
162
196
|
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
163
197
|
color: var(--smrt-color-primary);
|
|
164
198
|
line-height: 1;
|
|
165
199
|
}
|
|
166
|
-
|
|
167
|
-
.mini-chat__text {
|
|
200
|
+
.smrt-mini-chat__text {
|
|
168
201
|
font: var(--smrt-typography-body-small-font, 0.8125rem/1.4 sans-serif);
|
|
169
202
|
}
|
|
170
|
-
|
|
171
|
-
.mini-chat__time {
|
|
203
|
+
.smrt-mini-chat__time {
|
|
172
204
|
font-size: var(--smrt-typography-label-small-size, 0.625rem);
|
|
173
205
|
color: var(--smrt-color-outline);
|
|
174
|
-
align-self: flex-end;
|
|
175
206
|
line-height: 1;
|
|
176
207
|
}
|
|
177
|
-
|
|
178
|
-
.mini-chat__empty {
|
|
179
|
-
display: flex;
|
|
180
|
-
align-items: center;
|
|
181
|
-
justify-content: center;
|
|
182
|
-
height: 100%;
|
|
183
|
-
min-height: 80px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
.mini-chat__empty-text {
|
|
208
|
+
.smrt-mini-chat__empty-text {
|
|
187
209
|
font: var(--smrt-typography-body-small-font, 0.8125rem/1.4 sans-serif);
|
|
188
210
|
color: var(--smrt-color-outline);
|
|
189
211
|
}
|
|
190
|
-
|
|
191
212
|
/* :global() targets the Form primitive's rendered <form> (see #1589 scoping trap). */
|
|
192
|
-
:global(
|
|
193
|
-
display: flex;
|
|
194
|
-
align-items: center;
|
|
195
|
-
gap: var(--smrt-spacing-1);
|
|
196
|
-
padding: var(--smrt-spacing-2);
|
|
213
|
+
:global(:where([data-smrt-component="MiniChat"]) [data-smrt-component="Form"]) {
|
|
197
214
|
border-top: var(--smrt-hairline);
|
|
198
215
|
background: var(--smrt-color-surface);
|
|
199
216
|
}
|
|
200
|
-
|
|
201
217
|
/* Layout for the Input primitive's rendered <input> (tokenised styling comes
|
|
202
|
-
|
|
203
|
-
:global(
|
|
204
|
-
flex: 1;
|
|
218
|
+
from the primitive; this only sizes/shapes it within the input bar). */
|
|
219
|
+
:global(:where([data-smrt-component="MiniChat"]) [data-smrt-component="Input"]) {
|
|
205
220
|
border-radius: var(--smrt-radius-full);
|
|
206
221
|
}
|
|
207
|
-
|
|
208
222
|
/* :global() pierces into the Button child's rendered <button> (see #1589).
|
|
209
|
-
|
|
210
|
-
:global(
|
|
211
|
-
width: 32px;
|
|
212
|
-
height: 32px;
|
|
213
|
-
padding: 0;
|
|
223
|
+
The ancestor is the Form primitive's <form>, also global. */
|
|
224
|
+
:global(:where([data-smrt-component="MiniChat"]) [data-smrt-component="Form"] [data-smrt-component="Button"]) {
|
|
214
225
|
background: var(--smrt-color-primary);
|
|
215
226
|
color: var(--smrt-color-on-primary);
|
|
216
227
|
border-radius: var(--smrt-radius-full);
|
|
217
|
-
flex-shrink: 0;
|
|
218
228
|
transition: opacity var(--smrt-duration-short2, 150ms);
|
|
219
229
|
}
|
|
220
|
-
|
|
221
|
-
:global(.mini-chat__input-bar .mini-chat__send-btn:disabled) {
|
|
230
|
+
:global(:where([data-smrt-component="MiniChat"]) [data-smrt-component="Form"] [data-smrt-component="Button"]:disabled) {
|
|
222
231
|
opacity: 0.4;
|
|
223
232
|
}
|
|
224
|
-
|
|
225
|
-
:global(.mini-chat__input-bar .mini-chat__send-btn:not(:disabled):hover) {
|
|
233
|
+
:global(:where([data-smrt-component="MiniChat"]) [data-smrt-component="Form"] [data-smrt-component="Button"]:not(:disabled):hover) {
|
|
226
234
|
background: var(--smrt-color-primary);
|
|
227
235
|
opacity: 0.85;
|
|
228
236
|
}
|
|
229
|
-
|
|
230
237
|
@media (prefers-reduced-motion: reduce) {
|
|
231
|
-
.mini-chat__messages {
|
|
238
|
+
.smrt-mini-chat__messages {
|
|
232
239
|
scroll-behavior: auto;
|
|
233
240
|
}
|
|
234
|
-
|
|
235
|
-
:global(.mini-chat__input-bar .mini-chat__send-btn) {
|
|
241
|
+
:global(:where([data-smrt-component="MiniChat"]) [data-smrt-component="Form"] [data-smrt-component="Button"]) {
|
|
236
242
|
transition: none;
|
|
237
243
|
}
|
|
238
244
|
}
|
|
239
245
|
}
|
|
246
|
+
|
|
240
247
|
</style>
|
package/dist/sveltekit.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as clientRequestMessageId, n as ChatService, t as ChatClientRequestConflictError } from "./chunks/ChatService-BGBAqmZq.js";
|
|
2
|
-
import { $ as isFallbackReply, D as createSessionContinuationStore, I as MAX_CLIENT_TOOL_RESULT_CHARS, N as FALLBACK_HISTORY_PLACEHOLDER, O as runAssistantTurn, T as createAssistantTurnResponse, X as buildManifestToolCatalog, at as sanitizeClientToolDeclarations, vt as chatUnavailableBody, y as ASSISTANT_TURN_GENERIC_ERROR, yt as chatUnconfiguredBody } from "./chunks/chat-stream-
|
|
2
|
+
import { $ as isFallbackReply, D as createSessionContinuationStore, I as MAX_CLIENT_TOOL_RESULT_CHARS, N as FALLBACK_HISTORY_PLACEHOLDER, O as runAssistantTurn, T as createAssistantTurnResponse, X as buildManifestToolCatalog, at as sanitizeClientToolDeclarations, vt as chatUnavailableBody, y as ASSISTANT_TURN_GENERIC_ERROR, yt as chatUnconfiguredBody } from "./chunks/chat-stream-Cl_kkuiU.js";
|
|
3
3
|
import { resolveInferenceTarget } from "@happyvertical/smrt-core";
|
|
4
4
|
import { getCurrentSessionPermissionContext, getRequestScopedDatabase } from "@happyvertical/smrt-users";
|
|
5
5
|
import { withTenant } from "@happyvertical/smrt-tenancy";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-chat",
|
|
3
|
-
"version": "0.60.
|
|
3
|
+
"version": "0.60.17",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Chat rooms, DMs, threads, and agent conversations for the SMRT framework",
|
|
6
6
|
"type": "module",
|
|
@@ -83,22 +83,22 @@
|
|
|
83
83
|
},
|
|
84
84
|
"dependencies": {
|
|
85
85
|
"@happyvertical/animation": "0.5.0",
|
|
86
|
-
"@happyvertical/ai": "^0.
|
|
87
|
-
"@happyvertical/speech": "^0.
|
|
88
|
-
"@happyvertical/smrt-images": "0.60.
|
|
89
|
-
"@happyvertical/smrt-agents": "0.60.
|
|
90
|
-
"@happyvertical/smrt-assets": "0.60.
|
|
91
|
-
"@happyvertical/smrt-config": "0.60.
|
|
92
|
-
"@happyvertical/smrt-core": "0.60.
|
|
93
|
-
"@happyvertical/smrt-personas": "0.60.
|
|
94
|
-
"@happyvertical/smrt-profiles": "0.60.
|
|
95
|
-
"@happyvertical/smrt-reports": "0.60.
|
|
96
|
-
"@happyvertical/smrt-tenancy": "0.60.
|
|
97
|
-
"@happyvertical/smrt-types": "0.60.
|
|
98
|
-
"@happyvertical/smrt-ui": "0.60.
|
|
99
|
-
"@happyvertical/smrt-users": "0.60.
|
|
100
|
-
"@happyvertical/sql": "^0.
|
|
101
|
-
"@happyvertical/images": "^0.
|
|
86
|
+
"@happyvertical/ai": "^0.112.2",
|
|
87
|
+
"@happyvertical/speech": "^0.112.2",
|
|
88
|
+
"@happyvertical/smrt-images": "0.60.17",
|
|
89
|
+
"@happyvertical/smrt-agents": "0.60.17",
|
|
90
|
+
"@happyvertical/smrt-assets": "0.60.17",
|
|
91
|
+
"@happyvertical/smrt-config": "0.60.17",
|
|
92
|
+
"@happyvertical/smrt-core": "0.60.17",
|
|
93
|
+
"@happyvertical/smrt-personas": "0.60.17",
|
|
94
|
+
"@happyvertical/smrt-profiles": "0.60.17",
|
|
95
|
+
"@happyvertical/smrt-reports": "0.60.17",
|
|
96
|
+
"@happyvertical/smrt-tenancy": "0.60.17",
|
|
97
|
+
"@happyvertical/smrt-types": "0.60.17",
|
|
98
|
+
"@happyvertical/smrt-ui": "0.60.17",
|
|
99
|
+
"@happyvertical/smrt-users": "0.60.17",
|
|
100
|
+
"@happyvertical/sql": "^0.112.2",
|
|
101
|
+
"@happyvertical/images": "^0.112.2",
|
|
102
102
|
"gsap": "^3.13.0"
|
|
103
103
|
},
|
|
104
104
|
"peerDependencies": {
|
|
@@ -110,10 +110,10 @@
|
|
|
110
110
|
}
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
|
-
"@happyvertical/smrt-playground": "0.60.
|
|
114
|
-
"@happyvertical/smrt-scanner": "0.60.
|
|
115
|
-
"@happyvertical/smrt-vitest": "0.60.
|
|
116
|
-
"@happyvertical/smrt-web": "0.60.
|
|
113
|
+
"@happyvertical/smrt-playground": "0.60.17",
|
|
114
|
+
"@happyvertical/smrt-scanner": "0.60.17",
|
|
115
|
+
"@happyvertical/smrt-vitest": "0.60.17",
|
|
116
|
+
"@happyvertical/smrt-web": "0.60.17",
|
|
117
117
|
"@mlc-ai/web-llm": "^0.2.85",
|
|
118
118
|
"bitgpu": "0.19.1",
|
|
119
119
|
"@sveltejs/kit": "2.69.1",
|