@axiom-lattice/react-sdk 2.1.49 → 2.1.50
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.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +405 -341
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +540 -476
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3079,8 +3079,8 @@ var TenantSelector = ({
|
|
|
3079
3079
|
onLogout,
|
|
3080
3080
|
isLoading = false,
|
|
3081
3081
|
className = "",
|
|
3082
|
-
title = "Select
|
|
3083
|
-
description = "Choose a
|
|
3082
|
+
title = "Select Tenant",
|
|
3083
|
+
description = "Choose a tenant to continue"
|
|
3084
3084
|
}) => {
|
|
3085
3085
|
const [selectedId, setSelectedId] = useState12(currentTenantId || null);
|
|
3086
3086
|
const [isSubmitting, setIsSubmitting] = useState12(false);
|
|
@@ -3513,7 +3513,7 @@ var useStyle = createStyles2(({ token, css }) => {
|
|
|
3513
3513
|
position: relative;
|
|
3514
3514
|
|
|
3515
3515
|
&.full_content_width {
|
|
3516
|
-
max-width:
|
|
3516
|
+
max-width: 3000px;
|
|
3517
3517
|
}
|
|
3518
3518
|
|
|
3519
3519
|
&.drawer-open {
|
|
@@ -3785,7 +3785,7 @@ var useStyle = createStyles2(({ token, css }) => {
|
|
|
3785
3785
|
display: flex;
|
|
3786
3786
|
align-items: center;
|
|
3787
3787
|
gap: 12px;
|
|
3788
|
-
padding: 4px
|
|
3788
|
+
padding: 4px 8px;
|
|
3789
3789
|
margin-bottom: 16px;
|
|
3790
3790
|
font-size: 18px;
|
|
3791
3791
|
font-weight: 600;
|
|
@@ -8052,7 +8052,7 @@ import {
|
|
|
8052
8052
|
Space as Space27,
|
|
8053
8053
|
Typography as Typography32
|
|
8054
8054
|
} from "antd";
|
|
8055
|
-
import React40, { useContext as useContext10, useEffect as useEffect34, useRef as useRef20, useState as
|
|
8055
|
+
import React40, { useContext as useContext10, useEffect as useEffect34, useRef as useRef20, useState as useState51 } from "react";
|
|
8056
8056
|
import { BrainCircuit as BrainCircuit3 } from "lucide-react";
|
|
8057
8057
|
|
|
8058
8058
|
// src/components/GenUI/HITLContainer.tsx
|
|
@@ -8855,15 +8855,16 @@ var ThreadManagementButtons = () => {
|
|
|
8855
8855
|
import React33, {
|
|
8856
8856
|
createContext as createContext8,
|
|
8857
8857
|
useContext as useContext9,
|
|
8858
|
-
useState as
|
|
8858
|
+
useState as useState44,
|
|
8859
8859
|
useCallback as useCallback24,
|
|
8860
8860
|
useEffect as useEffect30
|
|
8861
8861
|
} from "react";
|
|
8862
8862
|
import { WorkspaceClient, Client as Client2 } from "@axiom-lattice/client-sdk";
|
|
8863
8863
|
|
|
8864
8864
|
// src/components/Chat/WorkspaceResourceManager.tsx
|
|
8865
|
-
import { useMemo as useMemo16, useEffect as useEffect29, useRef as useRef15 } from "react";
|
|
8866
|
-
import { FolderOpen as FolderOpen2, Activity as Activity3, Database as Database4, Plug as Plug2, Bot, Wrench, Zap } from "lucide-react";
|
|
8865
|
+
import { useMemo as useMemo16, useEffect as useEffect29, useRef as useRef15, useState as useState43 } from "react";
|
|
8866
|
+
import { FolderOpen as FolderOpen2, Activity as Activity3, Database as Database4, Plug as Plug2, Bot, Wrench, Zap, LogOut as LogOut3, Building2 as Building23 } from "lucide-react";
|
|
8867
|
+
import { Modal as Modal9 } from "antd";
|
|
8867
8868
|
|
|
8868
8869
|
// src/components/Chat/Menu.tsx
|
|
8869
8870
|
import React17, { useState as useState29, useMemo as useMemo10, useCallback as useCallback19 } from "react";
|
|
@@ -16768,7 +16769,7 @@ var ToolsList = ({
|
|
|
16768
16769
|
};
|
|
16769
16770
|
|
|
16770
16771
|
// src/components/Chat/WorkspaceResourceManager.tsx
|
|
16771
|
-
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
16772
|
+
import { jsx as jsx69, jsxs as jsxs44 } from "react/jsx-runtime";
|
|
16772
16773
|
var createWrapper = (Component) => {
|
|
16773
16774
|
return () => /* @__PURE__ */ jsx69(Component, { ...{} });
|
|
16774
16775
|
};
|
|
@@ -16820,6 +16821,9 @@ var WorkspaceResourceManager = ({
|
|
|
16820
16821
|
});
|
|
16821
16822
|
}
|
|
16822
16823
|
}, []);
|
|
16824
|
+
const { logout, tenants, currentTenant, selectTenant, isLoading } = useAuth();
|
|
16825
|
+
const { setWorkspace, setProject } = useWorkspaceContext();
|
|
16826
|
+
const [tenantModalOpen, setTenantModalOpen] = useState43(false);
|
|
16823
16827
|
const menuItems = useMemo16(() => {
|
|
16824
16828
|
return [
|
|
16825
16829
|
// Projects - opens in SideApp via route type
|
|
@@ -16886,10 +16890,38 @@ var WorkspaceResourceManager = ({
|
|
|
16886
16890
|
icon: /* @__PURE__ */ jsx69(Wrench, { size: 20 }),
|
|
16887
16891
|
order: 50,
|
|
16888
16892
|
group: "Settings"
|
|
16893
|
+
},
|
|
16894
|
+
// Switch Tenant action
|
|
16895
|
+
{
|
|
16896
|
+
id: "switch_tenant",
|
|
16897
|
+
builtin: "switch-tenant",
|
|
16898
|
+
type: "action",
|
|
16899
|
+
name: "Switch tenant",
|
|
16900
|
+
icon: /* @__PURE__ */ jsx69(Building23, { size: 20 }),
|
|
16901
|
+
order: 900,
|
|
16902
|
+
group: "Account"
|
|
16903
|
+
},
|
|
16904
|
+
// Logout action
|
|
16905
|
+
{
|
|
16906
|
+
id: "logout",
|
|
16907
|
+
builtin: "logout",
|
|
16908
|
+
type: "action",
|
|
16909
|
+
name: "Logout",
|
|
16910
|
+
icon: /* @__PURE__ */ jsx69(LogOut3, { size: 20 }),
|
|
16911
|
+
order: 1e3,
|
|
16912
|
+
group: "Account"
|
|
16889
16913
|
}
|
|
16890
16914
|
];
|
|
16891
16915
|
}, [workspaceName]);
|
|
16892
16916
|
const handleItemClick = (item) => {
|
|
16917
|
+
if (item.type === "action" && item.builtin === "logout") {
|
|
16918
|
+
logout();
|
|
16919
|
+
return;
|
|
16920
|
+
}
|
|
16921
|
+
if (item.type === "action" && item.builtin === "switch-tenant") {
|
|
16922
|
+
setTenantModalOpen(true);
|
|
16923
|
+
return;
|
|
16924
|
+
}
|
|
16893
16925
|
if (item.type === "route") {
|
|
16894
16926
|
const componentKeyMap = {
|
|
16895
16927
|
workspace_projects: "workspace_projects",
|
|
@@ -16920,7 +16952,7 @@ var WorkspaceResourceManager = ({
|
|
|
16920
16952
|
});
|
|
16921
16953
|
}
|
|
16922
16954
|
}, [openContentApp]);
|
|
16923
|
-
return /* @__PURE__ */
|
|
16955
|
+
return /* @__PURE__ */ jsxs44(
|
|
16924
16956
|
"div",
|
|
16925
16957
|
{
|
|
16926
16958
|
style: {
|
|
@@ -16929,27 +16961,60 @@ var WorkspaceResourceManager = ({
|
|
|
16929
16961
|
width: "100%",
|
|
16930
16962
|
height: "100%"
|
|
16931
16963
|
},
|
|
16932
|
-
children:
|
|
16933
|
-
|
|
16934
|
-
|
|
16935
|
-
|
|
16936
|
-
|
|
16937
|
-
|
|
16938
|
-
|
|
16939
|
-
|
|
16940
|
-
|
|
16941
|
-
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
|
|
16946
|
-
|
|
16947
|
-
|
|
16948
|
-
|
|
16949
|
-
|
|
16950
|
-
|
|
16951
|
-
|
|
16952
|
-
|
|
16964
|
+
children: [
|
|
16965
|
+
/* @__PURE__ */ jsx69(
|
|
16966
|
+
ColumnLayout,
|
|
16967
|
+
{
|
|
16968
|
+
menu: /* @__PURE__ */ jsx69(
|
|
16969
|
+
Menu,
|
|
16970
|
+
{
|
|
16971
|
+
items: menuItems,
|
|
16972
|
+
onItemClick: handleItemClick,
|
|
16973
|
+
logo,
|
|
16974
|
+
logoText: workspaceName || "Workspace",
|
|
16975
|
+
showToggle: true,
|
|
16976
|
+
defaultExpanded: true,
|
|
16977
|
+
collapsed: menuCollapsed,
|
|
16978
|
+
onCollapsedChange: setMenuCollapsed
|
|
16979
|
+
}
|
|
16980
|
+
),
|
|
16981
|
+
logo,
|
|
16982
|
+
left: /* @__PURE__ */ jsx69(SideAppViewBrowser, { region: "content" }),
|
|
16983
|
+
right: null
|
|
16984
|
+
}
|
|
16985
|
+
),
|
|
16986
|
+
/* @__PURE__ */ jsx69(
|
|
16987
|
+
Modal9,
|
|
16988
|
+
{
|
|
16989
|
+
open: tenantModalOpen,
|
|
16990
|
+
onCancel: () => setTenantModalOpen(false),
|
|
16991
|
+
footer: null,
|
|
16992
|
+
width: 520,
|
|
16993
|
+
closable: false,
|
|
16994
|
+
styles: {
|
|
16995
|
+
mask: {
|
|
16996
|
+
backgroundColor: "transparent"
|
|
16997
|
+
},
|
|
16998
|
+
content: {
|
|
16999
|
+
backgroundColor: "transparent",
|
|
17000
|
+
boxShadow: "none"
|
|
17001
|
+
}
|
|
17002
|
+
},
|
|
17003
|
+
children: /* @__PURE__ */ jsx69(
|
|
17004
|
+
TenantSelector,
|
|
17005
|
+
{
|
|
17006
|
+
tenants: tenants.map((t) => t.tenant).filter(Boolean),
|
|
17007
|
+
currentTenantId: currentTenant?.id,
|
|
17008
|
+
onSelect: async (tenant) => {
|
|
17009
|
+
await selectTenant(tenant.id);
|
|
17010
|
+
setTenantModalOpen(false);
|
|
17011
|
+
},
|
|
17012
|
+
isLoading
|
|
17013
|
+
}
|
|
17014
|
+
)
|
|
17015
|
+
}
|
|
17016
|
+
)
|
|
17017
|
+
]
|
|
16953
17018
|
}
|
|
16954
17019
|
);
|
|
16955
17020
|
};
|
|
@@ -16972,9 +17037,10 @@ var useWorkspaceContext = () => {
|
|
|
16972
17037
|
return context;
|
|
16973
17038
|
};
|
|
16974
17039
|
var WorkspaceContextProvider = ({
|
|
16975
|
-
children
|
|
16976
|
-
tenantId: initialTenantId = "default"
|
|
17040
|
+
children
|
|
16977
17041
|
}) => {
|
|
17042
|
+
const { currentTenant } = useAuth();
|
|
17043
|
+
const tenantId = currentTenant?.id || "";
|
|
16978
17044
|
const { config } = useLatticeChatShellContext();
|
|
16979
17045
|
const axiomClient = useClient("__GLOBAL__");
|
|
16980
17046
|
const getInitialWorkspaceId = () => {
|
|
@@ -16989,29 +17055,8 @@ var WorkspaceContextProvider = ({
|
|
|
16989
17055
|
}
|
|
16990
17056
|
return null;
|
|
16991
17057
|
};
|
|
16992
|
-
const
|
|
16993
|
-
|
|
16994
|
-
return sessionStorage.getItem("tenantId") || initialTenantId;
|
|
16995
|
-
}
|
|
16996
|
-
return initialTenantId;
|
|
16997
|
-
};
|
|
16998
|
-
const [tenantId, setTenantIdState] = useState43(getInitialTenantId);
|
|
16999
|
-
const [workspaceId, setWorkspaceId] = useState43(getInitialWorkspaceId);
|
|
17000
|
-
const [projectId, setProjectId] = useState43(getInitialProjectId);
|
|
17001
|
-
const setTenantId = useCallback24((id) => {
|
|
17002
|
-
setTenantIdState(id);
|
|
17003
|
-
if (typeof window !== "undefined") {
|
|
17004
|
-
sessionStorage.setItem("tenantId", id);
|
|
17005
|
-
}
|
|
17006
|
-
if (axiomClient) {
|
|
17007
|
-
axiomClient.setTenantId(id);
|
|
17008
|
-
}
|
|
17009
|
-
}, [axiomClient]);
|
|
17010
|
-
useEffect30(() => {
|
|
17011
|
-
if (initialTenantId && initialTenantId !== tenantId) {
|
|
17012
|
-
setTenantId(initialTenantId);
|
|
17013
|
-
}
|
|
17014
|
-
}, [initialTenantId, tenantId, setTenantId]);
|
|
17058
|
+
const [workspaceId, setWorkspaceId] = useState44(getInitialWorkspaceId);
|
|
17059
|
+
const [projectId, setProjectId] = useState44(getInitialProjectId);
|
|
17015
17060
|
React33.useEffect(() => {
|
|
17016
17061
|
const wsId = getInitialWorkspaceId();
|
|
17017
17062
|
const pjId = getInitialProjectId();
|
|
@@ -17022,10 +17067,10 @@ var WorkspaceContextProvider = ({
|
|
|
17022
17067
|
useEffect30(() => {
|
|
17023
17068
|
Client2.setWorkspaceContext(workspaceId || void 0, projectId || void 0);
|
|
17024
17069
|
}, [workspaceId, projectId]);
|
|
17025
|
-
const [workspaces, setWorkspaces] =
|
|
17026
|
-
const [projects, setProjects] =
|
|
17027
|
-
const [loading, setLoading] =
|
|
17028
|
-
const [error, setError] =
|
|
17070
|
+
const [workspaces, setWorkspaces] = useState44([]);
|
|
17071
|
+
const [projects, setProjects] = useState44([]);
|
|
17072
|
+
const [loading, setLoading] = useState44(false);
|
|
17073
|
+
const [error, setError] = useState44(null);
|
|
17029
17074
|
const client = React33.useMemo(() => {
|
|
17030
17075
|
return new WorkspaceClient({
|
|
17031
17076
|
baseURL: config.baseURL,
|
|
@@ -17034,6 +17079,21 @@ var WorkspaceContextProvider = ({
|
|
|
17034
17079
|
transport: "sse"
|
|
17035
17080
|
}, tenantId);
|
|
17036
17081
|
}, [config.baseURL, config.apiKey, tenantId]);
|
|
17082
|
+
const resetSelectedWorkspace = useCallback24(() => {
|
|
17083
|
+
setProjects([]);
|
|
17084
|
+
setWorkspaceId(null);
|
|
17085
|
+
sessionStorage.removeItem("workspaceId");
|
|
17086
|
+
setProjectId(null);
|
|
17087
|
+
sessionStorage.removeItem("projectId");
|
|
17088
|
+
}, [setProjects, setWorkspaceId, setProjectId]);
|
|
17089
|
+
const resetWS = useCallback24(() => {
|
|
17090
|
+
setWorkspaces([]);
|
|
17091
|
+
resetSelectedWorkspace();
|
|
17092
|
+
}, [resetSelectedWorkspace, setWorkspaces]);
|
|
17093
|
+
useEffect30(() => {
|
|
17094
|
+
resetWS();
|
|
17095
|
+
refreshWorkspaces();
|
|
17096
|
+
}, [tenantId]);
|
|
17037
17097
|
const refreshWorkspaces = useCallback24(async () => {
|
|
17038
17098
|
setLoading(true);
|
|
17039
17099
|
setError(null);
|
|
@@ -17128,7 +17188,7 @@ var WorkspaceContextProvider = ({
|
|
|
17128
17188
|
try {
|
|
17129
17189
|
await client.deleteWorkspace(id);
|
|
17130
17190
|
if (workspaceId === id) {
|
|
17131
|
-
|
|
17191
|
+
resetSelectedWorkspace();
|
|
17132
17192
|
}
|
|
17133
17193
|
await refreshWorkspaces();
|
|
17134
17194
|
} catch (e) {
|
|
@@ -17249,14 +17309,12 @@ var WorkspaceContextProvider = ({
|
|
|
17249
17309
|
[client, workspaceId, projectId]
|
|
17250
17310
|
);
|
|
17251
17311
|
const value = {
|
|
17252
|
-
tenantId,
|
|
17253
17312
|
workspaceId,
|
|
17254
17313
|
projectId,
|
|
17255
17314
|
workspaces,
|
|
17256
17315
|
projects,
|
|
17257
17316
|
loading,
|
|
17258
17317
|
error,
|
|
17259
|
-
setTenantId,
|
|
17260
17318
|
setWorkspace: setWorkspaceId,
|
|
17261
17319
|
setProject: setProjectId,
|
|
17262
17320
|
createWorkspace,
|
|
@@ -17293,15 +17351,15 @@ var WorkspaceContextProvider = ({
|
|
|
17293
17351
|
};
|
|
17294
17352
|
|
|
17295
17353
|
// src/components/Chat/DatabasePicker.tsx
|
|
17296
|
-
import { useRef as useRef16, useState as
|
|
17297
|
-
import { Modal as
|
|
17354
|
+
import { useRef as useRef16, useState as useState45 } from "react";
|
|
17355
|
+
import { Modal as Modal10, List as List7, Checkbox as Checkbox5, Spin as Spin8, Empty as Empty5, Typography as Typography26, Button as Button33, Space as Space22, Tooltip as Tooltip13 } from "antd";
|
|
17298
17356
|
import { Database as Database5 } from "lucide-react";
|
|
17299
|
-
import { Fragment as Fragment14, jsx as jsx71, jsxs as
|
|
17357
|
+
import { Fragment as Fragment14, jsx as jsx71, jsxs as jsxs45 } from "react/jsx-runtime";
|
|
17300
17358
|
var DatabasePicker = ({ senderRef, iconOnly }) => {
|
|
17301
|
-
const [modalOpen, setModalOpen] =
|
|
17302
|
-
const [databases, setDatabases] =
|
|
17303
|
-
const [loading, setLoading] =
|
|
17304
|
-
const [selectedDatabases, setSelectedDatabases] =
|
|
17359
|
+
const [modalOpen, setModalOpen] = useState45(false);
|
|
17360
|
+
const [databases, setDatabases] = useState45([]);
|
|
17361
|
+
const [loading, setLoading] = useState45(false);
|
|
17362
|
+
const [selectedDatabases, setSelectedDatabases] = useState45([]);
|
|
17305
17363
|
const { get } = useApi();
|
|
17306
17364
|
const fetchedRef = useRef16(false);
|
|
17307
17365
|
const loadDatabases = async () => {
|
|
@@ -17335,7 +17393,7 @@ var DatabasePicker = ({ senderRef, iconOnly }) => {
|
|
|
17335
17393
|
type: "tag",
|
|
17336
17394
|
key: `db_${dbKey}_${Date.now()}`,
|
|
17337
17395
|
props: {
|
|
17338
|
-
label: /* @__PURE__ */
|
|
17396
|
+
label: /* @__PURE__ */ jsxs45(Space22, { size: 1, children: [
|
|
17339
17397
|
/* @__PURE__ */ jsx71(Database5, { size: 10 }),
|
|
17340
17398
|
" ",
|
|
17341
17399
|
/* @__PURE__ */ jsx71(Typography26.Text, { children: db.name || dbKey })
|
|
@@ -17351,7 +17409,7 @@ var DatabasePicker = ({ senderRef, iconOnly }) => {
|
|
|
17351
17409
|
setModalOpen(false);
|
|
17352
17410
|
setSelectedDatabases([]);
|
|
17353
17411
|
};
|
|
17354
|
-
return /* @__PURE__ */
|
|
17412
|
+
return /* @__PURE__ */ jsxs45(Fragment14, { children: [
|
|
17355
17413
|
/* @__PURE__ */ jsx71(Tooltip13, { title: iconOnly ? "Database" : void 0, children: /* @__PURE__ */ jsx71(
|
|
17356
17414
|
Button33,
|
|
17357
17415
|
{
|
|
@@ -17374,7 +17432,7 @@ var DatabasePicker = ({ senderRef, iconOnly }) => {
|
|
|
17374
17432
|
}
|
|
17375
17433
|
) }),
|
|
17376
17434
|
/* @__PURE__ */ jsx71(
|
|
17377
|
-
|
|
17435
|
+
Modal10,
|
|
17378
17436
|
{
|
|
17379
17437
|
title: "Select Database",
|
|
17380
17438
|
open: modalOpen,
|
|
@@ -17443,15 +17501,15 @@ var DatabasePicker = ({ senderRef, iconOnly }) => {
|
|
|
17443
17501
|
};
|
|
17444
17502
|
|
|
17445
17503
|
// src/components/Chat/SkillPicker.tsx
|
|
17446
|
-
import { useRef as useRef17, useState as
|
|
17447
|
-
import { Modal as
|
|
17504
|
+
import { useRef as useRef17, useState as useState46 } from "react";
|
|
17505
|
+
import { Modal as Modal11, List as List8, Checkbox as Checkbox6, Spin as Spin9, Empty as Empty6, Typography as Typography27, Button as Button34, Space as Space23, Tooltip as Tooltip14 } from "antd";
|
|
17448
17506
|
import { BrainCircuit } from "lucide-react";
|
|
17449
|
-
import { Fragment as Fragment15, jsx as jsx72, jsxs as
|
|
17507
|
+
import { Fragment as Fragment15, jsx as jsx72, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
17450
17508
|
var SkillPicker = ({ senderRef, iconOnly }) => {
|
|
17451
|
-
const [modalOpen, setModalOpen] =
|
|
17452
|
-
const [skills, setSkills] =
|
|
17453
|
-
const [loading, setLoading] =
|
|
17454
|
-
const [selectedSkills, setSelectedSkills] =
|
|
17509
|
+
const [modalOpen, setModalOpen] = useState46(false);
|
|
17510
|
+
const [skills, setSkills] = useState46([]);
|
|
17511
|
+
const [loading, setLoading] = useState46(false);
|
|
17512
|
+
const [selectedSkills, setSelectedSkills] = useState46([]);
|
|
17455
17513
|
const { get } = useApi();
|
|
17456
17514
|
const fetchedRef = useRef17(false);
|
|
17457
17515
|
const loadSkills = async () => {
|
|
@@ -17485,7 +17543,7 @@ var SkillPicker = ({ senderRef, iconOnly }) => {
|
|
|
17485
17543
|
type: "tag",
|
|
17486
17544
|
key: `skill_${skillId}_${Date.now()}`,
|
|
17487
17545
|
props: {
|
|
17488
|
-
label: /* @__PURE__ */
|
|
17546
|
+
label: /* @__PURE__ */ jsxs46(Space23, { size: 1, children: [
|
|
17489
17547
|
/* @__PURE__ */ jsx72(BrainCircuit, { size: 12 }),
|
|
17490
17548
|
" ",
|
|
17491
17549
|
/* @__PURE__ */ jsx72(Typography27.Text, { children: skill.name })
|
|
@@ -17501,7 +17559,7 @@ var SkillPicker = ({ senderRef, iconOnly }) => {
|
|
|
17501
17559
|
setModalOpen(false);
|
|
17502
17560
|
setSelectedSkills([]);
|
|
17503
17561
|
};
|
|
17504
|
-
return /* @__PURE__ */
|
|
17562
|
+
return /* @__PURE__ */ jsxs46(Fragment15, { children: [
|
|
17505
17563
|
/* @__PURE__ */ jsx72(Tooltip14, { title: iconOnly ? "Skills" : void 0, children: /* @__PURE__ */ jsx72(
|
|
17506
17564
|
Button34,
|
|
17507
17565
|
{
|
|
@@ -17524,7 +17582,7 @@ var SkillPicker = ({ senderRef, iconOnly }) => {
|
|
|
17524
17582
|
}
|
|
17525
17583
|
) }),
|
|
17526
17584
|
/* @__PURE__ */ jsx72(
|
|
17527
|
-
|
|
17585
|
+
Modal11,
|
|
17528
17586
|
{
|
|
17529
17587
|
title: "Select Skills",
|
|
17530
17588
|
open: modalOpen,
|
|
@@ -17593,14 +17651,14 @@ var SkillPicker = ({ senderRef, iconOnly }) => {
|
|
|
17593
17651
|
};
|
|
17594
17652
|
|
|
17595
17653
|
// src/components/Chat/AgentPicker.tsx
|
|
17596
|
-
import { useRef as useRef18, useState as
|
|
17597
|
-
import { Modal as
|
|
17654
|
+
import { useRef as useRef18, useState as useState47 } from "react";
|
|
17655
|
+
import { Modal as Modal12, List as List9, Empty as Empty7, Typography as Typography28, Button as Button35, Tooltip as Tooltip15 } from "antd";
|
|
17598
17656
|
import { Bot as Bot2 } from "lucide-react";
|
|
17599
|
-
import { Fragment as Fragment16, jsx as jsx73, jsxs as
|
|
17657
|
+
import { Fragment as Fragment16, jsx as jsx73, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
17600
17658
|
var AgentPicker = ({ senderRef, iconOnly }) => {
|
|
17601
|
-
const [modalOpen, setModalOpen] =
|
|
17602
|
-
const [loading, setLoading] =
|
|
17603
|
-
const [selectedAgent, setSelectedAgent] =
|
|
17659
|
+
const [modalOpen, setModalOpen] = useState47(false);
|
|
17660
|
+
const [loading, setLoading] = useState47(false);
|
|
17661
|
+
const [selectedAgent, setSelectedAgent] = useState47(null);
|
|
17604
17662
|
const { assistants, currentAssistant, selectAssistant } = useAssistantContext();
|
|
17605
17663
|
const fetchedRef = useRef18(false);
|
|
17606
17664
|
const handleOpenModal = () => {
|
|
@@ -17616,7 +17674,7 @@ var AgentPicker = ({ senderRef, iconOnly }) => {
|
|
|
17616
17674
|
const handleAgentClick = (agentId) => {
|
|
17617
17675
|
setSelectedAgent(agentId);
|
|
17618
17676
|
};
|
|
17619
|
-
return /* @__PURE__ */
|
|
17677
|
+
return /* @__PURE__ */ jsxs47(Fragment16, { children: [
|
|
17620
17678
|
/* @__PURE__ */ jsx73(Tooltip15, { title: iconOnly ? currentAssistant?.name || "Agent" : void 0, children: /* @__PURE__ */ jsx73(
|
|
17621
17679
|
Button35,
|
|
17622
17680
|
{
|
|
@@ -17639,7 +17697,7 @@ var AgentPicker = ({ senderRef, iconOnly }) => {
|
|
|
17639
17697
|
}
|
|
17640
17698
|
) }),
|
|
17641
17699
|
/* @__PURE__ */ jsx73(
|
|
17642
|
-
|
|
17700
|
+
Modal12,
|
|
17643
17701
|
{
|
|
17644
17702
|
title: "Select Agent",
|
|
17645
17703
|
open: modalOpen,
|
|
@@ -17709,18 +17767,18 @@ var AgentPicker = ({ senderRef, iconOnly }) => {
|
|
|
17709
17767
|
};
|
|
17710
17768
|
|
|
17711
17769
|
// src/components/Chat/MetricsDataSourcePicker.tsx
|
|
17712
|
-
import { useEffect as useEffect32, useState as
|
|
17713
|
-
import { Modal as
|
|
17770
|
+
import { useEffect as useEffect32, useState as useState48, useRef as useRef19 } from "react";
|
|
17771
|
+
import { Modal as Modal13, List as List10, Spin as Spin11, Empty as Empty8, Typography as Typography29, Button as Button36, Tag as Tag14, Tooltip as Tooltip16 } from "antd";
|
|
17714
17772
|
import { Database as Database6, Check as Check4, Server as Server2 } from "lucide-react";
|
|
17715
|
-
import { Fragment as Fragment17, jsx as jsx74, jsxs as
|
|
17773
|
+
import { Fragment as Fragment17, jsx as jsx74, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
17716
17774
|
var SESSION_STORAGE_KEY = "metrics_datasource_selection";
|
|
17717
17775
|
var MetricsDataSourcePicker = ({
|
|
17718
17776
|
senderRef,
|
|
17719
17777
|
iconOnly
|
|
17720
17778
|
}) => {
|
|
17721
|
-
const [modalOpen, setModalOpen] =
|
|
17722
|
-
const [loading, setLoading] =
|
|
17723
|
-
const [dataSources, setDataSources] =
|
|
17779
|
+
const [modalOpen, setModalOpen] = useState48(false);
|
|
17780
|
+
const [loading, setLoading] = useState48(false);
|
|
17781
|
+
const [dataSources, setDataSources] = useState48([]);
|
|
17724
17782
|
const { config } = useLatticeChatShellContext();
|
|
17725
17783
|
const { customRunConfig, updateCustomRunConfig } = useConversationContext();
|
|
17726
17784
|
const { get } = useApi();
|
|
@@ -17801,19 +17859,25 @@ var MetricsDataSourcePicker = ({
|
|
|
17801
17859
|
useEffect32(() => {
|
|
17802
17860
|
if (hasInitializedRef.current) return;
|
|
17803
17861
|
hasInitializedRef.current = true;
|
|
17804
|
-
loadDataSources()
|
|
17805
|
-
|
|
17806
|
-
|
|
17807
|
-
|
|
17808
|
-
|
|
17809
|
-
|
|
17810
|
-
|
|
17811
|
-
|
|
17812
|
-
|
|
17813
|
-
|
|
17814
|
-
|
|
17815
|
-
|
|
17816
|
-
|
|
17862
|
+
loadDataSources().then(() => {
|
|
17863
|
+
const hasExistingSelection = customRunConfig?.metricsDataSource;
|
|
17864
|
+
if (hasExistingSelection) {
|
|
17865
|
+
saveToSessionStorage(
|
|
17866
|
+
hasExistingSelection.serverKey,
|
|
17867
|
+
hasExistingSelection.datasourceId
|
|
17868
|
+
);
|
|
17869
|
+
return;
|
|
17870
|
+
}
|
|
17871
|
+
const restored = restoreFromSessionStorage();
|
|
17872
|
+
if (!restored) {
|
|
17873
|
+
setDataSources((currentDataSources) => {
|
|
17874
|
+
if (currentDataSources.length > 0) {
|
|
17875
|
+
setModalOpen(true);
|
|
17876
|
+
}
|
|
17877
|
+
return currentDataSources;
|
|
17878
|
+
});
|
|
17879
|
+
}
|
|
17880
|
+
});
|
|
17817
17881
|
}, []);
|
|
17818
17882
|
const getSelectedDataSource = () => {
|
|
17819
17883
|
const metricsDataSource = customRunConfig?.metricsDataSource;
|
|
@@ -17850,13 +17914,14 @@ var MetricsDataSourcePicker = ({
|
|
|
17850
17914
|
acc[ds.serverName].push(ds);
|
|
17851
17915
|
return acc;
|
|
17852
17916
|
}, {});
|
|
17853
|
-
return /* @__PURE__ */
|
|
17854
|
-
/* @__PURE__ */ jsx74(Tooltip16, { title: iconOnly ? getSelectedName() || "Select Data Source" : void 0, children: /* @__PURE__ */ jsx74(
|
|
17917
|
+
return /* @__PURE__ */ jsxs48(Fragment17, { children: [
|
|
17918
|
+
/* @__PURE__ */ jsx74(Tooltip16, { title: iconOnly ? getSelectedName() || "Select Data Source" : dataSources.length === 0 ? "No data sources available" : void 0, children: /* @__PURE__ */ jsx74(
|
|
17855
17919
|
Button36,
|
|
17856
17920
|
{
|
|
17857
17921
|
icon: /* @__PURE__ */ jsx74(Database6, { size: iconOnly ? 18 : 18 }),
|
|
17858
17922
|
onClick: handleOpenModal,
|
|
17859
17923
|
type: "text",
|
|
17924
|
+
disabled: dataSources.length === 0,
|
|
17860
17925
|
style: {
|
|
17861
17926
|
height: 32,
|
|
17862
17927
|
width: iconOnly ? 32 : void 0,
|
|
@@ -17874,7 +17939,7 @@ var MetricsDataSourcePicker = ({
|
|
|
17874
17939
|
}
|
|
17875
17940
|
) }),
|
|
17876
17941
|
/* @__PURE__ */ jsx74(
|
|
17877
|
-
|
|
17942
|
+
Modal13,
|
|
17878
17943
|
{
|
|
17879
17944
|
title: /* @__PURE__ */ jsx74("div", { style: { fontSize: 16, fontWeight: 600 }, children: "Select Metrics Data Source" }),
|
|
17880
17945
|
open: modalOpen,
|
|
@@ -17894,8 +17959,8 @@ var MetricsDataSourcePicker = ({
|
|
|
17894
17959
|
description: "No Metrics Data Sources Available",
|
|
17895
17960
|
image: Empty8.PRESENTED_IMAGE_SIMPLE
|
|
17896
17961
|
}
|
|
17897
|
-
) : /* @__PURE__ */ jsx74("div", { style: { display: "flex", flexDirection: "column", gap: 24 }, children: Object.entries(groupedDataSources).map(([serverName, sources]) => /* @__PURE__ */
|
|
17898
|
-
/* @__PURE__ */
|
|
17962
|
+
) : /* @__PURE__ */ jsx74("div", { style: { display: "flex", flexDirection: "column", gap: 24 }, children: Object.entries(groupedDataSources).map(([serverName, sources]) => /* @__PURE__ */ jsxs48("div", { children: [
|
|
17963
|
+
/* @__PURE__ */ jsxs48(
|
|
17899
17964
|
"div",
|
|
17900
17965
|
{
|
|
17901
17966
|
style: {
|
|
@@ -17946,7 +18011,7 @@ var MetricsDataSourcePicker = ({
|
|
|
17946
18011
|
transition: "all 0.15s ease"
|
|
17947
18012
|
},
|
|
17948
18013
|
onClick: () => handleSelect(dataSource),
|
|
17949
|
-
children: /* @__PURE__ */
|
|
18014
|
+
children: /* @__PURE__ */ jsxs48(
|
|
17950
18015
|
"div",
|
|
17951
18016
|
{
|
|
17952
18017
|
style: {
|
|
@@ -17956,7 +18021,7 @@ var MetricsDataSourcePicker = ({
|
|
|
17956
18021
|
width: "100%"
|
|
17957
18022
|
},
|
|
17958
18023
|
children: [
|
|
17959
|
-
/* @__PURE__ */
|
|
18024
|
+
/* @__PURE__ */ jsxs48(
|
|
17960
18025
|
"div",
|
|
17961
18026
|
{
|
|
17962
18027
|
style: {
|
|
@@ -17987,7 +18052,7 @@ var MetricsDataSourcePicker = ({
|
|
|
17987
18052
|
)
|
|
17988
18053
|
}
|
|
17989
18054
|
),
|
|
17990
|
-
/* @__PURE__ */
|
|
18055
|
+
/* @__PURE__ */ jsxs48("div", { children: [
|
|
17991
18056
|
/* @__PURE__ */ jsx74(
|
|
17992
18057
|
Typography29.Text,
|
|
17993
18058
|
{
|
|
@@ -18061,9 +18126,9 @@ import {
|
|
|
18061
18126
|
} from "@ant-design/icons";
|
|
18062
18127
|
import { Prompts } from "@ant-design/x";
|
|
18063
18128
|
import { Space as Space25, Typography as Typography30, Spin as Spin12 } from "antd";
|
|
18064
|
-
import { useEffect as useEffect33, useState as
|
|
18129
|
+
import { useEffect as useEffect33, useState as useState49, useMemo as useMemo17 } from "react";
|
|
18065
18130
|
import { BrainCircuit as BrainCircuit2 } from "lucide-react";
|
|
18066
|
-
import { jsx as jsx75, jsxs as
|
|
18131
|
+
import { jsx as jsx75, jsxs as jsxs49 } from "react/jsx-runtime";
|
|
18067
18132
|
var categoryConfig = {
|
|
18068
18133
|
business_analysis: {
|
|
18069
18134
|
icon: /* @__PURE__ */ jsx75(BarChartOutlined, {}),
|
|
@@ -18146,9 +18211,9 @@ var SkillCategoryPrompts = ({
|
|
|
18146
18211
|
senderRef,
|
|
18147
18212
|
visible = true
|
|
18148
18213
|
}) => {
|
|
18149
|
-
const [skills, setSkills] =
|
|
18150
|
-
const [loading, setLoading] =
|
|
18151
|
-
const [showAll, setShowAll] =
|
|
18214
|
+
const [skills, setSkills] = useState49([]);
|
|
18215
|
+
const [loading, setLoading] = useState49(false);
|
|
18216
|
+
const [showAll, setShowAll] = useState49(false);
|
|
18152
18217
|
const { get } = useApi();
|
|
18153
18218
|
const MAX_SIMPLE_ITEMS = 10;
|
|
18154
18219
|
useEffect33(() => {
|
|
@@ -18188,7 +18253,7 @@ var SkillCategoryPrompts = ({
|
|
|
18188
18253
|
type: "tag",
|
|
18189
18254
|
key: `skill_${skill.id}_${Date.now()}`,
|
|
18190
18255
|
props: {
|
|
18191
|
-
label: /* @__PURE__ */
|
|
18256
|
+
label: /* @__PURE__ */ jsxs49(Space25, { size: 1, children: [
|
|
18192
18257
|
/* @__PURE__ */ jsx75(BrainCircuit2, { size: 12 }),
|
|
18193
18258
|
/* @__PURE__ */ jsx75(Typography30.Text, { children: skill.name })
|
|
18194
18259
|
] }),
|
|
@@ -18294,7 +18359,7 @@ var SkillCategoryPrompts = ({
|
|
|
18294
18359
|
return /* @__PURE__ */ jsx75("div", { style: { marginBottom: 16 }, children: /* @__PURE__ */ jsx75(
|
|
18295
18360
|
Prompts,
|
|
18296
18361
|
{
|
|
18297
|
-
title: /* @__PURE__ */
|
|
18362
|
+
title: /* @__PURE__ */ jsxs49(Space25, { children: [
|
|
18298
18363
|
/* @__PURE__ */ jsx75("span", { style: { color: config.color }, children: config.icon }),
|
|
18299
18364
|
/* @__PURE__ */ jsx75("span", { children: config.label })
|
|
18300
18365
|
] }),
|
|
@@ -18330,8 +18395,8 @@ import {
|
|
|
18330
18395
|
} from "@ant-design/icons";
|
|
18331
18396
|
import { Prompts as Prompts2 } from "@ant-design/x";
|
|
18332
18397
|
import { Space as Space26, Tabs } from "antd";
|
|
18333
|
-
import { useState as
|
|
18334
|
-
import { jsx as jsx76, jsxs as
|
|
18398
|
+
import { useState as useState50, useMemo as useMemo18 } from "react";
|
|
18399
|
+
import { jsx as jsx76, jsxs as jsxs50 } from "react/jsx-runtime";
|
|
18335
18400
|
var defaultCategoryIcons = {
|
|
18336
18401
|
financial: /* @__PURE__ */ jsx76(DollarOutlined, {}),
|
|
18337
18402
|
sales: /* @__PURE__ */ jsx76(LineChartOutlined, {}),
|
|
@@ -18549,7 +18614,7 @@ var BusinessAnalysisPrompts = ({
|
|
|
18549
18614
|
simpleModeTitle = "Quick Analysis",
|
|
18550
18615
|
expandModeTitle = "Analysis Categories"
|
|
18551
18616
|
}) => {
|
|
18552
|
-
const [showAll, setShowAll] =
|
|
18617
|
+
const [showAll, setShowAll] = useState50(false);
|
|
18553
18618
|
const { config } = useLatticeChatShellContext();
|
|
18554
18619
|
const analysisData = useMemo18(() => {
|
|
18555
18620
|
const customData = config.quickPromptsData;
|
|
@@ -18661,7 +18726,7 @@ var BusinessAnalysisPrompts = ({
|
|
|
18661
18726
|
defaultActiveKey: analysisData[0]?.key,
|
|
18662
18727
|
items: analysisData.map((category) => ({
|
|
18663
18728
|
key: category.key,
|
|
18664
|
-
label: /* @__PURE__ */
|
|
18729
|
+
label: /* @__PURE__ */ jsxs50(Space26, { children: [
|
|
18665
18730
|
/* @__PURE__ */ jsx76("span", { style: { color: category.color }, children: category.icon }),
|
|
18666
18731
|
/* @__PURE__ */ jsx76("span", { children: category.title })
|
|
18667
18732
|
] }),
|
|
@@ -18693,7 +18758,7 @@ var BusinessAnalysisPrompts = ({
|
|
|
18693
18758
|
};
|
|
18694
18759
|
|
|
18695
18760
|
// src/components/Chat/Chating.tsx
|
|
18696
|
-
import { Fragment as Fragment18, jsx as jsx77, jsxs as
|
|
18761
|
+
import { Fragment as Fragment18, jsx as jsx77, jsxs as jsxs51 } from "react/jsx-runtime";
|
|
18697
18762
|
var slotConfig = [];
|
|
18698
18763
|
var Chating = ({
|
|
18699
18764
|
avatar,
|
|
@@ -18713,10 +18778,10 @@ var Chating = ({
|
|
|
18713
18778
|
emptyStateQuestion = "Ready to turn data into insightful charts in seconds?",
|
|
18714
18779
|
welcomePrefix = "Hey"
|
|
18715
18780
|
}) => {
|
|
18716
|
-
const [content, setContent] =
|
|
18717
|
-
const [attachedFiles, setAttachedFiles] =
|
|
18781
|
+
const [content, setContent] = useState51("");
|
|
18782
|
+
const [attachedFiles, setAttachedFiles] = useState51([]);
|
|
18718
18783
|
const { styles } = useStyle();
|
|
18719
|
-
const [headerOpen, setHeaderOpen] =
|
|
18784
|
+
const [headerOpen, setHeaderOpen] = useState51(false);
|
|
18720
18785
|
const attachmentsRef = useRef20(null);
|
|
18721
18786
|
const senderRef = React40.useRef(null);
|
|
18722
18787
|
const {
|
|
@@ -18733,8 +18798,8 @@ var Chating = ({
|
|
|
18733
18798
|
clearError
|
|
18734
18799
|
} = useAgentChat();
|
|
18735
18800
|
const conversationContext = useConversationContext();
|
|
18736
|
-
const [isEmptyState, setIsEmptyState] =
|
|
18737
|
-
const [isTransitioning, setIsTransitioning] =
|
|
18801
|
+
const [isEmptyState, setIsEmptyState] = useState51(messages.length === 0);
|
|
18802
|
+
const [isTransitioning, setIsTransitioning] = useState51(false);
|
|
18738
18803
|
useEffect34(() => {
|
|
18739
18804
|
if (messages.length > 0 && isEmptyState) {
|
|
18740
18805
|
setIsTransitioning(true);
|
|
@@ -18755,9 +18820,9 @@ var Chating = ({
|
|
|
18755
18820
|
const listPathByFolder = workspaceContext?.listPathByFolder ?? (async () => []);
|
|
18756
18821
|
const workspaceId = workspaceContext?.workspaceId ?? null;
|
|
18757
18822
|
const projectId = workspaceContext?.projectId ?? null;
|
|
18758
|
-
const [workspaceFiles, setWorkspaceFiles] =
|
|
18759
|
-
const [suggestionsLoading, setSuggestionsLoading] =
|
|
18760
|
-
const [suggestionsOpen, setSuggestionsOpen] =
|
|
18823
|
+
const [workspaceFiles, setWorkspaceFiles] = useState51([]);
|
|
18824
|
+
const [suggestionsLoading, setSuggestionsLoading] = useState51(false);
|
|
18825
|
+
const [suggestionsOpen, setSuggestionsOpen] = useState51(false);
|
|
18761
18826
|
const getFileIcon3 = (filename) => {
|
|
18762
18827
|
const ext = filename.split(".").pop()?.toLowerCase();
|
|
18763
18828
|
const iconStyle = { fontSize: 16 };
|
|
@@ -18965,8 +19030,8 @@ var Chating = ({
|
|
|
18965
19030
|
if (!hasSlotButtons && !actionNode) {
|
|
18966
19031
|
return null;
|
|
18967
19032
|
}
|
|
18968
|
-
return /* @__PURE__ */
|
|
18969
|
-
/* @__PURE__ */
|
|
19033
|
+
return /* @__PURE__ */ jsxs51(Flex5, { justify: "space-between", align: "center", style: { padding: "8px 0" }, children: [
|
|
19034
|
+
/* @__PURE__ */ jsxs51(Flex5, { align: "center", gap: 8, children: [
|
|
18970
19035
|
/* @__PURE__ */ jsx77(Badge5, { dot: attachedFiles.length > 0 && !headerOpen, children: /* @__PURE__ */ jsx77(
|
|
18971
19036
|
Button37,
|
|
18972
19037
|
{
|
|
@@ -18976,7 +19041,7 @@ var Chating = ({
|
|
|
18976
19041
|
}
|
|
18977
19042
|
) }),
|
|
18978
19043
|
/* @__PURE__ */ jsx77(Divider6, { type: "vertical", style: { margin: 0 } }),
|
|
18979
|
-
hasSlotButtons && /* @__PURE__ */
|
|
19044
|
+
hasSlotButtons && /* @__PURE__ */ jsxs51(Flex5, { align: "center", gap: 8, children: [
|
|
18980
19045
|
showAgentSlot && /* @__PURE__ */ jsx77(AgentPicker, { senderRef, iconOnly: true }),
|
|
18981
19046
|
showDatabaseSlot && /* @__PURE__ */ jsx77(DatabasePicker, { senderRef, iconOnly: true }),
|
|
18982
19047
|
showSkillSlot && /* @__PURE__ */ jsx77(SkillPicker, { senderRef, iconOnly: true }),
|
|
@@ -19000,8 +19065,8 @@ var Chating = ({
|
|
|
19000
19065
|
...showRefreshButton ? [refreshButton] : [],
|
|
19001
19066
|
/* @__PURE__ */ jsx77(ThreadManagementButtons, {}, "thread-buttons")
|
|
19002
19067
|
];
|
|
19003
|
-
const [skills, setSkills] =
|
|
19004
|
-
const [skillsLoading, setSkillsLoading] =
|
|
19068
|
+
const [skills, setSkills] = useState51([]);
|
|
19069
|
+
const [skillsLoading, setSkillsLoading] = useState51(false);
|
|
19005
19070
|
const { get: apiGet } = useApi();
|
|
19006
19071
|
const loadSkills = async () => {
|
|
19007
19072
|
if (skills.length > 0) return;
|
|
@@ -19018,7 +19083,7 @@ var Chating = ({
|
|
|
19018
19083
|
}
|
|
19019
19084
|
};
|
|
19020
19085
|
const renderSender = (isEmpty) => {
|
|
19021
|
-
const [suggestionMode, setSuggestionMode] =
|
|
19086
|
+
const [suggestionMode, setSuggestionMode] = useState51(null);
|
|
19022
19087
|
const suggestionItems = suggestionMode === "skills" ? skills.map((skill) => ({
|
|
19023
19088
|
value: skill.name,
|
|
19024
19089
|
icon: /* @__PURE__ */ jsx77(BrainCircuit3, { size: 14, style: { color: "#722ed1" } }),
|
|
@@ -19040,7 +19105,7 @@ var Chating = ({
|
|
|
19040
19105
|
type: "tag",
|
|
19041
19106
|
key: `skill_${itemVal}_${Date.now()}`,
|
|
19042
19107
|
props: {
|
|
19043
|
-
label: /* @__PURE__ */
|
|
19108
|
+
label: /* @__PURE__ */ jsxs51(Space27, { size: 1, children: [
|
|
19044
19109
|
/* @__PURE__ */ jsx77(BrainCircuit3, { size: 12 }),
|
|
19045
19110
|
/* @__PURE__ */ jsx77(Typography32.Text, { children: itemVal })
|
|
19046
19111
|
] }),
|
|
@@ -19110,7 +19175,7 @@ var Chating = ({
|
|
|
19110
19175
|
}
|
|
19111
19176
|
);
|
|
19112
19177
|
};
|
|
19113
|
-
return /* @__PURE__ */
|
|
19178
|
+
return /* @__PURE__ */ jsxs51(Fragment18, { children: [
|
|
19114
19179
|
/* @__PURE__ */ jsx77(
|
|
19115
19180
|
"div",
|
|
19116
19181
|
{
|
|
@@ -19143,13 +19208,13 @@ var Chating = ({
|
|
|
19143
19208
|
)
|
|
19144
19209
|
}
|
|
19145
19210
|
),
|
|
19146
|
-
isEmptyState && /* @__PURE__ */
|
|
19211
|
+
isEmptyState && /* @__PURE__ */ jsxs51(
|
|
19147
19212
|
"div",
|
|
19148
19213
|
{
|
|
19149
19214
|
className: `${styles.emptyStateContainer} ${isTransitioning ? styles.exiting : ""}`,
|
|
19150
19215
|
children: [
|
|
19151
|
-
/* @__PURE__ */
|
|
19152
|
-
/* @__PURE__ */ jsx77("div", { className: styles.greeting, children: emptyStateGreeting ? emptyStateGreeting : /* @__PURE__ */
|
|
19216
|
+
/* @__PURE__ */ jsxs51("div", { className: styles.welcomeSection, children: [
|
|
19217
|
+
/* @__PURE__ */ jsx77("div", { className: styles.greeting, children: emptyStateGreeting ? emptyStateGreeting : /* @__PURE__ */ jsxs51(Fragment18, { children: [
|
|
19153
19218
|
welcomePrefix,
|
|
19154
19219
|
" ",
|
|
19155
19220
|
/* @__PURE__ */ jsx77("span", { className: "user-name", children: displayUserName })
|
|
@@ -19177,7 +19242,7 @@ var Chating = ({
|
|
|
19177
19242
|
]
|
|
19178
19243
|
}
|
|
19179
19244
|
),
|
|
19180
|
-
!isEmptyState && /* @__PURE__ */
|
|
19245
|
+
!isEmptyState && /* @__PURE__ */ jsxs51(Fragment18, { children: [
|
|
19181
19246
|
/* @__PURE__ */ jsx77(
|
|
19182
19247
|
MessageList,
|
|
19183
19248
|
{
|
|
@@ -19237,7 +19302,7 @@ import {
|
|
|
19237
19302
|
SearchOutlined
|
|
19238
19303
|
} from "@ant-design/icons";
|
|
19239
19304
|
import { createStyles as createStyles17 } from "antd-style";
|
|
19240
|
-
import { jsx as jsx79, jsxs as
|
|
19305
|
+
import { jsx as jsx79, jsxs as jsxs52 } from "react/jsx-runtime";
|
|
19241
19306
|
var { Text: Text25 } = Typography34;
|
|
19242
19307
|
var useStyle8 = createStyles17(({ token, css }) => ({
|
|
19243
19308
|
listContainer: css`
|
|
@@ -19352,7 +19417,7 @@ var InternetSearchCard = ({
|
|
|
19352
19417
|
if (!toolCallData) {
|
|
19353
19418
|
return null;
|
|
19354
19419
|
}
|
|
19355
|
-
const header = /* @__PURE__ */
|
|
19420
|
+
const header = /* @__PURE__ */ jsxs52(Space28, { children: [
|
|
19356
19421
|
/* @__PURE__ */ jsx79(Text25, { strong: true, children: "Internet Search" }),
|
|
19357
19422
|
/* @__PURE__ */ jsx79(Text25, { title: query, children: query })
|
|
19358
19423
|
] });
|
|
@@ -19372,7 +19437,7 @@ var InternetSearchCard = ({
|
|
|
19372
19437
|
const domain = getDomainFromUrl(url);
|
|
19373
19438
|
const iconText = getIconText(domain);
|
|
19374
19439
|
const iconColor = getIconColor(domain);
|
|
19375
|
-
return /* @__PURE__ */ jsx79(List11.Item, { extra: /* @__PURE__ */ jsx79(Text25, { className: styles.source, children: domain }), children: /* @__PURE__ */
|
|
19440
|
+
return /* @__PURE__ */ jsx79(List11.Item, { extra: /* @__PURE__ */ jsx79(Text25, { className: styles.source, children: domain }), children: /* @__PURE__ */ jsxs52(Space28, { style: { width: "100%" }, children: [
|
|
19376
19441
|
/* @__PURE__ */ jsx79(Avatar7, { style: { background: iconColor }, children: iconText }),
|
|
19377
19442
|
" ",
|
|
19378
19443
|
/* @__PURE__ */ jsx79(
|
|
@@ -19398,7 +19463,7 @@ var InternetSearchCard = ({
|
|
|
19398
19463
|
};
|
|
19399
19464
|
|
|
19400
19465
|
// src/components/GenUI/elements/schedule_viewer.tsx
|
|
19401
|
-
import { useState as
|
|
19466
|
+
import { useState as useState52, useEffect as useEffect35, useCallback as useCallback25 } from "react";
|
|
19402
19467
|
import {
|
|
19403
19468
|
Tag as Tag15,
|
|
19404
19469
|
Button as Button39,
|
|
@@ -19431,7 +19496,7 @@ import {
|
|
|
19431
19496
|
ScheduledTaskStatus as ScheduledTaskStatus2,
|
|
19432
19497
|
ScheduleExecutionType
|
|
19433
19498
|
} from "@axiom-lattice/client-sdk";
|
|
19434
|
-
import { jsx as jsx80, jsxs as
|
|
19499
|
+
import { jsx as jsx80, jsxs as jsxs53 } from "react/jsx-runtime";
|
|
19435
19500
|
dayjs2.extend(relativeTime);
|
|
19436
19501
|
var { Text: Text26, Title: Title5 } = Typography35;
|
|
19437
19502
|
var useStyles7 = createStyles18(({ token, css }) => ({
|
|
@@ -19558,9 +19623,9 @@ var ScheduleViewer = ({ data }) => {
|
|
|
19558
19623
|
const { styles } = useStyles7();
|
|
19559
19624
|
const { threadId, assistantId, tasks: initialTasks, onRefresh } = data ?? {};
|
|
19560
19625
|
const client = useClient(assistantId || "");
|
|
19561
|
-
const [tasks, setTasks] =
|
|
19562
|
-
const [loading, setLoading] =
|
|
19563
|
-
const [actionLoading, setActionLoading] =
|
|
19626
|
+
const [tasks, setTasks] = useState52(initialTasks || []);
|
|
19627
|
+
const [loading, setLoading] = useState52(false);
|
|
19628
|
+
const [actionLoading, setActionLoading] = useState52(null);
|
|
19564
19629
|
const handleRefresh = useCallback25(async () => {
|
|
19565
19630
|
if (!threadId) return;
|
|
19566
19631
|
setLoading(true);
|
|
@@ -19638,7 +19703,7 @@ var ScheduleViewer = ({ data }) => {
|
|
|
19638
19703
|
const isPending = task.status === ScheduledTaskStatus2.PENDING;
|
|
19639
19704
|
const isPaused = task.status === ScheduledTaskStatus2.PAUSED;
|
|
19640
19705
|
const isCron = task.executionType === ScheduleExecutionType.CRON;
|
|
19641
|
-
return /* @__PURE__ */
|
|
19706
|
+
return /* @__PURE__ */ jsxs53(Space29, { className: styles.actions, children: [
|
|
19642
19707
|
isPending && isCron && /* @__PURE__ */ jsx80(Tooltip17, { title: "Pause", children: /* @__PURE__ */ jsx80(
|
|
19643
19708
|
Button39,
|
|
19644
19709
|
{
|
|
@@ -19683,53 +19748,53 @@ var ScheduleViewer = ({ data }) => {
|
|
|
19683
19748
|
};
|
|
19684
19749
|
const renderTask = (task) => {
|
|
19685
19750
|
const isActive = task.status === ScheduledTaskStatus2.PENDING || task.status === ScheduledTaskStatus2.PAUSED;
|
|
19686
|
-
return /* @__PURE__ */
|
|
19751
|
+
return /* @__PURE__ */ jsxs53(
|
|
19687
19752
|
Card16,
|
|
19688
19753
|
{
|
|
19689
19754
|
className: styles.taskCard,
|
|
19690
19755
|
size: "small",
|
|
19691
19756
|
bordered: true,
|
|
19692
19757
|
children: [
|
|
19693
|
-
/* @__PURE__ */
|
|
19694
|
-
/* @__PURE__ */
|
|
19758
|
+
/* @__PURE__ */ jsxs53("div", { className: styles.taskHeader, children: [
|
|
19759
|
+
/* @__PURE__ */ jsxs53("div", { children: [
|
|
19695
19760
|
/* @__PURE__ */ jsx80("div", { className: styles.taskType, children: task.taskType }),
|
|
19696
19761
|
/* @__PURE__ */ jsx80("div", { className: styles.taskId, children: task.taskId })
|
|
19697
19762
|
] }),
|
|
19698
19763
|
/* @__PURE__ */ jsx80(Tag15, { color: getStatusColor(task.status), icon: getStatusIcon2(task.status), children: task.status.toUpperCase() })
|
|
19699
19764
|
] }),
|
|
19700
|
-
/* @__PURE__ */
|
|
19701
|
-
/* @__PURE__ */ jsx80(Tooltip17, { title: "Execution Type", children: /* @__PURE__ */
|
|
19765
|
+
/* @__PURE__ */ jsxs53("div", { className: styles.metaRow, children: [
|
|
19766
|
+
/* @__PURE__ */ jsx80(Tooltip17, { title: "Execution Type", children: /* @__PURE__ */ jsxs53("div", { className: styles.metaItem, children: [
|
|
19702
19767
|
/* @__PURE__ */ jsx80(FieldTimeOutlined, {}),
|
|
19703
19768
|
/* @__PURE__ */ jsx80("span", { children: task.executionType === ScheduleExecutionType.CRON ? "Recurring" : "One-time" })
|
|
19704
19769
|
] }) }),
|
|
19705
|
-
task.cronExpression && /* @__PURE__ */ jsx80(Tooltip17, { title: "Cron Expression", children: /* @__PURE__ */
|
|
19770
|
+
task.cronExpression && /* @__PURE__ */ jsx80(Tooltip17, { title: "Cron Expression", children: /* @__PURE__ */ jsxs53("div", { className: styles.metaItem, children: [
|
|
19706
19771
|
/* @__PURE__ */ jsx80(ClockCircleOutlined2, {}),
|
|
19707
19772
|
/* @__PURE__ */ jsx80("code", { className: styles.cronExpression, children: task.cronExpression })
|
|
19708
19773
|
] }) }),
|
|
19709
|
-
task.nextRunAt && /* @__PURE__ */ jsx80(Tooltip17, { title: `Next run: ${formatTime(task.nextRunAt)}`, children: /* @__PURE__ */
|
|
19774
|
+
task.nextRunAt && /* @__PURE__ */ jsx80(Tooltip17, { title: `Next run: ${formatTime(task.nextRunAt)}`, children: /* @__PURE__ */ jsxs53("div", { className: styles.metaItem, children: [
|
|
19710
19775
|
/* @__PURE__ */ jsx80(ClockCircleOutlined2, {}),
|
|
19711
|
-
/* @__PURE__ */
|
|
19776
|
+
/* @__PURE__ */ jsxs53("span", { children: [
|
|
19712
19777
|
"Next: ",
|
|
19713
19778
|
getRelativeTime(task.nextRunAt)
|
|
19714
19779
|
] })
|
|
19715
19780
|
] }) }),
|
|
19716
|
-
task.executeAt && !task.cronExpression && /* @__PURE__ */ jsx80(Tooltip17, { title: `Execute at: ${formatTime(task.executeAt)}`, children: /* @__PURE__ */
|
|
19781
|
+
task.executeAt && !task.cronExpression && /* @__PURE__ */ jsx80(Tooltip17, { title: `Execute at: ${formatTime(task.executeAt)}`, children: /* @__PURE__ */ jsxs53("div", { className: styles.metaItem, children: [
|
|
19717
19782
|
/* @__PURE__ */ jsx80(ClockCircleOutlined2, {}),
|
|
19718
|
-
/* @__PURE__ */
|
|
19783
|
+
/* @__PURE__ */ jsxs53("span", { children: [
|
|
19719
19784
|
"At: ",
|
|
19720
19785
|
getRelativeTime(task.executeAt)
|
|
19721
19786
|
] })
|
|
19722
19787
|
] }) }),
|
|
19723
|
-
task.runCount > 0 && /* @__PURE__ */ jsx80(Tooltip17, { title: "Run count", children: /* @__PURE__ */
|
|
19788
|
+
task.runCount > 0 && /* @__PURE__ */ jsx80(Tooltip17, { title: "Run count", children: /* @__PURE__ */ jsxs53("div", { className: styles.metaItem, children: [
|
|
19724
19789
|
/* @__PURE__ */ jsx80(SyncOutlined2, {}),
|
|
19725
|
-
/* @__PURE__ */
|
|
19790
|
+
/* @__PURE__ */ jsxs53("span", { children: [
|
|
19726
19791
|
"Runs: ",
|
|
19727
19792
|
task.runCount,
|
|
19728
19793
|
task.maxRuns ? ` / ${task.maxRuns}` : ""
|
|
19729
19794
|
] })
|
|
19730
19795
|
] }) })
|
|
19731
19796
|
] }),
|
|
19732
|
-
task.lastError && /* @__PURE__ */ jsx80("div", { style: { marginTop: 8 }, children: /* @__PURE__ */
|
|
19797
|
+
task.lastError && /* @__PURE__ */ jsx80("div", { style: { marginTop: 8 }, children: /* @__PURE__ */ jsxs53(Text26, { type: "danger", style: { fontSize: 12 }, children: [
|
|
19733
19798
|
/* @__PURE__ */ jsx80(ExclamationCircleOutlined, { style: { marginRight: 4 } }),
|
|
19734
19799
|
task.lastError
|
|
19735
19800
|
] }) }),
|
|
@@ -19752,8 +19817,8 @@ var ScheduleViewer = ({ data }) => {
|
|
|
19752
19817
|
task.taskId
|
|
19753
19818
|
);
|
|
19754
19819
|
};
|
|
19755
|
-
return /* @__PURE__ */
|
|
19756
|
-
/* @__PURE__ */
|
|
19820
|
+
return /* @__PURE__ */ jsxs53("div", { className: styles.container, children: [
|
|
19821
|
+
/* @__PURE__ */ jsxs53("div", { className: styles.header, children: [
|
|
19757
19822
|
/* @__PURE__ */ jsx80(Title5, { level: 5, style: { margin: 0 }, children: "Scheduled Tasks" }),
|
|
19758
19823
|
/* @__PURE__ */ jsx80(Tooltip17, { title: "Refresh", children: /* @__PURE__ */ jsx80(
|
|
19759
19824
|
Button39,
|
|
@@ -19765,7 +19830,7 @@ var ScheduleViewer = ({ data }) => {
|
|
|
19765
19830
|
}
|
|
19766
19831
|
) })
|
|
19767
19832
|
] }),
|
|
19768
|
-
loading && tasks.length === 0 ? /* @__PURE__ */
|
|
19833
|
+
loading && tasks.length === 0 ? /* @__PURE__ */ jsxs53("div", { className: styles.emptyContainer, children: [
|
|
19769
19834
|
/* @__PURE__ */ jsx80(Spin13, { size: "large" }),
|
|
19770
19835
|
/* @__PURE__ */ jsx80(Text26, { type: "secondary", style: { marginTop: 16 }, children: "Loading scheduled tasks..." })
|
|
19771
19836
|
] }) : tasks.length === 0 ? /* @__PURE__ */ jsx80("div", { className: styles.emptyContainer, children: /* @__PURE__ */ jsx80(
|
|
@@ -19781,7 +19846,7 @@ var ScheduleViewer = ({ data }) => {
|
|
|
19781
19846
|
// src/components/GenUI/elements/browser_view_card.tsx
|
|
19782
19847
|
import { Button as Button40, Flex as Flex6, Typography as Typography36 } from "antd";
|
|
19783
19848
|
import { CheckCircleOutlined as CheckCircleOutlined7, InfoCircleOutlined as InfoCircleOutlined5, LoadingOutlined as LoadingOutlined3 } from "@ant-design/icons";
|
|
19784
|
-
import { jsx as jsx81, jsxs as
|
|
19849
|
+
import { jsx as jsx81, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
19785
19850
|
var { Text: Text27 } = Typography36;
|
|
19786
19851
|
var BrowserViewer = ({
|
|
19787
19852
|
data,
|
|
@@ -19824,7 +19889,7 @@ var BrowserViewer = ({
|
|
|
19824
19889
|
return "Error parsing args";
|
|
19825
19890
|
}
|
|
19826
19891
|
};
|
|
19827
|
-
const header = /* @__PURE__ */
|
|
19892
|
+
const header = /* @__PURE__ */ jsxs54(Flex6, { align: "center", wrap: "wrap", children: [
|
|
19828
19893
|
/* @__PURE__ */ jsx81(Typography36.Text, { strong: true, children: formatToolName(toolCallData.name) }),
|
|
19829
19894
|
/* @__PURE__ */ jsx81(
|
|
19830
19895
|
Typography36.Text,
|
|
@@ -19873,7 +19938,7 @@ var BrowserViewer = ({
|
|
|
19873
19938
|
|
|
19874
19939
|
// src/components/GenUI/elements/execute_code.tsx
|
|
19875
19940
|
import { Button as Button41, Space as Space31, Typography as Typography37 } from "antd";
|
|
19876
|
-
import { jsx as jsx82, jsxs as
|
|
19941
|
+
import { jsx as jsx82, jsxs as jsxs55 } from "react/jsx-runtime";
|
|
19877
19942
|
var { Text: Text28 } = Typography37;
|
|
19878
19943
|
var ExecuteCode = ({
|
|
19879
19944
|
data,
|
|
@@ -19900,7 +19965,7 @@ var ExecuteCode = ({
|
|
|
19900
19965
|
const content = `\`\`\`${language}
|
|
19901
19966
|
${code}
|
|
19902
19967
|
\`\`\``;
|
|
19903
|
-
return /* @__PURE__ */
|
|
19968
|
+
return /* @__PURE__ */ jsxs55(
|
|
19904
19969
|
ContentPreviewCollapse,
|
|
19905
19970
|
{
|
|
19906
19971
|
panelKey: toolCallData.id,
|
|
@@ -19930,7 +19995,7 @@ ${code}
|
|
|
19930
19995
|
import { Card as Card17, Typography as Typography38, Avatar as Avatar8, Tag as Tag16, List as List13, Space as Space32, Button as Button42, Skeleton as Skeleton2 } from "antd";
|
|
19931
19996
|
import { UserOutlined as UserOutlined5, TeamOutlined as TeamOutlined2 } from "@ant-design/icons";
|
|
19932
19997
|
import { Monitor } from "lucide-react";
|
|
19933
|
-
import { jsx as jsx83, jsxs as
|
|
19998
|
+
import { jsx as jsx83, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
19934
19999
|
var { Text: Text29 } = Typography38;
|
|
19935
20000
|
var extractTeamInfo = (response) => {
|
|
19936
20001
|
if (!response) return null;
|
|
@@ -20026,12 +20091,12 @@ var TeamGraph = ({ data }) => {
|
|
|
20026
20091
|
if (teammates.length === 0) {
|
|
20027
20092
|
return /* @__PURE__ */ jsx83(Card17, { style: { width: "100%" }, bodyStyle: { padding: 12 }, children: /* @__PURE__ */ jsx83(Skeleton2, { active: true }) });
|
|
20028
20093
|
}
|
|
20029
|
-
return /* @__PURE__ */
|
|
20094
|
+
return /* @__PURE__ */ jsxs56(
|
|
20030
20095
|
Card17,
|
|
20031
20096
|
{
|
|
20032
20097
|
style: { width: "100%" },
|
|
20033
20098
|
bodyStyle: { padding: 12 },
|
|
20034
|
-
title: /* @__PURE__ */
|
|
20099
|
+
title: /* @__PURE__ */ jsxs56(Space32, { children: [
|
|
20035
20100
|
/* @__PURE__ */ jsx83(TeamOutlined2, {}),
|
|
20036
20101
|
/* @__PURE__ */ jsx83("span", { children: "Team Members" })
|
|
20037
20102
|
] }),
|
|
@@ -20049,8 +20114,8 @@ var TeamGraph = ({ data }) => {
|
|
|
20049
20114
|
List13,
|
|
20050
20115
|
{
|
|
20051
20116
|
dataSource: teammates,
|
|
20052
|
-
renderItem: (teammate) => /* @__PURE__ */
|
|
20053
|
-
/* @__PURE__ */
|
|
20117
|
+
renderItem: (teammate) => /* @__PURE__ */ jsxs56(List13.Item, { style: { display: "block" }, children: [
|
|
20118
|
+
/* @__PURE__ */ jsxs56(Space32, { align: "center", size: 12, children: [
|
|
20054
20119
|
/* @__PURE__ */ jsx83(
|
|
20055
20120
|
Avatar8,
|
|
20056
20121
|
{
|
|
@@ -20066,7 +20131,7 @@ var TeamGraph = ({ data }) => {
|
|
|
20066
20131
|
children: getInitials10(teammate?.name || "")
|
|
20067
20132
|
}
|
|
20068
20133
|
),
|
|
20069
|
-
/* @__PURE__ */
|
|
20134
|
+
/* @__PURE__ */ jsxs56("div", { style: { flex: 1 }, children: [
|
|
20070
20135
|
/* @__PURE__ */ jsx83(Text29, { strong: true, style: { display: "block" }, children: teammate?.name || "Unnamed" }),
|
|
20071
20136
|
/* @__PURE__ */ jsx83(
|
|
20072
20137
|
Tag16,
|
|
@@ -20082,8 +20147,8 @@ var TeamGraph = ({ data }) => {
|
|
|
20082
20147
|
] })
|
|
20083
20148
|
}
|
|
20084
20149
|
),
|
|
20085
|
-
tasks.length > 0 && /* @__PURE__ */
|
|
20086
|
-
/* @__PURE__ */
|
|
20150
|
+
tasks.length > 0 && /* @__PURE__ */ jsxs56("div", { style: { marginTop: 16, paddingTop: 16, borderTop: "1px solid #f0f0f0" }, children: [
|
|
20151
|
+
/* @__PURE__ */ jsxs56(Text29, { strong: true, style: { display: "block", marginBottom: 8 }, children: [
|
|
20087
20152
|
"Pending Tasks (",
|
|
20088
20153
|
tasks.filter((t) => t.status === "pending").length,
|
|
20089
20154
|
")"
|
|
@@ -20093,7 +20158,7 @@ var TeamGraph = ({ data }) => {
|
|
|
20093
20158
|
{
|
|
20094
20159
|
size: "small",
|
|
20095
20160
|
dataSource: tasks.filter((t) => t.status === "pending"),
|
|
20096
|
-
renderItem: (task) => /* @__PURE__ */ jsx83(List13.Item, { style: { padding: "8px 0" }, children: /* @__PURE__ */
|
|
20161
|
+
renderItem: (task) => /* @__PURE__ */ jsx83(List13.Item, { style: { padding: "8px 0" }, children: /* @__PURE__ */ jsxs56("div", { children: [
|
|
20097
20162
|
/* @__PURE__ */ jsx83(Text29, { style: { fontSize: 12, color: "#7A7A7A" }, children: task.id }),
|
|
20098
20163
|
/* @__PURE__ */ jsx83(Text29, { strong: true, style: { display: "block", fontSize: 13 }, children: task.title }),
|
|
20099
20164
|
task.description && /* @__PURE__ */ jsx83(Text29, { type: "secondary", style: { fontSize: 11 }, children: task.description.length > 100 ? task.description.slice(0, 100) + "..." : task.description })
|
|
@@ -20108,13 +20173,13 @@ var TeamGraph = ({ data }) => {
|
|
|
20108
20173
|
var TeamGraph_default = TeamGraph;
|
|
20109
20174
|
|
|
20110
20175
|
// src/components/GenUI/elements/TeamWorkspace/index.tsx
|
|
20111
|
-
import { useState as
|
|
20176
|
+
import { useState as useState57, useMemo as useMemo23 } from "react";
|
|
20112
20177
|
import { Layout, Spin as Spin14, Button as Button43 } from "antd";
|
|
20113
20178
|
import { RefreshCw } from "lucide-react";
|
|
20114
20179
|
import { createStyles as createStyles27 } from "antd-style";
|
|
20115
20180
|
|
|
20116
20181
|
// src/components/GenUI/elements/TeamWorkspace/TeamWorkspaceMenu.tsx
|
|
20117
|
-
import React42, { useState as
|
|
20182
|
+
import React42, { useState as useState53 } from "react";
|
|
20118
20183
|
import {
|
|
20119
20184
|
LayoutDashboard,
|
|
20120
20185
|
Inbox,
|
|
@@ -20126,7 +20191,7 @@ import {
|
|
|
20126
20191
|
} from "lucide-react";
|
|
20127
20192
|
import { Tooltip as Tooltip18, Badge as Badge6 } from "antd";
|
|
20128
20193
|
import { createStyles as createStyles19 } from "antd-style";
|
|
20129
|
-
import { Fragment as Fragment19, jsx as jsx84, jsxs as
|
|
20194
|
+
import { Fragment as Fragment19, jsx as jsx84, jsxs as jsxs57 } from "react/jsx-runtime";
|
|
20130
20195
|
var useStyles8 = createStyles19(({ token, css }) => ({
|
|
20131
20196
|
container: css`
|
|
20132
20197
|
display: flex;
|
|
@@ -20308,12 +20373,12 @@ var TeamWorkspaceMenu = ({
|
|
|
20308
20373
|
onItemClick
|
|
20309
20374
|
}) => {
|
|
20310
20375
|
const { styles } = useStyles8();
|
|
20311
|
-
const [isExpanded, setIsExpanded] =
|
|
20376
|
+
const [isExpanded, setIsExpanded] = useState53(false);
|
|
20312
20377
|
const mainItems = items.filter((item) => !item.group);
|
|
20313
20378
|
const teammateItems = items.filter((item) => item.group === "Teammates");
|
|
20314
20379
|
const teamItems = items.filter((item) => item.group === "Team");
|
|
20315
20380
|
const renderMenuItem = (item, showTooltip) => {
|
|
20316
|
-
const content = /* @__PURE__ */
|
|
20381
|
+
const content = /* @__PURE__ */ jsxs57(
|
|
20317
20382
|
"div",
|
|
20318
20383
|
{
|
|
20319
20384
|
className: `${styles.menuItem} ${!isExpanded ? styles.menuItemCollapsed : ""} ${activeItem === item.id ? "active" : ""}`,
|
|
@@ -20340,15 +20405,15 @@ var TeamWorkspaceMenu = ({
|
|
|
20340
20405
|
};
|
|
20341
20406
|
const renderGroup = (groupItems, groupLabel, showDivider) => {
|
|
20342
20407
|
if (groupItems.length === 0) return null;
|
|
20343
|
-
return /* @__PURE__ */
|
|
20408
|
+
return /* @__PURE__ */ jsxs57(Fragment19, { children: [
|
|
20344
20409
|
showDivider && /* @__PURE__ */ jsx84("div", { className: styles.groupDivider }),
|
|
20345
|
-
/* @__PURE__ */
|
|
20410
|
+
/* @__PURE__ */ jsxs57("div", { className: styles.menuGroup, children: [
|
|
20346
20411
|
isExpanded && groupLabel && /* @__PURE__ */ jsx84("div", { className: styles.groupLabel, children: groupLabel }),
|
|
20347
20412
|
groupItems.map((item) => renderMenuItem(item, true))
|
|
20348
20413
|
] })
|
|
20349
20414
|
] });
|
|
20350
20415
|
};
|
|
20351
|
-
return /* @__PURE__ */
|
|
20416
|
+
return /* @__PURE__ */ jsxs57(
|
|
20352
20417
|
"div",
|
|
20353
20418
|
{
|
|
20354
20419
|
className: `${styles.container} ${isExpanded ? styles.containerExpanded : styles.containerCollapsed}`,
|
|
@@ -20362,7 +20427,7 @@ var TeamWorkspaceMenu = ({
|
|
|
20362
20427
|
children: isExpanded ? /* @__PURE__ */ jsx84(ChevronLeft4, { size: 16 }) : /* @__PURE__ */ jsx84(ChevronRight4, { size: 16 })
|
|
20363
20428
|
}
|
|
20364
20429
|
),
|
|
20365
|
-
/* @__PURE__ */
|
|
20430
|
+
/* @__PURE__ */ jsxs57("div", { className: styles.menuContent, children: [
|
|
20366
20431
|
renderGroup(mainItems, null, false),
|
|
20367
20432
|
renderGroup(teammateItems, "Teammates", mainItems.length > 0),
|
|
20368
20433
|
renderGroup(
|
|
@@ -20435,7 +20500,7 @@ function useTeamWorkspaceData(threadId, assistantId) {
|
|
|
20435
20500
|
}
|
|
20436
20501
|
|
|
20437
20502
|
// src/components/GenUI/elements/TeamWorkspace/TeamDashboard.tsx
|
|
20438
|
-
import { jsx as jsx85, jsxs as
|
|
20503
|
+
import { jsx as jsx85, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
20439
20504
|
var { Title: Title6, Text: Text30 } = Typography39;
|
|
20440
20505
|
var useStyles9 = createStyles20(({ token, css }) => ({
|
|
20441
20506
|
container: css`
|
|
@@ -20655,17 +20720,17 @@ var ActivityItem = ({ activity, styles }) => {
|
|
|
20655
20720
|
const content = activity.content;
|
|
20656
20721
|
const maxLength = 60;
|
|
20657
20722
|
const displayContent = content.length > maxLength ? content.slice(0, maxLength) + "..." : content;
|
|
20658
|
-
return /* @__PURE__ */
|
|
20723
|
+
return /* @__PURE__ */ jsxs58("span", { className: styles.activityText, children: [
|
|
20659
20724
|
/* @__PURE__ */ jsx85("span", { className: styles.activityHighlight, children: activity.from }),
|
|
20660
20725
|
" ",
|
|
20661
|
-
activity.type === "broadcast" && /* @__PURE__ */
|
|
20726
|
+
activity.type === "broadcast" && /* @__PURE__ */ jsxs58("span", { style: { color: "#1890ff", fontWeight: 500 }, children: [
|
|
20662
20727
|
"[broadcast] ",
|
|
20663
20728
|
" "
|
|
20664
20729
|
] }),
|
|
20665
20730
|
displayContent
|
|
20666
20731
|
] });
|
|
20667
20732
|
};
|
|
20668
|
-
return /* @__PURE__ */ jsx85("div", { className: styles.listItem, children: /* @__PURE__ */
|
|
20733
|
+
return /* @__PURE__ */ jsx85("div", { className: styles.listItem, children: /* @__PURE__ */ jsxs58("div", { className: styles.activityItem, children: [
|
|
20669
20734
|
/* @__PURE__ */ jsx85(
|
|
20670
20735
|
"div",
|
|
20671
20736
|
{
|
|
@@ -20682,9 +20747,9 @@ var TaskItem = ({
|
|
|
20682
20747
|
task,
|
|
20683
20748
|
styles
|
|
20684
20749
|
}) => {
|
|
20685
|
-
return /* @__PURE__ */ jsx85(Tooltip19, { title: task.title, placement: "topLeft", children: /* @__PURE__ */ jsx85("div", { className: styles.listItem, children: /* @__PURE__ */
|
|
20750
|
+
return /* @__PURE__ */ jsx85(Tooltip19, { title: task.title, placement: "topLeft", children: /* @__PURE__ */ jsx85("div", { className: styles.listItem, children: /* @__PURE__ */ jsxs58("div", { className: styles.taskItem, children: [
|
|
20686
20751
|
/* @__PURE__ */ jsx85(StatusIcon, { status: task.status, className: styles.taskStatusIcon }),
|
|
20687
|
-
/* @__PURE__ */
|
|
20752
|
+
/* @__PURE__ */ jsxs58("div", { className: styles.taskContent, children: [
|
|
20688
20753
|
/* @__PURE__ */ jsx85("span", { className: styles.taskTitle, children: task.title }),
|
|
20689
20754
|
task.assignee && /* @__PURE__ */ jsx85(Tooltip19, { title: task.assignee, children: /* @__PURE__ */ jsx85(
|
|
20690
20755
|
"div",
|
|
@@ -20705,12 +20770,12 @@ var TeamDashboard = ({
|
|
|
20705
20770
|
team
|
|
20706
20771
|
}) => {
|
|
20707
20772
|
const { styles } = useStyles9();
|
|
20708
|
-
return /* @__PURE__ */
|
|
20709
|
-
/* @__PURE__ */
|
|
20773
|
+
return /* @__PURE__ */ jsxs58("div", { className: styles.container, children: [
|
|
20774
|
+
/* @__PURE__ */ jsxs58("div", { className: styles.header, children: [
|
|
20710
20775
|
/* @__PURE__ */ jsx85(Title6, { level: 3, className: styles.title, children: "Team Dashboard" }),
|
|
20711
20776
|
/* @__PURE__ */ jsx85(Text30, { className: styles.subtitle, children: team?.teamId ? `Team ID: ${team.teamId} \u2022 ${stats.totalTasks} tasks \u2022 ${stats.totalActivities} activities` : "Overview of team activities and tasks" })
|
|
20712
20777
|
] }),
|
|
20713
|
-
/* @__PURE__ */
|
|
20778
|
+
/* @__PURE__ */ jsxs58(Row2, { gutter: [16, 16], className: styles.statsRow, children: [
|
|
20714
20779
|
/* @__PURE__ */ jsx85(Col2, { span: 6, children: /* @__PURE__ */ jsx85(Card18, { className: styles.statCard, children: /* @__PURE__ */ jsx85(
|
|
20715
20780
|
Statistic,
|
|
20716
20781
|
{
|
|
@@ -20748,11 +20813,11 @@ var TeamDashboard = ({
|
|
|
20748
20813
|
}
|
|
20749
20814
|
) }) })
|
|
20750
20815
|
] }),
|
|
20751
|
-
/* @__PURE__ */
|
|
20816
|
+
/* @__PURE__ */ jsxs58(Row2, { gutter: [16, 16], className: styles.contentRow, children: [
|
|
20752
20817
|
/* @__PURE__ */ jsx85(Col2, { span: 12, children: /* @__PURE__ */ jsx85(
|
|
20753
20818
|
Card18,
|
|
20754
20819
|
{
|
|
20755
|
-
title: /* @__PURE__ */
|
|
20820
|
+
title: /* @__PURE__ */ jsxs58("span", { children: [
|
|
20756
20821
|
/* @__PURE__ */ jsx85(Mail, { size: 18, style: { marginRight: 8, verticalAlign: "middle" } }),
|
|
20757
20822
|
"Recent Activities"
|
|
20758
20823
|
] }),
|
|
@@ -20771,7 +20836,7 @@ var TeamDashboard = ({
|
|
|
20771
20836
|
/* @__PURE__ */ jsx85(Col2, { span: 12, children: /* @__PURE__ */ jsx85(
|
|
20772
20837
|
Card18,
|
|
20773
20838
|
{
|
|
20774
|
-
title: /* @__PURE__ */
|
|
20839
|
+
title: /* @__PURE__ */ jsxs58("span", { children: [
|
|
20775
20840
|
/* @__PURE__ */ jsx85(Users, { size: 18, style: { marginRight: 8, verticalAlign: "middle" } }),
|
|
20776
20841
|
"Recent Tasks"
|
|
20777
20842
|
] }),
|
|
@@ -20785,7 +20850,7 @@ var TeamDashboard = ({
|
|
|
20785
20850
|
};
|
|
20786
20851
|
|
|
20787
20852
|
// src/components/GenUI/elements/TeamWorkspace/IssuesView.tsx
|
|
20788
|
-
import { useState as
|
|
20853
|
+
import { useState as useState55, useMemo as useMemo20 } from "react";
|
|
20789
20854
|
import { Typography as Typography41, Badge as Badge7, Empty as Empty11, Tooltip as Tooltip20 } from "antd";
|
|
20790
20855
|
import {
|
|
20791
20856
|
CheckCircle2 as CheckCircle23,
|
|
@@ -20800,8 +20865,8 @@ import {
|
|
|
20800
20865
|
import { createStyles as createStyles22 } from "antd-style";
|
|
20801
20866
|
|
|
20802
20867
|
// src/components/GenUI/elements/TeamWorkspace/TaskDetailModal.tsx
|
|
20803
|
-
import { useState as
|
|
20804
|
-
import { Modal as
|
|
20868
|
+
import { useState as useState54 } from "react";
|
|
20869
|
+
import { Modal as Modal14, Typography as Typography40, Tag as Tag17, Divider as Divider7, Tabs as Tabs2, Timeline } from "antd";
|
|
20805
20870
|
import { createStyles as createStyles21 } from "antd-style";
|
|
20806
20871
|
import {
|
|
20807
20872
|
CheckCircle2 as CheckCircle22,
|
|
@@ -20814,7 +20879,7 @@ import {
|
|
|
20814
20879
|
Activity as Activity4,
|
|
20815
20880
|
GitCommit
|
|
20816
20881
|
} from "lucide-react";
|
|
20817
|
-
import { Fragment as Fragment20, jsx as jsx86, jsxs as
|
|
20882
|
+
import { Fragment as Fragment20, jsx as jsx86, jsxs as jsxs59 } from "react/jsx-runtime";
|
|
20818
20883
|
var { Title: Title7, Text: Text31, Paragraph } = Typography40;
|
|
20819
20884
|
var useStyles10 = createStyles21(({ token, css }) => ({
|
|
20820
20885
|
modalContent: css`
|
|
@@ -21155,7 +21220,7 @@ var CommentsTab = ({ task, styles }) => {
|
|
|
21155
21220
|
if (comments.length === 0) {
|
|
21156
21221
|
return /* @__PURE__ */ jsx86("div", { className: styles.emptyState, children: "No comments yet" });
|
|
21157
21222
|
}
|
|
21158
|
-
return /* @__PURE__ */ jsx86("div", { className: styles.commentsSection, children: comments.map((comment) => /* @__PURE__ */
|
|
21223
|
+
return /* @__PURE__ */ jsx86("div", { className: styles.commentsSection, children: comments.map((comment) => /* @__PURE__ */ jsxs59("div", { className: styles.commentItem, children: [
|
|
21159
21224
|
/* @__PURE__ */ jsx86(
|
|
21160
21225
|
"div",
|
|
21161
21226
|
{
|
|
@@ -21164,19 +21229,19 @@ var CommentsTab = ({ task, styles }) => {
|
|
|
21164
21229
|
children: comment.initials
|
|
21165
21230
|
}
|
|
21166
21231
|
),
|
|
21167
|
-
/* @__PURE__ */
|
|
21168
|
-
/* @__PURE__ */
|
|
21232
|
+
/* @__PURE__ */ jsxs59("div", { className: styles.commentContent, children: [
|
|
21233
|
+
/* @__PURE__ */ jsxs59("div", { className: styles.commentHeader, children: [
|
|
21169
21234
|
/* @__PURE__ */ jsx86("span", { className: styles.commentAuthor, children: comment.author }),
|
|
21170
21235
|
/* @__PURE__ */ jsx86("span", { className: styles.commentTime, children: formatRelativeTime(comment.time) })
|
|
21171
21236
|
] }),
|
|
21172
|
-
comment.type === "result" ? /* @__PURE__ */
|
|
21173
|
-
/* @__PURE__ */
|
|
21237
|
+
comment.type === "result" ? /* @__PURE__ */ jsxs59("div", { className: styles.resultComment, children: [
|
|
21238
|
+
/* @__PURE__ */ jsxs59("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 8 }, children: [
|
|
21174
21239
|
/* @__PURE__ */ jsx86(CheckCircle22, { size: 16, style: { color: "#22c55e" } }),
|
|
21175
21240
|
/* @__PURE__ */ jsx86(Text31, { style: { color: "#22c55e", fontWeight: 600 }, children: "Result" })
|
|
21176
21241
|
] }),
|
|
21177
21242
|
/* @__PURE__ */ jsx86(Paragraph, { style: { margin: 0 }, children: comment.content })
|
|
21178
|
-
] }) : comment.type === "error" ? /* @__PURE__ */
|
|
21179
|
-
/* @__PURE__ */
|
|
21243
|
+
] }) : comment.type === "error" ? /* @__PURE__ */ jsxs59("div", { className: styles.errorComment, children: [
|
|
21244
|
+
/* @__PURE__ */ jsxs59("div", { style: { display: "flex", alignItems: "center", gap: 8, marginBottom: 8 }, children: [
|
|
21180
21245
|
/* @__PURE__ */ jsx86(AlertCircle2, { size: 16, style: { color: "#ef4444" } }),
|
|
21181
21246
|
/* @__PURE__ */ jsx86(Text31, { style: { color: "#ef4444", fontWeight: 600 }, children: "Error" })
|
|
21182
21247
|
] }),
|
|
@@ -21191,9 +21256,9 @@ var ActivityTab = ({ task, styles }) => {
|
|
|
21191
21256
|
{
|
|
21192
21257
|
dot: /* @__PURE__ */ jsx86("div", { className: styles.timelineDot, children: /* @__PURE__ */ jsx86(GitCommit, { size: 16 }) }),
|
|
21193
21258
|
color: statusConfig.color,
|
|
21194
|
-
children: /* @__PURE__ */
|
|
21259
|
+
children: /* @__PURE__ */ jsxs59("div", { className: styles.timelineContent, children: [
|
|
21195
21260
|
/* @__PURE__ */ jsx86("div", { className: styles.timelineTitle, children: "Status Updated" }),
|
|
21196
|
-
/* @__PURE__ */
|
|
21261
|
+
/* @__PURE__ */ jsxs59("div", { className: styles.timelineTime, children: [
|
|
21197
21262
|
"Changed to ",
|
|
21198
21263
|
statusConfig.text,
|
|
21199
21264
|
" on ",
|
|
@@ -21204,7 +21269,7 @@ var ActivityTab = ({ task, styles }) => {
|
|
|
21204
21269
|
{
|
|
21205
21270
|
dot: /* @__PURE__ */ jsx86("div", { className: styles.timelineDot, children: /* @__PURE__ */ jsx86(Calendar, { size: 16 }) }),
|
|
21206
21271
|
color: "#6b7280",
|
|
21207
|
-
children: /* @__PURE__ */
|
|
21272
|
+
children: /* @__PURE__ */ jsxs59("div", { className: styles.timelineContent, children: [
|
|
21208
21273
|
/* @__PURE__ */ jsx86("div", { className: styles.timelineTitle, children: "Task Created" }),
|
|
21209
21274
|
/* @__PURE__ */ jsx86("div", { className: styles.timelineTime, children: formatDate(task.createdAt) })
|
|
21210
21275
|
] })
|
|
@@ -21225,13 +21290,13 @@ var TaskDetailModal = ({
|
|
|
21225
21290
|
onClose
|
|
21226
21291
|
}) => {
|
|
21227
21292
|
const { styles } = useStyles10();
|
|
21228
|
-
const [activeTab, setActiveTab] =
|
|
21293
|
+
const [activeTab, setActiveTab] = useState54("comments");
|
|
21229
21294
|
if (!task) return null;
|
|
21230
21295
|
const statusConfig = getStatusConfig2(task.status);
|
|
21231
21296
|
const tabItems = [
|
|
21232
21297
|
{
|
|
21233
21298
|
key: "comments",
|
|
21234
|
-
label: /* @__PURE__ */
|
|
21299
|
+
label: /* @__PURE__ */ jsxs59("span", { children: [
|
|
21235
21300
|
/* @__PURE__ */ jsx86(MessageSquare, { size: 14, style: { marginRight: 6 } }),
|
|
21236
21301
|
"Comments"
|
|
21237
21302
|
] }),
|
|
@@ -21239,7 +21304,7 @@ var TaskDetailModal = ({
|
|
|
21239
21304
|
},
|
|
21240
21305
|
{
|
|
21241
21306
|
key: "activity",
|
|
21242
|
-
label: /* @__PURE__ */
|
|
21307
|
+
label: /* @__PURE__ */ jsxs59("span", { children: [
|
|
21243
21308
|
/* @__PURE__ */ jsx86(Activity4, { size: 14, style: { marginRight: 6 } }),
|
|
21244
21309
|
"Activity"
|
|
21245
21310
|
] }),
|
|
@@ -21247,7 +21312,7 @@ var TaskDetailModal = ({
|
|
|
21247
21312
|
}
|
|
21248
21313
|
];
|
|
21249
21314
|
return /* @__PURE__ */ jsx86(
|
|
21250
|
-
|
|
21315
|
+
Modal14,
|
|
21251
21316
|
{
|
|
21252
21317
|
title: null,
|
|
21253
21318
|
open: visible,
|
|
@@ -21265,8 +21330,8 @@ var TaskDetailModal = ({
|
|
|
21265
21330
|
padding: 24
|
|
21266
21331
|
}
|
|
21267
21332
|
},
|
|
21268
|
-
children: /* @__PURE__ */
|
|
21269
|
-
/* @__PURE__ */
|
|
21333
|
+
children: /* @__PURE__ */ jsxs59("div", { className: styles.modalContent, children: [
|
|
21334
|
+
/* @__PURE__ */ jsxs59("div", { className: styles.header, children: [
|
|
21270
21335
|
/* @__PURE__ */ jsx86(
|
|
21271
21336
|
"div",
|
|
21272
21337
|
{
|
|
@@ -21279,10 +21344,10 @@ var TaskDetailModal = ({
|
|
|
21279
21344
|
] }),
|
|
21280
21345
|
/* @__PURE__ */ jsx86(Title7, { level: 3, className: styles.title, children: task.title }),
|
|
21281
21346
|
task.description && /* @__PURE__ */ jsx86("div", { className: styles.description, children: /* @__PURE__ */ jsx86(Paragraph, { style: { margin: 0 }, children: task.description }) }),
|
|
21282
|
-
/* @__PURE__ */
|
|
21283
|
-
/* @__PURE__ */
|
|
21347
|
+
/* @__PURE__ */ jsxs59("div", { className: styles.metaSection, children: [
|
|
21348
|
+
/* @__PURE__ */ jsxs59("div", { className: styles.metaItem, children: [
|
|
21284
21349
|
/* @__PURE__ */ jsx86(Text31, { className: styles.metaLabel, children: "Status" }),
|
|
21285
|
-
/* @__PURE__ */
|
|
21350
|
+
/* @__PURE__ */ jsxs59(
|
|
21286
21351
|
"div",
|
|
21287
21352
|
{
|
|
21288
21353
|
className: styles.statusTag,
|
|
@@ -21297,9 +21362,9 @@ var TaskDetailModal = ({
|
|
|
21297
21362
|
}
|
|
21298
21363
|
)
|
|
21299
21364
|
] }),
|
|
21300
|
-
/* @__PURE__ */
|
|
21365
|
+
/* @__PURE__ */ jsxs59("div", { className: styles.metaItem, children: [
|
|
21301
21366
|
/* @__PURE__ */ jsx86(Text31, { className: styles.metaLabel, children: "Assignee" }),
|
|
21302
|
-
/* @__PURE__ */ jsx86("div", { className: styles.metaValue, children: task.assignee ? /* @__PURE__ */
|
|
21367
|
+
/* @__PURE__ */ jsx86("div", { className: styles.metaValue, children: task.assignee ? /* @__PURE__ */ jsxs59(Fragment20, { children: [
|
|
21303
21368
|
/* @__PURE__ */ jsx86(
|
|
21304
21369
|
"div",
|
|
21305
21370
|
{
|
|
@@ -21311,25 +21376,25 @@ var TaskDetailModal = ({
|
|
|
21311
21376
|
/* @__PURE__ */ jsx86("span", { children: task.assignee })
|
|
21312
21377
|
] }) : /* @__PURE__ */ jsx86("span", { style: { color: "#999" }, children: "Unassigned" }) })
|
|
21313
21378
|
] }),
|
|
21314
|
-
/* @__PURE__ */
|
|
21379
|
+
/* @__PURE__ */ jsxs59("div", { className: styles.metaItem, children: [
|
|
21315
21380
|
/* @__PURE__ */ jsx86(Text31, { className: styles.metaLabel, children: "Created" }),
|
|
21316
|
-
/* @__PURE__ */
|
|
21381
|
+
/* @__PURE__ */ jsxs59("div", { className: styles.metaValue, children: [
|
|
21317
21382
|
/* @__PURE__ */ jsx86(Calendar, { size: 14 }),
|
|
21318
21383
|
/* @__PURE__ */ jsx86("span", { children: formatDate(task.createdAt) })
|
|
21319
21384
|
] })
|
|
21320
21385
|
] }),
|
|
21321
|
-
/* @__PURE__ */
|
|
21386
|
+
/* @__PURE__ */ jsxs59("div", { className: styles.metaItem, children: [
|
|
21322
21387
|
/* @__PURE__ */ jsx86(Text31, { className: styles.metaLabel, children: "Updated" }),
|
|
21323
|
-
/* @__PURE__ */
|
|
21388
|
+
/* @__PURE__ */ jsxs59("div", { className: styles.metaValue, children: [
|
|
21324
21389
|
/* @__PURE__ */ jsx86(Calendar, { size: 14 }),
|
|
21325
21390
|
/* @__PURE__ */ jsx86("span", { children: formatDate(task.updatedAt) })
|
|
21326
21391
|
] })
|
|
21327
21392
|
] })
|
|
21328
21393
|
] }),
|
|
21329
21394
|
/* @__PURE__ */ jsx86(Divider7, {}),
|
|
21330
|
-
task.dependencies?.length > 0 && /* @__PURE__ */
|
|
21395
|
+
task.dependencies?.length > 0 && /* @__PURE__ */ jsxs59("div", { className: styles.dependenciesSection, children: [
|
|
21331
21396
|
/* @__PURE__ */ jsx86(Text31, { className: styles.sectionTitle, children: "Dependencies" }),
|
|
21332
|
-
/* @__PURE__ */ jsx86("div", { className: styles.dependencyList, children: task.dependencies.map((dep) => /* @__PURE__ */
|
|
21397
|
+
/* @__PURE__ */ jsx86("div", { className: styles.dependencyList, children: task.dependencies.map((dep) => /* @__PURE__ */ jsxs59(Tag17, { className: styles.dependencyTag, children: [
|
|
21333
21398
|
/* @__PURE__ */ jsx86(Link, { size: 12 }),
|
|
21334
21399
|
" ",
|
|
21335
21400
|
dep
|
|
@@ -21349,7 +21414,7 @@ var TaskDetailModal = ({
|
|
|
21349
21414
|
};
|
|
21350
21415
|
|
|
21351
21416
|
// src/components/GenUI/elements/TeamWorkspace/IssuesView.tsx
|
|
21352
|
-
import { jsx as jsx87, jsxs as
|
|
21417
|
+
import { jsx as jsx87, jsxs as jsxs60 } from "react/jsx-runtime";
|
|
21353
21418
|
var { Title: Title8, Text: Text32 } = Typography41;
|
|
21354
21419
|
var getInitials4 = (name) => {
|
|
21355
21420
|
return name.split(/[\s_-]/).map((n) => n.charAt(0)).join("").toUpperCase().slice(0, 2);
|
|
@@ -21651,9 +21716,9 @@ var formatDate2 = (timestamp) => {
|
|
|
21651
21716
|
});
|
|
21652
21717
|
};
|
|
21653
21718
|
var ListGroupComponent = ({ group, styles, defaultExpanded = true, onTaskClick }) => {
|
|
21654
|
-
const [isExpanded, setIsExpanded] =
|
|
21655
|
-
return /* @__PURE__ */
|
|
21656
|
-
/* @__PURE__ */
|
|
21719
|
+
const [isExpanded, setIsExpanded] = useState55(defaultExpanded);
|
|
21720
|
+
return /* @__PURE__ */ jsxs60("div", { className: styles.listGroup, children: [
|
|
21721
|
+
/* @__PURE__ */ jsxs60(
|
|
21657
21722
|
"div",
|
|
21658
21723
|
{
|
|
21659
21724
|
className: styles.listGroupHeader,
|
|
@@ -21665,14 +21730,14 @@ var ListGroupComponent = ({ group, styles, defaultExpanded = true, onTaskClick }
|
|
|
21665
21730
|
]
|
|
21666
21731
|
}
|
|
21667
21732
|
),
|
|
21668
|
-
isExpanded && /* @__PURE__ */ jsx87("div", { className: styles.listGroupContent, children: group.tasks.map((task) => /* @__PURE__ */
|
|
21733
|
+
isExpanded && /* @__PURE__ */ jsx87("div", { className: styles.listGroupContent, children: group.tasks.map((task) => /* @__PURE__ */ jsxs60("div", { className: styles.listItem, onClick: () => onTaskClick(task), children: [
|
|
21669
21734
|
/* @__PURE__ */ jsx87("div", { className: styles.listItemIcon, children: /* @__PURE__ */ jsx87(StatusIcon2, { status: task.status }) }),
|
|
21670
|
-
/* @__PURE__ */
|
|
21735
|
+
/* @__PURE__ */ jsxs60("div", { className: styles.listItemContent, children: [
|
|
21671
21736
|
/* @__PURE__ */ jsx87("span", { className: styles.listItemId, children: task.id }),
|
|
21672
21737
|
/* @__PURE__ */ jsx87(Tooltip20, { title: task.title, children: /* @__PURE__ */ jsx87("span", { className: styles.listItemTitle, children: task.title }) })
|
|
21673
21738
|
] }),
|
|
21674
|
-
/* @__PURE__ */
|
|
21675
|
-
task.assignee ? /* @__PURE__ */ jsx87(Tooltip20, { title: task.assignee, children: /* @__PURE__ */
|
|
21739
|
+
/* @__PURE__ */ jsxs60("div", { className: styles.listItemRight, children: [
|
|
21740
|
+
task.assignee ? /* @__PURE__ */ jsx87(Tooltip20, { title: task.assignee, children: /* @__PURE__ */ jsxs60("div", { className: styles.listItemAssignee, children: [
|
|
21676
21741
|
/* @__PURE__ */ jsx87(
|
|
21677
21742
|
"div",
|
|
21678
21743
|
{
|
|
@@ -21694,9 +21759,9 @@ var IssuesView = ({
|
|
|
21694
21759
|
teammates
|
|
21695
21760
|
}) => {
|
|
21696
21761
|
const { styles } = useStyles11();
|
|
21697
|
-
const [viewMode, setViewMode] =
|
|
21698
|
-
const [selectedTask, setSelectedTask] =
|
|
21699
|
-
const [modalVisible, setModalVisible] =
|
|
21762
|
+
const [viewMode, setViewMode] = useState55("list");
|
|
21763
|
+
const [selectedTask, setSelectedTask] = useState55(null);
|
|
21764
|
+
const [modalVisible, setModalVisible] = useState55(false);
|
|
21700
21765
|
const listGroups = useMemo20(() => {
|
|
21701
21766
|
const groups = [
|
|
21702
21767
|
{
|
|
@@ -21764,13 +21829,13 @@ var IssuesView = ({
|
|
|
21764
21829
|
];
|
|
21765
21830
|
return /* @__PURE__ */ jsx87("div", { className: styles.kanbanContainer, children: columns.map((column) => {
|
|
21766
21831
|
const columnTasks = tasksByStatus[column.id] || [];
|
|
21767
|
-
return /* @__PURE__ */
|
|
21832
|
+
return /* @__PURE__ */ jsxs60("div", { className: styles.kanbanColumn, children: [
|
|
21768
21833
|
/* @__PURE__ */ jsx87(
|
|
21769
21834
|
"div",
|
|
21770
21835
|
{
|
|
21771
21836
|
className: styles.columnHeader,
|
|
21772
21837
|
style: { borderBottomColor: column.color },
|
|
21773
|
-
children: /* @__PURE__ */
|
|
21838
|
+
children: /* @__PURE__ */ jsxs60("span", { className: styles.columnTitle, children: [
|
|
21774
21839
|
/* @__PURE__ */ jsx87(
|
|
21775
21840
|
Badge7,
|
|
21776
21841
|
{
|
|
@@ -21782,9 +21847,9 @@ var IssuesView = ({
|
|
|
21782
21847
|
] })
|
|
21783
21848
|
}
|
|
21784
21849
|
),
|
|
21785
|
-
columnTasks.map((task) => /* @__PURE__ */
|
|
21850
|
+
columnTasks.map((task) => /* @__PURE__ */ jsxs60("div", { className: styles.taskCard, children: [
|
|
21786
21851
|
/* @__PURE__ */ jsx87("div", { className: styles.taskTitle, children: task.title }),
|
|
21787
|
-
/* @__PURE__ */
|
|
21852
|
+
/* @__PURE__ */ jsxs60("div", { className: styles.taskMeta, children: [
|
|
21788
21853
|
/* @__PURE__ */ jsx87(Text32, { type: "secondary", children: task.id }),
|
|
21789
21854
|
task.assignee && /* @__PURE__ */ jsx87(Tooltip20, { title: task.assignee, children: /* @__PURE__ */ jsx87(
|
|
21790
21855
|
"div",
|
|
@@ -21814,7 +21879,7 @@ var IssuesView = ({
|
|
|
21814
21879
|
setModalVisible(false);
|
|
21815
21880
|
setSelectedTask(null);
|
|
21816
21881
|
};
|
|
21817
|
-
const renderListView = () => /* @__PURE__ */
|
|
21882
|
+
const renderListView = () => /* @__PURE__ */ jsxs60("div", { className: styles.listContainer, children: [
|
|
21818
21883
|
listGroups.map((group) => /* @__PURE__ */ jsx87(
|
|
21819
21884
|
ListGroupComponent,
|
|
21820
21885
|
{
|
|
@@ -21827,17 +21892,17 @@ var IssuesView = ({
|
|
|
21827
21892
|
)),
|
|
21828
21893
|
listGroups.length === 0 && /* @__PURE__ */ jsx87("div", { style: { padding: 48, textAlign: "center" }, children: /* @__PURE__ */ jsx87(Empty11, { description: "No issues found" }) })
|
|
21829
21894
|
] });
|
|
21830
|
-
return /* @__PURE__ */
|
|
21831
|
-
/* @__PURE__ */
|
|
21832
|
-
/* @__PURE__ */
|
|
21895
|
+
return /* @__PURE__ */ jsxs60("div", { className: styles.container, children: [
|
|
21896
|
+
/* @__PURE__ */ jsxs60("div", { className: styles.header, children: [
|
|
21897
|
+
/* @__PURE__ */ jsxs60("div", { children: [
|
|
21833
21898
|
/* @__PURE__ */ jsx87(Title8, { level: 3, className: styles.title, children: "Issues" }),
|
|
21834
|
-
/* @__PURE__ */
|
|
21899
|
+
/* @__PURE__ */ jsxs60(Text32, { type: "secondary", children: [
|
|
21835
21900
|
tasks?.length || 0,
|
|
21836
21901
|
" tasks \u2022 Team: ",
|
|
21837
21902
|
teamId
|
|
21838
21903
|
] })
|
|
21839
21904
|
] }),
|
|
21840
|
-
/* @__PURE__ */
|
|
21905
|
+
/* @__PURE__ */ jsxs60("div", { className: styles.viewToggle, children: [
|
|
21841
21906
|
/* @__PURE__ */ jsx87(
|
|
21842
21907
|
"button",
|
|
21843
21908
|
{
|
|
@@ -21882,7 +21947,7 @@ import {
|
|
|
21882
21947
|
import "@xyflow/react/dist/style.css";
|
|
21883
21948
|
import { Typography as Typography42, Tag as Tag18, Space as Space34 } from "antd";
|
|
21884
21949
|
import { createStyles as createStyles23 } from "antd-style";
|
|
21885
|
-
import { jsx as jsx88, jsxs as
|
|
21950
|
+
import { jsx as jsx88, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
21886
21951
|
var { Title: Title9, Text: Text33 } = Typography42;
|
|
21887
21952
|
var useStyles12 = createStyles23(({ token, css }) => ({
|
|
21888
21953
|
container: css`
|
|
@@ -21983,8 +22048,8 @@ var getAvatarColor5 = (name) => {
|
|
|
21983
22048
|
var TeamMemberNode = ({ data }) => {
|
|
21984
22049
|
const { styles } = useStyles12();
|
|
21985
22050
|
const { name, role, description, isLead, taskStats } = data;
|
|
21986
|
-
return /* @__PURE__ */
|
|
21987
|
-
/* @__PURE__ */
|
|
22051
|
+
return /* @__PURE__ */ jsxs61("div", { className: styles.nodeCard, children: [
|
|
22052
|
+
/* @__PURE__ */ jsxs61("div", { className: styles.nodeHeader, children: [
|
|
21988
22053
|
/* @__PURE__ */ jsx88(
|
|
21989
22054
|
"div",
|
|
21990
22055
|
{
|
|
@@ -21996,8 +22061,8 @@ var TeamMemberNode = ({ data }) => {
|
|
|
21996
22061
|
children: getInitials5(name)
|
|
21997
22062
|
}
|
|
21998
22063
|
),
|
|
21999
|
-
/* @__PURE__ */
|
|
22000
|
-
/* @__PURE__ */
|
|
22064
|
+
/* @__PURE__ */ jsxs61("div", { children: [
|
|
22065
|
+
/* @__PURE__ */ jsxs61("div", { className: styles.nodeTitle, children: [
|
|
22001
22066
|
name,
|
|
22002
22067
|
isLead && /* @__PURE__ */ jsx88(Tag18, { color: "blue", style: { marginLeft: 8, fontSize: 10 }, children: "Lead" })
|
|
22003
22068
|
] }),
|
|
@@ -22012,16 +22077,16 @@ var TeamMemberNode = ({ data }) => {
|
|
|
22012
22077
|
children: description.length > 50 ? description.slice(0, 50) + "..." : description
|
|
22013
22078
|
}
|
|
22014
22079
|
),
|
|
22015
|
-
taskStats && /* @__PURE__ */
|
|
22016
|
-
taskStats.completed > 0 && /* @__PURE__ */
|
|
22080
|
+
taskStats && /* @__PURE__ */ jsxs61("div", { className: styles.nodeStats, children: [
|
|
22081
|
+
taskStats.completed > 0 && /* @__PURE__ */ jsxs61(Tag18, { color: "success", className: styles.statTag, children: [
|
|
22017
22082
|
"\u2713 ",
|
|
22018
22083
|
taskStats.completed
|
|
22019
22084
|
] }),
|
|
22020
|
-
taskStats.inProgress > 0 && /* @__PURE__ */
|
|
22085
|
+
taskStats.inProgress > 0 && /* @__PURE__ */ jsxs61(Tag18, { color: "warning", className: styles.statTag, children: [
|
|
22021
22086
|
"\u27F3 ",
|
|
22022
22087
|
taskStats.inProgress
|
|
22023
22088
|
] }),
|
|
22024
|
-
taskStats.pending > 0 && /* @__PURE__ */
|
|
22089
|
+
taskStats.pending > 0 && /* @__PURE__ */ jsxs61(Tag18, { className: styles.statTag, children: [
|
|
22025
22090
|
"\u25CB ",
|
|
22026
22091
|
taskStats.pending
|
|
22027
22092
|
] })
|
|
@@ -22118,18 +22183,18 @@ var TeamOrgCanvasInner = ({
|
|
|
22118
22183
|
const nodeTypes = {
|
|
22119
22184
|
teamMember: TeamMemberNode
|
|
22120
22185
|
};
|
|
22121
|
-
return /* @__PURE__ */
|
|
22122
|
-
/* @__PURE__ */
|
|
22186
|
+
return /* @__PURE__ */ jsxs61("div", { className: styles.container, children: [
|
|
22187
|
+
/* @__PURE__ */ jsxs61("div", { className: styles.header, children: [
|
|
22123
22188
|
/* @__PURE__ */ jsx88(Title9, { level: 3, className: styles.title, children: "Team Organization" }),
|
|
22124
|
-
/* @__PURE__ */
|
|
22189
|
+
/* @__PURE__ */ jsxs61(Text33, { type: "secondary", children: [
|
|
22125
22190
|
teammates.length + 1,
|
|
22126
22191
|
" members \u2022 ",
|
|
22127
22192
|
tasks.length,
|
|
22128
22193
|
" tasks"
|
|
22129
22194
|
] })
|
|
22130
22195
|
] }),
|
|
22131
|
-
/* @__PURE__ */
|
|
22132
|
-
/* @__PURE__ */
|
|
22196
|
+
/* @__PURE__ */ jsxs61("div", { className: styles.canvas, children: [
|
|
22197
|
+
/* @__PURE__ */ jsxs61(
|
|
22133
22198
|
ReactFlow3,
|
|
22134
22199
|
{
|
|
22135
22200
|
nodes: flowNodes,
|
|
@@ -22145,9 +22210,9 @@ var TeamOrgCanvasInner = ({
|
|
|
22145
22210
|
]
|
|
22146
22211
|
}
|
|
22147
22212
|
),
|
|
22148
|
-
/* @__PURE__ */ jsx88("div", { className: styles.legend, children: /* @__PURE__ */
|
|
22213
|
+
/* @__PURE__ */ jsx88("div", { className: styles.legend, children: /* @__PURE__ */ jsxs61(Space34, { direction: "vertical", size: "small", children: [
|
|
22149
22214
|
/* @__PURE__ */ jsx88(Text33, { strong: true, style: { fontSize: 12 }, children: "Legend" }),
|
|
22150
|
-
/* @__PURE__ */
|
|
22215
|
+
/* @__PURE__ */ jsxs61(Space34, { size: "small", children: [
|
|
22151
22216
|
/* @__PURE__ */ jsx88(
|
|
22152
22217
|
"div",
|
|
22153
22218
|
{
|
|
@@ -22162,7 +22227,7 @@ var TeamOrgCanvasInner = ({
|
|
|
22162
22227
|
),
|
|
22163
22228
|
/* @__PURE__ */ jsx88(Text33, { style: { fontSize: 11 }, children: "Team Lead" })
|
|
22164
22229
|
] }),
|
|
22165
|
-
/* @__PURE__ */
|
|
22230
|
+
/* @__PURE__ */ jsxs61(Space34, { size: "small", children: [
|
|
22166
22231
|
/* @__PURE__ */ jsx88(
|
|
22167
22232
|
"div",
|
|
22168
22233
|
{
|
|
@@ -22186,7 +22251,7 @@ var TeamOrgCanvas = (props) => /* @__PURE__ */ jsx88(ReactFlowProvider3, { child
|
|
|
22186
22251
|
// src/components/GenUI/elements/TeamWorkspace/TeamMemberChat.tsx
|
|
22187
22252
|
import { Typography as Typography43, Tag as Tag19 } from "antd";
|
|
22188
22253
|
import { createStyles as createStyles24 } from "antd-style";
|
|
22189
|
-
import { jsx as jsx89, jsxs as
|
|
22254
|
+
import { jsx as jsx89, jsxs as jsxs62 } from "react/jsx-runtime";
|
|
22190
22255
|
var { Title: Title10, Text: Text34 } = Typography43;
|
|
22191
22256
|
var useStyles13 = createStyles24(({ token, css }) => ({
|
|
22192
22257
|
container: css`
|
|
@@ -22270,8 +22335,8 @@ var TeamMemberChat = ({
|
|
|
22270
22335
|
enableReturnStateWhenStreamCompleted: true,
|
|
22271
22336
|
enableResumeStream: true
|
|
22272
22337
|
},
|
|
22273
|
-
children: /* @__PURE__ */
|
|
22274
|
-
/* @__PURE__ */
|
|
22338
|
+
children: /* @__PURE__ */ jsxs62("div", { className: styles.container, children: [
|
|
22339
|
+
/* @__PURE__ */ jsxs62("div", { className: styles.header, children: [
|
|
22275
22340
|
/* @__PURE__ */ jsx89(
|
|
22276
22341
|
"div",
|
|
22277
22342
|
{
|
|
@@ -22280,11 +22345,11 @@ var TeamMemberChat = ({
|
|
|
22280
22345
|
children: getInitials6(teammate.name)
|
|
22281
22346
|
}
|
|
22282
22347
|
),
|
|
22283
|
-
/* @__PURE__ */
|
|
22348
|
+
/* @__PURE__ */ jsxs62("div", { className: styles.headerInfo, children: [
|
|
22284
22349
|
/* @__PURE__ */ jsx89(Title10, { level: 4, className: styles.title, children: teammate.name }),
|
|
22285
|
-
/* @__PURE__ */
|
|
22350
|
+
/* @__PURE__ */ jsxs62("div", { children: [
|
|
22286
22351
|
/* @__PURE__ */ jsx89(Tag19, { color: "blue", children: teammate.role }),
|
|
22287
|
-
teammate.description && /* @__PURE__ */
|
|
22352
|
+
teammate.description && /* @__PURE__ */ jsxs62(Text34, { className: styles.role, children: [
|
|
22288
22353
|
"\u2022 ",
|
|
22289
22354
|
teammate.description
|
|
22290
22355
|
] })
|
|
@@ -22307,7 +22372,7 @@ var TeamMemberChat = ({
|
|
|
22307
22372
|
};
|
|
22308
22373
|
|
|
22309
22374
|
// src/components/GenUI/elements/MailboxPanel.tsx
|
|
22310
|
-
import { useState as
|
|
22375
|
+
import { useState as useState56, useMemo as useMemo22 } from "react";
|
|
22311
22376
|
import { Typography as Typography45, Empty as Empty12 } from "antd";
|
|
22312
22377
|
import { createStyles as createStyles26 } from "antd-style";
|
|
22313
22378
|
import {
|
|
@@ -22318,10 +22383,10 @@ import {
|
|
|
22318
22383
|
} from "lucide-react";
|
|
22319
22384
|
|
|
22320
22385
|
// src/components/GenUI/elements/MailboxDetailModal.tsx
|
|
22321
|
-
import { Modal as
|
|
22386
|
+
import { Modal as Modal15, Typography as Typography44, Tag as Tag20, Divider as Divider8 } from "antd";
|
|
22322
22387
|
import { createStyles as createStyles25 } from "antd-style";
|
|
22323
22388
|
import { Mail as Mail2, Calendar as Calendar2 } from "lucide-react";
|
|
22324
|
-
import { jsx as jsx90, jsxs as
|
|
22389
|
+
import { jsx as jsx90, jsxs as jsxs63 } from "react/jsx-runtime";
|
|
22325
22390
|
var { Title: Title11, Text: Text35, Paragraph: Paragraph2 } = Typography44;
|
|
22326
22391
|
var useStyles14 = createStyles25(({ token, css }) => ({
|
|
22327
22392
|
modalContent: css`
|
|
@@ -22459,7 +22524,7 @@ var MailboxDetailModal = ({
|
|
|
22459
22524
|
const { styles } = useStyles14();
|
|
22460
22525
|
if (!message18) return null;
|
|
22461
22526
|
return /* @__PURE__ */ jsx90(
|
|
22462
|
-
|
|
22527
|
+
Modal15,
|
|
22463
22528
|
{
|
|
22464
22529
|
title: null,
|
|
22465
22530
|
open: visible,
|
|
@@ -22477,20 +22542,20 @@ var MailboxDetailModal = ({
|
|
|
22477
22542
|
padding: 24
|
|
22478
22543
|
}
|
|
22479
22544
|
},
|
|
22480
|
-
children: /* @__PURE__ */
|
|
22481
|
-
/* @__PURE__ */
|
|
22545
|
+
children: /* @__PURE__ */ jsxs63("div", { className: styles.modalContent, children: [
|
|
22546
|
+
/* @__PURE__ */ jsxs63("div", { className: styles.header, children: [
|
|
22482
22547
|
/* @__PURE__ */ jsx90("div", { className: styles.messageIcon, children: /* @__PURE__ */ jsx90(Mail2, { size: 20 }) }),
|
|
22483
22548
|
/* @__PURE__ */ jsx90(Text35, { className: styles.messageId, children: message18.id }),
|
|
22484
22549
|
!message18.read && /* @__PURE__ */ jsx90(Tag20, { color: "red", children: "Unread" })
|
|
22485
22550
|
] }),
|
|
22486
|
-
/* @__PURE__ */
|
|
22551
|
+
/* @__PURE__ */ jsxs63(Title11, { level: 4, className: styles.title, children: [
|
|
22487
22552
|
"Message from ",
|
|
22488
22553
|
message18.from
|
|
22489
22554
|
] }),
|
|
22490
|
-
/* @__PURE__ */
|
|
22491
|
-
/* @__PURE__ */
|
|
22555
|
+
/* @__PURE__ */ jsxs63("div", { className: styles.metaSection, children: [
|
|
22556
|
+
/* @__PURE__ */ jsxs63("div", { className: styles.metaItem, children: [
|
|
22492
22557
|
/* @__PURE__ */ jsx90(Text35, { className: styles.metaLabel, children: "From" }),
|
|
22493
|
-
/* @__PURE__ */
|
|
22558
|
+
/* @__PURE__ */ jsxs63("div", { className: styles.metaValue, children: [
|
|
22494
22559
|
/* @__PURE__ */ jsx90(
|
|
22495
22560
|
"div",
|
|
22496
22561
|
{
|
|
@@ -22502,9 +22567,9 @@ var MailboxDetailModal = ({
|
|
|
22502
22567
|
/* @__PURE__ */ jsx90("span", { children: message18.from })
|
|
22503
22568
|
] })
|
|
22504
22569
|
] }),
|
|
22505
|
-
/* @__PURE__ */
|
|
22570
|
+
/* @__PURE__ */ jsxs63("div", { className: styles.metaItem, children: [
|
|
22506
22571
|
/* @__PURE__ */ jsx90(Text35, { className: styles.metaLabel, children: "To" }),
|
|
22507
|
-
/* @__PURE__ */
|
|
22572
|
+
/* @__PURE__ */ jsxs63("div", { className: styles.metaValue, children: [
|
|
22508
22573
|
/* @__PURE__ */ jsx90(
|
|
22509
22574
|
"div",
|
|
22510
22575
|
{
|
|
@@ -22516,20 +22581,20 @@ var MailboxDetailModal = ({
|
|
|
22516
22581
|
/* @__PURE__ */ jsx90("span", { children: message18.to })
|
|
22517
22582
|
] })
|
|
22518
22583
|
] }),
|
|
22519
|
-
/* @__PURE__ */
|
|
22584
|
+
/* @__PURE__ */ jsxs63("div", { className: styles.metaItem, children: [
|
|
22520
22585
|
/* @__PURE__ */ jsx90(Text35, { className: styles.metaLabel, children: "Time" }),
|
|
22521
|
-
/* @__PURE__ */
|
|
22586
|
+
/* @__PURE__ */ jsxs63("div", { className: styles.metaValue, children: [
|
|
22522
22587
|
/* @__PURE__ */ jsx90(Calendar2, { size: 14 }),
|
|
22523
22588
|
/* @__PURE__ */ jsx90("span", { children: formatDate3(message18.timestamp) })
|
|
22524
22589
|
] })
|
|
22525
22590
|
] }),
|
|
22526
|
-
/* @__PURE__ */
|
|
22591
|
+
/* @__PURE__ */ jsxs63("div", { className: styles.metaItem, children: [
|
|
22527
22592
|
/* @__PURE__ */ jsx90(Text35, { className: styles.metaLabel, children: "Type" }),
|
|
22528
22593
|
/* @__PURE__ */ jsx90("div", { className: styles.metaValue, children: /* @__PURE__ */ jsx90(Tag20, { color: message18.type === "broadcast" ? "blue" : "default", children: message18.type }) })
|
|
22529
22594
|
] })
|
|
22530
22595
|
] }),
|
|
22531
22596
|
/* @__PURE__ */ jsx90(Divider8, {}),
|
|
22532
|
-
/* @__PURE__ */
|
|
22597
|
+
/* @__PURE__ */ jsxs63("div", { className: styles.contentSection, children: [
|
|
22533
22598
|
/* @__PURE__ */ jsx90(Text35, { className: styles.contentLabel, children: "Message Content" }),
|
|
22534
22599
|
/* @__PURE__ */ jsx90("div", { className: styles.contentBox, children: /* @__PURE__ */ jsx90(Paragraph2, { className: styles.messageContent, children: message18.content }) })
|
|
22535
22600
|
] })
|
|
@@ -22539,7 +22604,7 @@ var MailboxDetailModal = ({
|
|
|
22539
22604
|
};
|
|
22540
22605
|
|
|
22541
22606
|
// src/components/GenUI/elements/MailboxPanel.tsx
|
|
22542
|
-
import { jsx as jsx91, jsxs as
|
|
22607
|
+
import { jsx as jsx91, jsxs as jsxs64 } from "react/jsx-runtime";
|
|
22543
22608
|
var { Title: Title12, Text: Text36 } = Typography45;
|
|
22544
22609
|
var useStyles15 = createStyles26(({ token, css }) => ({
|
|
22545
22610
|
container: css`
|
|
@@ -22730,9 +22795,9 @@ var getMessagePreview = (content) => {
|
|
|
22730
22795
|
return firstLine.length > 80 ? firstLine.slice(0, 80) + "..." : firstLine;
|
|
22731
22796
|
};
|
|
22732
22797
|
var MessageGroupComponent = ({ group, styles, defaultExpanded = true, onMessageClick }) => {
|
|
22733
|
-
const [isExpanded, setIsExpanded] =
|
|
22734
|
-
return /* @__PURE__ */
|
|
22735
|
-
/* @__PURE__ */
|
|
22798
|
+
const [isExpanded, setIsExpanded] = useState56(defaultExpanded);
|
|
22799
|
+
return /* @__PURE__ */ jsxs64("div", { className: styles.listGroup, children: [
|
|
22800
|
+
/* @__PURE__ */ jsxs64(
|
|
22736
22801
|
"div",
|
|
22737
22802
|
{
|
|
22738
22803
|
className: styles.listGroupHeader,
|
|
@@ -22748,10 +22813,10 @@ var MessageGroupComponent = ({ group, styles, defaultExpanded = true, onMessageC
|
|
|
22748
22813
|
}
|
|
22749
22814
|
),
|
|
22750
22815
|
/* @__PURE__ */ jsx91("span", { className: styles.listGroupTitle, children: group.sender }),
|
|
22751
|
-
/* @__PURE__ */
|
|
22816
|
+
/* @__PURE__ */ jsxs64("span", { className: styles.listGroupCount, children: [
|
|
22752
22817
|
group.messages.length,
|
|
22753
22818
|
" messages",
|
|
22754
|
-
group.unreadCount > 0 && /* @__PURE__ */
|
|
22819
|
+
group.unreadCount > 0 && /* @__PURE__ */ jsxs64("span", { style: { color: "#ff4d4f", marginLeft: 8 }, children: [
|
|
22755
22820
|
"(",
|
|
22756
22821
|
group.unreadCount,
|
|
22757
22822
|
" unread)"
|
|
@@ -22760,16 +22825,16 @@ var MessageGroupComponent = ({ group, styles, defaultExpanded = true, onMessageC
|
|
|
22760
22825
|
]
|
|
22761
22826
|
}
|
|
22762
22827
|
),
|
|
22763
|
-
isExpanded && /* @__PURE__ */ jsx91("div", { className: styles.listGroupContent, children: group.messages.map((message18) => /* @__PURE__ */
|
|
22828
|
+
isExpanded && /* @__PURE__ */ jsx91("div", { className: styles.listGroupContent, children: group.messages.map((message18) => /* @__PURE__ */ jsxs64(
|
|
22764
22829
|
"div",
|
|
22765
22830
|
{
|
|
22766
22831
|
className: `${styles.listItem} ${!message18.read ? styles.listItemUnread : ""}`,
|
|
22767
22832
|
onClick: () => onMessageClick(message18),
|
|
22768
22833
|
children: [
|
|
22769
22834
|
/* @__PURE__ */ jsx91("div", { className: styles.listItemIcon, children: !message18.read ? /* @__PURE__ */ jsx91("div", { className: styles.unreadBadge }) : /* @__PURE__ */ jsx91(Circle2, { size: 8, style: { color: "#d9d9d9" } }) }),
|
|
22770
|
-
/* @__PURE__ */
|
|
22835
|
+
/* @__PURE__ */ jsxs64("div", { className: styles.listItemContent, children: [
|
|
22771
22836
|
/* @__PURE__ */ jsx91("span", { className: styles.listItemPreview, children: getMessagePreview(message18.content) }),
|
|
22772
|
-
/* @__PURE__ */
|
|
22837
|
+
/* @__PURE__ */ jsxs64("span", { className: styles.listItemMeta, children: [
|
|
22773
22838
|
"To: ",
|
|
22774
22839
|
message18.to,
|
|
22775
22840
|
" \u2022 ",
|
|
@@ -22785,8 +22850,8 @@ var MessageGroupComponent = ({ group, styles, defaultExpanded = true, onMessageC
|
|
|
22785
22850
|
};
|
|
22786
22851
|
var MailboxPanel = ({ data }) => {
|
|
22787
22852
|
const { styles } = useStyles15();
|
|
22788
|
-
const [selectedMessage, setSelectedMessage] =
|
|
22789
|
-
const [modalVisible, setModalVisible] =
|
|
22853
|
+
const [selectedMessage, setSelectedMessage] = useState56(null);
|
|
22854
|
+
const [modalVisible, setModalVisible] = useState56(false);
|
|
22790
22855
|
const { teamMailbox = [] } = data || {};
|
|
22791
22856
|
const messageGroups = useMemo22(() => {
|
|
22792
22857
|
const groupsMap = /* @__PURE__ */ new Map();
|
|
@@ -22820,13 +22885,13 @@ var MailboxPanel = ({ data }) => {
|
|
|
22820
22885
|
setModalVisible(false);
|
|
22821
22886
|
setSelectedMessage(null);
|
|
22822
22887
|
};
|
|
22823
|
-
return /* @__PURE__ */
|
|
22824
|
-
/* @__PURE__ */ jsx91("div", { className: styles.header, children: /* @__PURE__ */
|
|
22825
|
-
/* @__PURE__ */
|
|
22888
|
+
return /* @__PURE__ */ jsxs64("div", { className: styles.container, children: [
|
|
22889
|
+
/* @__PURE__ */ jsx91("div", { className: styles.header, children: /* @__PURE__ */ jsxs64("div", { children: [
|
|
22890
|
+
/* @__PURE__ */ jsxs64(Title12, { level: 3, className: styles.title, children: [
|
|
22826
22891
|
/* @__PURE__ */ jsx91(Mail3, { size: 20, style: { marginRight: 8, verticalAlign: "middle" } }),
|
|
22827
22892
|
"Mailbox"
|
|
22828
22893
|
] }),
|
|
22829
|
-
/* @__PURE__ */
|
|
22894
|
+
/* @__PURE__ */ jsxs64(Text36, { type: "secondary", children: [
|
|
22830
22895
|
teamMailbox.length,
|
|
22831
22896
|
" messages \u2022 ",
|
|
22832
22897
|
messageGroups.length,
|
|
@@ -22856,7 +22921,7 @@ var MailboxPanel = ({ data }) => {
|
|
|
22856
22921
|
};
|
|
22857
22922
|
|
|
22858
22923
|
// src/components/GenUI/elements/TeamWorkspace/index.tsx
|
|
22859
|
-
import { jsx as jsx92, jsxs as
|
|
22924
|
+
import { jsx as jsx92, jsxs as jsxs65 } from "react/jsx-runtime";
|
|
22860
22925
|
var { Content } = Layout;
|
|
22861
22926
|
var useStyles16 = createStyles27(({ token, css }) => ({
|
|
22862
22927
|
container: css`
|
|
@@ -22916,7 +22981,7 @@ var TeamWorkspace = ({
|
|
|
22916
22981
|
isLoading,
|
|
22917
22982
|
refresh
|
|
22918
22983
|
} = useTeamWorkspaceData(parent_thread_id || null, assistantId);
|
|
22919
|
-
const [activeMenuId, setActiveMenuId] =
|
|
22984
|
+
const [activeMenuId, setActiveMenuId] = useState57("dashboard");
|
|
22920
22985
|
const menuItems = useMemo23(() => {
|
|
22921
22986
|
const items = [
|
|
22922
22987
|
{
|
|
@@ -23027,7 +23092,7 @@ var TeamWorkspace = ({
|
|
|
23027
23092
|
return null;
|
|
23028
23093
|
}
|
|
23029
23094
|
};
|
|
23030
|
-
return /* @__PURE__ */
|
|
23095
|
+
return /* @__PURE__ */ jsxs65("div", { className: styles.container, children: [
|
|
23031
23096
|
/* @__PURE__ */ jsx92(
|
|
23032
23097
|
TeamWorkspaceMenu,
|
|
23033
23098
|
{
|
|
@@ -23036,7 +23101,7 @@ var TeamWorkspace = ({
|
|
|
23036
23101
|
onItemClick: handleMenuClick
|
|
23037
23102
|
}
|
|
23038
23103
|
),
|
|
23039
|
-
/* @__PURE__ */
|
|
23104
|
+
/* @__PURE__ */ jsxs65(Content, { className: styles.content, children: [
|
|
23040
23105
|
/* @__PURE__ */ jsx92(
|
|
23041
23106
|
Button43,
|
|
23042
23107
|
{
|
|
@@ -23057,7 +23122,7 @@ var TeamWorkspace = ({
|
|
|
23057
23122
|
import { useMemo as useMemo24 } from "react";
|
|
23058
23123
|
|
|
23059
23124
|
// src/components/GenUI/elements/TaskBoardCard.tsx
|
|
23060
|
-
import { jsx as jsx93, jsxs as
|
|
23125
|
+
import { jsx as jsx93, jsxs as jsxs66 } from "react/jsx-runtime";
|
|
23061
23126
|
var useStyle9 = (status, isCompleted) => {
|
|
23062
23127
|
return {
|
|
23063
23128
|
card: {
|
|
@@ -23177,7 +23242,7 @@ var TaskBoardCard = ({
|
|
|
23177
23242
|
} else if (isDepCompleted) {
|
|
23178
23243
|
badgeStyle = styles.depBadgeCompleted;
|
|
23179
23244
|
}
|
|
23180
|
-
return /* @__PURE__ */
|
|
23245
|
+
return /* @__PURE__ */ jsxs66(
|
|
23181
23246
|
"span",
|
|
23182
23247
|
{
|
|
23183
23248
|
style: {
|
|
@@ -23194,17 +23259,17 @@ var TaskBoardCard = ({
|
|
|
23194
23259
|
);
|
|
23195
23260
|
});
|
|
23196
23261
|
};
|
|
23197
|
-
return /* @__PURE__ */
|
|
23198
|
-
/* @__PURE__ */
|
|
23262
|
+
return /* @__PURE__ */ jsxs66("div", { style: styles.card, children: [
|
|
23263
|
+
/* @__PURE__ */ jsxs66("div", { style: styles.header, children: [
|
|
23199
23264
|
/* @__PURE__ */ jsx93("span", { style: styles.taskId, children: task.id }),
|
|
23200
|
-
task.assignee && /* @__PURE__ */
|
|
23265
|
+
task.assignee && /* @__PURE__ */ jsxs66("span", { style: styles.assignee, children: [
|
|
23201
23266
|
"@",
|
|
23202
23267
|
task.assignee
|
|
23203
23268
|
] })
|
|
23204
23269
|
] }),
|
|
23205
23270
|
/* @__PURE__ */ jsx93("h3", { style: styles.title, children: task.title }),
|
|
23206
23271
|
task.description && /* @__PURE__ */ jsx93("p", { style: styles.description, children: task.description }),
|
|
23207
|
-
/* @__PURE__ */
|
|
23272
|
+
/* @__PURE__ */ jsxs66("div", { style: styles.depRow, children: [
|
|
23208
23273
|
/* @__PURE__ */ jsx93("span", { style: styles.depLabel, children: "Deps:" }),
|
|
23209
23274
|
renderDependencyBadges()
|
|
23210
23275
|
] })
|
|
@@ -23212,7 +23277,7 @@ var TaskBoardCard = ({
|
|
|
23212
23277
|
};
|
|
23213
23278
|
|
|
23214
23279
|
// src/components/GenUI/elements/TaskBoard.tsx
|
|
23215
|
-
import { jsx as jsx94, jsxs as
|
|
23280
|
+
import { jsx as jsx94, jsxs as jsxs67 } from "react/jsx-runtime";
|
|
23216
23281
|
var COLUMNS = [
|
|
23217
23282
|
{ id: "pending", title: "Pending", color: "#7A7A7A" },
|
|
23218
23283
|
{ id: "in_progress", title: "In Progress", color: "#E42313" },
|
|
@@ -23360,14 +23425,14 @@ var TaskBoard = ({
|
|
|
23360
23425
|
onAddTask();
|
|
23361
23426
|
}
|
|
23362
23427
|
};
|
|
23363
|
-
return /* @__PURE__ */
|
|
23364
|
-
/* @__PURE__ */
|
|
23365
|
-
/* @__PURE__ */
|
|
23428
|
+
return /* @__PURE__ */ jsxs67("div", { style: styles.container, children: [
|
|
23429
|
+
/* @__PURE__ */ jsxs67("div", { style: styles.header, children: [
|
|
23430
|
+
/* @__PURE__ */ jsxs67("div", { style: styles.titleSection, children: [
|
|
23366
23431
|
/* @__PURE__ */ jsx94("h1", { style: styles.pageTitle, children: "Task Board" }),
|
|
23367
23432
|
/* @__PURE__ */ jsx94("p", { style: styles.pageSubtitle, children: "Track team progress and task status" })
|
|
23368
23433
|
] }),
|
|
23369
|
-
/* @__PURE__ */ jsx94("div", { style: styles.actions, children: /* @__PURE__ */
|
|
23370
|
-
/* @__PURE__ */
|
|
23434
|
+
/* @__PURE__ */ jsx94("div", { style: styles.actions, children: /* @__PURE__ */ jsxs67("button", { style: styles.addButton, onClick: handleAddTask, children: [
|
|
23435
|
+
/* @__PURE__ */ jsxs67("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
23371
23436
|
/* @__PURE__ */ jsx94("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
|
23372
23437
|
/* @__PURE__ */ jsx94("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
|
23373
23438
|
] }),
|
|
@@ -23376,9 +23441,9 @@ var TaskBoard = ({
|
|
|
23376
23441
|
] }),
|
|
23377
23442
|
/* @__PURE__ */ jsx94("div", { style: styles.boardContainer, children: COLUMNS.map((column) => {
|
|
23378
23443
|
const columnTasks = tasksByStatus[column.id] || [];
|
|
23379
|
-
return /* @__PURE__ */
|
|
23380
|
-
/* @__PURE__ */
|
|
23381
|
-
/* @__PURE__ */
|
|
23444
|
+
return /* @__PURE__ */ jsxs67("div", { style: styles.column, children: [
|
|
23445
|
+
/* @__PURE__ */ jsxs67("div", { style: styles.columnHeader, children: [
|
|
23446
|
+
/* @__PURE__ */ jsxs67("div", { style: styles.columnTitle, children: [
|
|
23382
23447
|
/* @__PURE__ */ jsx94("div", { style: { ...styles.statusDot, background: column.color } }),
|
|
23383
23448
|
/* @__PURE__ */ jsx94("span", { style: styles.columnLabel, children: column.title })
|
|
23384
23449
|
] }),
|
|
@@ -23399,8 +23464,8 @@ var TaskBoard = ({
|
|
|
23399
23464
|
};
|
|
23400
23465
|
|
|
23401
23466
|
// src/components/GenUI/elements/Mailbox.tsx
|
|
23402
|
-
import { useState as
|
|
23403
|
-
import { jsx as jsx95, jsxs as
|
|
23467
|
+
import { useState as useState58, useMemo as useMemo25, useRef as useRef21, useEffect as useEffect36 } from "react";
|
|
23468
|
+
import { jsx as jsx95, jsxs as jsxs68 } from "react/jsx-runtime";
|
|
23404
23469
|
var useStyle11 = () => {
|
|
23405
23470
|
return {
|
|
23406
23471
|
container: {
|
|
@@ -23669,7 +23734,7 @@ var renderMessageWithMentions = (content, mentions, styles) => {
|
|
|
23669
23734
|
parts.push(content.slice(lastIndex, index));
|
|
23670
23735
|
}
|
|
23671
23736
|
parts.push(
|
|
23672
|
-
/* @__PURE__ */
|
|
23737
|
+
/* @__PURE__ */ jsxs68("span", { style: styles.mention, children: [
|
|
23673
23738
|
"@",
|
|
23674
23739
|
mention
|
|
23675
23740
|
] }, mention)
|
|
@@ -23685,7 +23750,7 @@ var renderMessageWithMentions = (content, mentions, styles) => {
|
|
|
23685
23750
|
var TeamChat = ({ data }) => {
|
|
23686
23751
|
const styles = useStyle11();
|
|
23687
23752
|
const { teamName, currentUser, teammates, messages, onSendMessage } = data || {};
|
|
23688
|
-
const [inputValue, setInputValue] =
|
|
23753
|
+
const [inputValue, setInputValue] = useState58("");
|
|
23689
23754
|
const messagesEndRef = useRef21(null);
|
|
23690
23755
|
const sortedMessages = useMemo25(() => {
|
|
23691
23756
|
return [...messages || []].sort(
|
|
@@ -23713,19 +23778,19 @@ var TeamChat = ({ data }) => {
|
|
|
23713
23778
|
const getStatusColor2 = (status) => {
|
|
23714
23779
|
return STATUS_COLORS[status] || STATUS_COLORS.offline;
|
|
23715
23780
|
};
|
|
23716
|
-
return /* @__PURE__ */
|
|
23717
|
-
/* @__PURE__ */ jsx95("div", { style: styles.header, children: /* @__PURE__ */
|
|
23781
|
+
return /* @__PURE__ */ jsxs68("div", { style: styles.container, children: [
|
|
23782
|
+
/* @__PURE__ */ jsx95("div", { style: styles.header, children: /* @__PURE__ */ jsxs68("div", { style: styles.titleSection, children: [
|
|
23718
23783
|
/* @__PURE__ */ jsx95("h2", { style: styles.teamName, children: teamName || "Team Chat" }),
|
|
23719
|
-
/* @__PURE__ */
|
|
23784
|
+
/* @__PURE__ */ jsxs68("p", { style: styles.teamDesc, children: [
|
|
23720
23785
|
teammates?.length || 0,
|
|
23721
23786
|
" member",
|
|
23722
23787
|
teammates?.length !== 1 ? "s" : ""
|
|
23723
23788
|
] })
|
|
23724
23789
|
] }) }),
|
|
23725
|
-
/* @__PURE__ */
|
|
23726
|
-
/* @__PURE__ */
|
|
23790
|
+
/* @__PURE__ */ jsxs68("div", { style: styles.mainContainer, children: [
|
|
23791
|
+
/* @__PURE__ */ jsxs68("div", { style: styles.sidebar, children: [
|
|
23727
23792
|
/* @__PURE__ */ jsx95("div", { style: styles.sidebarHeader, children: /* @__PURE__ */ jsx95("p", { style: styles.sidebarTitle, children: "Team Members" }) }),
|
|
23728
|
-
teammates?.map((member) => /* @__PURE__ */
|
|
23793
|
+
teammates?.map((member) => /* @__PURE__ */ jsxs68("div", { style: styles.member, children: [
|
|
23729
23794
|
/* @__PURE__ */ jsx95(
|
|
23730
23795
|
"div",
|
|
23731
23796
|
{
|
|
@@ -23736,8 +23801,8 @@ var TeamChat = ({ data }) => {
|
|
|
23736
23801
|
children: /* @__PURE__ */ jsx95("span", { style: styles.avatarText, children: getInitials9(member.name) })
|
|
23737
23802
|
}
|
|
23738
23803
|
),
|
|
23739
|
-
/* @__PURE__ */
|
|
23740
|
-
/* @__PURE__ */
|
|
23804
|
+
/* @__PURE__ */ jsxs68("div", { style: styles.memberInfo, children: [
|
|
23805
|
+
/* @__PURE__ */ jsxs68("p", { style: styles.memberName, children: [
|
|
23741
23806
|
member.name,
|
|
23742
23807
|
member.name === currentUser && " (You)"
|
|
23743
23808
|
] }),
|
|
@@ -23754,11 +23819,11 @@ var TeamChat = ({ data }) => {
|
|
|
23754
23819
|
)
|
|
23755
23820
|
] }, member.name))
|
|
23756
23821
|
] }),
|
|
23757
|
-
/* @__PURE__ */
|
|
23758
|
-
/* @__PURE__ */
|
|
23822
|
+
/* @__PURE__ */ jsxs68("div", { style: styles.chatArea, children: [
|
|
23823
|
+
/* @__PURE__ */ jsxs68("div", { style: styles.messages, children: [
|
|
23759
23824
|
sortedMessages.map((msg) => {
|
|
23760
23825
|
const isSelf = msg.from === currentUser;
|
|
23761
|
-
return /* @__PURE__ */
|
|
23826
|
+
return /* @__PURE__ */ jsxs68(
|
|
23762
23827
|
"div",
|
|
23763
23828
|
{
|
|
23764
23829
|
style: {
|
|
@@ -23776,7 +23841,7 @@ var TeamChat = ({ data }) => {
|
|
|
23776
23841
|
children: /* @__PURE__ */ jsx95("span", { style: styles.avatarText, children: getInitials9(msg.from) })
|
|
23777
23842
|
}
|
|
23778
23843
|
),
|
|
23779
|
-
/* @__PURE__ */
|
|
23844
|
+
/* @__PURE__ */ jsxs68(
|
|
23780
23845
|
"div",
|
|
23781
23846
|
{
|
|
23782
23847
|
style: {
|
|
@@ -23784,7 +23849,7 @@ var TeamChat = ({ data }) => {
|
|
|
23784
23849
|
...isSelf ? { alignItems: "flex-end" } : {}
|
|
23785
23850
|
},
|
|
23786
23851
|
children: [
|
|
23787
|
-
/* @__PURE__ */
|
|
23852
|
+
/* @__PURE__ */ jsxs68("div", { style: styles.messageHeader, children: [
|
|
23788
23853
|
/* @__PURE__ */ jsx95(
|
|
23789
23854
|
"span",
|
|
23790
23855
|
{
|
|
@@ -23827,7 +23892,7 @@ var TeamChat = ({ data }) => {
|
|
|
23827
23892
|
}),
|
|
23828
23893
|
/* @__PURE__ */ jsx95("div", { ref: messagesEndRef })
|
|
23829
23894
|
] }),
|
|
23830
|
-
/* @__PURE__ */
|
|
23895
|
+
/* @__PURE__ */ jsxs68("div", { style: styles.inputArea, children: [
|
|
23831
23896
|
/* @__PURE__ */ jsx95("div", { style: styles.input, children: /* @__PURE__ */ jsx95(
|
|
23832
23897
|
"input",
|
|
23833
23898
|
{
|
|
@@ -23839,8 +23904,8 @@ var TeamChat = ({ data }) => {
|
|
|
23839
23904
|
style: styles.inputText
|
|
23840
23905
|
}
|
|
23841
23906
|
) }),
|
|
23842
|
-
/* @__PURE__ */
|
|
23843
|
-
/* @__PURE__ */
|
|
23907
|
+
/* @__PURE__ */ jsxs68("button", { style: styles.sendButton, onClick: handleSend, children: [
|
|
23908
|
+
/* @__PURE__ */ jsxs68(
|
|
23844
23909
|
"svg",
|
|
23845
23910
|
{
|
|
23846
23911
|
width: "16",
|
|
@@ -23962,8 +24027,8 @@ var regsiterElement = (language, ElementMeta) => {
|
|
|
23962
24027
|
// src/components/Chat/SideAppViewBrowser.tsx
|
|
23963
24028
|
import { Dropdown as Dropdown2, Tooltip as Tooltip22 } from "antd";
|
|
23964
24029
|
import { createStyles as createStyles28 } from "antd-style";
|
|
23965
|
-
import { useEffect as useEffect37, useState as
|
|
23966
|
-
import { Fragment as Fragment21, jsx as jsx96, jsxs as
|
|
24030
|
+
import { useEffect as useEffect37, useState as useState59 } from "react";
|
|
24031
|
+
import { Fragment as Fragment21, jsx as jsx96, jsxs as jsxs69 } from "react/jsx-runtime";
|
|
23967
24032
|
var useStyle12 = createStyles28(({ token, css }) => {
|
|
23968
24033
|
return {
|
|
23969
24034
|
container: css`
|
|
@@ -24142,7 +24207,7 @@ var EmptySideAppView = ({ component_key, data }) => {
|
|
|
24142
24207
|
if (data?.component) {
|
|
24143
24208
|
return /* @__PURE__ */ jsx96(Fragment21, { children: data.component });
|
|
24144
24209
|
}
|
|
24145
|
-
return /* @__PURE__ */
|
|
24210
|
+
return /* @__PURE__ */ jsxs69("div", { children: [
|
|
24146
24211
|
/* @__PURE__ */ jsx96("p", { children: "Component view not found" }),
|
|
24147
24212
|
/* @__PURE__ */ jsx96("pre", { children: JSON.stringify({ component_key, data }, null, 2) })
|
|
24148
24213
|
] });
|
|
@@ -24160,11 +24225,11 @@ var SideAppViewBrowser = ({ region = "side" }) => {
|
|
|
24160
24225
|
} = useChatUIContext();
|
|
24161
24226
|
const selectedCard = region === "side" ? sideAppSelectedCard : contextAppSelectedCard;
|
|
24162
24227
|
const closeApp = region === "side" ? closeSideApp : closeContentApp;
|
|
24163
|
-
const [activeKey, setActiveKey] =
|
|
24228
|
+
const [activeKey, setActiveKey] = useState59(
|
|
24164
24229
|
JSON.stringify(selectedCard)
|
|
24165
24230
|
);
|
|
24166
|
-
const [hoveredTab, setHoveredTab] =
|
|
24167
|
-
const [items, setItems] =
|
|
24231
|
+
const [hoveredTab, setHoveredTab] = useState59(null);
|
|
24232
|
+
const [items, setItems] = useState59([]);
|
|
24168
24233
|
const add = (key, label, children, componentKey) => {
|
|
24169
24234
|
const newPanes = [...items, { label, children, key, componentKey }];
|
|
24170
24235
|
setItems(newPanes);
|
|
@@ -24220,7 +24285,7 @@ var SideAppViewBrowser = ({ region = "side" }) => {
|
|
|
24220
24285
|
const activeItem = items.find((item) => item.key === activeKey);
|
|
24221
24286
|
const dropdownItems = items.map((item) => ({
|
|
24222
24287
|
key: item.key,
|
|
24223
|
-
label: /* @__PURE__ */
|
|
24288
|
+
label: /* @__PURE__ */ jsxs69(
|
|
24224
24289
|
"div",
|
|
24225
24290
|
{
|
|
24226
24291
|
style: {
|
|
@@ -24247,9 +24312,9 @@ var SideAppViewBrowser = ({ region = "side" }) => {
|
|
|
24247
24312
|
),
|
|
24248
24313
|
onClick: () => switchTab(item.key)
|
|
24249
24314
|
}));
|
|
24250
|
-
return /* @__PURE__ */
|
|
24251
|
-
/* @__PURE__ */
|
|
24252
|
-
/* @__PURE__ */ jsx96("div", { className: styles.tabsStrip, children: items.map((item) => /* @__PURE__ */ jsx96(Tooltip22, { title: item.label, placement: "bottom", children: /* @__PURE__ */
|
|
24315
|
+
return /* @__PURE__ */ jsxs69("div", { className: styles.container, children: [
|
|
24316
|
+
/* @__PURE__ */ jsxs69("div", { className: styles.header, children: [
|
|
24317
|
+
/* @__PURE__ */ jsx96("div", { className: styles.tabsStrip, children: items.map((item) => /* @__PURE__ */ jsx96(Tooltip22, { title: item.label, placement: "bottom", children: /* @__PURE__ */ jsxs69(
|
|
24253
24318
|
"div",
|
|
24254
24319
|
{
|
|
24255
24320
|
"data-tab-key": item.key,
|
|
@@ -24274,7 +24339,7 @@ var SideAppViewBrowser = ({ region = "side" }) => {
|
|
|
24274
24339
|
]
|
|
24275
24340
|
}
|
|
24276
24341
|
) }, item.key)) }),
|
|
24277
|
-
/* @__PURE__ */
|
|
24342
|
+
/* @__PURE__ */ jsxs69("div", { className: styles.actions, children: [
|
|
24278
24343
|
items.length > 0 && /* @__PURE__ */ jsx96("div", { className: styles.tabCounter, children: items.length }),
|
|
24279
24344
|
items.length > 1 && /* @__PURE__ */ jsx96(
|
|
24280
24345
|
Dropdown2,
|
|
@@ -24288,7 +24353,7 @@ var SideAppViewBrowser = ({ region = "side" }) => {
|
|
|
24288
24353
|
/* @__PURE__ */ jsx96(Tooltip22, { title: "Close", children: /* @__PURE__ */ jsx96("button", { className: styles.actionBtn, onClick: closeApp, children: /* @__PURE__ */ jsx96(CloseOutlined2, {}) }) })
|
|
24289
24354
|
] })
|
|
24290
24355
|
] }),
|
|
24291
|
-
/* @__PURE__ */ jsx96("div", { className: styles.content, children: activeItem ? /* @__PURE__ */ jsx96("div", { className: styles.contentWrapper, children: activeItem.children }, activeItem.key) : /* @__PURE__ */
|
|
24356
|
+
/* @__PURE__ */ jsx96("div", { className: styles.content, children: activeItem ? /* @__PURE__ */ jsx96("div", { className: styles.contentWrapper, children: activeItem.children }, activeItem.key) : /* @__PURE__ */ jsxs69("div", { className: styles.emptyState, children: [
|
|
24292
24357
|
/* @__PURE__ */ jsx96(AppstoreOutlined, { className: "icon" }),
|
|
24293
24358
|
/* @__PURE__ */ jsx96("span", { children: "Select an app to start" })
|
|
24294
24359
|
] }) })
|
|
@@ -24296,11 +24361,11 @@ var SideAppViewBrowser = ({ region = "side" }) => {
|
|
|
24296
24361
|
};
|
|
24297
24362
|
|
|
24298
24363
|
// src/components/Chat/ProjectSelector.tsx
|
|
24299
|
-
import { useState as
|
|
24300
|
-
import { Modal as
|
|
24364
|
+
import { useState as useState60, useCallback as useCallback26, useMemo as useMemo26, useRef as useRef22 } from "react";
|
|
24365
|
+
import { Modal as Modal16, Input as Input12, Button as Button44, message as message14 } from "antd";
|
|
24301
24366
|
import { createStyles as createStyles29 } from "antd-style";
|
|
24302
|
-
import { Folder, ChevronDown as ChevronDown4, Building2 as
|
|
24303
|
-
import { Fragment as Fragment22, jsx as jsx97, jsxs as
|
|
24367
|
+
import { Folder, ChevronDown as ChevronDown4, Building2 as Building24 } from "lucide-react";
|
|
24368
|
+
import { Fragment as Fragment22, jsx as jsx97, jsxs as jsxs70 } from "react/jsx-runtime";
|
|
24304
24369
|
var PROJECT_NAME_MAX_LENGTH = 50;
|
|
24305
24370
|
var useStyles17 = createStyles29(({ token, css }) => ({
|
|
24306
24371
|
container: css`
|
|
@@ -24530,13 +24595,13 @@ var ProjectSelector = () => {
|
|
|
24530
24595
|
setProject,
|
|
24531
24596
|
createProject
|
|
24532
24597
|
} = useWorkspaceContext();
|
|
24533
|
-
const [isWorkspaceListOpen, setIsWorkspaceListOpen] =
|
|
24598
|
+
const [isWorkspaceListOpen, setIsWorkspaceListOpen] = useState60(false);
|
|
24534
24599
|
const workspaceDropdownRef = useRef22(null);
|
|
24535
|
-
const [isProjectListOpen, setIsProjectListOpen] =
|
|
24536
|
-
const [isModalOpen, setIsModalOpen] =
|
|
24537
|
-
const [projectName, setProjectName] =
|
|
24538
|
-
const [validationError, setValidationError] =
|
|
24539
|
-
const [isCreating, setIsCreating] =
|
|
24600
|
+
const [isProjectListOpen, setIsProjectListOpen] = useState60(false);
|
|
24601
|
+
const [isModalOpen, setIsModalOpen] = useState60(false);
|
|
24602
|
+
const [projectName, setProjectName] = useState60("");
|
|
24603
|
+
const [validationError, setValidationError] = useState60(null);
|
|
24604
|
+
const [isCreating, setIsCreating] = useState60(false);
|
|
24540
24605
|
const projectNameInputRef = useRef22(null);
|
|
24541
24606
|
const currentProject = useMemo26(() => {
|
|
24542
24607
|
return projects.find((p) => p.id === projectId);
|
|
@@ -24618,25 +24683,25 @@ var ProjectSelector = () => {
|
|
|
24618
24683
|
}
|
|
24619
24684
|
};
|
|
24620
24685
|
const isProjectNameValid = !validateProjectName(projectName.trim());
|
|
24621
|
-
return /* @__PURE__ */
|
|
24622
|
-
/* @__PURE__ */ jsx97("div", { className: styles.container, children: /* @__PURE__ */
|
|
24686
|
+
return /* @__PURE__ */ jsxs70(Fragment22, { children: [
|
|
24687
|
+
/* @__PURE__ */ jsx97("div", { className: styles.container, children: /* @__PURE__ */ jsxs70("div", { className: styles.selectorWrapper, children: [
|
|
24623
24688
|
/* @__PURE__ */ jsx97("div", { style: { position: "relative" }, ref: workspaceDropdownRef, children: /* @__PURE__ */ jsx97(
|
|
24624
24689
|
"button",
|
|
24625
24690
|
{
|
|
24626
24691
|
className: styles.workspaceButton,
|
|
24627
24692
|
onClick: handleWorkspaceClick,
|
|
24628
24693
|
title: currentWorkspace?.name || "Select Workspace",
|
|
24629
|
-
children: /* @__PURE__ */ jsx97("div", { className: styles.workspaceButtonIcon, children: /* @__PURE__ */ jsx97(
|
|
24694
|
+
children: /* @__PURE__ */ jsx97("div", { className: styles.workspaceButtonIcon, children: /* @__PURE__ */ jsx97(Building24, { size: 16 }) })
|
|
24630
24695
|
}
|
|
24631
24696
|
) }),
|
|
24632
24697
|
/* @__PURE__ */ jsx97("span", { className: styles.divider, children: "/" }),
|
|
24633
|
-
/* @__PURE__ */
|
|
24698
|
+
/* @__PURE__ */ jsxs70("div", { className: styles.projectTrigger, onClick: toggleProjectList, children: [
|
|
24634
24699
|
/* @__PURE__ */ jsx97("div", { className: styles.projectTriggerIcon, children: /* @__PURE__ */ jsx97(Folder, { size: 16 }) }),
|
|
24635
24700
|
/* @__PURE__ */ jsx97("div", { className: styles.projectTriggerInfo, children: /* @__PURE__ */ jsx97("div", { className: styles.projectTriggerName, children: currentProject?.name || "Select Project" }) }),
|
|
24636
24701
|
/* @__PURE__ */ jsx97("div", { className: `${styles.projectTriggerArrow} ${isProjectListOpen ? "expanded" : ""}`, children: /* @__PURE__ */ jsx97(ChevronDown4, { size: 14 }) })
|
|
24637
24702
|
] }),
|
|
24638
|
-
isProjectListOpen && /* @__PURE__ */
|
|
24639
|
-
projects.map((project) => /* @__PURE__ */
|
|
24703
|
+
isProjectListOpen && /* @__PURE__ */ jsxs70("div", { className: styles.projectDropdown, children: [
|
|
24704
|
+
projects.map((project) => /* @__PURE__ */ jsxs70(
|
|
24640
24705
|
"div",
|
|
24641
24706
|
{
|
|
24642
24707
|
className: `${styles.projectDropdownItem} ${project.id === projectId ? "active" : ""}`,
|
|
@@ -24651,8 +24716,8 @@ var ProjectSelector = () => {
|
|
|
24651
24716
|
projects.length === 0 && /* @__PURE__ */ jsx97("div", { className: styles.emptyState, children: "No projects" })
|
|
24652
24717
|
] })
|
|
24653
24718
|
] }) }),
|
|
24654
|
-
/* @__PURE__ */
|
|
24655
|
-
|
|
24719
|
+
/* @__PURE__ */ jsxs70(
|
|
24720
|
+
Modal16,
|
|
24656
24721
|
{
|
|
24657
24722
|
title: "Create New Project",
|
|
24658
24723
|
open: isModalOpen,
|
|
@@ -24663,7 +24728,7 @@ var ProjectSelector = () => {
|
|
|
24663
24728
|
maskClosable: !isCreating,
|
|
24664
24729
|
keyboard: true,
|
|
24665
24730
|
closable: true,
|
|
24666
|
-
footer: /* @__PURE__ */
|
|
24731
|
+
footer: /* @__PURE__ */ jsxs70("div", { className: styles.modalFooter, children: [
|
|
24667
24732
|
/* @__PURE__ */ jsx97(Button44, { onClick: handleCloseModal, disabled: isCreating, children: "Cancel" }),
|
|
24668
24733
|
/* @__PURE__ */ jsx97(
|
|
24669
24734
|
Button44,
|
|
@@ -24697,7 +24762,7 @@ var ProjectSelector = () => {
|
|
|
24697
24762
|
};
|
|
24698
24763
|
|
|
24699
24764
|
// src/components/Chat/LatticeChat.tsx
|
|
24700
|
-
import { jsx as jsx98, jsxs as
|
|
24765
|
+
import { jsx as jsx98, jsxs as jsxs71 } from "react/jsx-runtime";
|
|
24701
24766
|
var LatticeChat = (props) => {
|
|
24702
24767
|
const { assistant_id, thread_id = "", menu, header, ...chatingProps } = props;
|
|
24703
24768
|
const { config } = useLatticeChatShellContext();
|
|
@@ -24713,7 +24778,7 @@ var LatticeChat = (props) => {
|
|
|
24713
24778
|
enableReturnStateWhenStreamCompleted: true,
|
|
24714
24779
|
enableResumeStream: true
|
|
24715
24780
|
},
|
|
24716
|
-
children: /* @__PURE__ */ jsx98(ChatUIContextProvider, { children: /* @__PURE__ */
|
|
24781
|
+
children: /* @__PURE__ */ jsx98(ChatUIContextProvider, { children: /* @__PURE__ */ jsxs71(
|
|
24717
24782
|
"div",
|
|
24718
24783
|
{
|
|
24719
24784
|
style: {
|
|
@@ -24802,22 +24867,22 @@ var AgentConversations = ({
|
|
|
24802
24867
|
import { useContext as useContext11 } from "react";
|
|
24803
24868
|
|
|
24804
24869
|
// src/components/Chat/ChatSidebar.tsx
|
|
24805
|
-
import { useState as
|
|
24870
|
+
import { useState as useState62, useMemo as useMemo29, useCallback as useCallback29 } from "react";
|
|
24806
24871
|
import { Drawer as Drawer2 } from "antd";
|
|
24807
24872
|
import {
|
|
24808
24873
|
History,
|
|
24809
|
-
LogOut as
|
|
24874
|
+
LogOut as LogOut4,
|
|
24810
24875
|
FolderOpen as FolderOpen4,
|
|
24811
24876
|
PlusCircle,
|
|
24812
24877
|
PanelLeftClose as PanelLeftClose2
|
|
24813
24878
|
} from "lucide-react";
|
|
24814
24879
|
|
|
24815
24880
|
// src/components/Chat/ProjectsMenuContent.tsx
|
|
24816
|
-
import { useState as
|
|
24817
|
-
import { Spin as Spin15, Modal as
|
|
24881
|
+
import { useState as useState61, useEffect as useEffect38, useCallback as useCallback27, useMemo as useMemo28, useRef as useRef23 } from "react";
|
|
24882
|
+
import { Spin as Spin15, Modal as Modal17, Input as Input13, Button as Button45, message as message15 } from "antd";
|
|
24818
24883
|
import { createStyles as createStyles30 } from "antd-style";
|
|
24819
24884
|
import { Upload } from "lucide-react";
|
|
24820
|
-
import { Fragment as Fragment23, jsx as jsx100, jsxs as
|
|
24885
|
+
import { Fragment as Fragment23, jsx as jsx100, jsxs as jsxs72 } from "react/jsx-runtime";
|
|
24821
24886
|
var PROJECT_NAME_MAX_LENGTH2 = 50;
|
|
24822
24887
|
var useStyles18 = createStyles30(({ token, css }) => ({
|
|
24823
24888
|
container: css`
|
|
@@ -25186,14 +25251,14 @@ var ProjectsMenuContent = () => {
|
|
|
25186
25251
|
getFileViewUrl,
|
|
25187
25252
|
uploadFileToFolder
|
|
25188
25253
|
} = useWorkspaceContext();
|
|
25189
|
-
const [folderAssets, setFolderAssets] =
|
|
25190
|
-
const [folderLoading, setFolderLoading] =
|
|
25191
|
-
const [isProjectListOpen, setIsProjectListOpen] =
|
|
25192
|
-
const [uploadingFolder, setUploadingFolder] =
|
|
25193
|
-
const [isModalOpen, setIsModalOpen] =
|
|
25194
|
-
const [projectName, setProjectName] =
|
|
25195
|
-
const [validationError, setValidationError] =
|
|
25196
|
-
const [isCreating, setIsCreating] =
|
|
25254
|
+
const [folderAssets, setFolderAssets] = useState61({});
|
|
25255
|
+
const [folderLoading, setFolderLoading] = useState61({});
|
|
25256
|
+
const [isProjectListOpen, setIsProjectListOpen] = useState61(false);
|
|
25257
|
+
const [uploadingFolder, setUploadingFolder] = useState61(null);
|
|
25258
|
+
const [isModalOpen, setIsModalOpen] = useState61(false);
|
|
25259
|
+
const [projectName, setProjectName] = useState61("");
|
|
25260
|
+
const [validationError, setValidationError] = useState61(null);
|
|
25261
|
+
const [isCreating, setIsCreating] = useState61(false);
|
|
25197
25262
|
const projectNameInputRef = useRef23(null);
|
|
25198
25263
|
const resourceFolders = useMemo28(() => {
|
|
25199
25264
|
return config.resourceFolders && config.resourceFolders.length > 0 ? config.resourceFolders : [{ name: "/", displayName: "Project Assets", allowUpload: true }];
|
|
@@ -25346,12 +25411,12 @@ var ProjectsMenuContent = () => {
|
|
|
25346
25411
|
const parts = path.split(/[/\\]/);
|
|
25347
25412
|
return parts[parts.length - 1];
|
|
25348
25413
|
};
|
|
25349
|
-
return /* @__PURE__ */
|
|
25414
|
+
return /* @__PURE__ */ jsxs72("div", { className: styles.container, children: [
|
|
25350
25415
|
resourceFolders.map((folder) => {
|
|
25351
25416
|
const assets = folderAssets[folder.name] || [];
|
|
25352
25417
|
const isLoading = folderLoading[folder.name] || false;
|
|
25353
|
-
return /* @__PURE__ */
|
|
25354
|
-
/* @__PURE__ */
|
|
25418
|
+
return /* @__PURE__ */ jsxs72("div", { className: styles.section, children: [
|
|
25419
|
+
/* @__PURE__ */ jsxs72("div", { className: styles.sectionHeader, children: [
|
|
25355
25420
|
/* @__PURE__ */ jsx100(
|
|
25356
25421
|
"span",
|
|
25357
25422
|
{
|
|
@@ -25363,8 +25428,8 @@ var ProjectsMenuContent = () => {
|
|
|
25363
25428
|
),
|
|
25364
25429
|
/* @__PURE__ */ jsx100("span", { className: styles.badge, children: assets.length })
|
|
25365
25430
|
] }),
|
|
25366
|
-
isLoading ? /* @__PURE__ */ jsx100("div", { className: styles.loading, children: /* @__PURE__ */ jsx100(Spin15, { size: "small" }) }) : /* @__PURE__ */
|
|
25367
|
-
assets.map((asset) => /* @__PURE__ */
|
|
25431
|
+
isLoading ? /* @__PURE__ */ jsx100("div", { className: styles.loading, children: /* @__PURE__ */ jsx100(Spin15, { size: "small" }) }) : /* @__PURE__ */ jsxs72("div", { className: styles.assetList, children: [
|
|
25432
|
+
assets.map((asset) => /* @__PURE__ */ jsxs72(
|
|
25368
25433
|
"div",
|
|
25369
25434
|
{
|
|
25370
25435
|
className: styles.assetItem,
|
|
@@ -25372,7 +25437,7 @@ var ProjectsMenuContent = () => {
|
|
|
25372
25437
|
title: getFileName(asset.name || asset.path),
|
|
25373
25438
|
children: [
|
|
25374
25439
|
/* @__PURE__ */ jsx100("div", { className: styles.assetIcon, children: getFileIcon2(getFileName(asset.name || asset.path)) }),
|
|
25375
|
-
/* @__PURE__ */
|
|
25440
|
+
/* @__PURE__ */ jsxs72("div", { className: styles.assetInfo, children: [
|
|
25376
25441
|
/* @__PURE__ */ jsx100("div", { className: styles.assetName, children: getFileName(asset.name || asset.path) }),
|
|
25377
25442
|
/* @__PURE__ */ jsx100("div", { className: styles.assetMeta, children: formatDate5(asset.modified_at) })
|
|
25378
25443
|
] })
|
|
@@ -25388,10 +25453,10 @@ var ProjectsMenuContent = () => {
|
|
|
25388
25453
|
className: styles.uploadBtn,
|
|
25389
25454
|
onClick: () => handleUploadClick(folder.name),
|
|
25390
25455
|
disabled: !workspaceId || !projectId || uploadingFolder === folder.name,
|
|
25391
|
-
children: uploadingFolder === folder.name ? /* @__PURE__ */
|
|
25456
|
+
children: uploadingFolder === folder.name ? /* @__PURE__ */ jsxs72(Fragment23, { children: [
|
|
25392
25457
|
/* @__PURE__ */ jsx100(Spin15, { size: "small" }),
|
|
25393
25458
|
/* @__PURE__ */ jsx100("span", { children: "Uploading..." })
|
|
25394
|
-
] }) : /* @__PURE__ */
|
|
25459
|
+
] }) : /* @__PURE__ */ jsxs72(Fragment23, { children: [
|
|
25395
25460
|
/* @__PURE__ */ jsx100(Upload, { size: 14 }),
|
|
25396
25461
|
/* @__PURE__ */ jsx100("span", { children: "Upload" })
|
|
25397
25462
|
] })
|
|
@@ -25400,8 +25465,8 @@ var ProjectsMenuContent = () => {
|
|
|
25400
25465
|
] })
|
|
25401
25466
|
] }, folder.name);
|
|
25402
25467
|
}),
|
|
25403
|
-
/* @__PURE__ */
|
|
25404
|
-
|
|
25468
|
+
/* @__PURE__ */ jsxs72(
|
|
25469
|
+
Modal17,
|
|
25405
25470
|
{
|
|
25406
25471
|
title: "Create New Project",
|
|
25407
25472
|
open: isModalOpen,
|
|
@@ -25412,7 +25477,7 @@ var ProjectsMenuContent = () => {
|
|
|
25412
25477
|
maskClosable: !isCreating,
|
|
25413
25478
|
keyboard: true,
|
|
25414
25479
|
closable: true,
|
|
25415
|
-
footer: /* @__PURE__ */
|
|
25480
|
+
footer: /* @__PURE__ */ jsxs72("div", { className: styles.modalFooter, children: [
|
|
25416
25481
|
/* @__PURE__ */ jsx100(Button45, { onClick: handleCloseModal, disabled: isCreating, children: "Cancel" }),
|
|
25417
25482
|
/* @__PURE__ */ jsx100(
|
|
25418
25483
|
Button45,
|
|
@@ -25453,8 +25518,8 @@ var ProjectsMenuContent = () => {
|
|
|
25453
25518
|
import React54, { useCallback as useCallback28 } from "react";
|
|
25454
25519
|
import { createStyles as createStyles31 } from "antd-style";
|
|
25455
25520
|
import { MessageSquare as MessageSquare2, Trash2 as Trash24 } from "lucide-react";
|
|
25456
|
-
import { message as message16, Modal as
|
|
25457
|
-
import { jsx as jsx101, jsxs as
|
|
25521
|
+
import { message as message16, Modal as Modal18 } from "antd";
|
|
25522
|
+
import { jsx as jsx101, jsxs as jsxs73 } from "react/jsx-runtime";
|
|
25458
25523
|
var useStyles19 = createStyles31(({ token, css }) => ({
|
|
25459
25524
|
container: css`
|
|
25460
25525
|
padding: 4px;
|
|
@@ -25567,7 +25632,7 @@ var ThreadHistoryMenuContent = () => {
|
|
|
25567
25632
|
const handleDeleteThread = useCallback28(
|
|
25568
25633
|
async (e, threadIdToDelete) => {
|
|
25569
25634
|
e.stopPropagation();
|
|
25570
|
-
|
|
25635
|
+
Modal18.confirm({
|
|
25571
25636
|
title: "Delete Conversation",
|
|
25572
25637
|
content: "Are you sure you want to delete this conversation? This action cannot be undone.",
|
|
25573
25638
|
okText: "Delete",
|
|
@@ -25595,7 +25660,7 @@ var ThreadHistoryMenuContent = () => {
|
|
|
25595
25660
|
if (isLoading) {
|
|
25596
25661
|
return /* @__PURE__ */ jsx101("div", { className: styles.container, children: /* @__PURE__ */ jsx101("div", { className: styles.loading, children: "Loading conversations..." }) });
|
|
25597
25662
|
}
|
|
25598
|
-
return /* @__PURE__ */ jsx101("div", { className: styles.container, children: sortedThreads.length === 0 ? /* @__PURE__ */ jsx101("div", { className: styles.emptyState, children: "No conversations yet" }) : /* @__PURE__ */ jsx101("div", { className: styles.threadList, children: sortedThreads.map((thread) => /* @__PURE__ */
|
|
25663
|
+
return /* @__PURE__ */ jsx101("div", { className: styles.container, children: sortedThreads.length === 0 ? /* @__PURE__ */ jsx101("div", { className: styles.emptyState, children: "No conversations yet" }) : /* @__PURE__ */ jsx101("div", { className: styles.threadList, children: sortedThreads.map((thread) => /* @__PURE__ */ jsxs73(
|
|
25599
25664
|
"div",
|
|
25600
25665
|
{
|
|
25601
25666
|
className: `${styles.threadItem} ${thread.id === threadId ? "active" : ""}`,
|
|
@@ -25626,7 +25691,7 @@ var ThreadHistoryMenuContent = () => {
|
|
|
25626
25691
|
};
|
|
25627
25692
|
|
|
25628
25693
|
// src/components/Chat/ChatSidebar.tsx
|
|
25629
|
-
import { Fragment as Fragment24, jsx as jsx102, jsxs as
|
|
25694
|
+
import { Fragment as Fragment24, jsx as jsx102, jsxs as jsxs74 } from "react/jsx-runtime";
|
|
25630
25695
|
var DRAWER_STYLES2 = {
|
|
25631
25696
|
wrapper: {
|
|
25632
25697
|
background: "transparent",
|
|
@@ -25689,7 +25754,7 @@ var DEFAULT_MENU_ITEMS = [
|
|
|
25689
25754
|
builtin: "logout",
|
|
25690
25755
|
type: "action",
|
|
25691
25756
|
name: "Logout",
|
|
25692
|
-
icon: /* @__PURE__ */ jsx102(
|
|
25757
|
+
icon: /* @__PURE__ */ jsx102(LogOut4, { size: 20 }),
|
|
25693
25758
|
order: 1e3,
|
|
25694
25759
|
group: "Account"
|
|
25695
25760
|
}
|
|
@@ -25703,7 +25768,7 @@ var ChatSidebar = ({
|
|
|
25703
25768
|
const { sideAppVisible, menuCollapsed, setMenuCollapsed } = useChatUIContext();
|
|
25704
25769
|
const { logout } = useAuth();
|
|
25705
25770
|
const { createThread } = useConversationContext();
|
|
25706
|
-
const [drawerStates, setDrawerStates] =
|
|
25771
|
+
const [drawerStates, setDrawerStates] = useState62({});
|
|
25707
25772
|
const {
|
|
25708
25773
|
sidebarMode,
|
|
25709
25774
|
sidebarShowToggle,
|
|
@@ -25764,7 +25829,7 @@ var ChatSidebar = ({
|
|
|
25764
25829
|
return item.content;
|
|
25765
25830
|
}
|
|
25766
25831
|
}, []);
|
|
25767
|
-
return /* @__PURE__ */
|
|
25832
|
+
return /* @__PURE__ */ jsxs74(Fragment24, { children: [
|
|
25768
25833
|
/* @__PURE__ */ jsx102(
|
|
25769
25834
|
Menu,
|
|
25770
25835
|
{
|
|
@@ -25784,7 +25849,7 @@ var ChatSidebar = ({
|
|
|
25784
25849
|
menuItems.filter((item) => item.type === "drawer" && !item.inline).map((item) => /* @__PURE__ */ jsx102(
|
|
25785
25850
|
Drawer2,
|
|
25786
25851
|
{
|
|
25787
|
-
title: /* @__PURE__ */
|
|
25852
|
+
title: /* @__PURE__ */ jsxs74("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%" }, children: [
|
|
25788
25853
|
/* @__PURE__ */ jsx102("span", { style: { fontSize: 16, fontWeight: 600, textTransform: "uppercase", letterSpacing: 0.5 }, children: item.title || item.name }),
|
|
25789
25854
|
/* @__PURE__ */ jsx102(
|
|
25790
25855
|
"button",
|
|
@@ -25865,9 +25930,9 @@ var LatticeChatView = (props) => {
|
|
|
25865
25930
|
};
|
|
25866
25931
|
|
|
25867
25932
|
// src/components/Chat/SettingsModal.tsx
|
|
25868
|
-
import { useState as
|
|
25933
|
+
import { useState as useState63, useEffect as useEffect39, useRef as useRef24 } from "react";
|
|
25869
25934
|
import {
|
|
25870
|
-
Modal as
|
|
25935
|
+
Modal as Modal19,
|
|
25871
25936
|
Input as Input14,
|
|
25872
25937
|
Button as Button46,
|
|
25873
25938
|
message as message17,
|
|
@@ -25892,7 +25957,7 @@ import {
|
|
|
25892
25957
|
CloudServerOutlined
|
|
25893
25958
|
} from "@ant-design/icons";
|
|
25894
25959
|
import { createStyles as createStyles32 } from "antd-style";
|
|
25895
|
-
import { Fragment as Fragment25, jsx as jsx104, jsxs as
|
|
25960
|
+
import { Fragment as Fragment25, jsx as jsx104, jsxs as jsxs75 } from "react/jsx-runtime";
|
|
25896
25961
|
var { Text: Text37, Title: Title13 } = Typography46;
|
|
25897
25962
|
var { TextArea: TextArea8 } = Input14;
|
|
25898
25963
|
var useStyles20 = createStyles32(({ token, css }) => ({
|
|
@@ -26254,7 +26319,7 @@ var SettingsModal = ({
|
|
|
26254
26319
|
}) => {
|
|
26255
26320
|
const { styles } = useStyles20();
|
|
26256
26321
|
const { config: shellConfig, updateConfigValue } = useLatticeChatShellContext();
|
|
26257
|
-
const [connections, setConnections] =
|
|
26322
|
+
const [connections, setConnections] = useState63(() => {
|
|
26258
26323
|
if (typeof window !== "undefined") {
|
|
26259
26324
|
try {
|
|
26260
26325
|
const stored = localStorage.getItem("lattice_server_connections");
|
|
@@ -26277,21 +26342,21 @@ var SettingsModal = ({
|
|
|
26277
26342
|
}
|
|
26278
26343
|
return [];
|
|
26279
26344
|
});
|
|
26280
|
-
const [serverConfigs, setServerConfigs] =
|
|
26345
|
+
const [serverConfigs, setServerConfigs] = useState63({});
|
|
26281
26346
|
const connectionsRef = useRef24(connections);
|
|
26282
26347
|
useEffect39(() => {
|
|
26283
26348
|
connectionsRef.current = connections;
|
|
26284
26349
|
}, [connections]);
|
|
26285
|
-
const [activeTabKey, setActiveTabKey] =
|
|
26350
|
+
const [activeTabKey, setActiveTabKey] = useState63(
|
|
26286
26351
|
connections.length > 0 ? connections[0].id : ""
|
|
26287
26352
|
);
|
|
26288
|
-
const [activeMenu, setActiveMenu] =
|
|
26289
|
-
const [loading, setLoading] =
|
|
26290
|
-
const [showAddServerModal, setShowAddServerModal] =
|
|
26291
|
-
const [newServerUrl, setNewServerUrl] =
|
|
26292
|
-
const [newServerName, setNewServerName] =
|
|
26293
|
-
const [newServerApiKey, setNewServerApiKey] =
|
|
26294
|
-
const [addingServer, setAddingServer] =
|
|
26353
|
+
const [activeMenu, setActiveMenu] = useState63("environment");
|
|
26354
|
+
const [loading, setLoading] = useState63(false);
|
|
26355
|
+
const [showAddServerModal, setShowAddServerModal] = useState63(false);
|
|
26356
|
+
const [newServerUrl, setNewServerUrl] = useState63("");
|
|
26357
|
+
const [newServerName, setNewServerName] = useState63("");
|
|
26358
|
+
const [newServerApiKey, setNewServerApiKey] = useState63("");
|
|
26359
|
+
const [addingServer, setAddingServer] = useState63(false);
|
|
26295
26360
|
const saveConnections = (newConnections) => {
|
|
26296
26361
|
setConnections(newConnections);
|
|
26297
26362
|
if (typeof window !== "undefined") {
|
|
@@ -26701,13 +26766,13 @@ var SettingsModal = ({
|
|
|
26701
26766
|
}
|
|
26702
26767
|
}));
|
|
26703
26768
|
};
|
|
26704
|
-
return /* @__PURE__ */
|
|
26769
|
+
return /* @__PURE__ */ jsxs75("div", { className: styles.formContainer, children: [
|
|
26705
26770
|
/* @__PURE__ */ jsx104(
|
|
26706
26771
|
Alert8,
|
|
26707
26772
|
{
|
|
26708
26773
|
message: "Configuration Effect",
|
|
26709
|
-
description: /* @__PURE__ */
|
|
26710
|
-
/* @__PURE__ */
|
|
26774
|
+
description: /* @__PURE__ */ jsxs75("div", { children: [
|
|
26775
|
+
/* @__PURE__ */ jsxs75("div", { style: { marginBottom: 8 }, children: [
|
|
26711
26776
|
/* @__PURE__ */ jsx104(
|
|
26712
26777
|
CheckCircleOutlined8,
|
|
26713
26778
|
{
|
|
@@ -26717,7 +26782,7 @@ var SettingsModal = ({
|
|
|
26717
26782
|
/* @__PURE__ */ jsx104("strong", { children: "Immediately effective:" }),
|
|
26718
26783
|
" QUEUE_SERVICE_TYPE, REDIS_URL, REDIS_PASSWORD, QUEUE_NAME"
|
|
26719
26784
|
] }),
|
|
26720
|
-
/* @__PURE__ */
|
|
26785
|
+
/* @__PURE__ */ jsxs75("div", { children: [
|
|
26721
26786
|
/* @__PURE__ */ jsx104(ReloadOutlined4, { style: { color: "#faad14", marginRight: 8 } }),
|
|
26722
26787
|
/* @__PURE__ */ jsx104("strong", { children: "Requires restart:" }),
|
|
26723
26788
|
" PORT (server must be restarted to change port)"
|
|
@@ -26806,10 +26871,10 @@ QUEUE_NAME=tasks`,
|
|
|
26806
26871
|
}));
|
|
26807
26872
|
}
|
|
26808
26873
|
};
|
|
26809
|
-
return /* @__PURE__ */
|
|
26874
|
+
return /* @__PURE__ */ jsxs75("div", { className: styles.formContainer, children: [
|
|
26810
26875
|
/* @__PURE__ */ jsx104("div", { style: { marginBottom: 32 }, children: /* @__PURE__ */ jsx104(Text37, { type: "secondary", style: { fontSize: 14, lineHeight: 1.6 }, children: "Configure model lattices. Each model will be registered with the provided key and can be used by agents." }) }),
|
|
26811
|
-
config.models.map((model, index) => /* @__PURE__ */
|
|
26812
|
-
/* @__PURE__ */
|
|
26876
|
+
config.models.map((model, index) => /* @__PURE__ */ jsxs75("div", { className: styles.card, children: [
|
|
26877
|
+
/* @__PURE__ */ jsxs75(
|
|
26813
26878
|
"div",
|
|
26814
26879
|
{
|
|
26815
26880
|
style: {
|
|
@@ -26821,12 +26886,12 @@ QUEUE_NAME=tasks`,
|
|
|
26821
26886
|
borderBottom: "1px solid rgba(0, 0, 0, 0.06)"
|
|
26822
26887
|
},
|
|
26823
26888
|
children: [
|
|
26824
|
-
/* @__PURE__ */
|
|
26825
|
-
/* @__PURE__ */
|
|
26889
|
+
/* @__PURE__ */ jsxs75("div", { children: [
|
|
26890
|
+
/* @__PURE__ */ jsxs75(Text37, { strong: true, style: { fontSize: 16 }, children: [
|
|
26826
26891
|
"Model ",
|
|
26827
26892
|
index + 1
|
|
26828
26893
|
] }),
|
|
26829
|
-
model.key && /* @__PURE__ */
|
|
26894
|
+
model.key && /* @__PURE__ */ jsxs75(
|
|
26830
26895
|
Text37,
|
|
26831
26896
|
{
|
|
26832
26897
|
type: "secondary",
|
|
@@ -26856,8 +26921,8 @@ QUEUE_NAME=tasks`,
|
|
|
26856
26921
|
]
|
|
26857
26922
|
}
|
|
26858
26923
|
),
|
|
26859
|
-
/* @__PURE__ */
|
|
26860
|
-
/* @__PURE__ */
|
|
26924
|
+
/* @__PURE__ */ jsxs75(Space35, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
|
|
26925
|
+
/* @__PURE__ */ jsxs75("div", { children: [
|
|
26861
26926
|
/* @__PURE__ */ jsx104(Text37, { className: styles.formLabel, children: "Key *" }),
|
|
26862
26927
|
/* @__PURE__ */ jsx104(
|
|
26863
26928
|
Input14,
|
|
@@ -26870,7 +26935,7 @@ QUEUE_NAME=tasks`,
|
|
|
26870
26935
|
),
|
|
26871
26936
|
/* @__PURE__ */ jsx104(Text37, { className: styles.formDescription, children: "Unique identifier for this model" })
|
|
26872
26937
|
] }),
|
|
26873
|
-
/* @__PURE__ */
|
|
26938
|
+
/* @__PURE__ */ jsxs75("div", { children: [
|
|
26874
26939
|
/* @__PURE__ */ jsx104(Text37, { className: styles.formLabel, children: "Provider *" }),
|
|
26875
26940
|
/* @__PURE__ */ jsx104(
|
|
26876
26941
|
Select6,
|
|
@@ -26888,7 +26953,7 @@ QUEUE_NAME=tasks`,
|
|
|
26888
26953
|
}
|
|
26889
26954
|
)
|
|
26890
26955
|
] }),
|
|
26891
|
-
/* @__PURE__ */
|
|
26956
|
+
/* @__PURE__ */ jsxs75("div", { children: [
|
|
26892
26957
|
/* @__PURE__ */ jsx104(Text37, { className: styles.formLabel, children: "Model Name *" }),
|
|
26893
26958
|
/* @__PURE__ */ jsx104(
|
|
26894
26959
|
Input14,
|
|
@@ -26900,7 +26965,7 @@ QUEUE_NAME=tasks`,
|
|
|
26900
26965
|
}
|
|
26901
26966
|
)
|
|
26902
26967
|
] }),
|
|
26903
|
-
/* @__PURE__ */
|
|
26968
|
+
/* @__PURE__ */ jsxs75("div", { children: [
|
|
26904
26969
|
/* @__PURE__ */ jsx104(Text37, { className: styles.formLabel, children: "API Key" }),
|
|
26905
26970
|
/* @__PURE__ */ jsx104(
|
|
26906
26971
|
Input14.Password,
|
|
@@ -26913,7 +26978,7 @@ QUEUE_NAME=tasks`,
|
|
|
26913
26978
|
),
|
|
26914
26979
|
/* @__PURE__ */ jsx104(Text37, { className: styles.formDescription, children: "API key for the model provider. Leave empty to use environment variable." })
|
|
26915
26980
|
] }),
|
|
26916
|
-
/* @__PURE__ */
|
|
26981
|
+
/* @__PURE__ */ jsxs75("div", { children: [
|
|
26917
26982
|
/* @__PURE__ */ jsx104(Text37, { className: styles.formLabel, children: "Base URL" }),
|
|
26918
26983
|
/* @__PURE__ */ jsx104(
|
|
26919
26984
|
Input14,
|
|
@@ -26926,7 +26991,7 @@ QUEUE_NAME=tasks`,
|
|
|
26926
26991
|
),
|
|
26927
26992
|
/* @__PURE__ */ jsx104(Text37, { className: styles.formDescription, children: "Optional custom base URL for the API" })
|
|
26928
26993
|
] }),
|
|
26929
|
-
/* @__PURE__ */ jsx104("div", { children: /* @__PURE__ */
|
|
26994
|
+
/* @__PURE__ */ jsx104("div", { children: /* @__PURE__ */ jsxs75(Space35, { children: [
|
|
26930
26995
|
/* @__PURE__ */ jsx104(
|
|
26931
26996
|
Switch3,
|
|
26932
26997
|
{
|
|
@@ -26936,8 +27001,8 @@ QUEUE_NAME=tasks`,
|
|
|
26936
27001
|
),
|
|
26937
27002
|
/* @__PURE__ */ jsx104(Text37, { children: "Enable Streaming" })
|
|
26938
27003
|
] }) }),
|
|
26939
|
-
/* @__PURE__ */
|
|
26940
|
-
/* @__PURE__ */
|
|
27004
|
+
/* @__PURE__ */ jsxs75("div", { style: { display: "flex", gap: 20 }, children: [
|
|
27005
|
+
/* @__PURE__ */ jsxs75("div", { style: { flex: 1 }, children: [
|
|
26941
27006
|
/* @__PURE__ */ jsx104(Text37, { className: styles.formLabel, children: "Max Tokens" }),
|
|
26942
27007
|
/* @__PURE__ */ jsx104(
|
|
26943
27008
|
Input14,
|
|
@@ -26954,7 +27019,7 @@ QUEUE_NAME=tasks`,
|
|
|
26954
27019
|
}
|
|
26955
27020
|
)
|
|
26956
27021
|
] }),
|
|
26957
|
-
/* @__PURE__ */
|
|
27022
|
+
/* @__PURE__ */ jsxs75("div", { style: { flex: 1 }, children: [
|
|
26958
27023
|
/* @__PURE__ */ jsx104(Text37, { className: styles.formLabel, children: "Temperature" }),
|
|
26959
27024
|
/* @__PURE__ */ jsx104(
|
|
26960
27025
|
Input14,
|
|
@@ -27003,7 +27068,7 @@ QUEUE_NAME=tasks`,
|
|
|
27003
27068
|
);
|
|
27004
27069
|
const currentConnection = connections.find((c) => c.id === activeTabKey);
|
|
27005
27070
|
const renderTabLabel = (connection) => {
|
|
27006
|
-
return /* @__PURE__ */
|
|
27071
|
+
return /* @__PURE__ */ jsxs75("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
27007
27072
|
/* @__PURE__ */ jsx104(
|
|
27008
27073
|
CloudServerOutlined,
|
|
27009
27074
|
{
|
|
@@ -27031,8 +27096,8 @@ QUEUE_NAME=tasks`,
|
|
|
27031
27096
|
const tabItems = connections.map((connection) => ({
|
|
27032
27097
|
key: connection.id,
|
|
27033
27098
|
label: renderTabLabel(connection),
|
|
27034
|
-
children: /* @__PURE__ */ jsx104("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ jsx104(Fragment25, { children: /* @__PURE__ */
|
|
27035
|
-
/* @__PURE__ */ jsx104("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */
|
|
27099
|
+
children: /* @__PURE__ */ jsx104("div", { className: styles.tabContent, children: connection.connected ? /* @__PURE__ */ jsx104(Fragment25, { children: /* @__PURE__ */ jsxs75("div", { style: { display: "flex", height: "100%" }, children: [
|
|
27100
|
+
/* @__PURE__ */ jsx104("div", { className: styles.sidebar, children: SETTINGS_MENU_ITEMS.map((item) => /* @__PURE__ */ jsxs75(
|
|
27036
27101
|
"div",
|
|
27037
27102
|
{
|
|
27038
27103
|
className: `${styles.menuItem} ${activeMenu === item.key ? "active" : ""}`,
|
|
@@ -27044,16 +27109,16 @@ QUEUE_NAME=tasks`,
|
|
|
27044
27109
|
},
|
|
27045
27110
|
item.key
|
|
27046
27111
|
)) }),
|
|
27047
|
-
/* @__PURE__ */
|
|
27048
|
-
/* @__PURE__ */
|
|
27049
|
-
/* @__PURE__ */
|
|
27112
|
+
/* @__PURE__ */ jsxs75("div", { className: styles.content, children: [
|
|
27113
|
+
/* @__PURE__ */ jsxs75("div", { className: styles.contentHeader, children: [
|
|
27114
|
+
/* @__PURE__ */ jsxs75("div", { className: styles.contentHeaderLeft, children: [
|
|
27050
27115
|
/* @__PURE__ */ jsx104(Title13, { level: 3, className: styles.contentTitle, children: activeMenuItem?.label }),
|
|
27051
|
-
/* @__PURE__ */
|
|
27116
|
+
/* @__PURE__ */ jsxs75(Text37, { className: styles.contentDescription, children: [
|
|
27052
27117
|
activeMenu === "environment" && "Manage environment variables for the gateway server",
|
|
27053
27118
|
activeMenu === "models" && "Configure and register model lattices for use by agents"
|
|
27054
27119
|
] })
|
|
27055
27120
|
] }),
|
|
27056
|
-
/* @__PURE__ */
|
|
27121
|
+
/* @__PURE__ */ jsxs75("div", { className: styles.contentHeaderRight, children: [
|
|
27057
27122
|
/* @__PURE__ */ jsx104(Button46, { onClick: onClose, children: "Cancel" }),
|
|
27058
27123
|
/* @__PURE__ */ jsx104(
|
|
27059
27124
|
Button46,
|
|
@@ -27081,14 +27146,14 @@ QUEUE_NAME=tasks`,
|
|
|
27081
27146
|
gap: 16,
|
|
27082
27147
|
padding: 48
|
|
27083
27148
|
},
|
|
27084
|
-
children: connection.connecting ? /* @__PURE__ */
|
|
27149
|
+
children: connection.connecting ? /* @__PURE__ */ jsxs75(Fragment25, { children: [
|
|
27085
27150
|
/* @__PURE__ */ jsx104(LinkOutlined2, { style: { fontSize: 64, color: "#1890ff" }, spin: true }),
|
|
27086
27151
|
/* @__PURE__ */ jsx104(Title13, { level: 4, children: "Connecting..." }),
|
|
27087
|
-
/* @__PURE__ */
|
|
27152
|
+
/* @__PURE__ */ jsxs75(Text37, { type: "secondary", style: { textAlign: "center" }, children: [
|
|
27088
27153
|
"Connecting to ",
|
|
27089
27154
|
connection.url
|
|
27090
27155
|
] })
|
|
27091
|
-
] }) : /* @__PURE__ */
|
|
27156
|
+
] }) : /* @__PURE__ */ jsxs75(Fragment25, { children: [
|
|
27092
27157
|
/* @__PURE__ */ jsx104(LinkOutlined2, { style: { fontSize: 64, color: "#d9d9d9" } }),
|
|
27093
27158
|
/* @__PURE__ */ jsx104(Title13, { level: 4, type: "secondary", children: connection.error || "Not Connected" }),
|
|
27094
27159
|
/* @__PURE__ */ jsx104(
|
|
@@ -27115,9 +27180,9 @@ QUEUE_NAME=tasks`,
|
|
|
27115
27180
|
) }),
|
|
27116
27181
|
closable: connections.length > 1
|
|
27117
27182
|
}));
|
|
27118
|
-
return /* @__PURE__ */
|
|
27183
|
+
return /* @__PURE__ */ jsxs75(Fragment25, { children: [
|
|
27119
27184
|
/* @__PURE__ */ jsx104(
|
|
27120
|
-
|
|
27185
|
+
Modal19,
|
|
27121
27186
|
{
|
|
27122
27187
|
open,
|
|
27123
27188
|
onCancel: onClose,
|
|
@@ -27139,7 +27204,7 @@ QUEUE_NAME=tasks`,
|
|
|
27139
27204
|
}
|
|
27140
27205
|
},
|
|
27141
27206
|
items: tabItems,
|
|
27142
|
-
addIcon: /* @__PURE__ */
|
|
27207
|
+
addIcon: /* @__PURE__ */ jsxs75(
|
|
27143
27208
|
"div",
|
|
27144
27209
|
{
|
|
27145
27210
|
style: {
|
|
@@ -27159,7 +27224,7 @@ QUEUE_NAME=tasks`,
|
|
|
27159
27224
|
}
|
|
27160
27225
|
),
|
|
27161
27226
|
/* @__PURE__ */ jsx104(
|
|
27162
|
-
|
|
27227
|
+
Modal19,
|
|
27163
27228
|
{
|
|
27164
27229
|
title: "Add New Server",
|
|
27165
27230
|
open: showAddServerModal,
|
|
@@ -27172,8 +27237,8 @@ QUEUE_NAME=tasks`,
|
|
|
27172
27237
|
},
|
|
27173
27238
|
confirmLoading: addingServer,
|
|
27174
27239
|
className: styles.addServerModal,
|
|
27175
|
-
children: /* @__PURE__ */
|
|
27176
|
-
/* @__PURE__ */
|
|
27240
|
+
children: /* @__PURE__ */ jsxs75(Space35, { direction: "vertical", style: { width: "100%" }, size: "large", children: [
|
|
27241
|
+
/* @__PURE__ */ jsxs75("div", { children: [
|
|
27177
27242
|
/* @__PURE__ */ jsx104(Text37, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server Name" }),
|
|
27178
27243
|
/* @__PURE__ */ jsx104(
|
|
27179
27244
|
Input14,
|
|
@@ -27186,7 +27251,7 @@ QUEUE_NAME=tasks`,
|
|
|
27186
27251
|
),
|
|
27187
27252
|
/* @__PURE__ */ jsx104(Text37, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Optional: Leave empty to use URL as name" })
|
|
27188
27253
|
] }),
|
|
27189
|
-
/* @__PURE__ */
|
|
27254
|
+
/* @__PURE__ */ jsxs75("div", { children: [
|
|
27190
27255
|
/* @__PURE__ */ jsx104(Text37, { strong: true, style: { display: "block", marginBottom: 8 }, children: "Server URL *" }),
|
|
27191
27256
|
/* @__PURE__ */ jsx104(
|
|
27192
27257
|
Input14,
|
|
@@ -27199,7 +27264,7 @@ QUEUE_NAME=tasks`,
|
|
|
27199
27264
|
),
|
|
27200
27265
|
/* @__PURE__ */ jsx104(Text37, { type: "secondary", style: { fontSize: 12, marginTop: 4 }, children: "Enter the full URL of the gateway server" })
|
|
27201
27266
|
] }),
|
|
27202
|
-
/* @__PURE__ */
|
|
27267
|
+
/* @__PURE__ */ jsxs75("div", { children: [
|
|
27203
27268
|
/* @__PURE__ */ jsx104(Text37, { strong: true, style: { display: "block", marginBottom: 8 }, children: "API Key" }),
|
|
27204
27269
|
/* @__PURE__ */ jsx104(
|
|
27205
27270
|
Input14.Password,
|
|
@@ -27232,17 +27297,16 @@ var AgentServerSetting = () => {
|
|
|
27232
27297
|
};
|
|
27233
27298
|
|
|
27234
27299
|
// src/components/Chat/LatticeChatShell.tsx
|
|
27235
|
-
import { Fragment as Fragment26, jsx as jsx106, jsxs as
|
|
27300
|
+
import { Fragment as Fragment26, jsx as jsx106, jsxs as jsxs76 } from "react/jsx-runtime";
|
|
27236
27301
|
var ShellContent = ({
|
|
27237
27302
|
initialAssistantId,
|
|
27238
27303
|
enableWorkspace
|
|
27239
27304
|
}) => {
|
|
27240
27305
|
const { currentTenant } = useAuth();
|
|
27241
|
-
|
|
27242
|
-
return /* @__PURE__ */ jsx106(Fragment26, { children: enableWorkspace ? /* @__PURE__ */ jsxs75(WorkspaceContextProvider, { tenantId, children: [
|
|
27306
|
+
return /* @__PURE__ */ jsx106(Fragment26, { children: enableWorkspace ? /* @__PURE__ */ jsxs76(WorkspaceContextProvider, { children: [
|
|
27243
27307
|
/* @__PURE__ */ jsx106(AssistantContextProvider, { autoLoad: true, initialAssistantId, children: /* @__PURE__ */ jsx106(ConversationContextProvider, { children: /* @__PURE__ */ jsx106(LatticeChatView, {}) }) }),
|
|
27244
27308
|
/* @__PURE__ */ jsx106(AgentServerSetting, {})
|
|
27245
|
-
] }) : /* @__PURE__ */
|
|
27309
|
+
] }) : /* @__PURE__ */ jsxs76(Fragment26, { children: [
|
|
27246
27310
|
/* @__PURE__ */ jsx106(AssistantContextProvider, { autoLoad: true, initialAssistantId, children: /* @__PURE__ */ jsx106(ConversationContextProvider, { children: /* @__PURE__ */ jsx106(LatticeChatView, {}) }) }),
|
|
27247
27311
|
/* @__PURE__ */ jsx106(AgentServerSetting, {})
|
|
27248
27312
|
] }) });
|