@axiom-lattice/react-sdk 2.1.94 → 2.1.96
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/index.js +348 -276
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +589 -517
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -220,8 +220,8 @@ var AuthProvider = ({
|
|
|
220
220
|
onLoginSuccess?.(userData, tenantList || []);
|
|
221
221
|
return { requiresTenantSelection, hasTenants };
|
|
222
222
|
} catch (err) {
|
|
223
|
-
const
|
|
224
|
-
setError(
|
|
223
|
+
const message28 = err instanceof Error ? err.message : "Login failed";
|
|
224
|
+
setError(message28);
|
|
225
225
|
throw err;
|
|
226
226
|
} finally {
|
|
227
227
|
setIsLoading(false);
|
|
@@ -245,8 +245,8 @@ var AuthProvider = ({
|
|
|
245
245
|
}
|
|
246
246
|
return { message: data.message || "Registration successful!", token: data.data?.token };
|
|
247
247
|
} catch (err) {
|
|
248
|
-
const
|
|
249
|
-
setError(
|
|
248
|
+
const message28 = err instanceof Error ? err.message : "Registration failed";
|
|
249
|
+
setError(message28);
|
|
250
250
|
throw err;
|
|
251
251
|
} finally {
|
|
252
252
|
setIsLoading(false);
|
|
@@ -305,8 +305,8 @@ var AuthProvider = ({
|
|
|
305
305
|
}
|
|
306
306
|
onTenantSelected?.(tenantData);
|
|
307
307
|
} catch (err) {
|
|
308
|
-
const
|
|
309
|
-
setError(
|
|
308
|
+
const message28 = err instanceof Error ? err.message : "Failed to select tenant";
|
|
309
|
+
setError(message28);
|
|
310
310
|
throw err;
|
|
311
311
|
} finally {
|
|
312
312
|
setIsLoading(false);
|
|
@@ -345,8 +345,8 @@ var AuthProvider = ({
|
|
|
345
345
|
setTenants(tenantList);
|
|
346
346
|
sessionStorage.setItem("lattice_tenants", JSON.stringify(tenantList));
|
|
347
347
|
} catch (err) {
|
|
348
|
-
const
|
|
349
|
-
setError(
|
|
348
|
+
const message28 = err instanceof Error ? err.message : "Failed to fetch tenants";
|
|
349
|
+
setError(message28);
|
|
350
350
|
} finally {
|
|
351
351
|
setIsLoading(false);
|
|
352
352
|
}
|
|
@@ -376,8 +376,8 @@ var AuthProvider = ({
|
|
|
376
376
|
setUser(data);
|
|
377
377
|
sessionStorage.setItem("lattice_user", JSON.stringify(data));
|
|
378
378
|
} catch (err) {
|
|
379
|
-
const
|
|
380
|
-
setError(
|
|
379
|
+
const message28 = err instanceof Error ? err.message : "Failed to refresh user";
|
|
380
|
+
setError(message28);
|
|
381
381
|
} finally {
|
|
382
382
|
setIsLoading(false);
|
|
383
383
|
}
|
|
@@ -413,8 +413,8 @@ var AuthProvider = ({
|
|
|
413
413
|
const result = await response.json();
|
|
414
414
|
return result;
|
|
415
415
|
} catch (err) {
|
|
416
|
-
const
|
|
417
|
-
setError(
|
|
416
|
+
const message28 = err instanceof Error ? err.message : "Failed to change password";
|
|
417
|
+
setError(message28);
|
|
418
418
|
throw err;
|
|
419
419
|
} finally {
|
|
420
420
|
setIsLoading(false);
|
|
@@ -633,7 +633,7 @@ function useChat(threadId, assistantId, options = {}) {
|
|
|
633
633
|
throw new Error("Thread ID is required to send messages");
|
|
634
634
|
}
|
|
635
635
|
const { input, command, streaming = true } = data;
|
|
636
|
-
const { message:
|
|
636
|
+
const { message: message28, files, ...rest } = input || {};
|
|
637
637
|
setState((prev) => ({
|
|
638
638
|
...prev,
|
|
639
639
|
isLoading: true,
|
|
@@ -642,7 +642,7 @@ function useChat(threadId, assistantId, options = {}) {
|
|
|
642
642
|
}));
|
|
643
643
|
const userMessage = {
|
|
644
644
|
id: (0, import_uuid.v4)(),
|
|
645
|
-
content:
|
|
645
|
+
content: message28 || command?.resume?.message || "",
|
|
646
646
|
files,
|
|
647
647
|
role: "human"
|
|
648
648
|
};
|
|
@@ -1649,8 +1649,8 @@ function convertThreadToConversationThread(thread, label) {
|
|
|
1649
1649
|
function getThreadMetadata(label) {
|
|
1650
1650
|
return label ? { label } : {};
|
|
1651
1651
|
}
|
|
1652
|
-
function generateLabelFromMessage(
|
|
1653
|
-
const cleanMessage =
|
|
1652
|
+
function generateLabelFromMessage(message28) {
|
|
1653
|
+
const cleanMessage = message28.replace(/```attachments[\s\S]*?```/g, "").trim();
|
|
1654
1654
|
if (!cleanMessage) {
|
|
1655
1655
|
return "";
|
|
1656
1656
|
}
|
|
@@ -2123,7 +2123,7 @@ function AgentThreadProvider({
|
|
|
2123
2123
|
throw new Error("Thread ID is required to send messages");
|
|
2124
2124
|
}
|
|
2125
2125
|
const { input, command, streaming = true, mode } = data;
|
|
2126
|
-
const { message:
|
|
2126
|
+
const { message: message28, files, ...rest } = input || {};
|
|
2127
2127
|
setState((prev) => ({
|
|
2128
2128
|
...prev,
|
|
2129
2129
|
isLoading: true,
|
|
@@ -2132,7 +2132,7 @@ function AgentThreadProvider({
|
|
|
2132
2132
|
}));
|
|
2133
2133
|
const userMessage = {
|
|
2134
2134
|
id: (0, import_uuid2.v4)(),
|
|
2135
|
-
content:
|
|
2135
|
+
content: message28 || command?.resume?.message || "",
|
|
2136
2136
|
files,
|
|
2137
2137
|
role: "human"
|
|
2138
2138
|
};
|
|
@@ -2150,8 +2150,8 @@ function AgentThreadProvider({
|
|
|
2150
2150
|
]
|
|
2151
2151
|
}));
|
|
2152
2152
|
const isFirstMessage = messageCountRef.current === 0;
|
|
2153
|
-
if (isFirstMessage &&
|
|
2154
|
-
const label = generateLabelFromMessage(
|
|
2153
|
+
if (isFirstMessage && message28 && conversationContext) {
|
|
2154
|
+
const label = generateLabelFromMessage(message28);
|
|
2155
2155
|
if (label) {
|
|
2156
2156
|
conversationContext.updateThread({
|
|
2157
2157
|
id: threadId,
|
|
@@ -4048,8 +4048,8 @@ function useTenants(options) {
|
|
|
4048
4048
|
const { data } = await response.json();
|
|
4049
4049
|
setTenants(data || []);
|
|
4050
4050
|
} catch (err) {
|
|
4051
|
-
const
|
|
4052
|
-
setError(
|
|
4051
|
+
const message28 = err instanceof Error ? err.message : "Failed to fetch tenants";
|
|
4052
|
+
setError(message28);
|
|
4053
4053
|
} finally {
|
|
4054
4054
|
setIsLoading(false);
|
|
4055
4055
|
}
|
|
@@ -4091,8 +4091,8 @@ function useUsers(options) {
|
|
|
4091
4091
|
const { data } = await response.json();
|
|
4092
4092
|
setUsers(data || []);
|
|
4093
4093
|
} catch (err) {
|
|
4094
|
-
const
|
|
4095
|
-
setError(
|
|
4094
|
+
const message28 = err instanceof Error ? err.message : "Failed to fetch users";
|
|
4095
|
+
setError(message28);
|
|
4096
4096
|
} finally {
|
|
4097
4097
|
setIsLoading(false);
|
|
4098
4098
|
}
|
|
@@ -13451,11 +13451,11 @@ var ConfirmFeedback = ({
|
|
|
13451
13451
|
data,
|
|
13452
13452
|
interactive = true
|
|
13453
13453
|
}) => {
|
|
13454
|
-
const { message:
|
|
13454
|
+
const { message: message28, type, config, feedback, options } = data ?? {};
|
|
13455
13455
|
const { sendMessage } = useAgentChat();
|
|
13456
13456
|
const [clicked, setClicked] = (0, import_react42.useState)(false);
|
|
13457
13457
|
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_antd23.Space, { direction: "vertical", style: { width: "100%" }, children: [
|
|
13458
|
-
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MDResponse, { content:
|
|
13458
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MDResponse, { content: message28 }),
|
|
13459
13459
|
options ? /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_antd23.Space, { style: { justifyContent: "flex-end", width: "100%" }, children: options?.map((option) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
13460
13460
|
import_antd23.Button,
|
|
13461
13461
|
{
|
|
@@ -13778,7 +13778,7 @@ var useSideAppOpener = () => {
|
|
|
13778
13778
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
13779
13779
|
var { Text: Text16 } = import_antd25.Typography;
|
|
13780
13780
|
var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = true }) => {
|
|
13781
|
-
const { dataSource, message:
|
|
13781
|
+
const { dataSource, message: message28 } = data ?? {};
|
|
13782
13782
|
const [expandedRowKeys, setExpandedRowKeys] = (0, import_react45.useState)([]);
|
|
13783
13783
|
const openSideApp = useSideAppOpener();
|
|
13784
13784
|
const processedData = dataSource?.map((item, index) => ({
|
|
@@ -13877,7 +13877,7 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
|
|
|
13877
13877
|
type: "text/csv;charset=utf-8;"
|
|
13878
13878
|
});
|
|
13879
13879
|
const link = document.createElement("a");
|
|
13880
|
-
const filename = `${
|
|
13880
|
+
const filename = `${message28 || "data"}_${(/* @__PURE__ */ new Date()).toISOString().split("T")[0]}.csv`;
|
|
13881
13881
|
link.href = URL.createObjectURL(blob);
|
|
13882
13882
|
link.download = filename;
|
|
13883
13883
|
document.body.appendChild(link);
|
|
@@ -13898,7 +13898,7 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
|
|
|
13898
13898
|
tableLayout: "fixed",
|
|
13899
13899
|
style: { width: "100% !important" },
|
|
13900
13900
|
title: () => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_antd25.Flex, { justify: "space-between", align: "center", children: [
|
|
13901
|
-
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_antd25.Space, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text16, { strong: true, style: { fontSize: 16 }, children:
|
|
13901
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_antd25.Space, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text16, { strong: true, style: { fontSize: 16 }, children: message28 || "" }) }),
|
|
13902
13902
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_antd25.Space, { children: [
|
|
13903
13903
|
/* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
13904
13904
|
import_antd25.Button,
|
|
@@ -13920,8 +13920,8 @@ var GenericDataTable = ({ data, interactive = true, default_open_in_side_app = t
|
|
|
13920
13920
|
onClick: () => {
|
|
13921
13921
|
openSideApp({
|
|
13922
13922
|
component_key: "generic_data_table",
|
|
13923
|
-
message:
|
|
13924
|
-
data: { dataSource, message:
|
|
13923
|
+
message: message28 || "",
|
|
13924
|
+
data: { dataSource, message: message28 }
|
|
13925
13925
|
});
|
|
13926
13926
|
},
|
|
13927
13927
|
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_icons12.ExpandAltOutlined, {})
|
|
@@ -15663,7 +15663,7 @@ var import_react51 = require("react");
|
|
|
15663
15663
|
var import_antd34 = require("antd");
|
|
15664
15664
|
var import_icons21 = require("@ant-design/icons");
|
|
15665
15665
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
15666
|
-
var { Text: Text20 } = import_antd34.Typography;
|
|
15666
|
+
var { Text: Text20, Title: Title5 } = import_antd34.Typography;
|
|
15667
15667
|
var EXPIRY_OPTIONS = [
|
|
15668
15668
|
{ label: "Never", value: void 0 },
|
|
15669
15669
|
{ label: "1 hour", value: "1h" },
|
|
@@ -15683,32 +15683,60 @@ function expiryToDate(option) {
|
|
|
15683
15683
|
const ms = map[option] ?? 0;
|
|
15684
15684
|
return ms ? new Date(now + ms).toISOString() : void 0;
|
|
15685
15685
|
}
|
|
15686
|
+
function formatExpiry(d) {
|
|
15687
|
+
if (!d) return "Never";
|
|
15688
|
+
return new Date(d).toLocaleDateString();
|
|
15689
|
+
}
|
|
15690
|
+
function filePathMatch(record, filePath) {
|
|
15691
|
+
const normalizedPath = filePath.replace(/^\/?project\//, "");
|
|
15692
|
+
return record.address.resourcePath === normalizedPath;
|
|
15693
|
+
}
|
|
15686
15694
|
var ShareModal = ({
|
|
15687
15695
|
open,
|
|
15688
15696
|
filePath,
|
|
15689
15697
|
assistantId,
|
|
15690
15698
|
fileName,
|
|
15691
|
-
|
|
15692
|
-
existingVisibility,
|
|
15693
|
-
existingTitle,
|
|
15694
|
-
onClose,
|
|
15695
|
-
onUpdated
|
|
15699
|
+
onClose
|
|
15696
15700
|
}) => {
|
|
15697
|
-
const { shareFile } = useWorkspaceContext();
|
|
15698
|
-
const
|
|
15699
|
-
const
|
|
15700
|
-
const [
|
|
15701
|
-
const [
|
|
15702
|
-
const [
|
|
15703
|
-
const [
|
|
15704
|
-
|
|
15705
|
-
);
|
|
15701
|
+
const { shareFile, listShares, unshareFile } = useWorkspaceContext();
|
|
15702
|
+
const { config: shellConfig } = useLatticeChatShellContext();
|
|
15703
|
+
const baseURL = (shellConfig?.baseURL ?? "").replace(/\/$/, "");
|
|
15704
|
+
const [view, setView] = (0, import_react51.useState)("list");
|
|
15705
|
+
const [shares, setShares] = (0, import_react51.useState)([]);
|
|
15706
|
+
const [loading, setLoading] = (0, import_react51.useState)(false);
|
|
15707
|
+
const [title, setTitle] = (0, import_react51.useState)(fileName ?? "");
|
|
15708
|
+
const [visibility, setVisibility] = (0, import_react51.useState)("public");
|
|
15706
15709
|
const [password, setPassword] = (0, import_react51.useState)("");
|
|
15707
15710
|
const [expiry, setExpiry] = (0, import_react51.useState)(void 0);
|
|
15708
15711
|
const [maxAccess, setMaxAccess] = (0, import_react51.useState)(void 0);
|
|
15709
15712
|
const [error, setError] = (0, import_react51.useState)("");
|
|
15713
|
+
const [resultUrl, setResultUrl] = (0, import_react51.useState)("");
|
|
15714
|
+
const [resultPwd, setResultPwd] = (0, import_react51.useState)("");
|
|
15715
|
+
const loadShares = (0, import_react51.useCallback)(async () => {
|
|
15716
|
+
setLoading(true);
|
|
15717
|
+
try {
|
|
15718
|
+
const all = await listShares();
|
|
15719
|
+
setShares(all.filter((r) => filePathMatch(r, filePath) && !r.revoked));
|
|
15720
|
+
} catch {
|
|
15721
|
+
}
|
|
15722
|
+
setLoading(false);
|
|
15723
|
+
}, [listShares, filePath]);
|
|
15724
|
+
(0, import_react51.useEffect)(() => {
|
|
15725
|
+
if (open) {
|
|
15726
|
+
setView("list");
|
|
15727
|
+
loadShares();
|
|
15728
|
+
}
|
|
15729
|
+
}, [open, loadShares]);
|
|
15730
|
+
const handleCreate = (0, import_react51.useCallback)(async () => {
|
|
15731
|
+
setView("create");
|
|
15732
|
+
setTitle(fileName ?? "");
|
|
15733
|
+
setVisibility("public");
|
|
15734
|
+
setPassword("");
|
|
15735
|
+
setExpiry(void 0);
|
|
15736
|
+
setMaxAccess(void 0);
|
|
15737
|
+
setError("");
|
|
15738
|
+
}, [fileName]);
|
|
15710
15739
|
const handleShare = (0, import_react51.useCallback)(async () => {
|
|
15711
|
-
setState("creating");
|
|
15712
15740
|
setError("");
|
|
15713
15741
|
try {
|
|
15714
15742
|
const result = await shareFile(filePath, assistantId, {
|
|
@@ -15718,104 +15746,137 @@ var ShareModal = ({
|
|
|
15718
15746
|
expiresAt: expiryToDate(expiry),
|
|
15719
15747
|
maxAccess: maxAccess ?? void 0
|
|
15720
15748
|
});
|
|
15721
|
-
|
|
15722
|
-
|
|
15723
|
-
|
|
15749
|
+
setResultUrl(`${baseURL}${result.url}`);
|
|
15750
|
+
setResultPwd(password);
|
|
15751
|
+
setView("result");
|
|
15752
|
+
loadShares();
|
|
15724
15753
|
} catch (err) {
|
|
15725
15754
|
setError(err instanceof Error ? err.message : "Failed to create share");
|
|
15726
|
-
|
|
15755
|
+
setView("error");
|
|
15756
|
+
}
|
|
15757
|
+
}, [filePath, assistantId, title, visibility, password, expiry, maxAccess, shareFile, baseURL, loadShares]);
|
|
15758
|
+
const handleCopy = (0, import_react51.useCallback)((fullUrl, shareTitle, pwd, isProtected) => {
|
|
15759
|
+
const titleText = shareTitle ? `${shareTitle}
|
|
15760
|
+
` : "";
|
|
15761
|
+
const pwdText = pwd ? `Password: ${pwd}
|
|
15762
|
+
` : isProtected ? "Password protected\n" : "";
|
|
15763
|
+
navigator.clipboard.writeText(`${titleText}${fullUrl}
|
|
15764
|
+
${pwdText}`.trim());
|
|
15765
|
+
import_antd34.message.success("Copied");
|
|
15766
|
+
}, []);
|
|
15767
|
+
const handleRevoke = (0, import_react51.useCallback)(async (token) => {
|
|
15768
|
+
try {
|
|
15769
|
+
await unshareFile(token);
|
|
15770
|
+
import_antd34.message.success("Share revoked");
|
|
15771
|
+
loadShares();
|
|
15772
|
+
} catch {
|
|
15773
|
+
import_antd34.message.error("Failed to revoke");
|
|
15727
15774
|
}
|
|
15728
|
-
}, [
|
|
15729
|
-
|
|
15730
|
-
|
|
15731
|
-
|
|
15732
|
-
visibility,
|
|
15733
|
-
password,
|
|
15734
|
-
expiry,
|
|
15735
|
-
maxAccess,
|
|
15736
|
-
shareFile
|
|
15737
|
-
]);
|
|
15738
|
-
const handleCopy = (0, import_react51.useCallback)(() => {
|
|
15739
|
-
const fullUrl = `${window.location.origin}${url}`;
|
|
15740
|
-
navigator.clipboard.writeText(fullUrl);
|
|
15741
|
-
import_antd34.message.success("Copied to clipboard");
|
|
15742
|
-
}, [url]);
|
|
15743
|
-
const handleOpen = (0, import_react51.useCallback)(() => {
|
|
15744
|
-
window.open(url, "_blank");
|
|
15745
|
-
}, [url]);
|
|
15775
|
+
}, [unshareFile, loadShares]);
|
|
15776
|
+
const handleOpen = (0, import_react51.useCallback)((fullUrl) => {
|
|
15777
|
+
window.open(fullUrl, "_blank");
|
|
15778
|
+
}, []);
|
|
15746
15779
|
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
15747
15780
|
import_antd34.Modal,
|
|
15748
15781
|
{
|
|
15749
|
-
title:
|
|
15782
|
+
title: "Share Resource",
|
|
15750
15783
|
open,
|
|
15751
15784
|
onCancel: onClose,
|
|
15752
15785
|
footer: null,
|
|
15753
|
-
width:
|
|
15786
|
+
width: 480,
|
|
15754
15787
|
children: [
|
|
15755
|
-
|
|
15788
|
+
view === "list" && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_antd34.Space, { direction: "vertical", style: { width: "100%" }, size: "middle", children: [
|
|
15789
|
+
shares.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15790
|
+
import_antd34.List,
|
|
15791
|
+
{
|
|
15792
|
+
loading,
|
|
15793
|
+
dataSource: shares,
|
|
15794
|
+
renderItem: (r) => {
|
|
15795
|
+
const fullUrl = `${baseURL}/s/${r.token}`;
|
|
15796
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15797
|
+
import_antd34.List.Item,
|
|
15798
|
+
{
|
|
15799
|
+
actions: [
|
|
15800
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15801
|
+
import_antd34.Button,
|
|
15802
|
+
{
|
|
15803
|
+
type: "text",
|
|
15804
|
+
size: "small",
|
|
15805
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons21.CopyOutlined, {}),
|
|
15806
|
+
onClick: () => handleCopy(fullUrl, r.title ?? void 0, void 0, r.visibility === "password")
|
|
15807
|
+
},
|
|
15808
|
+
"copy"
|
|
15809
|
+
),
|
|
15810
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15811
|
+
import_antd34.Button,
|
|
15812
|
+
{
|
|
15813
|
+
type: "text",
|
|
15814
|
+
size: "small",
|
|
15815
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons21.LinkOutlined, {}),
|
|
15816
|
+
onClick: () => handleOpen(fullUrl)
|
|
15817
|
+
},
|
|
15818
|
+
"open"
|
|
15819
|
+
),
|
|
15820
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Popconfirm, { title: "Revoke this share?", onConfirm: () => handleRevoke(r.token), children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Button, { type: "text", size: "small", danger: true, icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons21.StopOutlined, {}) }) }, "revoke")
|
|
15821
|
+
],
|
|
15822
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15823
|
+
import_antd34.List.Item.Meta,
|
|
15824
|
+
{
|
|
15825
|
+
title: r.title || fileName || r.address.resourcePath.split("/").pop(),
|
|
15826
|
+
description: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_antd34.Space, { size: "small", children: [
|
|
15827
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Tag, { color: r.visibility === "password" ? "orange" : "green", children: r.visibility === "password" ? "Password" : "Public" }),
|
|
15828
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(Text20, { type: "secondary", style: { fontSize: 12 }, children: [
|
|
15829
|
+
"Expires: ",
|
|
15830
|
+
formatExpiry(r.expiresAt)
|
|
15831
|
+
] })
|
|
15832
|
+
] })
|
|
15833
|
+
}
|
|
15834
|
+
)
|
|
15835
|
+
}
|
|
15836
|
+
);
|
|
15837
|
+
}
|
|
15838
|
+
}
|
|
15839
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { style: { textAlign: "center", padding: "16px 0" }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text20, { type: "secondary", children: "No active shares yet" }) }),
|
|
15840
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Button, { type: "primary", block: true, icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons21.PlusOutlined, {}), onClick: handleCreate, children: "Create New Share" })
|
|
15841
|
+
] }),
|
|
15842
|
+
view === "create" && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_antd34.Space, { direction: "vertical", style: { width: "100%" }, size: "middle", children: [
|
|
15756
15843
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
|
|
15757
15844
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text20, { type: "secondary", style: { fontSize: 12 }, children: "Title" }),
|
|
15758
15845
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Input, { value: title, onChange: (e) => setTitle(e.target.value) })
|
|
15759
15846
|
] }),
|
|
15760
15847
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
|
|
15761
15848
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text20, { type: "secondary", style: { fontSize: 12 }, children: "Visibility" }),
|
|
15762
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(
|
|
15763
|
-
import_antd34.Select,
|
|
15764
|
-
{
|
|
15765
|
-
|
|
15766
|
-
onChange: setVisibility,
|
|
15767
|
-
style: { width: "100%" },
|
|
15768
|
-
children: [
|
|
15769
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Select.Option, { value: "public", children: "Public" }),
|
|
15770
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Select.Option, { value: "password", children: "Password" })
|
|
15771
|
-
]
|
|
15772
|
-
}
|
|
15773
|
-
)
|
|
15849
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_antd34.Select, { value: visibility, onChange: setVisibility, style: { width: "100%" }, children: [
|
|
15850
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Select.Option, { value: "public", children: "Public" }),
|
|
15851
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Select.Option, { value: "password", children: "Password" })
|
|
15852
|
+
] })
|
|
15774
15853
|
] }),
|
|
15775
15854
|
visibility === "password" && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
|
|
15776
15855
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text20, { type: "secondary", style: { fontSize: 12 }, children: "Password" }),
|
|
15777
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15778
|
-
import_antd34.Input.Password,
|
|
15779
|
-
{
|
|
15780
|
-
value: password,
|
|
15781
|
-
onChange: (e) => setPassword(e.target.value)
|
|
15782
|
-
}
|
|
15783
|
-
)
|
|
15856
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Input.Password, { value: password, onChange: (e) => setPassword(e.target.value) })
|
|
15784
15857
|
] }),
|
|
15785
15858
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
|
|
15786
15859
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text20, { type: "secondary", style: { fontSize: 12 }, children: "Expires" }),
|
|
15787
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15788
|
-
import_antd34.Select,
|
|
15789
|
-
{
|
|
15790
|
-
value: expiry,
|
|
15791
|
-
onChange: setExpiry,
|
|
15792
|
-
style: { width: "100%" },
|
|
15793
|
-
children: EXPIRY_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Select.Option, { value: opt.value, children: opt.label }, opt.label))
|
|
15794
|
-
}
|
|
15795
|
-
)
|
|
15860
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Select, { value: expiry, onChange: setExpiry, style: { width: "100%" }, children: EXPIRY_OPTIONS.map((opt) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Select.Option, { value: opt.value, children: opt.label }, opt.label)) })
|
|
15796
15861
|
] }),
|
|
15797
15862
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { children: [
|
|
15798
15863
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text20, { type: "secondary", style: { fontSize: 12 }, children: "Max accesses (empty = unlimited)" }),
|
|
15799
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
15800
|
-
import_antd34.InputNumber,
|
|
15801
|
-
{
|
|
15802
|
-
value: maxAccess,
|
|
15803
|
-
onChange: (v) => setMaxAccess(v ?? void 0),
|
|
15804
|
-
style: { width: "100%" },
|
|
15805
|
-
min: 1
|
|
15806
|
-
}
|
|
15807
|
-
)
|
|
15864
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.InputNumber, { value: maxAccess, onChange: (v) => setMaxAccess(v ?? void 0), style: { width: "100%" }, min: 1 })
|
|
15808
15865
|
] }),
|
|
15809
|
-
|
|
15866
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { display: "flex", gap: 8 }, children: [
|
|
15867
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Button, { block: true, onClick: () => setView("list"), children: "Back" }),
|
|
15868
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Button, { type: "primary", block: true, onClick: handleShare, children: "Create Share" })
|
|
15869
|
+
] })
|
|
15810
15870
|
] }),
|
|
15811
|
-
|
|
15812
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Input, { value:
|
|
15871
|
+
view === "result" && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_antd34.Space, { direction: "vertical", style: { width: "100%" }, size: "middle", children: [
|
|
15872
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Input, { value: resultUrl, readOnly: true, style: { fontFamily: "monospace" } }),
|
|
15813
15873
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("div", { style: { textAlign: "center" }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_antd34.Space, { children: [
|
|
15814
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons21.CopyOutlined, {}), onClick: handleCopy, children: "Copy" }),
|
|
15815
|
-
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Button, { type: "primary", icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons21.LinkOutlined, {}), onClick: handleOpen, children: "Open" })
|
|
15816
|
-
] }) })
|
|
15874
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Button, { icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons21.CopyOutlined, {}), onClick: () => handleCopy(resultUrl, title, resultPwd), children: "Copy" }),
|
|
15875
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Button, { type: "primary", icon: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_icons21.LinkOutlined, {}), onClick: () => handleOpen(resultUrl), children: "Open" })
|
|
15876
|
+
] }) }),
|
|
15877
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Button, { block: true, onClick: () => setView("list"), children: "Back to shares" })
|
|
15817
15878
|
] }),
|
|
15818
|
-
|
|
15879
|
+
view === "error" && /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)("div", { style: { textAlign: "center", padding: "24px 0" }, children: [
|
|
15819
15880
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text20, { type: "danger", children: error }),
|
|
15820
15881
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)("br", {}),
|
|
15821
15882
|
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_antd34.Button, { onClick: handleShare, style: { marginTop: 16 }, children: "Retry" })
|
|
@@ -16467,7 +16528,7 @@ var import_ErrorBoundary = __toESM(require("antd/es/alert/ErrorBoundary"));
|
|
|
16467
16528
|
var import_react54 = require("react");
|
|
16468
16529
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
16469
16530
|
var LazyBubble = ({
|
|
16470
|
-
message:
|
|
16531
|
+
message: message28,
|
|
16471
16532
|
renderContent,
|
|
16472
16533
|
autoLoadRightPanel
|
|
16473
16534
|
}) => {
|
|
@@ -16498,10 +16559,10 @@ var LazyBubble = ({
|
|
|
16498
16559
|
autoLoadRightPanel?.();
|
|
16499
16560
|
}, []);
|
|
16500
16561
|
const getPlaceholder = () => {
|
|
16501
|
-
const estimatedHeight =
|
|
16562
|
+
const estimatedHeight = message28.content ? Math.min(100, message28.content.length / 5) : 100;
|
|
16502
16563
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { style: { height: `${estimatedHeight}px`, minHeight: "50px" } });
|
|
16503
16564
|
};
|
|
16504
|
-
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_ErrorBoundary.default, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { ref, style: { width: "100%" }, children: isVisible || wasEverVisible ? renderContent(
|
|
16565
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_ErrorBoundary.default, { children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("div", { ref, style: { width: "100%" }, children: isVisible || wasEverVisible ? renderContent(message28) : getPlaceholder() }) });
|
|
16505
16566
|
};
|
|
16506
16567
|
var MemoizedBubbleList = (0, import_react54.memo)(
|
|
16507
16568
|
({
|
|
@@ -16532,8 +16593,8 @@ var MessageList = ({
|
|
|
16532
16593
|
messageLengthRef.current = messages?.length;
|
|
16533
16594
|
}
|
|
16534
16595
|
}, [messages?.length]);
|
|
16535
|
-
const renderContent = (0, import_react54.useCallback)((
|
|
16536
|
-
const { content } =
|
|
16596
|
+
const renderContent = (0, import_react54.useCallback)((message28) => {
|
|
16597
|
+
const { content } = message28;
|
|
16537
16598
|
try {
|
|
16538
16599
|
const json = JSON.parse(content);
|
|
16539
16600
|
if (json.action && json.message) {
|
|
@@ -16541,7 +16602,7 @@ var MessageList = ({
|
|
|
16541
16602
|
}
|
|
16542
16603
|
} catch (error) {
|
|
16543
16604
|
}
|
|
16544
|
-
const tool_calls_md =
|
|
16605
|
+
const tool_calls_md = message28.tool_calls?.map((tool_call) => {
|
|
16545
16606
|
return `\`\`\`tool_call
|
|
16546
16607
|
${JSON.stringify(tool_call)}
|
|
16547
16608
|
\`\`\``;
|
|
@@ -16550,17 +16611,17 @@ ${JSON.stringify(tool_call)}
|
|
|
16550
16611
|
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_antd40.Space, { direction: "vertical", style: { width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(MDResponse, { content: content_md }) });
|
|
16551
16612
|
}, []);
|
|
16552
16613
|
const items = (0, import_react54.useMemo)(
|
|
16553
|
-
() => messages.map((
|
|
16554
|
-
key:
|
|
16555
|
-
role:
|
|
16614
|
+
() => messages.map((message28, index) => ({
|
|
16615
|
+
key: message28.id,
|
|
16616
|
+
role: message28.role,
|
|
16556
16617
|
typing: false,
|
|
16557
16618
|
content: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
16558
16619
|
LazyBubble,
|
|
16559
16620
|
{
|
|
16560
|
-
message:
|
|
16621
|
+
message: message28,
|
|
16561
16622
|
renderContent,
|
|
16562
16623
|
autoLoadRightPanel: () => {
|
|
16563
|
-
const { content, role: role2 } =
|
|
16624
|
+
const { content, role: role2 } = message28;
|
|
16564
16625
|
const isNewAddedMessage = messageLengthRef.current > 1 && messageLengthRef.current + 1 === messages.length;
|
|
16565
16626
|
if (index === messages.length - 1 && isNewAddedMessage && role2 === "ai") {
|
|
16566
16627
|
try {
|
|
@@ -19972,7 +20033,7 @@ var import_relativeTime = __toESM(require("dayjs/plugin/relativeTime"));
|
|
|
19972
20033
|
var import_client_sdk6 = require("@axiom-lattice/client-sdk");
|
|
19973
20034
|
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
19974
20035
|
import_dayjs2.default.extend(import_relativeTime.default);
|
|
19975
|
-
var { Text: Text27, Title:
|
|
20036
|
+
var { Text: Text27, Title: Title6 } = import_antd61.Typography;
|
|
19976
20037
|
var useStyles7 = (0, import_antd_style19.createStyles)(({ token, css }) => ({
|
|
19977
20038
|
container: css`
|
|
19978
20039
|
height: 100%;
|
|
@@ -20286,7 +20347,7 @@ var ScheduleViewer = ({ data }) => {
|
|
|
20286
20347
|
};
|
|
20287
20348
|
return /* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: styles.container, children: [
|
|
20288
20349
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsxs)("div", { className: styles.header, children: [
|
|
20289
|
-
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
20350
|
+
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(Title6, { level: 5, style: { margin: 0 }, children: "Scheduled Tasks" }),
|
|
20290
20351
|
/* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_antd61.Tooltip, { title: "Refresh", children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
|
|
20291
20352
|
import_antd61.Button,
|
|
20292
20353
|
{
|
|
@@ -20952,7 +21013,7 @@ function useTeamWorkspaceData(threadId, assistantId) {
|
|
|
20952
21013
|
|
|
20953
21014
|
// src/components/GenUI/elements/TeamWorkspace/TeamDashboard.tsx
|
|
20954
21015
|
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
20955
|
-
var { Title:
|
|
21016
|
+
var { Title: Title7, Text: Text31 } = import_antd66.Typography;
|
|
20956
21017
|
var useStyles9 = (0, import_antd_style21.createStyles)(({ token, css }) => ({
|
|
20957
21018
|
container: css`
|
|
20958
21019
|
padding: ${token.paddingLG}px;
|
|
@@ -21223,7 +21284,7 @@ var TeamDashboard = ({
|
|
|
21223
21284
|
const { styles } = useStyles9();
|
|
21224
21285
|
return /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: styles.container, children: [
|
|
21225
21286
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("div", { className: styles.header, children: [
|
|
21226
|
-
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(
|
|
21287
|
+
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Title7, { level: 3, className: styles.title, children: "Team Dashboard" }),
|
|
21227
21288
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsx)(Text31, { className: styles.subtitle, children: team?.teamId ? `Team ID: ${team.teamId} \u2022 ${stats.totalTasks} tasks \u2022 ${stats.totalActivities} activities` : "Overview of team activities and tasks" })
|
|
21228
21289
|
] }),
|
|
21229
21290
|
/* @__PURE__ */ (0, import_jsx_runtime82.jsxs)(import_antd66.Row, { gutter: [16, 16], className: styles.statsRow, children: [
|
|
@@ -21312,7 +21373,7 @@ var import_antd67 = require("antd");
|
|
|
21312
21373
|
var import_antd_style22 = require("antd-style");
|
|
21313
21374
|
var import_lucide_react22 = require("lucide-react");
|
|
21314
21375
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
21315
|
-
var { Title:
|
|
21376
|
+
var { Title: Title8, Text: Text32, Paragraph } = import_antd67.Typography;
|
|
21316
21377
|
var useStyles10 = (0, import_antd_style22.createStyles)(({ token, css }) => ({
|
|
21317
21378
|
modalContent: css`
|
|
21318
21379
|
padding: 0;
|
|
@@ -21774,7 +21835,7 @@ var TaskDetailModal = ({
|
|
|
21774
21835
|
),
|
|
21775
21836
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Text32, { className: styles.taskId, children: task.id })
|
|
21776
21837
|
] }),
|
|
21777
|
-
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(
|
|
21838
|
+
/* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Title8, { level: 3, className: styles.title, children: task.title }),
|
|
21778
21839
|
task.description && /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: styles.description, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Paragraph, { style: { margin: 0 }, children: task.description }) }),
|
|
21779
21840
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: styles.metaSection, children: [
|
|
21780
21841
|
/* @__PURE__ */ (0, import_jsx_runtime83.jsxs)("div", { className: styles.metaItem, children: [
|
|
@@ -21847,7 +21908,7 @@ var TaskDetailModal = ({
|
|
|
21847
21908
|
|
|
21848
21909
|
// src/components/GenUI/elements/TeamWorkspace/IssuesView.tsx
|
|
21849
21910
|
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
21850
|
-
var { Title:
|
|
21911
|
+
var { Title: Title9, Text: Text33 } = import_antd68.Typography;
|
|
21851
21912
|
var getInitials4 = (name) => {
|
|
21852
21913
|
return name.split(/[\s_-]/).map((n) => n.charAt(0)).join("").toUpperCase().slice(0, 2);
|
|
21853
21914
|
};
|
|
@@ -22327,7 +22388,7 @@ var IssuesView = ({
|
|
|
22327
22388
|
return /* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: styles.container, children: [
|
|
22328
22389
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { className: styles.header, children: [
|
|
22329
22390
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)("div", { children: [
|
|
22330
|
-
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(
|
|
22391
|
+
/* @__PURE__ */ (0, import_jsx_runtime84.jsx)(Title9, { level: 3, className: styles.title, children: "Issues" }),
|
|
22331
22392
|
/* @__PURE__ */ (0, import_jsx_runtime84.jsxs)(Text33, { type: "secondary", children: [
|
|
22332
22393
|
tasks?.length || 0,
|
|
22333
22394
|
" tasks \u2022 Team: ",
|
|
@@ -22372,7 +22433,7 @@ var import_style3 = require("@xyflow/react/dist/style.css");
|
|
|
22372
22433
|
var import_antd69 = require("antd");
|
|
22373
22434
|
var import_antd_style24 = require("antd-style");
|
|
22374
22435
|
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
22375
|
-
var { Title:
|
|
22436
|
+
var { Title: Title10, Text: Text34 } = import_antd69.Typography;
|
|
22376
22437
|
var useStyles12 = (0, import_antd_style24.createStyles)(({ token, css }) => ({
|
|
22377
22438
|
container: css`
|
|
22378
22439
|
height: 100%;
|
|
@@ -22609,7 +22670,7 @@ var TeamOrgCanvasInner = ({
|
|
|
22609
22670
|
};
|
|
22610
22671
|
return /* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: styles.container, children: [
|
|
22611
22672
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)("div", { className: styles.header, children: [
|
|
22612
|
-
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(
|
|
22673
|
+
/* @__PURE__ */ (0, import_jsx_runtime85.jsx)(Title10, { level: 3, className: styles.title, children: "Team Organization" }),
|
|
22613
22674
|
/* @__PURE__ */ (0, import_jsx_runtime85.jsxs)(Text34, { type: "secondary", children: [
|
|
22614
22675
|
teammates.length + 1,
|
|
22615
22676
|
" members \u2022 ",
|
|
@@ -22676,7 +22737,7 @@ var TeamOrgCanvas = (props) => /* @__PURE__ */ (0, import_jsx_runtime85.jsx)(imp
|
|
|
22676
22737
|
var import_antd70 = require("antd");
|
|
22677
22738
|
var import_antd_style25 = require("antd-style");
|
|
22678
22739
|
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
22679
|
-
var { Title:
|
|
22740
|
+
var { Title: Title11, Text: Text35 } = import_antd70.Typography;
|
|
22680
22741
|
var useStyles13 = (0, import_antd_style25.createStyles)(({ token, css }) => ({
|
|
22681
22742
|
container: css`
|
|
22682
22743
|
height: 100%;
|
|
@@ -22770,7 +22831,7 @@ var TeamMemberChat = ({
|
|
|
22770
22831
|
}
|
|
22771
22832
|
),
|
|
22772
22833
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { className: styles.headerInfo, children: [
|
|
22773
|
-
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(
|
|
22834
|
+
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(Title11, { level: 4, className: styles.title, children: teammate.name }),
|
|
22774
22835
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsxs)("div", { children: [
|
|
22775
22836
|
/* @__PURE__ */ (0, import_jsx_runtime86.jsx)(import_antd70.Tag, { color: "blue", children: teammate.role }),
|
|
22776
22837
|
teammate.description && /* @__PURE__ */ (0, import_jsx_runtime86.jsxs)(Text35, { className: styles.role, children: [
|
|
@@ -22806,7 +22867,7 @@ var import_antd71 = require("antd");
|
|
|
22806
22867
|
var import_antd_style26 = require("antd-style");
|
|
22807
22868
|
var import_lucide_react24 = require("lucide-react");
|
|
22808
22869
|
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
22809
|
-
var { Title:
|
|
22870
|
+
var { Title: Title12, Text: Text36, Paragraph: Paragraph2 } = import_antd71.Typography;
|
|
22810
22871
|
var useStyles14 = (0, import_antd_style26.createStyles)(({ token, css }) => ({
|
|
22811
22872
|
modalContent: css`
|
|
22812
22873
|
padding: 0;
|
|
@@ -22936,12 +22997,12 @@ var formatDate3 = (timestamp) => {
|
|
|
22936
22997
|
});
|
|
22937
22998
|
};
|
|
22938
22999
|
var MailboxDetailModal = ({
|
|
22939
|
-
message:
|
|
23000
|
+
message: message28,
|
|
22940
23001
|
visible,
|
|
22941
23002
|
onClose
|
|
22942
23003
|
}) => {
|
|
22943
23004
|
const { styles } = useStyles14();
|
|
22944
|
-
if (!
|
|
23005
|
+
if (!message28) return null;
|
|
22945
23006
|
return /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(
|
|
22946
23007
|
import_antd71.Modal,
|
|
22947
23008
|
{
|
|
@@ -22964,12 +23025,12 @@ var MailboxDetailModal = ({
|
|
|
22964
23025
|
children: /* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: styles.modalContent, children: [
|
|
22965
23026
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: styles.header, children: [
|
|
22966
23027
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: styles.messageIcon, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_lucide_react24.Mail, { size: 20 }) }),
|
|
22967
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Text36, { className: styles.messageId, children:
|
|
22968
|
-
!
|
|
23028
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Text36, { className: styles.messageId, children: message28.id }),
|
|
23029
|
+
!message28.read && /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_antd71.Tag, { color: "red", children: "Unread" })
|
|
22969
23030
|
] }),
|
|
22970
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(
|
|
23031
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)(Title12, { level: 4, className: styles.title, children: [
|
|
22971
23032
|
"Message from ",
|
|
22972
|
-
|
|
23033
|
+
message28.from
|
|
22973
23034
|
] }),
|
|
22974
23035
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: styles.metaSection, children: [
|
|
22975
23036
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: styles.metaItem, children: [
|
|
@@ -22979,11 +23040,11 @@ var MailboxDetailModal = ({
|
|
|
22979
23040
|
"div",
|
|
22980
23041
|
{
|
|
22981
23042
|
className: styles.avatar,
|
|
22982
|
-
style: { background: getAvatarColor7(
|
|
22983
|
-
children: getInitials7(
|
|
23043
|
+
style: { background: getAvatarColor7(message28.from) },
|
|
23044
|
+
children: getInitials7(message28.from)
|
|
22984
23045
|
}
|
|
22985
23046
|
),
|
|
22986
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children:
|
|
23047
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: message28.from })
|
|
22987
23048
|
] })
|
|
22988
23049
|
] }),
|
|
22989
23050
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: styles.metaItem, children: [
|
|
@@ -22993,29 +23054,29 @@ var MailboxDetailModal = ({
|
|
|
22993
23054
|
"div",
|
|
22994
23055
|
{
|
|
22995
23056
|
className: styles.avatar,
|
|
22996
|
-
style: { background: getAvatarColor7(
|
|
22997
|
-
children: getInitials7(
|
|
23057
|
+
style: { background: getAvatarColor7(message28.to) },
|
|
23058
|
+
children: getInitials7(message28.to)
|
|
22998
23059
|
}
|
|
22999
23060
|
),
|
|
23000
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children:
|
|
23061
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: message28.to })
|
|
23001
23062
|
] })
|
|
23002
23063
|
] }),
|
|
23003
23064
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: styles.metaItem, children: [
|
|
23004
23065
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Text36, { className: styles.metaLabel, children: "Time" }),
|
|
23005
23066
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: styles.metaValue, children: [
|
|
23006
23067
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_lucide_react24.Calendar, { size: 14 }),
|
|
23007
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: formatDate3(
|
|
23068
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("span", { children: formatDate3(message28.timestamp) })
|
|
23008
23069
|
] })
|
|
23009
23070
|
] }),
|
|
23010
23071
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: styles.metaItem, children: [
|
|
23011
23072
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Text36, { className: styles.metaLabel, children: "Type" }),
|
|
23012
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: styles.metaValue, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_antd71.Tag, { color:
|
|
23073
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: styles.metaValue, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_antd71.Tag, { color: message28.type === "broadcast" ? "blue" : "default", children: message28.type }) })
|
|
23013
23074
|
] })
|
|
23014
23075
|
] }),
|
|
23015
23076
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(import_antd71.Divider, {}),
|
|
23016
23077
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsxs)("div", { className: styles.contentSection, children: [
|
|
23017
23078
|
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Text36, { className: styles.contentLabel, children: "Message Content" }),
|
|
23018
|
-
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: styles.contentBox, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Paragraph2, { className: styles.messageContent, children:
|
|
23079
|
+
/* @__PURE__ */ (0, import_jsx_runtime87.jsx)("div", { className: styles.contentBox, children: /* @__PURE__ */ (0, import_jsx_runtime87.jsx)(Paragraph2, { className: styles.messageContent, children: message28.content }) })
|
|
23019
23080
|
] })
|
|
23020
23081
|
] })
|
|
23021
23082
|
}
|
|
@@ -23024,7 +23085,7 @@ var MailboxDetailModal = ({
|
|
|
23024
23085
|
|
|
23025
23086
|
// src/components/GenUI/elements/MailboxPanel.tsx
|
|
23026
23087
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
23027
|
-
var { Title:
|
|
23088
|
+
var { Title: Title13, Text: Text37 } = import_antd72.Typography;
|
|
23028
23089
|
var useStyles15 = (0, import_antd_style27.createStyles)(({ token, css }) => ({
|
|
23029
23090
|
container: css`
|
|
23030
23091
|
padding: ${token.paddingLG}px;
|
|
@@ -23244,26 +23305,26 @@ var MessageGroupComponent = ({ group, styles, defaultExpanded = true, onMessageC
|
|
|
23244
23305
|
]
|
|
23245
23306
|
}
|
|
23246
23307
|
),
|
|
23247
|
-
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: styles.listGroupContent, children: group.messages.map((
|
|
23308
|
+
isExpanded && /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: styles.listGroupContent, children: group.messages.map((message28) => /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
23248
23309
|
"div",
|
|
23249
23310
|
{
|
|
23250
|
-
className: `${styles.listItem} ${!
|
|
23251
|
-
onClick: () => onMessageClick(
|
|
23311
|
+
className: `${styles.listItem} ${!message28.read ? styles.listItemUnread : ""}`,
|
|
23312
|
+
onClick: () => onMessageClick(message28),
|
|
23252
23313
|
children: [
|
|
23253
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: styles.listItemIcon, children: !
|
|
23314
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: styles.listItemIcon, children: !message28.read ? /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: styles.unreadBadge }) : /* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_lucide_react25.Circle, { size: 8, style: { color: "#d9d9d9" } }) }),
|
|
23254
23315
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: styles.listItemContent, children: [
|
|
23255
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: styles.listItemPreview, children: getMessagePreview(
|
|
23316
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: styles.listItemPreview, children: getMessagePreview(message28.content) }),
|
|
23256
23317
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("span", { className: styles.listItemMeta, children: [
|
|
23257
23318
|
"To: ",
|
|
23258
|
-
|
|
23319
|
+
message28.to,
|
|
23259
23320
|
" \u2022 ",
|
|
23260
|
-
|
|
23321
|
+
message28.type
|
|
23261
23322
|
] })
|
|
23262
23323
|
] }),
|
|
23263
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: styles.listItemRight, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: styles.listItemDate, children: formatDate4(
|
|
23324
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: styles.listItemRight, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsx)("span", { className: styles.listItemDate, children: formatDate4(message28.timestamp) }) })
|
|
23264
23325
|
]
|
|
23265
23326
|
},
|
|
23266
|
-
|
|
23327
|
+
message28.id
|
|
23267
23328
|
)) })
|
|
23268
23329
|
] });
|
|
23269
23330
|
};
|
|
@@ -23274,12 +23335,12 @@ var MailboxPanel = ({ data }) => {
|
|
|
23274
23335
|
const { teamMailbox = [] } = data || {};
|
|
23275
23336
|
const messageGroups = (0, import_react73.useMemo)(() => {
|
|
23276
23337
|
const groupsMap = /* @__PURE__ */ new Map();
|
|
23277
|
-
teamMailbox.forEach((
|
|
23278
|
-
const sender =
|
|
23338
|
+
teamMailbox.forEach((message28) => {
|
|
23339
|
+
const sender = message28.from;
|
|
23279
23340
|
if (!groupsMap.has(sender)) {
|
|
23280
23341
|
groupsMap.set(sender, []);
|
|
23281
23342
|
}
|
|
23282
|
-
groupsMap.get(sender).push(
|
|
23343
|
+
groupsMap.get(sender).push(message28);
|
|
23283
23344
|
});
|
|
23284
23345
|
const groups = Array.from(groupsMap.entries()).map(([sender, messages]) => ({
|
|
23285
23346
|
sender,
|
|
@@ -23296,8 +23357,8 @@ var MailboxPanel = ({ data }) => {
|
|
|
23296
23357
|
return groups;
|
|
23297
23358
|
}, [teamMailbox]);
|
|
23298
23359
|
const totalUnread = teamMailbox.filter((m) => !m.read).length;
|
|
23299
|
-
const handleMessageClick = (
|
|
23300
|
-
setSelectedMessage(
|
|
23360
|
+
const handleMessageClick = (message28) => {
|
|
23361
|
+
setSelectedMessage(message28);
|
|
23301
23362
|
setModalVisible(true);
|
|
23302
23363
|
};
|
|
23303
23364
|
const handleCloseModal = () => {
|
|
@@ -23306,7 +23367,7 @@ var MailboxPanel = ({ data }) => {
|
|
|
23306
23367
|
};
|
|
23307
23368
|
return /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { className: styles.container, children: [
|
|
23308
23369
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)("div", { className: styles.header, children: /* @__PURE__ */ (0, import_jsx_runtime88.jsxs)("div", { children: [
|
|
23309
|
-
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(
|
|
23370
|
+
/* @__PURE__ */ (0, import_jsx_runtime88.jsxs)(Title13, { level: 3, className: styles.title, children: [
|
|
23310
23371
|
/* @__PURE__ */ (0, import_jsx_runtime88.jsx)(import_lucide_react25.Mail, { size: 20, style: { marginRight: 8, verticalAlign: "middle" } }),
|
|
23311
23372
|
"Mailbox"
|
|
23312
23373
|
] }),
|
|
@@ -25141,11 +25202,11 @@ var StreamingHTMLRenderer = ({
|
|
|
25141
25202
|
if (!iframe || event.source !== iframe.contentWindow) {
|
|
25142
25203
|
return;
|
|
25143
25204
|
}
|
|
25144
|
-
const
|
|
25145
|
-
if (!
|
|
25205
|
+
const message28 = event.data;
|
|
25206
|
+
if (!message28 || typeof message28 !== "object") {
|
|
25146
25207
|
return;
|
|
25147
25208
|
}
|
|
25148
|
-
switch (
|
|
25209
|
+
switch (message28.type) {
|
|
25149
25210
|
case "iframe-ready":
|
|
25150
25211
|
console.log("[StreamingHTMLRenderer] Iframe ready");
|
|
25151
25212
|
isReadyRef.current = true;
|
|
@@ -25160,26 +25221,26 @@ var StreamingHTMLRenderer = ({
|
|
|
25160
25221
|
}
|
|
25161
25222
|
break;
|
|
25162
25223
|
case "iframe-height":
|
|
25163
|
-
if (typeof
|
|
25164
|
-
setIframeHeight(
|
|
25224
|
+
if (typeof message28.height === "number" && message28.height > 0) {
|
|
25225
|
+
setIframeHeight(message28.height);
|
|
25165
25226
|
}
|
|
25166
25227
|
break;
|
|
25167
25228
|
case "iframe-error": {
|
|
25168
25229
|
const streamingError = {
|
|
25169
25230
|
type: "RENDER_ERROR",
|
|
25170
|
-
message:
|
|
25231
|
+
message: message28.error || "Unknown iframe error"
|
|
25171
25232
|
};
|
|
25172
25233
|
onError?.(streamingError);
|
|
25173
25234
|
break;
|
|
25174
25235
|
}
|
|
25175
25236
|
case "widget-prompt":
|
|
25176
|
-
if (typeof
|
|
25177
|
-
onPrompt?.(
|
|
25237
|
+
if (typeof message28.text === "string") {
|
|
25238
|
+
onPrompt?.(message28.text);
|
|
25178
25239
|
}
|
|
25179
25240
|
break;
|
|
25180
25241
|
case "widget-open-link":
|
|
25181
|
-
if (typeof
|
|
25182
|
-
window.open(
|
|
25242
|
+
if (typeof message28.url === "string") {
|
|
25243
|
+
window.open(message28.url, "_blank", "noopener,noreferrer");
|
|
25183
25244
|
}
|
|
25184
25245
|
break;
|
|
25185
25246
|
}
|
|
@@ -27709,7 +27770,7 @@ if (typeof document !== "undefined") {
|
|
|
27709
27770
|
document.head.appendChild(style);
|
|
27710
27771
|
}
|
|
27711
27772
|
}
|
|
27712
|
-
var { Text: Text40, Title:
|
|
27773
|
+
var { Text: Text40, Title: Title14 } = import_antd81.Typography;
|
|
27713
27774
|
var statusConfig = {
|
|
27714
27775
|
running: { icon: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react28.Loader2, { size: 14, style: { animation: "spin 1s linear infinite", color: "#1677ff" } }), label: "Running" },
|
|
27715
27776
|
completed: { icon: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_lucide_react28.CircleCheckBig, { size: 14, style: { color: "#52c41a" } }), label: "Completed" },
|
|
@@ -28294,8 +28355,8 @@ var TopologyRuntimeView = () => {
|
|
|
28294
28355
|
setRuns((prev) => prev.filter((r) => r.id !== runId));
|
|
28295
28356
|
setSelectedRun((prev) => prev?.id === runId ? null : prev);
|
|
28296
28357
|
} catch (err) {
|
|
28297
|
-
const
|
|
28298
|
-
setError(
|
|
28358
|
+
const message28 = err instanceof Error ? err.message : "Failed to delete run";
|
|
28359
|
+
setError(message28);
|
|
28299
28360
|
}
|
|
28300
28361
|
}, [del]);
|
|
28301
28362
|
const refreshRuns = (0, import_react91.useCallback)(async () => {
|
|
@@ -28379,7 +28440,7 @@ var TopologyRuntimeView = () => {
|
|
|
28379
28440
|
}
|
|
28380
28441
|
return /* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { style: { padding: 16, overflow: "auto", height: "100%" }, children: [
|
|
28381
28442
|
/* @__PURE__ */ (0, import_jsx_runtime108.jsxs)("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", marginBottom: 16 }, children: [
|
|
28382
|
-
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
28443
|
+
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(Title14, { level: 5, style: { marginBottom: 0 }, children: "Workflow Runs" }),
|
|
28383
28444
|
/* @__PURE__ */ (0, import_jsx_runtime108.jsx)(import_antd81.Tooltip, { title: "Refresh now", children: /* @__PURE__ */ (0, import_jsx_runtime108.jsx)(
|
|
28384
28445
|
import_icons40.ReloadOutlined,
|
|
28385
28446
|
{
|
|
@@ -28440,7 +28501,7 @@ var import_react93 = require("react");
|
|
|
28440
28501
|
var import_antd82 = require("antd");
|
|
28441
28502
|
var import_icons41 = require("@ant-design/icons");
|
|
28442
28503
|
var import_jsx_runtime109 = require("react/jsx-runtime");
|
|
28443
|
-
var { Text: Text41, Title:
|
|
28504
|
+
var { Text: Text41, Title: Title15 } = import_antd82.Typography;
|
|
28444
28505
|
var TopologyInboxView = () => {
|
|
28445
28506
|
const { get } = useApi();
|
|
28446
28507
|
const [items, setItems] = (0, import_react93.useState)([]);
|
|
@@ -28486,7 +28547,7 @@ var TopologyInboxView = () => {
|
|
|
28486
28547
|
},
|
|
28487
28548
|
children: [
|
|
28488
28549
|
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)("div", { children: [
|
|
28489
|
-
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(
|
|
28550
|
+
/* @__PURE__ */ (0, import_jsx_runtime109.jsxs)(Title15, { level: 4, style: { margin: 0 }, children: [
|
|
28490
28551
|
/* @__PURE__ */ (0, import_jsx_runtime109.jsx)(import_icons41.InboxOutlined, { style: { marginRight: 8 } }),
|
|
28491
28552
|
"User Inbox"
|
|
28492
28553
|
] }),
|
|
@@ -30474,7 +30535,7 @@ var EvalRunResults = ({ runId, onBack }) => {
|
|
|
30474
30535
|
|
|
30475
30536
|
// src/components/Eval/EvalPanel.tsx
|
|
30476
30537
|
var import_jsx_runtime117 = require("react/jsx-runtime");
|
|
30477
|
-
var { Text: Text48, Title:
|
|
30538
|
+
var { Text: Text48, Title: Title16, Paragraph: Paragraph3 } = import_antd90.Typography;
|
|
30478
30539
|
var useStyle16 = (0, import_antd_style34.createStyles)(({ token, css }) => ({
|
|
30479
30540
|
shell: css`
|
|
30480
30541
|
display: flex;
|
|
@@ -31534,7 +31595,7 @@ var PersonalAssistantChannelModal = ({
|
|
|
31534
31595
|
import_antd91.Button,
|
|
31535
31596
|
{
|
|
31536
31597
|
block: true,
|
|
31537
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.
|
|
31598
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.MessagesSquare, { size: 14 }),
|
|
31538
31599
|
onClick: openCreateForm,
|
|
31539
31600
|
children: "Connect"
|
|
31540
31601
|
}
|
|
@@ -31543,7 +31604,7 @@ var PersonalAssistantChannelModal = ({
|
|
|
31543
31604
|
const renderRightContent = () => {
|
|
31544
31605
|
if (formMode === "view" && !selectedId) {
|
|
31545
31606
|
return /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { className: styles.emptyState, children: [
|
|
31546
|
-
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.
|
|
31607
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.MessagesSquare, { size: 40, style: { opacity: 0.25, marginBottom: 16 } }),
|
|
31547
31608
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(Text49, { style: { fontSize: 14, color: "var(--color-text-secondary, #666)" }, children: "Select a channel from the left or add a new one" })
|
|
31548
31609
|
] });
|
|
31549
31610
|
}
|
|
@@ -31605,7 +31666,7 @@ var PersonalAssistantChannelModal = ({
|
|
|
31605
31666
|
import_antd91.Button,
|
|
31606
31667
|
{
|
|
31607
31668
|
type: "primary",
|
|
31608
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.
|
|
31669
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.MessagesSquare, { size: 14 }),
|
|
31609
31670
|
loading: qrLoading,
|
|
31610
31671
|
onClick: fetchQrCode,
|
|
31611
31672
|
children: "Get QR Code"
|
|
@@ -31815,7 +31876,7 @@ var PersonalAssistantChannelModal = ({
|
|
|
31815
31876
|
import_antd91.Modal,
|
|
31816
31877
|
{
|
|
31817
31878
|
title: /* @__PURE__ */ (0, import_jsx_runtime119.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
|
|
31818
|
-
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.
|
|
31879
|
+
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)(import_lucide_react35.MessagesSquare, { size: 18 }),
|
|
31819
31880
|
/* @__PURE__ */ (0, import_jsx_runtime119.jsx)("span", { children: "Connect Channels" })
|
|
31820
31881
|
] }),
|
|
31821
31882
|
open,
|
|
@@ -31836,7 +31897,7 @@ var PersonalAssistantChannelModal = ({
|
|
|
31836
31897
|
|
|
31837
31898
|
// src/components/Chat/PersonalAssistantPage.tsx
|
|
31838
31899
|
var import_jsx_runtime120 = require("react/jsx-runtime");
|
|
31839
|
-
var { Title:
|
|
31900
|
+
var { Title: Title17, Text: Text50, Paragraph: Paragraph4 } = import_antd92.Typography;
|
|
31840
31901
|
var useStyles20 = (0, import_antd_style36.createStyles)(({ css, token }) => ({
|
|
31841
31902
|
container: css` display: flex; flex-direction: column; height: 100%; padding: 24px; overflow-y: auto; `,
|
|
31842
31903
|
setupWrap: css` max-width: 520px; margin: 30px auto 0; `,
|
|
@@ -32021,7 +32082,7 @@ var PersonalAssistantPage = () => {
|
|
|
32021
32082
|
HeaderIconButton,
|
|
32022
32083
|
{
|
|
32023
32084
|
ariaLabel: "Channel settings",
|
|
32024
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react36.
|
|
32085
|
+
icon: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react36.MessagesSquare, { size: 16 }),
|
|
32025
32086
|
onClick: () => setChannelModalOpen(true)
|
|
32026
32087
|
}
|
|
32027
32088
|
),
|
|
@@ -32046,7 +32107,7 @@ var PersonalAssistantPage = () => {
|
|
|
32046
32107
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: styles.stepIndicator, children: [0, 1, 2].map((i) => /* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: `${styles.stepDot} ${i === step ? styles.stepDotActive : i < step ? styles.stepDotDone : styles.stepDotPending}` }, i)) }),
|
|
32047
32108
|
step === 0 && /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_antd92.Card, { className: styles.card, children: [
|
|
32048
32109
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: styles.avatar, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react36.Sparkles, { size: 26 }) }),
|
|
32049
|
-
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
32110
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Title17, { level: 3, style: { textAlign: "center", margin: "0 0 4px" }, children: "What would you like to call them?" }),
|
|
32050
32111
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Paragraph4, { type: "secondary", style: { textAlign: "center", margin: "0 0 24px" }, children: "This is the name you'll use every day \u2014 your go-to nickname for your AI sidekick." }),
|
|
32051
32112
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
32052
32113
|
import_antd92.Input,
|
|
@@ -32064,7 +32125,7 @@ var PersonalAssistantPage = () => {
|
|
|
32064
32125
|
] }),
|
|
32065
32126
|
step === 1 && /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_antd92.Card, { className: styles.card, children: [
|
|
32066
32127
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: styles.avatar, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react36.Smile, { size: 26 }) }),
|
|
32067
|
-
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
32128
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Title17, { level: 3, style: { textAlign: "center", margin: "0 0 4px" }, children: "What's their vibe?" }),
|
|
32068
32129
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Paragraph4, { type: "secondary", style: { textAlign: "center", margin: "0 0 20px" }, children: "Pick the personality that feels right. This shapes how they talk and support you." }),
|
|
32069
32130
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: styles.personalityGrid, children: PERSONALITIES.map((p) => /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(
|
|
32070
32131
|
"div",
|
|
@@ -32102,7 +32163,7 @@ var PersonalAssistantPage = () => {
|
|
|
32102
32163
|
] }),
|
|
32103
32164
|
step === 2 && /* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_antd92.Card, { className: styles.card, children: [
|
|
32104
32165
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)("div", { className: styles.avatar, children: /* @__PURE__ */ (0, import_jsx_runtime120.jsx)(import_lucide_react36.Bot, { size: 26 }) }),
|
|
32105
|
-
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(
|
|
32166
|
+
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Title17, { level: 3, style: { textAlign: "center", margin: "0 0 4px" }, children: "Almost ready!" }),
|
|
32106
32167
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Paragraph4, { type: "secondary", style: { textAlign: "center", margin: "0 0 24px" }, children: "Your assistant will have private memory and learn about you over time." }),
|
|
32107
32168
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsxs)(import_antd92.Card, { size: "small", style: { background: "#fafafa", borderRadius: 12, marginBottom: 20 }, children: [
|
|
32108
32169
|
/* @__PURE__ */ (0, import_jsx_runtime120.jsx)(Text50, { type: "secondary", style: { fontSize: 12, textTransform: "uppercase", letterSpacing: 1 }, children: "Name" }),
|
|
@@ -32211,7 +32272,7 @@ var FileView = ({ parsed }) => {
|
|
|
32211
32272
|
const baseURL = shellConfig?.baseURL ?? "";
|
|
32212
32273
|
const resourcePath = decodeURIComponent(parsed.payload);
|
|
32213
32274
|
const params = new URLSearchParams({
|
|
32214
|
-
path: `/${resourcePath}`
|
|
32275
|
+
path: resourcePath.startsWith("/") ? resourcePath : `/${resourcePath}`
|
|
32215
32276
|
});
|
|
32216
32277
|
if (parsed.assistantId) params.set("assistantId", parsed.assistantId);
|
|
32217
32278
|
const url = `${baseURL}/api/workspaces/${parsed.workspaceId}/projects/${parsed.projectId}/viewfile?${params}`;
|
|
@@ -32287,7 +32348,6 @@ var { Text: Text51 } = import_antd95.Typography;
|
|
|
32287
32348
|
var SharesPage = ({ client }) => {
|
|
32288
32349
|
const [shares, setShares] = (0, import_react105.useState)([]);
|
|
32289
32350
|
const [loading, setLoading] = (0, import_react105.useState)(true);
|
|
32290
|
-
const [editingShare, setEditingShare] = (0, import_react105.useState)(null);
|
|
32291
32351
|
const loadShares = async () => {
|
|
32292
32352
|
setLoading(true);
|
|
32293
32353
|
try {
|
|
@@ -32301,8 +32361,15 @@ var SharesPage = ({ client }) => {
|
|
|
32301
32361
|
(0, import_react105.useEffect)(() => {
|
|
32302
32362
|
loadShares();
|
|
32303
32363
|
}, []);
|
|
32304
|
-
const handleCopy = (
|
|
32305
|
-
|
|
32364
|
+
const handleCopy = (record) => {
|
|
32365
|
+
const baseURL = client.baseURL ?? "";
|
|
32366
|
+
const fullUrl = `${baseURL.replace(/\/$/, "")}/s/${record.token}`;
|
|
32367
|
+
const titleText = record.title ? `${record.title}
|
|
32368
|
+
` : `${record.address.resourcePath.split("/").pop() || "file"}
|
|
32369
|
+
`;
|
|
32370
|
+
const pwdText = record.visibility === "password" ? "Password protected\n" : "";
|
|
32371
|
+
navigator.clipboard.writeText(`${titleText}${fullUrl}
|
|
32372
|
+
${pwdText}`.trim());
|
|
32306
32373
|
import_antd95.message.success("Copied");
|
|
32307
32374
|
};
|
|
32308
32375
|
const handleRevoke = async (token) => {
|
|
@@ -32355,21 +32422,9 @@ var SharesPage = ({ client }) => {
|
|
|
32355
32422
|
key: "copy",
|
|
32356
32423
|
icon: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_icons44.CopyOutlined, {}),
|
|
32357
32424
|
label: "Copy Link",
|
|
32358
|
-
onClick: () => handleCopy(
|
|
32425
|
+
onClick: () => handleCopy(r)
|
|
32359
32426
|
},
|
|
32360
32427
|
...r.revoked ? [] : [
|
|
32361
|
-
{
|
|
32362
|
-
key: "edit",
|
|
32363
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_icons44.EditOutlined, {}),
|
|
32364
|
-
label: "Edit",
|
|
32365
|
-
onClick: () => setEditingShare({
|
|
32366
|
-
token: r.token,
|
|
32367
|
-
path: r.address.resourcePath,
|
|
32368
|
-
assistantId: r.assistantId ?? void 0,
|
|
32369
|
-
visibility: r.visibility,
|
|
32370
|
-
title: r.title ?? void 0
|
|
32371
|
-
})
|
|
32372
|
-
},
|
|
32373
32428
|
{
|
|
32374
32429
|
key: "revoke",
|
|
32375
32430
|
icon: /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_icons44.StopOutlined, {}),
|
|
@@ -32383,20 +32438,7 @@ var SharesPage = ({ client }) => {
|
|
|
32383
32438
|
];
|
|
32384
32439
|
return /* @__PURE__ */ (0, import_jsx_runtime123.jsxs)("div", { style: { padding: 24 }, children: [
|
|
32385
32440
|
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_antd95.Typography.Title, { level: 4, children: "My Shares" }),
|
|
32386
|
-
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_antd95.Table, { dataSource: shares, columns, rowKey: "token", loading, pagination: { pageSize: 20 } })
|
|
32387
|
-
editingShare && /* @__PURE__ */ (0, import_jsx_runtime123.jsx)(
|
|
32388
|
-
ShareModal,
|
|
32389
|
-
{
|
|
32390
|
-
open: true,
|
|
32391
|
-
filePath: editingShare.path,
|
|
32392
|
-
assistantId: editingShare.assistantId,
|
|
32393
|
-
existingToken: editingShare.token,
|
|
32394
|
-
existingVisibility: editingShare.visibility,
|
|
32395
|
-
existingTitle: editingShare.title,
|
|
32396
|
-
onClose: () => setEditingShare(null),
|
|
32397
|
-
onUpdated: () => loadShares()
|
|
32398
|
-
}
|
|
32399
|
-
)
|
|
32441
|
+
/* @__PURE__ */ (0, import_jsx_runtime123.jsx)(import_antd95.Table, { dataSource: shares, columns, rowKey: "token", loading, pagination: { pageSize: 20 } })
|
|
32400
32442
|
] });
|
|
32401
32443
|
};
|
|
32402
32444
|
|
|
@@ -33500,6 +33542,18 @@ var WorkspaceContextProvider = ({
|
|
|
33500
33542
|
},
|
|
33501
33543
|
[client, workspaceId, projectId]
|
|
33502
33544
|
);
|
|
33545
|
+
const listShares = (0, import_react108.useCallback)(
|
|
33546
|
+
async () => {
|
|
33547
|
+
return client.resources.listShares();
|
|
33548
|
+
},
|
|
33549
|
+
[client]
|
|
33550
|
+
);
|
|
33551
|
+
const unshareFile = (0, import_react108.useCallback)(
|
|
33552
|
+
async (token) => {
|
|
33553
|
+
await client.resources.unshare(token);
|
|
33554
|
+
},
|
|
33555
|
+
[client]
|
|
33556
|
+
);
|
|
33503
33557
|
const value = {
|
|
33504
33558
|
workspaceId,
|
|
33505
33559
|
projectId,
|
|
@@ -33522,7 +33576,9 @@ var WorkspaceContextProvider = ({
|
|
|
33522
33576
|
uploadFile,
|
|
33523
33577
|
uploadFileToFolder,
|
|
33524
33578
|
getFileViewUrl,
|
|
33525
|
-
shareFile
|
|
33579
|
+
shareFile,
|
|
33580
|
+
listShares,
|
|
33581
|
+
unshareFile
|
|
33526
33582
|
};
|
|
33527
33583
|
const currentWorkspace = workspaces.find((w) => w.id === workspaceId);
|
|
33528
33584
|
const workspaceName = currentWorkspace?.name;
|
|
@@ -33550,7 +33606,15 @@ var MODAL_BODY_STYLE = {
|
|
|
33550
33606
|
flexDirection: "column",
|
|
33551
33607
|
gap: 12
|
|
33552
33608
|
};
|
|
33553
|
-
var PinToMenuButton = ({
|
|
33609
|
+
var PinToMenuButton = ({
|
|
33610
|
+
assistantId,
|
|
33611
|
+
contentType = "agent",
|
|
33612
|
+
contentConfig: externalContentConfig,
|
|
33613
|
+
isMatch,
|
|
33614
|
+
size = "small",
|
|
33615
|
+
label,
|
|
33616
|
+
block
|
|
33617
|
+
}) => {
|
|
33554
33618
|
const workspaceCtx = import_react109.default.useContext(WorkspaceContext);
|
|
33555
33619
|
const { config } = useLatticeChatShellContext();
|
|
33556
33620
|
const { post, get, del } = useApi();
|
|
@@ -33561,8 +33625,9 @@ var PinToMenuButton = ({ assistantId }) => {
|
|
|
33561
33625
|
const [isPinned, setIsPinned] = (0, import_react109.useState)(false);
|
|
33562
33626
|
const [pinnedItemId, setPinnedItemId] = (0, import_react109.useState)(null);
|
|
33563
33627
|
const [checking, setChecking] = (0, import_react109.useState)(true);
|
|
33628
|
+
const hasTarget = contentType === "agent" ? !!assistantId : !!externalContentConfig;
|
|
33564
33629
|
const checkPinned = (0, import_react109.useCallback)(async () => {
|
|
33565
|
-
if (!
|
|
33630
|
+
if (!hasTarget || !config.enableCustomMenu) {
|
|
33566
33631
|
setChecking(false);
|
|
33567
33632
|
return;
|
|
33568
33633
|
}
|
|
@@ -33572,8 +33637,11 @@ var PinToMenuButton = ({ assistantId }) => {
|
|
|
33572
33637
|
"/api/menu-items?menuTarget=workspace"
|
|
33573
33638
|
);
|
|
33574
33639
|
if (json.success && json.data?.records) {
|
|
33640
|
+
const matchFn = isMatch ?? ((cfg) => {
|
|
33641
|
+
return contentType === "agent" && cfg.agentId === assistantId;
|
|
33642
|
+
});
|
|
33575
33643
|
const pinned = json.data.records.find(
|
|
33576
|
-
(item) => item.
|
|
33644
|
+
(item) => item.contentType === contentType && matchFn(item.contentConfig)
|
|
33577
33645
|
);
|
|
33578
33646
|
if (pinned) {
|
|
33579
33647
|
setIsPinned(true);
|
|
@@ -33587,11 +33655,11 @@ var PinToMenuButton = ({ assistantId }) => {
|
|
|
33587
33655
|
} finally {
|
|
33588
33656
|
setChecking(false);
|
|
33589
33657
|
}
|
|
33590
|
-
}, [
|
|
33658
|
+
}, [hasTarget, config.enableCustomMenu, get, contentType, assistantId, isMatch]);
|
|
33591
33659
|
(0, import_react109.useEffect)(() => {
|
|
33592
33660
|
checkPinned();
|
|
33593
33661
|
}, [checkPinned]);
|
|
33594
|
-
if (!
|
|
33662
|
+
if (!hasTarget || !config.enableCustomMenu) return null;
|
|
33595
33663
|
const handlePin = async () => {
|
|
33596
33664
|
if (!name.trim()) {
|
|
33597
33665
|
import_antd98.message.warning("Please enter a menu name");
|
|
@@ -33599,14 +33667,19 @@ var PinToMenuButton = ({ assistantId }) => {
|
|
|
33599
33667
|
}
|
|
33600
33668
|
setLoading(true);
|
|
33601
33669
|
try {
|
|
33670
|
+
const contentConfig = contentType === "agent" ? {
|
|
33671
|
+
agentId: assistantId,
|
|
33672
|
+
workspaceId: workspaceCtx?.workspaceId || void 0,
|
|
33673
|
+
projectId: workspaceCtx?.projectId || void 0
|
|
33674
|
+
} : {
|
|
33675
|
+
...externalContentConfig,
|
|
33676
|
+
workspaceId: workspaceCtx?.workspaceId || void 0,
|
|
33677
|
+
projectId: workspaceCtx?.projectId || void 0
|
|
33678
|
+
};
|
|
33602
33679
|
const body = {
|
|
33603
33680
|
menuTarget: "workspace",
|
|
33604
|
-
contentType
|
|
33605
|
-
contentConfig
|
|
33606
|
-
agentId: assistantId,
|
|
33607
|
-
workspaceId: workspaceCtx?.workspaceId || void 0,
|
|
33608
|
-
projectId: workspaceCtx?.projectId || void 0
|
|
33609
|
-
},
|
|
33681
|
+
contentType,
|
|
33682
|
+
contentConfig,
|
|
33610
33683
|
group: group.trim() || void 0,
|
|
33611
33684
|
name: name.trim(),
|
|
33612
33685
|
sortOrder: 0
|
|
@@ -33653,11 +33726,23 @@ var PinToMenuButton = ({ assistantId }) => {
|
|
|
33653
33726
|
}
|
|
33654
33727
|
};
|
|
33655
33728
|
return /* @__PURE__ */ (0, import_jsx_runtime127.jsxs)(import_jsx_runtime127.Fragment, { children: [
|
|
33656
|
-
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_antd98.Tooltip, { title: isPinned ? "Unpin from Menu" : "Pin to Menu", children: /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
33729
|
+
/* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_antd98.Tooltip, { title: isPinned ? "Unpin from Menu" : "Pin to Menu", children: label ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
33657
33730
|
import_antd98.Button,
|
|
33658
33731
|
{
|
|
33659
33732
|
type: "text",
|
|
33660
|
-
size
|
|
33733
|
+
size,
|
|
33734
|
+
block,
|
|
33735
|
+
icon: isPinned ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react38.Pin, { size: 14, fill: "currentColor" }) : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react38.Pin, { size: 14 }),
|
|
33736
|
+
onClick: handleClick,
|
|
33737
|
+
loading: checking || loading && isPinned,
|
|
33738
|
+
children: label
|
|
33739
|
+
}
|
|
33740
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(
|
|
33741
|
+
import_antd98.Button,
|
|
33742
|
+
{
|
|
33743
|
+
type: "text",
|
|
33744
|
+
size,
|
|
33745
|
+
block,
|
|
33661
33746
|
icon: isPinned ? /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react38.Pin, { size: 14, fill: "currentColor" }) : /* @__PURE__ */ (0, import_jsx_runtime127.jsx)(import_lucide_react38.Pin, { size: 14 }),
|
|
33662
33747
|
onClick: handleClick,
|
|
33663
33748
|
loading: checking || loading && isPinned
|
|
@@ -34124,6 +34209,7 @@ var useStyles22 = (0, import_antd_style39.createStyles)(({ token, css }) => ({
|
|
|
34124
34209
|
container: css`
|
|
34125
34210
|
height: 100%;
|
|
34126
34211
|
overflow-y: auto;
|
|
34212
|
+
overflow-x: hidden;
|
|
34127
34213
|
padding: 12px;
|
|
34128
34214
|
font-size: 13px;
|
|
34129
34215
|
background: transparent;
|
|
@@ -34194,7 +34280,8 @@ var useStyles22 = (0, import_antd_style39.createStyles)(({ token, css }) => ({
|
|
|
34194
34280
|
display: flex;
|
|
34195
34281
|
align-items: center;
|
|
34196
34282
|
gap: 8px;
|
|
34197
|
-
|
|
34283
|
+
flex: 1;
|
|
34284
|
+
min-width: 0;
|
|
34198
34285
|
padding: 5px 8px;
|
|
34199
34286
|
border-radius: 4px;
|
|
34200
34287
|
cursor: pointer;
|
|
@@ -34349,7 +34436,6 @@ var FileDirectoryPanel = ({
|
|
|
34349
34436
|
const { styles } = useStyles22();
|
|
34350
34437
|
const { currentAssistant } = useAssistantContext();
|
|
34351
34438
|
const { getFileViewUrl } = useWorkspaceContext();
|
|
34352
|
-
const { post } = useApi();
|
|
34353
34439
|
const [sharePath, setSharePath] = (0, import_react111.useState)(null);
|
|
34354
34440
|
const renderEntry = import_react111.default.useCallback((entry, depth) => {
|
|
34355
34441
|
const entryName = getEntryName(entry);
|
|
@@ -34408,6 +34494,18 @@ var FileDirectoryPanel = ({
|
|
|
34408
34494
|
]
|
|
34409
34495
|
}
|
|
34410
34496
|
),
|
|
34497
|
+
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
34498
|
+
PinToMenuButton,
|
|
34499
|
+
{
|
|
34500
|
+
contentType: "file",
|
|
34501
|
+
contentConfig: {
|
|
34502
|
+
resourcePath: entry.path,
|
|
34503
|
+
assistantId: currentAssistant?.id || "",
|
|
34504
|
+
fileName: entry.path.split("/").pop() || entry.path
|
|
34505
|
+
},
|
|
34506
|
+
isMatch: (cfg) => cfg.resourcePath === entry.path
|
|
34507
|
+
}
|
|
34508
|
+
),
|
|
34411
34509
|
/* @__PURE__ */ (0, import_jsx_runtime129.jsx)(
|
|
34412
34510
|
import_antd100.Dropdown,
|
|
34413
34511
|
{
|
|
@@ -34437,32 +34535,6 @@ var FileDirectoryPanel = ({
|
|
|
34437
34535
|
icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_icons46.LinkOutlined, {}),
|
|
34438
34536
|
label: "Share",
|
|
34439
34537
|
onClick: () => setSharePath(entry.path)
|
|
34440
|
-
},
|
|
34441
|
-
{
|
|
34442
|
-
key: "pin",
|
|
34443
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime129.jsx)(import_lucide_react40.Pin, { size: 14 }),
|
|
34444
|
-
label: "Pin to Menu",
|
|
34445
|
-
onClick: async () => {
|
|
34446
|
-
try {
|
|
34447
|
-
const fileName = entry.path.split("/").pop() || entry.path;
|
|
34448
|
-
await post("/api/menu-items", {
|
|
34449
|
-
menuTarget: "workspace",
|
|
34450
|
-
contentType: "file",
|
|
34451
|
-
contentConfig: {
|
|
34452
|
-
resourcePath: entry.path,
|
|
34453
|
-
workspaceId: workspaceId || "",
|
|
34454
|
-
projectId: projectId || "",
|
|
34455
|
-
assistantId: currentAssistant?.id || "",
|
|
34456
|
-
fileName
|
|
34457
|
-
},
|
|
34458
|
-
name: fileName,
|
|
34459
|
-
sortOrder: 0
|
|
34460
|
-
});
|
|
34461
|
-
import_antd100.message.success(`Pinned "${fileName}" to menu`);
|
|
34462
|
-
} catch {
|
|
34463
|
-
import_antd100.message.error("Failed to pin to menu");
|
|
34464
|
-
}
|
|
34465
|
-
}
|
|
34466
34538
|
}
|
|
34467
34539
|
]
|
|
34468
34540
|
},
|
|
@@ -35263,7 +35335,7 @@ var import_antd104 = require("antd");
|
|
|
35263
35335
|
var import_icons47 = require("@ant-design/icons");
|
|
35264
35336
|
var import_antd_style42 = require("antd-style");
|
|
35265
35337
|
var import_jsx_runtime135 = require("react/jsx-runtime");
|
|
35266
|
-
var { Text: Text52, Title:
|
|
35338
|
+
var { Text: Text52, Title: Title18 } = import_antd104.Typography;
|
|
35267
35339
|
var { TextArea: TextArea9 } = import_antd104.Input;
|
|
35268
35340
|
var useStyles25 = (0, import_antd_style42.createStyles)(({ token, css }) => ({
|
|
35269
35341
|
// settingsModal: css`
|
|
@@ -36417,7 +36489,7 @@ QUEUE_NAME=tasks`,
|
|
|
36417
36489
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: styles.content, children: [
|
|
36418
36490
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: styles.contentHeader, children: [
|
|
36419
36491
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)("div", { className: styles.contentHeaderLeft, children: [
|
|
36420
|
-
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
36492
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Title18, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
|
|
36421
36493
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(Text52, { className: styles.contentDescription, children: [
|
|
36422
36494
|
activeMenu === "environment" && "Manage environment variables for the gateway server",
|
|
36423
36495
|
activeMenu === "models" && "Configure and register model lattices for use by agents"
|
|
@@ -36453,14 +36525,14 @@ QUEUE_NAME=tasks`,
|
|
|
36453
36525
|
},
|
|
36454
36526
|
children: connection.connecting ? /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, { children: [
|
|
36455
36527
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_icons47.LinkOutlined, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
|
|
36456
|
-
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
36528
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Title18, { level: 4, children: "Connecting..." }),
|
|
36457
36529
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(Text52, { type: "secondary", style: { textAlign: "center" }, children: [
|
|
36458
36530
|
"Connecting to ",
|
|
36459
36531
|
connection.url
|
|
36460
36532
|
] })
|
|
36461
36533
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime135.jsxs)(import_jsx_runtime135.Fragment, { children: [
|
|
36462
36534
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(import_icons47.LinkOutlined, { style: { fontSize: 64, color: "#d9d9d9" } }),
|
|
36463
|
-
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
36535
|
+
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(Title18, { level: 4, type: "secondary", children: connection.error || "Not Connected" }),
|
|
36464
36536
|
/* @__PURE__ */ (0, import_jsx_runtime135.jsx)(
|
|
36465
36537
|
Text52,
|
|
36466
36538
|
{
|
|
@@ -36644,7 +36716,7 @@ var import_react117 = require("react");
|
|
|
36644
36716
|
var import_antd105 = require("antd");
|
|
36645
36717
|
var import_lucide_react43 = require("lucide-react");
|
|
36646
36718
|
var import_jsx_runtime138 = require("react/jsx-runtime");
|
|
36647
|
-
var { Text: Text53, Title:
|
|
36719
|
+
var { Text: Text53, Title: Title19 } = import_antd105.Typography;
|
|
36648
36720
|
var ChannelInstallationsDrawerContent = () => {
|
|
36649
36721
|
const { get, post, put, del } = useApi();
|
|
36650
36722
|
const [installations, setInstallations] = (0, import_react117.useState)([]);
|
|
@@ -36702,7 +36774,7 @@ var ChannelInstallationsDrawerContent = () => {
|
|
|
36702
36774
|
alignItems: "center"
|
|
36703
36775
|
},
|
|
36704
36776
|
children: [
|
|
36705
|
-
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
36777
|
+
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(Title19, { level: 5, style: { margin: 0 }, children: "Channel Installations" }),
|
|
36706
36778
|
/* @__PURE__ */ (0, import_jsx_runtime138.jsx)(
|
|
36707
36779
|
import_antd105.Button,
|
|
36708
36780
|
{
|