@burdenoff/fe-libs 2026.1017.12 → 2026.1019.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/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/WorkflowAssistantPanel.js +152 -140
- package/dist/shared/events/sinks/RybbitSink.js +2 -2
- package/dist/shared/providers/shell/authProvider/useAuthActions.d.ts +19 -0
- package/dist/shared/providers/shell/authProvider/useAuthActions.js +97 -91
- 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/package.json +3 -3
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { resolveGatewayUrls as e } from "../../../config/gatewayUrls.js";
|
|
2
|
-
import { addProfile as t,
|
|
3
|
-
import { clearShellSsoCookies as
|
|
4
|
-
import { getAuthBridge as
|
|
5
|
-
import { getCrossOriginLogoutUrl as
|
|
6
|
-
import { getJwtExpiry as
|
|
7
|
-
import { useCallback as
|
|
2
|
+
import { addProfile as t, getActiveProfileId as n, getProfileTokens as r, getProfileUser as i, getProfileWorkspaceToken as a, getProfiles as o, loginProfile as s, logoutAllProfiles as c, removeProfile as l, resolveActiveProfileId as u, setProfileTokens as d, setProfileUser as f, setProfileWorkspaceToken as p, switchProfile as m } from "../ProfileStorageManager.js";
|
|
3
|
+
import { clearShellSsoCookies as h, setShellSsoCookies as g } from "../../../utils/authCookie.js";
|
|
4
|
+
import { getAuthBridge as _ } from "../AuthBridgeClient.js";
|
|
5
|
+
import { getCrossOriginLogoutUrl as v } from "./ssoRelay.js";
|
|
6
|
+
import { getJwtExpiry as y } from "./jwt.js";
|
|
7
|
+
import { useCallback as b } from "react";
|
|
8
8
|
//#region src/shared/providers/shell/authProvider/useAuthActions.ts
|
|
9
|
-
function
|
|
9
|
+
function x(t) {
|
|
10
10
|
if (t) try {
|
|
11
11
|
let { globalBaseUrl: n } = e();
|
|
12
12
|
if (!n) return;
|
|
@@ -21,164 +21,170 @@ function b(t) {
|
|
|
21
21
|
}).catch(() => {});
|
|
22
22
|
} catch {}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
function S(e, t, i) {
|
|
25
|
+
if (e) return e;
|
|
26
|
+
if (t?.accessToken) return t.accessToken;
|
|
27
|
+
let a = i ?? n();
|
|
28
|
+
return (a ? r(a)?.accessToken : void 0) || void 0;
|
|
29
|
+
}
|
|
30
|
+
function C({ user: e, tokens: n, activeId: C, bridgeSyncInProgress: w, onRefreshToken: T, onTokenExpired: E, setActiveId: D, setUser: O, setTokens: k, setWorkspaceTokenLocal: A, setMfaRequiredState: j, setMfaChallengeIdState: M, setIsLoading: N, clearAccounts: P, refreshAccounts: F }) {
|
|
31
|
+
let I = b((e, t, n) => {
|
|
32
|
+
let r = y(t) ?? Date.now() + 3600 * 1e3, i = {
|
|
27
33
|
accessToken: t,
|
|
28
34
|
refreshToken: n,
|
|
29
35
|
expiresAt: r
|
|
30
|
-
},
|
|
31
|
-
|
|
36
|
+
}, a = s(e, i);
|
|
37
|
+
D(a), O(e), k(i), A(null), j(!1), M(null), F();
|
|
32
38
|
try {
|
|
33
|
-
|
|
39
|
+
g(a, window.location.origin);
|
|
34
40
|
} catch {}
|
|
35
|
-
|
|
41
|
+
w.current || _()?.notifyLogin({
|
|
36
42
|
user: e,
|
|
37
43
|
tokens: {
|
|
38
44
|
accessToken: t,
|
|
39
45
|
refreshToken: n,
|
|
40
46
|
expiresAt: r
|
|
41
47
|
},
|
|
42
|
-
activeAccountId:
|
|
43
|
-
activeProfileId:
|
|
44
|
-
profiles:
|
|
48
|
+
activeAccountId: a,
|
|
49
|
+
activeProfileId: a,
|
|
50
|
+
profiles: o()
|
|
45
51
|
});
|
|
46
52
|
}, [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
E,
|
|
53
|
+
F,
|
|
54
|
+
w,
|
|
50
55
|
D,
|
|
51
56
|
O,
|
|
52
57
|
k,
|
|
53
58
|
A,
|
|
54
|
-
j
|
|
55
|
-
|
|
59
|
+
j,
|
|
60
|
+
M
|
|
61
|
+
]), L = b((e) => {
|
|
56
62
|
let t = e?.authoritative !== !1;
|
|
57
|
-
t && !
|
|
58
|
-
let
|
|
59
|
-
|
|
63
|
+
t && !w.current && x(S(e?.accessToken, n, C)), C && l(C);
|
|
64
|
+
let o = u();
|
|
65
|
+
o ? (D(o), O(i(o)), k(r(o)), A(a(o))) : (D(null), O(null), k(null), A(null)), j(!1), M(null), F();
|
|
60
66
|
try {
|
|
61
|
-
|
|
67
|
+
h();
|
|
62
68
|
} catch {}
|
|
63
|
-
|
|
64
|
-
let
|
|
65
|
-
|
|
69
|
+
w.current || _()?.notifyLogout();
|
|
70
|
+
let s = t ? v() : null;
|
|
71
|
+
s && !w.current && window.location.replace(s);
|
|
66
72
|
}, [
|
|
67
|
-
S,
|
|
68
|
-
x,
|
|
69
|
-
P,
|
|
70
73
|
C,
|
|
71
|
-
|
|
74
|
+
n,
|
|
75
|
+
F,
|
|
76
|
+
w,
|
|
72
77
|
D,
|
|
73
78
|
O,
|
|
74
79
|
k,
|
|
75
80
|
A,
|
|
76
|
-
j
|
|
77
|
-
|
|
78
|
-
|
|
81
|
+
j,
|
|
82
|
+
M
|
|
83
|
+
]), R = b((n) => {
|
|
84
|
+
if (!e || !C) return;
|
|
79
85
|
let r = {
|
|
80
86
|
...e,
|
|
81
87
|
...n
|
|
82
88
|
};
|
|
83
|
-
|
|
84
|
-
id:
|
|
89
|
+
O(r), f(C, r), t({
|
|
90
|
+
id: C,
|
|
85
91
|
email: r.email,
|
|
86
92
|
name: r.name ?? `${r.firstName ?? ""} ${r.lastName ?? ""}`.trim(),
|
|
87
93
|
avatar: r.avatar,
|
|
88
94
|
lastLogin: (/* @__PURE__ */ new Date()).toISOString()
|
|
89
|
-
}),
|
|
95
|
+
}), F();
|
|
90
96
|
}, [
|
|
91
97
|
e,
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
]),
|
|
96
|
-
if (!
|
|
97
|
-
let e =
|
|
98
|
+
C,
|
|
99
|
+
F,
|
|
100
|
+
O
|
|
101
|
+
]), z = b(async () => {
|
|
102
|
+
if (!T || !C) return;
|
|
103
|
+
let e = n?.refreshToken ?? r(C)?.refreshToken ?? void 0;
|
|
98
104
|
if (e) {
|
|
99
|
-
|
|
105
|
+
N(!0);
|
|
100
106
|
try {
|
|
101
|
-
let t = await
|
|
107
|
+
let t = await T(e), n = y(t.accessToken), r = t.expiresAt ?? n ?? Date.now() + 1440 * 60 * 1e3, i = {
|
|
102
108
|
accessToken: t.accessToken,
|
|
103
109
|
refreshToken: t.refreshToken ?? e,
|
|
104
110
|
expiresAt: r
|
|
105
111
|
};
|
|
106
|
-
|
|
112
|
+
k(i), d(C, i), w.current || _()?.notifyTokenRefresh({
|
|
107
113
|
accessToken: i.accessToken,
|
|
108
114
|
refreshToken: i.refreshToken,
|
|
109
115
|
expiresAt: i.expiresAt
|
|
110
116
|
});
|
|
111
117
|
} catch (e) {
|
|
112
|
-
console.error("Failed to refresh token:", e),
|
|
118
|
+
console.error("Failed to refresh token:", e), n?.expiresAt && n.expiresAt - Date.now() > 0 || (L({ authoritative: !1 }), E?.());
|
|
113
119
|
} finally {
|
|
114
|
-
|
|
120
|
+
N(!1);
|
|
115
121
|
}
|
|
116
122
|
}
|
|
117
123
|
}, [
|
|
118
|
-
|
|
119
|
-
w,
|
|
120
|
-
S,
|
|
121
|
-
I,
|
|
124
|
+
n,
|
|
122
125
|
T,
|
|
123
126
|
C,
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
k
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
127
|
+
L,
|
|
128
|
+
E,
|
|
129
|
+
w,
|
|
130
|
+
k,
|
|
131
|
+
N
|
|
132
|
+
]), B = b((t) => e?.permissions ? e.permissions.includes(t) || e.permissions.includes("*") : !1, [e]), V = b((e) => {
|
|
133
|
+
A(e), C && p(C, e);
|
|
134
|
+
}, [C, A]), H = b((e, t) => {
|
|
135
|
+
j(e), M(t ?? null);
|
|
136
|
+
}, [j, M]), U = b((e) => {
|
|
137
|
+
if (!m(e)) {
|
|
132
138
|
console.error(`Profile ${e} not found`);
|
|
133
139
|
return;
|
|
134
140
|
}
|
|
135
|
-
|
|
141
|
+
D(e), O(i(e)), k(r(e)), A(a(e)), j(!1), M(null), F(), w.current || _()?.notifyAccountSwitch(e);
|
|
136
142
|
}, [
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
E,
|
|
143
|
+
F,
|
|
144
|
+
w,
|
|
140
145
|
D,
|
|
141
146
|
O,
|
|
142
147
|
k,
|
|
143
148
|
A,
|
|
144
|
-
j
|
|
145
|
-
|
|
146
|
-
|
|
149
|
+
j,
|
|
150
|
+
M
|
|
151
|
+
]), W = I, G = b((e) => {
|
|
152
|
+
if (e === C) {
|
|
147
153
|
console.error("Cannot remove active account — logout first");
|
|
148
154
|
return;
|
|
149
155
|
}
|
|
150
|
-
|
|
151
|
-
}, [
|
|
156
|
+
l(e), F();
|
|
157
|
+
}, [C, F]);
|
|
152
158
|
return {
|
|
153
|
-
login:
|
|
154
|
-
logout:
|
|
155
|
-
logoutAll:
|
|
156
|
-
|
|
159
|
+
login: I,
|
|
160
|
+
logout: L,
|
|
161
|
+
logoutAll: b(() => {
|
|
162
|
+
c(), D(null), O(null), k(null), A(null), j(!1), M(null), P();
|
|
157
163
|
try {
|
|
158
|
-
|
|
164
|
+
h();
|
|
159
165
|
} catch {}
|
|
160
|
-
|
|
161
|
-
let e =
|
|
162
|
-
e && !
|
|
166
|
+
w.current || _()?.notifyLogoutAll();
|
|
167
|
+
let e = v();
|
|
168
|
+
e && !w.current && window.location.replace(e);
|
|
163
169
|
}, [
|
|
164
|
-
|
|
165
|
-
E,
|
|
170
|
+
w,
|
|
166
171
|
D,
|
|
167
172
|
O,
|
|
168
173
|
k,
|
|
169
174
|
A,
|
|
170
175
|
j,
|
|
171
|
-
|
|
176
|
+
M,
|
|
177
|
+
P
|
|
172
178
|
]),
|
|
173
|
-
updateUser:
|
|
174
|
-
refreshAccessToken:
|
|
175
|
-
hasPermission:
|
|
176
|
-
setWorkspaceToken:
|
|
177
|
-
setMfaState:
|
|
178
|
-
switchAccount:
|
|
179
|
-
addAccount:
|
|
180
|
-
removeAccount:
|
|
179
|
+
updateUser: R,
|
|
180
|
+
refreshAccessToken: z,
|
|
181
|
+
hasPermission: B,
|
|
182
|
+
setWorkspaceToken: V,
|
|
183
|
+
setMfaState: H,
|
|
184
|
+
switchAccount: U,
|
|
185
|
+
addAccount: W,
|
|
186
|
+
removeAccount: G
|
|
181
187
|
};
|
|
182
188
|
}
|
|
183
189
|
//#endregion
|
|
184
|
-
export {
|
|
190
|
+
export { C as useAuthActions };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Fragment as e } from "react";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/shared/providers/shell/interpolateShellLabel.tsx
|
|
4
|
+
function n(n, r) {
|
|
5
|
+
return n.split(/(\{\{[A-Za-z][A-Za-z0-9]*\}\})/g).map((n, i) => {
|
|
6
|
+
let a = n.startsWith("{{") ? n.slice(2, -2) : "";
|
|
7
|
+
return /* @__PURE__ */ t(e, { children: Object.hasOwn(r, a) ? r[a] : n }, i);
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { n as interpolateShellLabel };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Generic shell labels stay separate from the product-prefixed assistant dictionary. */
|
|
2
|
+
export declare function useWorkflowAssistantLabels(): {
|
|
3
|
+
title: string;
|
|
4
|
+
savedPending: string;
|
|
5
|
+
conversationUnavailable: string;
|
|
6
|
+
historyUnavailable: string;
|
|
7
|
+
olderUnavailable: string;
|
|
8
|
+
audioUnavailable: string;
|
|
9
|
+
unknownTurn: string;
|
|
10
|
+
cancelledTurn: string;
|
|
11
|
+
failedTurn: string;
|
|
12
|
+
answerPending: string;
|
|
13
|
+
admissionRefused: string;
|
|
14
|
+
interrupted: string;
|
|
15
|
+
cancelUnconfirmed: string;
|
|
16
|
+
newChat: string;
|
|
17
|
+
savedConversations: string;
|
|
18
|
+
savedAssistantConversations: string;
|
|
19
|
+
noSavedConversations: string;
|
|
20
|
+
loadOlderConversations: string;
|
|
21
|
+
assistantConversation: string;
|
|
22
|
+
loadingYourConversation: string;
|
|
23
|
+
emptyHint: string;
|
|
24
|
+
loadOlderMessages: string;
|
|
25
|
+
you: string;
|
|
26
|
+
generatingAnswer: string;
|
|
27
|
+
readAnswerAloud: string;
|
|
28
|
+
answerSources: string;
|
|
29
|
+
sourceReference: (params: Record<string, string | number>) => string;
|
|
30
|
+
preparingYourAnswer: string;
|
|
31
|
+
dictationUnavailable: string;
|
|
32
|
+
question: string;
|
|
33
|
+
askAQuestion: string;
|
|
34
|
+
stopDictation: string;
|
|
35
|
+
dictateQuestion: string;
|
|
36
|
+
stopAudio: string;
|
|
37
|
+
reloadConversation: string;
|
|
38
|
+
recoverTurn: string;
|
|
39
|
+
cancelTurn: string;
|
|
40
|
+
ask: string;
|
|
41
|
+
};
|
|
42
|
+
export declare function useAssistantChromeLabels(): {
|
|
43
|
+
tokens: string;
|
|
44
|
+
code: string;
|
|
45
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { useShellLabel as e } from "./useShellLabel.js";
|
|
2
|
+
//#region src/shared/providers/shell/useAssistantShellLabels.ts
|
|
3
|
+
function t() {
|
|
4
|
+
let t = e();
|
|
5
|
+
return {
|
|
6
|
+
title: t("workflowAssistant.title", "AI assistant"),
|
|
7
|
+
savedPending: t("workflowAssistant.savedPending", "A saved turn is pending. Recover it to check the answer."),
|
|
8
|
+
conversationUnavailable: t("workflowAssistant.conversationUnavailable", "Your conversation is unavailable. Reload it before sending another question."),
|
|
9
|
+
historyUnavailable: t("workflowAssistant.historyUnavailable", "Conversation history is unavailable. Try loading it again."),
|
|
10
|
+
olderUnavailable: t("workflowAssistant.olderUnavailable", "Older messages are unavailable. Try loading them again."),
|
|
11
|
+
audioUnavailable: t("workflowAssistant.audioUnavailable", "Audio playback is unavailable. You can read the answer above."),
|
|
12
|
+
unknownTurn: t("workflowAssistant.unknownTurn", "This turn could not be confirmed. It will not be generated again automatically."),
|
|
13
|
+
cancelledTurn: t("workflowAssistant.cancelledTurn", "This turn was cancelled."),
|
|
14
|
+
failedTurn: t("workflowAssistant.failedTurn", "The assistant could not complete this turn."),
|
|
15
|
+
answerPending: t("workflowAssistant.answerPending", "Your answer is still pending. Recover this turn to check it again."),
|
|
16
|
+
admissionRefused: t("workflowAssistant.admissionRefused", "The assistant could not accept this question. Check your access, available quota or assistant configuration."),
|
|
17
|
+
interrupted: t("workflowAssistant.interrupted", "The connection was interrupted. Recover this turn using the same request."),
|
|
18
|
+
cancelUnconfirmed: t("workflowAssistant.cancelUnconfirmed", "Cancellation could not be confirmed. Recover the saved turn to check its result."),
|
|
19
|
+
newChat: t("workflowAssistant.newChat", "New chat"),
|
|
20
|
+
savedConversations: t("workflowAssistant.savedConversations", "Saved conversations"),
|
|
21
|
+
savedAssistantConversations: t("workflowAssistant.savedAssistantConversations", "Saved assistant conversations"),
|
|
22
|
+
noSavedConversations: t("workflowAssistant.noSavedConversations", "No saved conversations."),
|
|
23
|
+
loadOlderConversations: t("workflowAssistant.loadOlderConversations", "Load older conversations"),
|
|
24
|
+
assistantConversation: t("workflowAssistant.assistantConversation", "Assistant conversation"),
|
|
25
|
+
loadingYourConversation: t("workflowAssistant.loadingYourConversation", "Loading your conversation…"),
|
|
26
|
+
emptyHint: t("workflowAssistant.emptyHint", "Ask a question about the available content."),
|
|
27
|
+
loadOlderMessages: t("workflowAssistant.loadOlderMessages", "Load older messages"),
|
|
28
|
+
you: t("workflowAssistant.you", "You"),
|
|
29
|
+
generatingAnswer: t("workflowAssistant.generatingAnswer", "Generating answer…"),
|
|
30
|
+
readAnswerAloud: t("workflowAssistant.readAnswerAloud", "Read answer aloud"),
|
|
31
|
+
answerSources: t("workflowAssistant.answerSources", "Answer sources"),
|
|
32
|
+
sourceReference: (e) => t("workflowAssistant.sourceReference", "[{{reference}}] Source {{documentId}}", e),
|
|
33
|
+
preparingYourAnswer: t("workflowAssistant.preparingYourAnswer", "Preparing your answer…"),
|
|
34
|
+
dictationUnavailable: t("workflowAssistant.dictationUnavailable", "Dictation is unavailable. You can type your question."),
|
|
35
|
+
question: t("workflowAssistant.question", "Question"),
|
|
36
|
+
askAQuestion: t("workflowAssistant.askAQuestion", "Ask a question…"),
|
|
37
|
+
stopDictation: t("workflowAssistant.stopDictation", "Stop dictation"),
|
|
38
|
+
dictateQuestion: t("workflowAssistant.dictateQuestion", "Dictate question"),
|
|
39
|
+
stopAudio: t("workflowAssistant.stopAudio", "Stop audio"),
|
|
40
|
+
reloadConversation: t("workflowAssistant.reloadConversation", "Reload conversation"),
|
|
41
|
+
recoverTurn: t("workflowAssistant.recoverTurn", "Recover turn"),
|
|
42
|
+
cancelTurn: t("workflowAssistant.cancelTurn", "Cancel turn"),
|
|
43
|
+
ask: t("workflowAssistant.ask", "Ask")
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function n() {
|
|
47
|
+
let t = e();
|
|
48
|
+
return {
|
|
49
|
+
tokens: t("assistantChrome.tokens", "tokens"),
|
|
50
|
+
code: t("markdownEditor.placeholder.code", "code")
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { n as useAssistantChromeLabels, t as useWorkflowAssistantLabels };
|
|
@@ -1,58 +1,59 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useShellLabel as e } from "../providers/shell/useShellLabel.js";
|
|
2
|
+
import { useTourPlayerContext as t } from "./TourPlayerProvider.js";
|
|
3
|
+
import { useCallback as n, useEffect as r } from "react";
|
|
4
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
4
5
|
//#region src/shared/tours/TourPlayer.tsx
|
|
5
|
-
function
|
|
6
|
-
let { startTour: s, isPlaying: c, isCompleted: l, isSkipped: u, currentTour: d } =
|
|
7
|
-
return
|
|
8
|
-
if (
|
|
9
|
-
let
|
|
10
|
-
s(
|
|
6
|
+
function a({ tour: e, autoStart: n = !1, autoStartDelay: i = 0, onComplete: a, onSkip: o }) {
|
|
7
|
+
let { startTour: s, isPlaying: c, isCompleted: l, isSkipped: u, currentTour: d } = t();
|
|
8
|
+
return r(() => {
|
|
9
|
+
if (e && n && !c) {
|
|
10
|
+
let t = setTimeout(() => {
|
|
11
|
+
s(e);
|
|
11
12
|
}, i);
|
|
12
|
-
return () => clearTimeout(
|
|
13
|
+
return () => clearTimeout(t);
|
|
13
14
|
}
|
|
14
15
|
}, [
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
e,
|
|
17
|
+
n,
|
|
17
18
|
i,
|
|
18
19
|
s,
|
|
19
20
|
c
|
|
20
|
-
]),
|
|
21
|
-
l && d?.id ===
|
|
21
|
+
]), r(() => {
|
|
22
|
+
l && d?.id === e?.id && a?.();
|
|
22
23
|
}, [
|
|
23
24
|
l,
|
|
24
25
|
d,
|
|
25
|
-
|
|
26
|
+
e,
|
|
26
27
|
a
|
|
27
|
-
]),
|
|
28
|
-
u && d?.id ===
|
|
28
|
+
]), r(() => {
|
|
29
|
+
u && d?.id === e?.id && o?.();
|
|
29
30
|
}, [
|
|
30
31
|
u,
|
|
31
32
|
d,
|
|
32
|
-
|
|
33
|
+
e,
|
|
33
34
|
o
|
|
34
35
|
]), null;
|
|
35
36
|
}
|
|
36
|
-
function
|
|
37
|
-
let { startTour:
|
|
38
|
-
return
|
|
39
|
-
r && i(),
|
|
37
|
+
function o() {
|
|
38
|
+
let { startTour: e, isPlaying: r, stopTour: i } = t();
|
|
39
|
+
return n((t) => {
|
|
40
|
+
r && i(), e(t);
|
|
40
41
|
}, [
|
|
41
|
-
|
|
42
|
+
e,
|
|
42
43
|
i,
|
|
43
44
|
r
|
|
44
45
|
]);
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
-
let
|
|
48
|
-
return /* @__PURE__ */
|
|
47
|
+
function s({ tour: t, children: n, className: r, style: a }) {
|
|
48
|
+
let s = e(), c = o();
|
|
49
|
+
return /* @__PURE__ */ i("button", {
|
|
49
50
|
type: "button",
|
|
50
|
-
onClick: () =>
|
|
51
|
-
className:
|
|
52
|
-
style:
|
|
53
|
-
"aria-label":
|
|
54
|
-
children:
|
|
51
|
+
onClick: () => c(t),
|
|
52
|
+
className: r,
|
|
53
|
+
style: a,
|
|
54
|
+
"aria-label": s("tours.startNamed", "Start tour: {{name}}", { name: t.name }),
|
|
55
|
+
children: n
|
|
55
56
|
});
|
|
56
57
|
}
|
|
57
58
|
//#endregion
|
|
58
|
-
export {
|
|
59
|
+
export { a as TourPlayer, s as TourTriggerButton, o as usePlayTour };
|