@burdenoff/fe-libs 2026.1018.1 → 2026.1019.2
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/chrome/AccountSwitcher.js +90 -89
- package/dist/chrome/Breadcrumbs.js +1 -1
- package/dist/chrome/CommandPalette.js +91 -90
- package/dist/chrome/Footer.js +31 -8
- package/dist/chrome/GlobalSearch.js +78 -77
- package/dist/chrome/HeaderBar.js +1 -1
- package/dist/chrome/HeaderThemeSwitcher.js +48 -47
- package/dist/chrome/LanguagePickerSheet.js +23 -22
- package/dist/chrome/NavCustomizeDialog.d.ts +0 -14
- package/dist/chrome/NavCustomizeDialog.js +114 -122
- package/dist/chrome/PanelTabs.js +45 -41
- package/dist/chrome/PersonaSurfaceControls.d.ts +0 -17
- package/dist/chrome/PersonaSurfaceControls.js +115 -118
- package/dist/chrome/PluginSettingsPage.js +29 -28
- package/dist/chrome/PluginWidgetGrid.js +19 -18
- package/dist/chrome/ProductPickerSheet.js +44 -47
- package/dist/chrome/ProductSwitcher.js +2 -6
- package/dist/chrome/ProfileSwitcher.js +6 -10
- package/dist/chrome/ShortcutHelpDialog.js +60 -65
- package/dist/chrome/SideNavigation.js +2 -2
- package/dist/chrome/Sidebar.js +44 -43
- package/dist/chrome/ThemePreferences.js +289 -267
- package/dist/chrome/contextSwitcher/EmptyState.js +31 -27
- package/dist/chrome/contextSwitcher/OrganizationList.js +40 -30
- package/dist/chrome/contextSwitcher/ProjectList.js +48 -44
- package/dist/chrome/contextSwitcher/SearchInput.js +44 -40
- package/dist/chrome/contextSwitcher/TriggerButton.js +2 -2
- package/dist/chrome/contextSwitcher/WorkspaceList.js +36 -32
- package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +128 -126
- package/dist/chrome/globalSearch/ResultsList.js +25 -27
- package/dist/chrome/globalSearch/SearchInput.js +16 -14
- package/dist/chrome/notificationCenter/NotificationCardItem.js +58 -47
- package/dist/chrome/notificationCenter/NotificationFilters.js +76 -62
- package/dist/chrome/notificationCenter/NotificationFooter.js +21 -21
- package/dist/chrome/notificationCenter/NotificationHeader.js +67 -63
- package/dist/chrome/notificationCenter/NotificationList.js +75 -71
- package/dist/chrome/notificationCenter/NotificationPanel.js +37 -33
- package/dist/chrome/notificationCenter/PushOptInToggle.js +33 -32
- package/dist/chrome/notificationCenter/constants.d.ts +6 -1
- package/dist/chrome/notificationCenter/constants.js +12 -11
- package/dist/chrome/useThemeOptionLabels.d.ts +33 -0
- package/dist/chrome/useThemeOptionLabels.js +39 -0
- package/dist/shared/assistant/conversation.d.ts +8 -0
- package/dist/shared/assistant/history/historyMapping.js +1 -1
- package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts +6 -6
- package/dist/shared/assistant/ui/AssistantMarkdownRenderer.js +86 -85
- package/dist/shared/assistant/ui/AssistantMessageItem.js +101 -96
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.d.ts +2 -0
- package/dist/shared/assistant/ui/AssistantWriteProposalCard.js +93 -89
- package/dist/shared/assistant/ui/WorkflowAssistantPanel.js +152 -140
- package/dist/shared/assistant/ui/useWriteProposals.js +122 -85
- package/dist/shared/assistant/writeProposalDiscovery.d.ts +3 -1
- package/dist/shared/assistant/writeProposalDiscovery.js +2 -2
- package/dist/shared/events/sinks/RybbitSink.js +2 -2
- package/dist/shared/providers/shell/interpolateShellLabel.d.ts +3 -0
- package/dist/shared/providers/shell/interpolateShellLabel.js +11 -0
- package/dist/shared/providers/shell/useAssistantShellLabels.d.ts +45 -0
- package/dist/shared/providers/shell/useAssistantShellLabels.js +54 -0
- package/dist/shared/tours/TourPlayer.js +33 -32
- package/dist/shared/tours/TourTooltip.js +108 -109
- package/dist/shared/tours/tourTrigger/MobileTourSheet.js +98 -85
- package/dist/shared/tours/tourTrigger/TourListItemDesktop.js +20 -18
- package/dist/shared/tours/tourTrigger/TourListItemMobile.js +23 -25
- package/dist/shared-assistant.js +188 -188
- package/package.json +2 -2
|
@@ -1,20 +1,34 @@
|
|
|
1
1
|
import { useVoiceInput as e } from "../voice/useVoiceInput.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { useWorkflowAssistantLabels as t } from "../../providers/shell/useAssistantShellLabels.js";
|
|
3
|
+
import { getSpeechEngine as n, subscribeSpeechEngine as r } from "../speech/createSpeechEngine.js";
|
|
4
|
+
import { chunkForSpeech as i, toSpeakableText as a } from "../voice/speakableText.js";
|
|
5
|
+
import { AssistantWorkflowClient as o, isWorkflowAssistantAdmissionRefusal as ee } from "../workflowApi.js";
|
|
6
|
+
import { useCallback as te, useEffect as s, useRef as c, useState as l, useSyncExternalStore as ne } from "react";
|
|
7
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
7
8
|
//#region src/shared/assistant/ui/WorkflowAssistantPanel.tsx
|
|
8
|
-
function
|
|
9
|
+
function f(e) {
|
|
9
10
|
let t = e.target.kind === "botmanor" ? e.target.agentId : e.target.courseId;
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ u(p, { ...e }, `${e.context.workspaceId}:${e.ownerId}:${e.target.kind}:${t}`);
|
|
11
12
|
}
|
|
12
|
-
function
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
function p({ target: f, context: p, ownerId: m, title: re, description: h, client: ie, voiceLanguage: ae }) {
|
|
14
|
+
let g = t(), _ = re ?? g.title, oe = {
|
|
15
|
+
savedPending: g.savedPending,
|
|
16
|
+
conversationUnavailable: g.conversationUnavailable,
|
|
17
|
+
historyUnavailable: g.historyUnavailable,
|
|
18
|
+
olderUnavailable: g.olderUnavailable,
|
|
19
|
+
audioUnavailable: g.audioUnavailable,
|
|
20
|
+
unknownTurn: g.unknownTurn,
|
|
21
|
+
cancelledTurn: g.cancelledTurn,
|
|
22
|
+
failedTurn: g.failedTurn,
|
|
23
|
+
answerPending: g.answerPending,
|
|
24
|
+
admissionRefused: g.admissionRefused,
|
|
25
|
+
interrupted: g.interrupted,
|
|
26
|
+
cancelUnconfirmed: g.cancelUnconfirmed
|
|
27
|
+
}, v = c(ie ?? new o()), y = c(crypto.randomUUID()), se = c({
|
|
28
|
+
target: f,
|
|
29
|
+
context: p,
|
|
30
|
+
ownerId: m
|
|
31
|
+
}), b = c(null), [x, S] = l(!0), [C, w] = l(!1), T = c(null), E = c(!1), D = c(!1), [O, k] = l(!1), [A, j] = l([]), [M, N] = l(""), [ce, P] = l(null), [F, I] = l(!1), [L, R] = l(null), [z, B] = l(!1), [V, H] = l(null), [U, W] = l(null), G = te((e) => {
|
|
18
32
|
if (P(null), I(!!e?.turns.length), !e) {
|
|
19
33
|
y.current = crypto.randomUUID(), j([]), H(null);
|
|
20
34
|
return;
|
|
@@ -31,8 +45,8 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
|
|
|
31
45
|
e.pending && t.push({
|
|
32
46
|
input: e.pending,
|
|
33
47
|
receipt: null
|
|
34
|
-
}), j(t), H(e.pending), e.pending && W("
|
|
35
|
-
}, []), K =
|
|
48
|
+
}), j(t), H(e.pending), e.pending && W("savedPending");
|
|
49
|
+
}, []), K = te(async (e, t, n = null) => {
|
|
36
50
|
let r = new AbortController();
|
|
37
51
|
b.current?.abort(), b.current = r, S(!0), w(!1), W(null);
|
|
38
52
|
try {
|
|
@@ -43,13 +57,13 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
|
|
|
43
57
|
if (n !== null && i === null) throw Error("Conversation unavailable");
|
|
44
58
|
r.signal.aborted || G(i);
|
|
45
59
|
} catch {
|
|
46
|
-
r.signal.aborted || (w(!0), W("
|
|
60
|
+
r.signal.aborted || (w(!0), W("conversationUnavailable"));
|
|
47
61
|
} finally {
|
|
48
62
|
b.current === r && !r.signal.aborted && S(!1);
|
|
49
63
|
}
|
|
50
64
|
}, [G]);
|
|
51
|
-
|
|
52
|
-
let e =
|
|
65
|
+
s(() => {
|
|
66
|
+
let e = se.current;
|
|
53
67
|
return e.context.workspaceId && e.ownerId ? K(e.target, e.context) : S(!1), () => b.current?.abort();
|
|
54
68
|
}, [K]);
|
|
55
69
|
let q = async (e = null) => {
|
|
@@ -57,8 +71,8 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
|
|
|
57
71
|
let t = new AbortController();
|
|
58
72
|
b.current?.abort(), b.current = t, S(!0);
|
|
59
73
|
try {
|
|
60
|
-
let n = await v.current.conversations(
|
|
61
|
-
...
|
|
74
|
+
let n = await v.current.conversations(f, {
|
|
75
|
+
...p,
|
|
62
76
|
signal: t.signal
|
|
63
77
|
}, e);
|
|
64
78
|
t.signal.aborted || R((t) => ({
|
|
@@ -66,21 +80,21 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
|
|
|
66
80
|
nextCursor: n.nextCursor
|
|
67
81
|
}));
|
|
68
82
|
} catch {
|
|
69
|
-
t.signal.aborted || W("
|
|
83
|
+
t.signal.aborted || W("historyUnavailable");
|
|
70
84
|
} finally {
|
|
71
85
|
!t.signal.aborted && b.current === t && S(!1);
|
|
72
86
|
}
|
|
73
|
-
},
|
|
87
|
+
}, le = async () => {
|
|
74
88
|
if (E.current || D.current || x || V || $.isActive || !F || A.length >= 200) return;
|
|
75
89
|
let e = new AbortController();
|
|
76
90
|
b.current?.abort(), b.current = e;
|
|
77
91
|
let t = y.current;
|
|
78
92
|
S(!0);
|
|
79
93
|
try {
|
|
80
|
-
let n = await v.current.messages(
|
|
81
|
-
...
|
|
94
|
+
let n = await v.current.messages(f, {
|
|
95
|
+
...p,
|
|
82
96
|
signal: e.signal
|
|
83
|
-
}, t,
|
|
97
|
+
}, t, ce);
|
|
84
98
|
!e.signal.aborted && t === y.current && (j((e) => [...n.turns.filter((t) => !e.some((e) => e.input.clientTurnId === t.receipt.clientTurnId)).map((e) => ({
|
|
85
99
|
input: {
|
|
86
100
|
clientTurnId: e.receipt.clientTurnId,
|
|
@@ -90,21 +104,21 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
|
|
|
90
104
|
receipt: e.receipt
|
|
91
105
|
})), ...e]), P(n.nextCursor), I(n.nextCursor !== null));
|
|
92
106
|
} catch {
|
|
93
|
-
e.signal.aborted || W("
|
|
107
|
+
e.signal.aborted || W("olderUnavailable");
|
|
94
108
|
} finally {
|
|
95
109
|
!e.signal.aborted && b.current === e && S(!1);
|
|
96
110
|
}
|
|
97
|
-
}, J =
|
|
98
|
-
language:
|
|
111
|
+
}, J = c(null), Y = ne(r, n, n), X = c(!1), Z = c(0), [ue, Q] = l(!1), $ = e({
|
|
112
|
+
language: ae,
|
|
99
113
|
onFinalize: (e) => N((t) => `${t}${t.trim() ? " " : ""}${e}`.slice(0, 8192))
|
|
100
114
|
});
|
|
101
|
-
|
|
115
|
+
s(() => () => {
|
|
102
116
|
X.current && (Z.current += 1, X.current = !1, Y.cancel());
|
|
103
117
|
}, [Y]);
|
|
104
|
-
let
|
|
118
|
+
let de = (e) => {
|
|
105
119
|
if ($.isActive) return;
|
|
106
120
|
let t = ++Z.current;
|
|
107
|
-
X.current = !0, Q(!0), Y.speak(
|
|
121
|
+
X.current = !0, Q(!0), Y.speak(i(a(e)), {
|
|
108
122
|
voice: null,
|
|
109
123
|
lang: $.language
|
|
110
124
|
}, {
|
|
@@ -112,46 +126,46 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
|
|
|
112
126
|
t === Z.current && (X.current = !1, Q(!1));
|
|
113
127
|
},
|
|
114
128
|
onError: (e) => {
|
|
115
|
-
t === Z.current && (X.current = !1, Q(!1), e !== "cancelled" && W("
|
|
129
|
+
t === Z.current && (X.current = !1, Q(!1), e !== "cancelled" && W("audioUnavailable"));
|
|
116
130
|
}
|
|
117
131
|
});
|
|
118
|
-
},
|
|
132
|
+
}, fe = () => {
|
|
119
133
|
X.current && Y.cancel(), $.toggle();
|
|
120
134
|
};
|
|
121
|
-
|
|
135
|
+
s(() => () => T.current?.abort(), []), s(() => {
|
|
122
136
|
J.current?.scrollTo({
|
|
123
137
|
top: J.current.scrollHeight,
|
|
124
138
|
behavior: "smooth"
|
|
125
139
|
});
|
|
126
140
|
}, [A, z]);
|
|
127
|
-
let
|
|
141
|
+
let pe = (e, t) => {
|
|
128
142
|
j((n) => n.map((n) => n.input.clientTurnId === e.clientTurnId ? {
|
|
129
143
|
...n,
|
|
130
144
|
receipt: t
|
|
131
145
|
} : n));
|
|
132
|
-
},
|
|
133
|
-
if (E.current || D.current || !
|
|
146
|
+
}, me = async (e, t = !1) => {
|
|
147
|
+
if (E.current || D.current || !p.workspaceId || !m) return;
|
|
134
148
|
E.current = !0, B(!0), W(null), H(e);
|
|
135
149
|
let n = new AbortController();
|
|
136
150
|
T.current = n;
|
|
137
151
|
let r = {
|
|
138
|
-
...
|
|
152
|
+
...p,
|
|
139
153
|
signal: n.signal
|
|
140
154
|
}, i = !0;
|
|
141
155
|
try {
|
|
142
|
-
let a = t ? await v.current.read(
|
|
143
|
-
(!a || a.status === "READY") && await v.current.start(
|
|
144
|
-
let o = await v.current.wait(
|
|
145
|
-
n.signal.aborted ||
|
|
156
|
+
let a = t ? await v.current.read(f, e.clientTurnId, r) : null;
|
|
157
|
+
(!a || a.status === "READY") && await v.current.start(f, e, r), i = !1;
|
|
158
|
+
let o = await v.current.wait(f, e.clientTurnId, r, { onProgress: (t) => {
|
|
159
|
+
n.signal.aborted || pe(e, t);
|
|
146
160
|
} });
|
|
147
161
|
if (n.signal.aborted) return;
|
|
148
|
-
o.kind === "completed" ? H(null) : o.kind === "terminal" ? (H(null), W(o.receipt.status === "UNKNOWN" ? "
|
|
162
|
+
o.kind === "completed" ? H(null) : o.kind === "terminal" ? (H(null), W(o.receipt.status === "UNKNOWN" ? "unknownTurn" : o.receipt.status === "CANCELLED" ? "cancelledTurn" : "failedTurn")) : W("answerPending");
|
|
149
163
|
} catch (e) {
|
|
150
|
-
n.signal.aborted || (i &&
|
|
164
|
+
n.signal.aborted || (i && ee(e) ? (H(null), W("admissionRefused")) : W("interrupted"));
|
|
151
165
|
} finally {
|
|
152
166
|
T.current === n && (T.current = null, E.current = !1, B(!1));
|
|
153
167
|
}
|
|
154
|
-
},
|
|
168
|
+
}, he = () => {
|
|
155
169
|
if (x || C || !M.trim() || E.current || D.current || $.isActive || V || M.length > 8192) return;
|
|
156
170
|
X.current && Y.cancel();
|
|
157
171
|
let e = {
|
|
@@ -162,13 +176,13 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
|
|
|
162
176
|
j((t) => [...t, {
|
|
163
177
|
input: e,
|
|
164
178
|
receipt: null
|
|
165
|
-
}]), N(""),
|
|
166
|
-
},
|
|
179
|
+
}]), N(""), me(e);
|
|
180
|
+
}, ge = async () => {
|
|
167
181
|
let e = V;
|
|
168
182
|
if (!(!e || D.current)) {
|
|
169
183
|
D.current = !0, k(!0), T.current?.abort();
|
|
170
184
|
try {
|
|
171
|
-
await v.current.cancel(e.clientTurnId,
|
|
185
|
+
await v.current.cancel(e.clientTurnId, p) ? (j((t) => t.map((t) => t.input.clientTurnId === e.clientTurnId && t.receipt ? {
|
|
172
186
|
...t,
|
|
173
187
|
receipt: {
|
|
174
188
|
...t.receipt,
|
|
@@ -176,243 +190,241 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
|
|
|
176
190
|
partialMessage: null,
|
|
177
191
|
result: null
|
|
178
192
|
}
|
|
179
|
-
} : t)), H(null), W("
|
|
193
|
+
} : t)), H(null), W("cancelledTurn")) : W("cancelUnconfirmed");
|
|
180
194
|
} catch {
|
|
181
|
-
W("
|
|
195
|
+
W("cancelUnconfirmed");
|
|
182
196
|
} finally {
|
|
183
197
|
D.current = !1, k(!1);
|
|
184
198
|
}
|
|
185
199
|
}
|
|
186
200
|
};
|
|
187
|
-
return /* @__PURE__ */
|
|
188
|
-
"aria-label":
|
|
201
|
+
return /* @__PURE__ */ d("section", {
|
|
202
|
+
"aria-label": _,
|
|
189
203
|
className: "flex flex-col overflow-hidden rounded-xl border border-border-seam bg-bg-surface",
|
|
190
204
|
children: [
|
|
191
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ d("header", {
|
|
192
206
|
className: "border-b border-border-seam px-4 py-3",
|
|
193
207
|
children: [
|
|
194
|
-
/* @__PURE__ */
|
|
208
|
+
/* @__PURE__ */ u("h2", {
|
|
195
209
|
className: "text-sm font-semibold text-text-primary",
|
|
196
|
-
children:
|
|
210
|
+
children: _
|
|
197
211
|
}),
|
|
198
|
-
|
|
212
|
+
h && /* @__PURE__ */ u("p", {
|
|
199
213
|
className: "text-xs text-text-secondary",
|
|
200
|
-
children:
|
|
214
|
+
children: h
|
|
201
215
|
}),
|
|
202
|
-
/* @__PURE__ */
|
|
216
|
+
/* @__PURE__ */ d("div", {
|
|
203
217
|
className: "mt-2 flex flex-wrap gap-2",
|
|
204
|
-
children: [/* @__PURE__ */
|
|
218
|
+
children: [/* @__PURE__ */ u("button", {
|
|
205
219
|
type: "button",
|
|
206
|
-
disabled: x || z || O || !!V || $.isActive || !
|
|
220
|
+
disabled: x || z || O || !!V || $.isActive || !p.workspaceId || !m,
|
|
207
221
|
onClick: () => {
|
|
208
222
|
b.current?.abort(), X.current && Y.cancel(), G(null), N(""), W(null), w(!1), R(null);
|
|
209
223
|
},
|
|
210
224
|
className: "rounded-lg border border-border-seam px-2 py-1 text-xs",
|
|
211
|
-
children:
|
|
212
|
-
}), /* @__PURE__ */
|
|
225
|
+
children: g.newChat
|
|
226
|
+
}), /* @__PURE__ */ u("button", {
|
|
213
227
|
type: "button",
|
|
214
|
-
disabled: x || z || O || !!V || $.isActive || !
|
|
228
|
+
disabled: x || z || O || !!V || $.isActive || !p.workspaceId || !m,
|
|
215
229
|
onClick: () => void q(),
|
|
216
230
|
className: "rounded-lg border border-border-seam px-2 py-1 text-xs",
|
|
217
|
-
children:
|
|
231
|
+
children: g.savedConversations
|
|
218
232
|
})]
|
|
219
233
|
}),
|
|
220
|
-
L && /* @__PURE__ */
|
|
221
|
-
"aria-label":
|
|
234
|
+
L && /* @__PURE__ */ d("nav", {
|
|
235
|
+
"aria-label": g.savedAssistantConversations,
|
|
222
236
|
className: "mt-2 max-h-40 overflow-auto",
|
|
223
237
|
children: [
|
|
224
|
-
/* @__PURE__ */
|
|
238
|
+
/* @__PURE__ */ u("ul", { children: L.nodes.map((e) => /* @__PURE__ */ u("li", { children: /* @__PURE__ */ u("button", {
|
|
225
239
|
type: "button",
|
|
226
240
|
disabled: x || z || O || !!V || $.isActive,
|
|
227
241
|
"aria-current": e.clientConversationId === y.current ? "true" : void 0,
|
|
228
242
|
onClick: () => {
|
|
229
|
-
X.current && Y.cancel(), N(""), K(
|
|
243
|
+
X.current && Y.cancel(), N(""), K(f, p, e.clientConversationId);
|
|
230
244
|
},
|
|
231
245
|
className: "rounded-lg px-2 py-1 text-xs",
|
|
232
246
|
children: new Date(e.createdAt).toLocaleString()
|
|
233
247
|
}) }, e.clientConversationId)) }),
|
|
234
|
-
L.nodes.length === 0 && /* @__PURE__ */
|
|
248
|
+
L.nodes.length === 0 && /* @__PURE__ */ u("p", {
|
|
235
249
|
className: "text-xs",
|
|
236
|
-
children:
|
|
250
|
+
children: g.noSavedConversations
|
|
237
251
|
}),
|
|
238
|
-
L.nextCursor && /* @__PURE__ */
|
|
252
|
+
L.nextCursor && /* @__PURE__ */ u("button", {
|
|
239
253
|
type: "button",
|
|
240
254
|
disabled: x || z || O || !!V || $.isActive,
|
|
241
255
|
onClick: () => void q(L.nextCursor),
|
|
242
256
|
className: "rounded-lg border border-border-seam px-2 py-1 text-xs",
|
|
243
|
-
children:
|
|
257
|
+
children: g.loadOlderConversations
|
|
244
258
|
})
|
|
245
259
|
]
|
|
246
260
|
})
|
|
247
261
|
]
|
|
248
262
|
}),
|
|
249
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ d("div", {
|
|
250
264
|
ref: J,
|
|
251
265
|
role: "log",
|
|
252
|
-
"aria-label":
|
|
266
|
+
"aria-label": g.assistantConversation,
|
|
253
267
|
"aria-live": "polite",
|
|
254
268
|
className: "max-h-96 min-h-40 overflow-y-auto p-4",
|
|
255
269
|
children: [
|
|
256
|
-
x && /* @__PURE__ */
|
|
270
|
+
x && /* @__PURE__ */ u("p", {
|
|
257
271
|
role: "status",
|
|
258
272
|
className: "text-sm text-text-secondary",
|
|
259
|
-
children:
|
|
273
|
+
children: g.loadingYourConversation
|
|
260
274
|
}),
|
|
261
|
-
!x && A.length === 0 && /* @__PURE__ */
|
|
275
|
+
!x && A.length === 0 && /* @__PURE__ */ u("p", {
|
|
262
276
|
className: "text-sm text-text-secondary",
|
|
263
|
-
children:
|
|
277
|
+
children: g.emptyHint
|
|
264
278
|
}),
|
|
265
|
-
F && A.length < 200 && /* @__PURE__ */
|
|
279
|
+
F && A.length < 200 && /* @__PURE__ */ u("button", {
|
|
266
280
|
type: "button",
|
|
267
|
-
onClick: () => void
|
|
281
|
+
onClick: () => void le(),
|
|
268
282
|
disabled: x || z || O || !!V || $.isActive,
|
|
269
283
|
className: "mb-4 text-sm underline",
|
|
270
|
-
children:
|
|
284
|
+
children: g.loadOlderMessages
|
|
271
285
|
}),
|
|
272
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ u("ol", {
|
|
273
287
|
className: "space-y-4",
|
|
274
|
-
children: A.map((e) => /* @__PURE__ */
|
|
275
|
-
/* @__PURE__ */
|
|
288
|
+
children: A.map((e) => /* @__PURE__ */ d("li", { children: [
|
|
289
|
+
/* @__PURE__ */ u("p", {
|
|
276
290
|
className: "text-xs font-semibold text-text-primary",
|
|
277
|
-
children:
|
|
291
|
+
children: g.you
|
|
278
292
|
}),
|
|
279
|
-
/* @__PURE__ */
|
|
293
|
+
/* @__PURE__ */ u("p", {
|
|
280
294
|
className: "whitespace-pre-wrap break-words text-sm text-text-secondary",
|
|
281
295
|
children: e.input.message
|
|
282
296
|
}),
|
|
283
|
-
e.receipt?.status === "RUNNING" && e.receipt.partialMessage && /* @__PURE__ */
|
|
297
|
+
e.receipt?.status === "RUNNING" && e.receipt.partialMessage && /* @__PURE__ */ d("div", {
|
|
284
298
|
className: "mt-3",
|
|
285
|
-
children: [/* @__PURE__ */
|
|
299
|
+
children: [/* @__PURE__ */ u("p", {
|
|
286
300
|
className: "text-xs text-text-secondary",
|
|
287
|
-
children:
|
|
288
|
-
}), /* @__PURE__ */
|
|
301
|
+
children: g.generatingAnswer
|
|
302
|
+
}), /* @__PURE__ */ u("p", {
|
|
289
303
|
className: "whitespace-pre-wrap break-words text-sm text-text-secondary",
|
|
290
304
|
children: e.receipt.partialMessage
|
|
291
305
|
})]
|
|
292
306
|
}),
|
|
293
|
-
e.receipt?.status === "COMPLETED" && e.receipt.result && /* @__PURE__ */
|
|
307
|
+
e.receipt?.status === "COMPLETED" && e.receipt.result && /* @__PURE__ */ d("div", {
|
|
294
308
|
className: "mt-3",
|
|
295
309
|
children: [
|
|
296
|
-
/* @__PURE__ */
|
|
310
|
+
/* @__PURE__ */ u("p", {
|
|
297
311
|
className: "text-xs font-semibold text-text-primary",
|
|
298
|
-
children:
|
|
312
|
+
children: _
|
|
299
313
|
}),
|
|
300
|
-
/* @__PURE__ */
|
|
314
|
+
/* @__PURE__ */ u("p", {
|
|
301
315
|
className: "whitespace-pre-wrap break-words text-sm text-text-secondary",
|
|
302
316
|
children: e.receipt.result.message
|
|
303
317
|
}),
|
|
304
|
-
Y.isSupported() && /* @__PURE__ */
|
|
318
|
+
Y.isSupported() && /* @__PURE__ */ u("button", {
|
|
305
319
|
type: "button",
|
|
306
320
|
onClick: () => {
|
|
307
321
|
let t = e.receipt?.result;
|
|
308
|
-
t &&
|
|
322
|
+
t && de(t.message);
|
|
309
323
|
},
|
|
310
324
|
disabled: $.isActive,
|
|
311
325
|
className: "mt-2 rounded-lg border border-border-seam px-2 py-1 text-xs",
|
|
312
|
-
children:
|
|
326
|
+
children: g.readAnswerAloud
|
|
313
327
|
}),
|
|
314
|
-
e.receipt.result.sources.length > 0 && /* @__PURE__ */
|
|
315
|
-
"aria-label":
|
|
328
|
+
e.receipt.result.sources.length > 0 && /* @__PURE__ */ u("ul", {
|
|
329
|
+
"aria-label": g.answerSources,
|
|
316
330
|
className: "mt-2 space-y-1 text-xs text-text-secondary",
|
|
317
|
-
children: e.receipt.result.sources.map((e) => /* @__PURE__ */
|
|
331
|
+
children: e.receipt.result.sources.map((e) => /* @__PURE__ */ u("li", {
|
|
318
332
|
title: e.documentId,
|
|
319
|
-
children:
|
|
320
|
-
|
|
321
|
-
e.
|
|
322
|
-
|
|
323
|
-
e.documentId
|
|
324
|
-
]
|
|
333
|
+
children: g.sourceReference({
|
|
334
|
+
reference: e.reference,
|
|
335
|
+
documentId: e.documentId
|
|
336
|
+
})
|
|
325
337
|
}, `${e.reference}:${e.chunkId}`))
|
|
326
338
|
})
|
|
327
339
|
]
|
|
328
340
|
})
|
|
329
341
|
] }, e.input.clientTurnId))
|
|
330
342
|
}),
|
|
331
|
-
z && /* @__PURE__ */
|
|
343
|
+
z && /* @__PURE__ */ u("p", {
|
|
332
344
|
role: "status",
|
|
333
345
|
className: "mt-3 text-sm text-text-secondary",
|
|
334
|
-
children:
|
|
346
|
+
children: g.preparingYourAnswer
|
|
335
347
|
})
|
|
336
348
|
]
|
|
337
349
|
}),
|
|
338
|
-
/* @__PURE__ */
|
|
350
|
+
/* @__PURE__ */ d("div", {
|
|
339
351
|
className: "border-t border-border-seam p-3",
|
|
340
352
|
children: [
|
|
341
|
-
$.interim && /* @__PURE__ */
|
|
353
|
+
$.interim && /* @__PURE__ */ u("p", {
|
|
342
354
|
role: "status",
|
|
343
355
|
className: "mb-2 text-sm text-text-secondary",
|
|
344
356
|
children: $.interim
|
|
345
357
|
}),
|
|
346
|
-
$.error && /* @__PURE__ */
|
|
358
|
+
$.error && /* @__PURE__ */ u("p", {
|
|
347
359
|
role: "status",
|
|
348
360
|
className: "mb-2 text-sm text-text-secondary",
|
|
349
|
-
children:
|
|
361
|
+
children: g.dictationUnavailable
|
|
350
362
|
}),
|
|
351
|
-
U && /* @__PURE__ */
|
|
363
|
+
U && /* @__PURE__ */ u("p", {
|
|
352
364
|
role: "status",
|
|
353
365
|
className: "mb-2 text-sm text-text-secondary",
|
|
354
|
-
children: U
|
|
366
|
+
children: oe[U]
|
|
355
367
|
}),
|
|
356
|
-
/* @__PURE__ */
|
|
368
|
+
/* @__PURE__ */ u("label", {
|
|
357
369
|
className: "sr-only",
|
|
358
370
|
htmlFor: `assistant-question-${y.current}`,
|
|
359
|
-
children:
|
|
371
|
+
children: g.question
|
|
360
372
|
}),
|
|
361
|
-
/* @__PURE__ */
|
|
373
|
+
/* @__PURE__ */ u("textarea", {
|
|
362
374
|
id: `assistant-question-${y.current}`,
|
|
363
375
|
value: M,
|
|
364
376
|
onChange: (e) => N(e.target.value),
|
|
365
377
|
onKeyDown: (e) => {
|
|
366
|
-
e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing && (e.preventDefault(),
|
|
378
|
+
e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing && (e.preventDefault(), he());
|
|
367
379
|
},
|
|
368
380
|
maxLength: 8192,
|
|
369
381
|
rows: 2,
|
|
370
|
-
placeholder:
|
|
371
|
-
disabled: x || C || z || O || !!V || !
|
|
382
|
+
placeholder: g.askAQuestion,
|
|
383
|
+
disabled: x || C || z || O || !!V || !p.workspaceId || !m,
|
|
372
384
|
className: "w-full rounded-lg border border-border-seam bg-bg-sunken p-2 text-sm text-text-primary"
|
|
373
385
|
}),
|
|
374
|
-
/* @__PURE__ */
|
|
386
|
+
/* @__PURE__ */ d("div", {
|
|
375
387
|
className: "mt-2 flex flex-wrap justify-end gap-2",
|
|
376
388
|
children: [
|
|
377
|
-
$.isSupported && /* @__PURE__ */
|
|
389
|
+
$.isSupported && /* @__PURE__ */ u("button", {
|
|
378
390
|
type: "button",
|
|
379
|
-
onClick:
|
|
391
|
+
onClick: fe,
|
|
380
392
|
disabled: x || C || z || O || !!V,
|
|
381
393
|
"aria-pressed": $.isActive,
|
|
382
394
|
className: "rounded-lg border border-border-seam px-3 py-2 text-sm",
|
|
383
|
-
children: $.isActive ?
|
|
395
|
+
children: $.isActive ? g.stopDictation : g.dictateQuestion
|
|
384
396
|
}),
|
|
385
|
-
|
|
397
|
+
ue && /* @__PURE__ */ u("button", {
|
|
386
398
|
type: "button",
|
|
387
399
|
onClick: () => Y.cancel(),
|
|
388
400
|
className: "rounded-lg border border-border-seam px-3 py-2 text-sm",
|
|
389
|
-
children:
|
|
401
|
+
children: g.stopAudio
|
|
390
402
|
}),
|
|
391
|
-
C && !x && /* @__PURE__ */
|
|
403
|
+
C && !x && /* @__PURE__ */ u("button", {
|
|
392
404
|
type: "button",
|
|
393
|
-
onClick: () => void K(
|
|
405
|
+
onClick: () => void K(f, p),
|
|
394
406
|
className: "rounded-lg border border-border-seam px-3 py-2 text-sm",
|
|
395
|
-
children:
|
|
407
|
+
children: g.reloadConversation
|
|
396
408
|
}),
|
|
397
|
-
V && !z && !O && /* @__PURE__ */
|
|
409
|
+
V && !z && !O && /* @__PURE__ */ u("button", {
|
|
398
410
|
type: "button",
|
|
399
|
-
onClick: () => void
|
|
411
|
+
onClick: () => void me(V, !0),
|
|
400
412
|
className: "rounded-lg border border-border-seam px-3 py-2 text-sm",
|
|
401
|
-
children:
|
|
413
|
+
children: g.recoverTurn
|
|
402
414
|
}),
|
|
403
|
-
V && /* @__PURE__ */
|
|
415
|
+
V && /* @__PURE__ */ u("button", {
|
|
404
416
|
type: "button",
|
|
405
|
-
onClick: () => void
|
|
417
|
+
onClick: () => void ge(),
|
|
406
418
|
disabled: O,
|
|
407
419
|
className: "rounded-lg border border-border-seam px-3 py-2 text-sm",
|
|
408
|
-
children:
|
|
420
|
+
children: g.cancelTurn
|
|
409
421
|
}),
|
|
410
|
-
/* @__PURE__ */
|
|
422
|
+
/* @__PURE__ */ u("button", {
|
|
411
423
|
type: "button",
|
|
412
|
-
onClick:
|
|
413
|
-
disabled: !M.trim() || $.isActive || O || x || C || z || !!V || !
|
|
424
|
+
onClick: he,
|
|
425
|
+
disabled: !M.trim() || $.isActive || O || x || C || z || !!V || !p.workspaceId || !m,
|
|
414
426
|
className: "rounded-lg bg-[var(--color-accent-soft)] px-3 py-2 text-sm disabled:opacity-50",
|
|
415
|
-
children:
|
|
427
|
+
children: g.ask
|
|
416
428
|
})
|
|
417
429
|
]
|
|
418
430
|
})
|
|
@@ -422,4 +434,4 @@ function m({ target: p, context: m, ownerId: h, title: g = "AI assistant", descr
|
|
|
422
434
|
});
|
|
423
435
|
}
|
|
424
436
|
//#endregion
|
|
425
|
-
export {
|
|
437
|
+
export { f as WorkflowAssistantPanel };
|