@axiom-lattice/react-sdk 2.1.74 → 2.1.75
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 +80 -5
- package/dist/index.d.ts +80 -5
- package/dist/index.js +127 -133
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +124 -133
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -20887,6 +20887,110 @@ var EvalPanel = () => {
|
|
|
20887
20887
|
|
|
20888
20888
|
// src/components/Chat/WorkspaceResourceManager.tsx
|
|
20889
20889
|
import { jsx as jsx82, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
20890
|
+
var DEFAULT_WORKSPACE_MENU_ITEMS = [
|
|
20891
|
+
{
|
|
20892
|
+
id: "workspace_projects",
|
|
20893
|
+
type: "route",
|
|
20894
|
+
name: "Projects",
|
|
20895
|
+
icon: /* @__PURE__ */ jsx82(FolderOpen2, { size: 20 }),
|
|
20896
|
+
order: 0
|
|
20897
|
+
},
|
|
20898
|
+
{
|
|
20899
|
+
id: "metrics",
|
|
20900
|
+
builtin: "metrics",
|
|
20901
|
+
type: "route",
|
|
20902
|
+
name: "Metrics",
|
|
20903
|
+
icon: /* @__PURE__ */ jsx82(Activity3, { size: 20 }),
|
|
20904
|
+
order: 10,
|
|
20905
|
+
group: "DataSource"
|
|
20906
|
+
},
|
|
20907
|
+
{
|
|
20908
|
+
id: "database",
|
|
20909
|
+
builtin: "database",
|
|
20910
|
+
type: "route",
|
|
20911
|
+
name: "Database",
|
|
20912
|
+
icon: /* @__PURE__ */ jsx82(Database4, { size: 20 }),
|
|
20913
|
+
order: 20,
|
|
20914
|
+
group: "DataSource"
|
|
20915
|
+
},
|
|
20916
|
+
{
|
|
20917
|
+
id: "topology-automations",
|
|
20918
|
+
type: "route",
|
|
20919
|
+
name: "Automations",
|
|
20920
|
+
icon: /* @__PURE__ */ jsx82(Share2, { size: 20 }),
|
|
20921
|
+
order: 25,
|
|
20922
|
+
group: "Process"
|
|
20923
|
+
},
|
|
20924
|
+
{
|
|
20925
|
+
id: "topology-runtimes",
|
|
20926
|
+
type: "route",
|
|
20927
|
+
name: "Runtime",
|
|
20928
|
+
icon: /* @__PURE__ */ jsx82(History, { size: 20 }),
|
|
20929
|
+
order: 26,
|
|
20930
|
+
group: "Process"
|
|
20931
|
+
},
|
|
20932
|
+
{
|
|
20933
|
+
id: "topology-inbox",
|
|
20934
|
+
type: "route",
|
|
20935
|
+
name: "Inbox",
|
|
20936
|
+
icon: /* @__PURE__ */ jsx82(Inbox, { size: 20 }),
|
|
20937
|
+
order: 27,
|
|
20938
|
+
group: "Process"
|
|
20939
|
+
},
|
|
20940
|
+
{
|
|
20941
|
+
id: "eval",
|
|
20942
|
+
type: "route",
|
|
20943
|
+
name: "Eval",
|
|
20944
|
+
icon: /* @__PURE__ */ jsx82(FlaskConical3, { size: 20 }),
|
|
20945
|
+
order: 28,
|
|
20946
|
+
group: "Process"
|
|
20947
|
+
},
|
|
20948
|
+
{
|
|
20949
|
+
id: "assistants",
|
|
20950
|
+
builtin: "assistants",
|
|
20951
|
+
type: "route",
|
|
20952
|
+
name: "Assistants",
|
|
20953
|
+
icon: /* @__PURE__ */ jsx82(Bot2, { size: 20 }),
|
|
20954
|
+
order: 30,
|
|
20955
|
+
group: "Settings"
|
|
20956
|
+
},
|
|
20957
|
+
{
|
|
20958
|
+
id: "skills",
|
|
20959
|
+
builtin: "skills",
|
|
20960
|
+
type: "route",
|
|
20961
|
+
name: "Skills",
|
|
20962
|
+
icon: /* @__PURE__ */ jsx82(Zap, { size: 20 }),
|
|
20963
|
+
order: 35,
|
|
20964
|
+
group: "Settings"
|
|
20965
|
+
},
|
|
20966
|
+
{
|
|
20967
|
+
id: "mcp",
|
|
20968
|
+
builtin: "mcp",
|
|
20969
|
+
type: "route",
|
|
20970
|
+
name: "MCP",
|
|
20971
|
+
icon: /* @__PURE__ */ jsx82(Plug2, { size: 20 }),
|
|
20972
|
+
order: 40,
|
|
20973
|
+
group: "Settings"
|
|
20974
|
+
},
|
|
20975
|
+
{
|
|
20976
|
+
id: "tools",
|
|
20977
|
+
builtin: "tools",
|
|
20978
|
+
type: "route",
|
|
20979
|
+
name: "Tools",
|
|
20980
|
+
icon: /* @__PURE__ */ jsx82(Wrench, { size: 20 }),
|
|
20981
|
+
order: 50,
|
|
20982
|
+
group: "Settings"
|
|
20983
|
+
},
|
|
20984
|
+
{
|
|
20985
|
+
id: "switch_tenant",
|
|
20986
|
+
builtin: "switch-tenant",
|
|
20987
|
+
type: "action",
|
|
20988
|
+
name: "Switch tenant",
|
|
20989
|
+
icon: /* @__PURE__ */ jsx82(Building23, { size: 20 }),
|
|
20990
|
+
order: 900,
|
|
20991
|
+
group: "Account"
|
|
20992
|
+
}
|
|
20993
|
+
];
|
|
20890
20994
|
var createWrapper = (Component) => {
|
|
20891
20995
|
return () => /* @__PURE__ */ jsx82(Component, { ...{} });
|
|
20892
20996
|
};
|
|
@@ -20956,120 +21060,13 @@ var WorkspaceResourceManager = ({
|
|
|
20956
21060
|
}, []);
|
|
20957
21061
|
const { user, logout, tenants, currentTenant, selectTenant, isLoading } = useAuth();
|
|
20958
21062
|
const { setWorkspace, setProject } = useWorkspaceContext();
|
|
21063
|
+
const { config } = useLatticeChatShellContext();
|
|
20959
21064
|
const [tenantModalOpen, setTenantModalOpen] = useState57(false);
|
|
20960
21065
|
const [changePasswordOpen, setChangePasswordOpen] = useState57(false);
|
|
20961
21066
|
const menuItems = useMemo19(() => {
|
|
20962
|
-
|
|
20963
|
-
|
|
20964
|
-
|
|
20965
|
-
{
|
|
20966
|
-
id: "workspace_projects",
|
|
20967
|
-
type: "route",
|
|
20968
|
-
name: "Projects",
|
|
20969
|
-
icon: /* @__PURE__ */ jsx82(FolderOpen2, { size: 20 }),
|
|
20970
|
-
order: 0
|
|
20971
|
-
},
|
|
20972
|
-
// DataSource Group
|
|
20973
|
-
{
|
|
20974
|
-
id: "metrics",
|
|
20975
|
-
builtin: "metrics",
|
|
20976
|
-
type: "route",
|
|
20977
|
-
name: "Metrics",
|
|
20978
|
-
icon: /* @__PURE__ */ jsx82(Activity3, { size: 20 }),
|
|
20979
|
-
order: 10,
|
|
20980
|
-
group: "DataSource"
|
|
20981
|
-
},
|
|
20982
|
-
{
|
|
20983
|
-
id: "database",
|
|
20984
|
-
builtin: "database",
|
|
20985
|
-
type: "route",
|
|
20986
|
-
name: "Database",
|
|
20987
|
-
icon: /* @__PURE__ */ jsx82(Database4, { size: 20 }),
|
|
20988
|
-
order: 20,
|
|
20989
|
-
group: "DataSource"
|
|
20990
|
-
},
|
|
20991
|
-
// Process Group
|
|
20992
|
-
{
|
|
20993
|
-
id: "topology-automations",
|
|
20994
|
-
type: "route",
|
|
20995
|
-
name: "Automations",
|
|
20996
|
-
icon: /* @__PURE__ */ jsx82(Share2, { size: 20 }),
|
|
20997
|
-
order: 25,
|
|
20998
|
-
group: "Process"
|
|
20999
|
-
},
|
|
21000
|
-
{
|
|
21001
|
-
id: "topology-runtimes",
|
|
21002
|
-
type: "route",
|
|
21003
|
-
name: "Runtime",
|
|
21004
|
-
icon: /* @__PURE__ */ jsx82(History, { size: 20 }),
|
|
21005
|
-
order: 26,
|
|
21006
|
-
group: "Process"
|
|
21007
|
-
},
|
|
21008
|
-
{
|
|
21009
|
-
id: "topology-inbox",
|
|
21010
|
-
type: "route",
|
|
21011
|
-
name: "Inbox",
|
|
21012
|
-
icon: /* @__PURE__ */ jsx82(Inbox, { size: 20 }),
|
|
21013
|
-
order: 27,
|
|
21014
|
-
group: "Process"
|
|
21015
|
-
},
|
|
21016
|
-
{
|
|
21017
|
-
id: "eval",
|
|
21018
|
-
type: "route",
|
|
21019
|
-
name: "Eval",
|
|
21020
|
-
icon: /* @__PURE__ */ jsx82(FlaskConical3, { size: 20 }),
|
|
21021
|
-
order: 28,
|
|
21022
|
-
group: "Process"
|
|
21023
|
-
},
|
|
21024
|
-
// Settings Group
|
|
21025
|
-
{
|
|
21026
|
-
id: "assistants",
|
|
21027
|
-
builtin: "assistants",
|
|
21028
|
-
type: "route",
|
|
21029
|
-
name: "Assistants",
|
|
21030
|
-
icon: /* @__PURE__ */ jsx82(Bot2, { size: 20 }),
|
|
21031
|
-
order: 30,
|
|
21032
|
-
group: "Settings"
|
|
21033
|
-
},
|
|
21034
|
-
{
|
|
21035
|
-
id: "skills",
|
|
21036
|
-
builtin: "skills",
|
|
21037
|
-
type: "route",
|
|
21038
|
-
name: "Skills",
|
|
21039
|
-
icon: /* @__PURE__ */ jsx82(Zap, { size: 20 }),
|
|
21040
|
-
order: 35,
|
|
21041
|
-
group: "Settings"
|
|
21042
|
-
},
|
|
21043
|
-
{
|
|
21044
|
-
id: "mcp",
|
|
21045
|
-
builtin: "mcp",
|
|
21046
|
-
type: "route",
|
|
21047
|
-
name: "MCP",
|
|
21048
|
-
icon: /* @__PURE__ */ jsx82(Plug2, { size: 20 }),
|
|
21049
|
-
order: 40,
|
|
21050
|
-
group: "Settings"
|
|
21051
|
-
},
|
|
21052
|
-
{
|
|
21053
|
-
id: "tools",
|
|
21054
|
-
builtin: "tools",
|
|
21055
|
-
type: "route",
|
|
21056
|
-
name: "Tools",
|
|
21057
|
-
icon: /* @__PURE__ */ jsx82(Wrench, { size: 20 }),
|
|
21058
|
-
order: 50,
|
|
21059
|
-
group: "Settings"
|
|
21060
|
-
},
|
|
21061
|
-
// Switch Tenant action
|
|
21062
|
-
{
|
|
21063
|
-
id: "switch_tenant",
|
|
21064
|
-
builtin: "switch-tenant",
|
|
21065
|
-
type: "action",
|
|
21066
|
-
name: "Switch tenant",
|
|
21067
|
-
icon: /* @__PURE__ */ jsx82(Building23, { size: 20 }),
|
|
21068
|
-
order: 900,
|
|
21069
|
-
group: "Account"
|
|
21070
|
-
}
|
|
21071
|
-
];
|
|
21072
|
-
}, [workspaceName]);
|
|
21067
|
+
const items = config.workspaceMenuItems?.length ? [...config.workspaceMenuItems] : [...DEFAULT_WORKSPACE_MENU_ITEMS];
|
|
21068
|
+
return items.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
21069
|
+
}, [config.workspaceMenuItems]);
|
|
21073
21070
|
const handleItemClick = (item) => {
|
|
21074
21071
|
if (item.type === "action" && item.builtin === "switch-tenant") {
|
|
21075
21072
|
setTenantModalOpen(true);
|
|
@@ -21089,26 +21086,23 @@ var WorkspaceResourceManager = ({
|
|
|
21089
21086
|
"topology-inbox": "workspace_topology_inbox",
|
|
21090
21087
|
eval: "workspace_eval"
|
|
21091
21088
|
};
|
|
21092
|
-
const componentKey = componentKeyMap[item.id];
|
|
21093
|
-
|
|
21094
|
-
|
|
21095
|
-
|
|
21096
|
-
|
|
21097
|
-
|
|
21098
|
-
});
|
|
21099
|
-
}
|
|
21089
|
+
const componentKey = componentKeyMap[item.id] ?? item.id;
|
|
21090
|
+
openContentApp({
|
|
21091
|
+
component_key: componentKey,
|
|
21092
|
+
data: {},
|
|
21093
|
+
message: item.name
|
|
21094
|
+
});
|
|
21100
21095
|
}
|
|
21101
21096
|
};
|
|
21102
21097
|
useEffect40(() => {
|
|
21103
|
-
if (!hasOpenedDefault.current) {
|
|
21098
|
+
if (!hasOpenedDefault.current && menuItems.length > 0) {
|
|
21104
21099
|
hasOpenedDefault.current = true;
|
|
21105
|
-
|
|
21106
|
-
|
|
21107
|
-
|
|
21108
|
-
|
|
21109
|
-
});
|
|
21100
|
+
const firstRoute = menuItems.find((item) => item.type === "route");
|
|
21101
|
+
if (firstRoute) {
|
|
21102
|
+
handleItemClick(firstRoute);
|
|
21103
|
+
}
|
|
21110
21104
|
}
|
|
21111
|
-
}, [
|
|
21105
|
+
}, []);
|
|
21112
21106
|
const userMenuItems = /* @__PURE__ */ jsxs56("div", { style: { minWidth: 160 }, children: [
|
|
21113
21107
|
/* @__PURE__ */ jsxs56("div", { style: { padding: "8px 12px", borderBottom: "1px solid #f0f0f0" }, children: [
|
|
21114
21108
|
/* @__PURE__ */ jsx82("div", { style: { fontWeight: 500 }, children: user?.name || user?.email }),
|
|
@@ -31161,7 +31155,6 @@ var DRAWER_STYLES2 = {
|
|
|
31161
31155
|
}
|
|
31162
31156
|
};
|
|
31163
31157
|
var DEFAULT_MENU_ITEMS = [
|
|
31164
|
-
// First: New Analysis (action)
|
|
31165
31158
|
{
|
|
31166
31159
|
id: "new-analysis",
|
|
31167
31160
|
builtin: "new-analysis",
|
|
@@ -31170,7 +31163,6 @@ var DEFAULT_MENU_ITEMS = [
|
|
|
31170
31163
|
icon: /* @__PURE__ */ jsx121(PlusCircle, { size: 20 }),
|
|
31171
31164
|
order: 0
|
|
31172
31165
|
},
|
|
31173
|
-
// Second: Thread History (inline drawer)
|
|
31174
31166
|
{
|
|
31175
31167
|
id: "thread-history",
|
|
31176
31168
|
builtin: "thread-history",
|
|
@@ -31184,7 +31176,6 @@ var DEFAULT_MENU_ITEMS = [
|
|
|
31184
31176
|
inlineDefaultExpanded: true,
|
|
31185
31177
|
content: /* @__PURE__ */ jsx121(ThreadHistoryMenuContent, {})
|
|
31186
31178
|
}
|
|
31187
|
-
// Project Files removed - now accessed via header toggle
|
|
31188
31179
|
];
|
|
31189
31180
|
var ChatSidebar = ({
|
|
31190
31181
|
onSettingsClick,
|
|
@@ -31206,10 +31197,7 @@ var ChatSidebar = ({
|
|
|
31206
31197
|
} = config;
|
|
31207
31198
|
const isExpandedMode = sidebarMode === "expanded";
|
|
31208
31199
|
const menuItems = useMemo32(() => {
|
|
31209
|
-
const items = [...DEFAULT_MENU_ITEMS];
|
|
31210
|
-
for (const item of customMenuItems) {
|
|
31211
|
-
items.push(item);
|
|
31212
|
-
}
|
|
31200
|
+
const items = customMenuItems.length > 0 ? [...customMenuItems] : [...DEFAULT_MENU_ITEMS];
|
|
31213
31201
|
return items.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
31214
31202
|
}, [customMenuItems]);
|
|
31215
31203
|
const handleMenuClick = useCallback42(async (item) => {
|
|
@@ -33214,6 +33202,7 @@ export {
|
|
|
33214
33202
|
AxiomLatticeProvider,
|
|
33215
33203
|
ChangePasswordModal,
|
|
33216
33204
|
ChannelInstallationsDrawerContent,
|
|
33205
|
+
ChatSidebar,
|
|
33217
33206
|
ChatUIContext,
|
|
33218
33207
|
ChatUIContextProvider,
|
|
33219
33208
|
Chating,
|
|
@@ -33221,7 +33210,9 @@ export {
|
|
|
33221
33210
|
ConversationContext,
|
|
33222
33211
|
ConversationContextProvider,
|
|
33223
33212
|
CreateAssistantModal_default as CreateAssistantModal,
|
|
33213
|
+
DEFAULT_MENU_ITEMS,
|
|
33224
33214
|
DEFAULT_MIDDLEWARE_TYPES,
|
|
33215
|
+
DEFAULT_WORKSPACE_MENU_ITEMS,
|
|
33225
33216
|
EvalPanel,
|
|
33226
33217
|
EvalRunResults,
|
|
33227
33218
|
EvalSuiteCardList,
|