@mastra/playground-ui 6.2.1-alpha.0 → 6.2.2-alpha.0
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/CHANGELOG.md +21 -0
- package/dist/index.cjs.js +70 -69
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +70 -69
- package/dist/index.es.js.map +1 -1
- package/dist/src/domains/agents/components/agent-metadata/agent-metadata.d.ts +7 -19
- package/dist/src/domains/agents/components/agent-table/agent-table.d.ts +1 -2
- package/dist/src/domains/agents/components/chat-threads.d.ts +3 -3
- package/dist/src/domains/networks/components/network-table/network-table.d.ts +1 -2
- package/dist/src/domains/observability/components/helpers.d.ts +1 -1
- package/dist/src/domains/observability/components/trace-dialog.d.ts +1 -3
- package/dist/src/domains/scores/components/scorers-table/scorers-table.d.ts +1 -2
- package/dist/src/domains/tools/components/tool-list.d.ts +1 -3
- package/dist/src/domains/workflows/components/workflow-table/workflow-table.d.ts +1 -2
- package/dist/src/lib/framework.d.ts +18 -1
- package/package.json +6 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @mastra/playground-ui
|
|
2
2
|
|
|
3
|
+
## 6.2.2-alpha.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dependencies updates: ([#7980](https://github.com/mastra-ai/mastra/pull/7980))
|
|
8
|
+
- Updated dependency [`zod@^4.1.8` ↗︎](https://www.npmjs.com/package/zod/v/4.1.8) (from `^4.1.5`, in `dependencies`)
|
|
9
|
+
|
|
10
|
+
- Get rid off swr one for all ([#7931](https://github.com/mastra-ai/mastra/pull/7931))
|
|
11
|
+
|
|
12
|
+
- Updated dependencies [[`a61f23f`](https://github.com/mastra-ai/mastra/commit/a61f23fbbca4b88b763d94f1d784c47895ed72d7), [`d1dc606`](https://github.com/mastra-ai/mastra/commit/d1dc6067b0557a71190b68d56ee15b48c26d2411), [`d3bd4d4`](https://github.com/mastra-ai/mastra/commit/d3bd4d482a685bbb67bfa89be91c90dca3fa71ad)]:
|
|
13
|
+
- @mastra/client-js@0.13.2-alpha.0
|
|
14
|
+
- @mastra/core@0.17.2-alpha.0
|
|
15
|
+
|
|
16
|
+
## 6.2.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`fd00e63`](https://github.com/mastra-ai/mastra/commit/fd00e63759cbcca3473c40cac9843280b0557cff), [`ab610f6`](https://github.com/mastra-ai/mastra/commit/ab610f6f41dbfe6c9502368671485ca7a0aac09b), [`e6bda5f`](https://github.com/mastra-ai/mastra/commit/e6bda5f954ee8493ea18adc1a883f0a5b785ad9b)]:
|
|
21
|
+
- @mastra/core@0.17.1
|
|
22
|
+
- @mastra/client-js@0.13.1
|
|
23
|
+
|
|
3
24
|
## 6.2.1-alpha.0
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
package/dist/index.cjs.js
CHANGED
|
@@ -8495,10 +8495,24 @@ const ScrollableContainer = ({
|
|
|
8495
8495
|
const LinkComponentContext = React.createContext({
|
|
8496
8496
|
Link: React.forwardRef(() => null),
|
|
8497
8497
|
navigate: () => {
|
|
8498
|
+
},
|
|
8499
|
+
paths: {
|
|
8500
|
+
agentLink: () => "",
|
|
8501
|
+
agentsLink: () => "",
|
|
8502
|
+
agentToolLink: () => "",
|
|
8503
|
+
agentThreadLink: () => "",
|
|
8504
|
+
agentNewThreadLink: () => "",
|
|
8505
|
+
workflowsLink: () => "",
|
|
8506
|
+
workflowLink: () => "",
|
|
8507
|
+
networkLink: () => "",
|
|
8508
|
+
networkNewThreadLink: () => "",
|
|
8509
|
+
networkThreadLink: () => "",
|
|
8510
|
+
scorerLink: () => "",
|
|
8511
|
+
toolLink: () => ""
|
|
8498
8512
|
}
|
|
8499
8513
|
});
|
|
8500
|
-
const LinkComponentProvider = ({ children, Link, navigate }) => {
|
|
8501
|
-
return /* @__PURE__ */ jsxRuntime.jsx(LinkComponentContext.Provider, { value: { Link, navigate }, children });
|
|
8514
|
+
const LinkComponentProvider = ({ children, Link, navigate, paths }) => {
|
|
8515
|
+
return /* @__PURE__ */ jsxRuntime.jsx(LinkComponentContext.Provider, { value: { Link, navigate, paths }, children });
|
|
8502
8516
|
};
|
|
8503
8517
|
const useLinkComponent = () => {
|
|
8504
8518
|
const ctx = React.useContext(LinkComponentContext);
|
|
@@ -8543,8 +8557,8 @@ const columns$3 = [
|
|
|
8543
8557
|
}
|
|
8544
8558
|
];
|
|
8545
8559
|
|
|
8546
|
-
function WorkflowTable({ workflows, legacyWorkflows, isLoading
|
|
8547
|
-
const { navigate } = useLinkComponent();
|
|
8560
|
+
function WorkflowTable({ workflows, legacyWorkflows, isLoading }) {
|
|
8561
|
+
const { navigate, paths } = useLinkComponent();
|
|
8548
8562
|
const workflowData = React.useMemo(() => {
|
|
8549
8563
|
const _workflowsData = Object.keys(workflows ?? {}).map((key) => {
|
|
8550
8564
|
const workflow = workflows?.[key];
|
|
@@ -8553,7 +8567,7 @@ function WorkflowTable({ workflows, legacyWorkflows, isLoading, computeLink }) {
|
|
|
8553
8567
|
name: workflow?.name || "N/A",
|
|
8554
8568
|
stepsCount: Object.keys(workflow?.steps ?? {})?.length,
|
|
8555
8569
|
isLegacy: false,
|
|
8556
|
-
link:
|
|
8570
|
+
link: paths.workflowLink(key)
|
|
8557
8571
|
};
|
|
8558
8572
|
});
|
|
8559
8573
|
const legacyWorkflowsData = Object.keys(legacyWorkflows ?? {}).map((key) => {
|
|
@@ -8563,7 +8577,7 @@ function WorkflowTable({ workflows, legacyWorkflows, isLoading, computeLink }) {
|
|
|
8563
8577
|
name: workflow?.name || "N/A",
|
|
8564
8578
|
stepsCount: Object.keys(workflow?.steps ?? {})?.length,
|
|
8565
8579
|
isLegacy: true,
|
|
8566
|
-
link:
|
|
8580
|
+
link: paths.workflowLink(key)
|
|
8567
8581
|
};
|
|
8568
8582
|
});
|
|
8569
8583
|
return [..._workflowsData, ...legacyWorkflowsData];
|
|
@@ -12275,8 +12289,8 @@ const columns$2 = [
|
|
|
12275
12289
|
}
|
|
12276
12290
|
];
|
|
12277
12291
|
|
|
12278
|
-
function AgentsTable({ agents, isLoading
|
|
12279
|
-
const { navigate } = useLinkComponent();
|
|
12292
|
+
function AgentsTable({ agents, isLoading }) {
|
|
12293
|
+
const { navigate, paths } = useLinkComponent();
|
|
12280
12294
|
const projectData = React.useMemo(
|
|
12281
12295
|
() => Object.keys(agents).map((key) => {
|
|
12282
12296
|
const agent = agents[key];
|
|
@@ -12290,7 +12304,7 @@ function AgentsTable({ agents, isLoading, computeLink }) {
|
|
|
12290
12304
|
repoUrl: void 0,
|
|
12291
12305
|
tools: agent.tools,
|
|
12292
12306
|
modelId: agent.modelId,
|
|
12293
|
-
link:
|
|
12307
|
+
link: paths.agentLink(key)
|
|
12294
12308
|
};
|
|
12295
12309
|
}),
|
|
12296
12310
|
[agents]
|
|
@@ -14028,8 +14042,8 @@ const columns$1 = [
|
|
|
14028
14042
|
}
|
|
14029
14043
|
];
|
|
14030
14044
|
|
|
14031
|
-
function ScorersTable({ scorers, isLoading
|
|
14032
|
-
const { navigate } = useLinkComponent();
|
|
14045
|
+
function ScorersTable({ scorers, isLoading }) {
|
|
14046
|
+
const { navigate, paths } = useLinkComponent();
|
|
14033
14047
|
const scorersData = React.useMemo(
|
|
14034
14048
|
() => Object.keys(scorers).map((key) => {
|
|
14035
14049
|
const scorer = scorers[key];
|
|
@@ -14054,7 +14068,7 @@ function ScorersTable({ scorers, isLoading, computeScorerLink }) {
|
|
|
14054
14068
|
}
|
|
14055
14069
|
return /* @__PURE__ */ jsxRuntime.jsx(ScrollableContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs(Table$1, { children: [
|
|
14056
14070
|
/* @__PURE__ */ jsxRuntime.jsx(Thead, { className: "sticky top-0", children: ths.headers.map((header) => /* @__PURE__ */ jsxRuntime.jsx(Th, { style: { width: header.index === 0 ? "auto" : header.column.getSize() }, children: reactTable.flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }),
|
|
14057
|
-
/* @__PURE__ */ jsxRuntime.jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(Row, { onClick: () => navigate(
|
|
14071
|
+
/* @__PURE__ */ jsxRuntime.jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(Row, { onClick: () => navigate(paths.scorerLink(row.original.id)), children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) })
|
|
14058
14072
|
] }) });
|
|
14059
14073
|
}
|
|
14060
14074
|
const ScorersTableSkeleton = () => /* @__PURE__ */ jsxRuntime.jsxs(Table$1, { children: [
|
|
@@ -14339,21 +14353,18 @@ const AgentMetadataModelSwitcher = ({
|
|
|
14339
14353
|
] }) });
|
|
14340
14354
|
};
|
|
14341
14355
|
|
|
14342
|
-
const AgentMetadataNetworkList = ({ agents
|
|
14343
|
-
const { Link } = useLinkComponent();
|
|
14356
|
+
const AgentMetadataNetworkList = ({ agents }) => {
|
|
14357
|
+
const { Link, paths } = useLinkComponent();
|
|
14344
14358
|
if (agents.length === 0) {
|
|
14345
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListEmpty, { children: "No
|
|
14359
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListEmpty, { children: "No agents" });
|
|
14346
14360
|
}
|
|
14347
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataList, { children: agents.map((agent) => /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { href:
|
|
14361
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataList, { children: agents.map((agent) => /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { href: paths.agentLink(agent.id), children: /* @__PURE__ */ jsxRuntime.jsx(Badge$1, { variant: "success", icon: /* @__PURE__ */ jsxRuntime.jsx(AgentIcon, {}), children: agent.name }) }) }, agent.id)) });
|
|
14348
14362
|
};
|
|
14349
14363
|
const AgentMetadata = ({
|
|
14364
|
+
agentId,
|
|
14350
14365
|
agent,
|
|
14351
14366
|
promptSlot,
|
|
14352
14367
|
hasMemoryEnabled,
|
|
14353
|
-
computeAgentLink,
|
|
14354
|
-
computeToolLink,
|
|
14355
|
-
computeWorkflowLink,
|
|
14356
|
-
computeScorerLink,
|
|
14357
14368
|
updateModel,
|
|
14358
14369
|
modelProviders
|
|
14359
14370
|
}) => {
|
|
@@ -14407,7 +14418,7 @@ const AgentMetadata = ({
|
|
|
14407
14418
|
link: "https://mastra.ai/en/docs/agents/overview",
|
|
14408
14419
|
title: "Agents documentation"
|
|
14409
14420
|
},
|
|
14410
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataNetworkList, { agents: networkAgents
|
|
14421
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataNetworkList, { agents: networkAgents })
|
|
14411
14422
|
}
|
|
14412
14423
|
),
|
|
14413
14424
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14418,7 +14429,7 @@ const AgentMetadata = ({
|
|
|
14418
14429
|
link: "https://mastra.ai/en/docs/agents/using-tools-and-mcp",
|
|
14419
14430
|
title: "Using Tools and MCP documentation"
|
|
14420
14431
|
},
|
|
14421
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataToolList, { tools,
|
|
14432
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataToolList, { tools, agentId })
|
|
14422
14433
|
}
|
|
14423
14434
|
),
|
|
14424
14435
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -14429,29 +14440,29 @@ const AgentMetadata = ({
|
|
|
14429
14440
|
link: "https://mastra.ai/en/docs/workflows/overview",
|
|
14430
14441
|
title: "Workflows documentation"
|
|
14431
14442
|
},
|
|
14432
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataWorkflowList, { workflows
|
|
14443
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataWorkflowList, { workflows })
|
|
14433
14444
|
}
|
|
14434
14445
|
),
|
|
14435
|
-
/* @__PURE__ */ jsxRuntime.jsx(AgentMetadataSection, { title: "Scorers", children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataScorerList, { entityId: agent.name, entityType: "AGENT"
|
|
14446
|
+
/* @__PURE__ */ jsxRuntime.jsx(AgentMetadataSection, { title: "Scorers", children: /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataScorerList, { entityId: agent.name, entityType: "AGENT" }) }),
|
|
14436
14447
|
/* @__PURE__ */ jsxRuntime.jsx(AgentMetadataSection, { title: "System Prompt", children: promptSlot })
|
|
14437
14448
|
] });
|
|
14438
14449
|
};
|
|
14439
|
-
const AgentMetadataToolList = ({ tools,
|
|
14440
|
-
const { Link } = useLinkComponent();
|
|
14450
|
+
const AgentMetadataToolList = ({ tools, agentId }) => {
|
|
14451
|
+
const { Link, paths } = useLinkComponent();
|
|
14441
14452
|
if (tools.length === 0) {
|
|
14442
14453
|
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListEmpty, { children: "No tools" });
|
|
14443
14454
|
}
|
|
14444
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataList, { children: tools.map((tool) => /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { href:
|
|
14455
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataList, { children: tools.map((tool) => /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { href: paths.agentToolLink(agentId, tool.id), children: /* @__PURE__ */ jsxRuntime.jsx(Badge$1, { icon: /* @__PURE__ */ jsxRuntime.jsx(ToolsIcon, { className: "text-[#ECB047]" }), children: tool.id }) }) }, tool.id)) });
|
|
14445
14456
|
};
|
|
14446
|
-
const AgentMetadataWorkflowList = ({ workflows
|
|
14447
|
-
const { Link } = useLinkComponent();
|
|
14457
|
+
const AgentMetadataWorkflowList = ({ workflows }) => {
|
|
14458
|
+
const { Link, paths } = useLinkComponent();
|
|
14448
14459
|
if (workflows.length === 0) {
|
|
14449
14460
|
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListEmpty, { children: "No workflows" });
|
|
14450
14461
|
}
|
|
14451
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataList, { children: workflows.map((workflow) => /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { href:
|
|
14462
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataList, { children: workflows.map((workflow) => /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { href: paths.workflowLink(workflow.id), children: /* @__PURE__ */ jsxRuntime.jsx(Badge$1, { icon: /* @__PURE__ */ jsxRuntime.jsx(WorkflowIcon, { className: "text-accent3" }), children: workflow.name }) }) }, workflow.id)) });
|
|
14452
14463
|
};
|
|
14453
|
-
const AgentMetadataScorerList = ({ entityId, entityType
|
|
14454
|
-
const { Link } = useLinkComponent();
|
|
14464
|
+
const AgentMetadataScorerList = ({ entityId, entityType }) => {
|
|
14465
|
+
const { Link, paths } = useLinkComponent();
|
|
14455
14466
|
const { scorers, isLoading } = useScorers();
|
|
14456
14467
|
const scorerList = Object.keys(scorers).filter((scorerKey) => {
|
|
14457
14468
|
const scorer = scorers[scorerKey];
|
|
@@ -14466,7 +14477,7 @@ const AgentMetadataScorerList = ({ entityId, entityType, computeScorerLink }) =>
|
|
|
14466
14477
|
if (scorerList.length === 0) {
|
|
14467
14478
|
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListEmpty, { children: "No Scorers" });
|
|
14468
14479
|
}
|
|
14469
|
-
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataList, { children: scorerList.map((scorer) => /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { href:
|
|
14480
|
+
return /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataList, { children: scorerList.map((scorer) => /* @__PURE__ */ jsxRuntime.jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { href: paths.scorerLink(scorer.id), children: /* @__PURE__ */ jsxRuntime.jsx(Badge$1, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.GaugeIcon, { className: "text-icon3" }), children: scorer.scorer.config.name }) }) }, scorer.id)) });
|
|
14470
14481
|
};
|
|
14471
14482
|
|
|
14472
14483
|
const AgentMetadataPrompt = ({ prompt }) => {
|
|
@@ -14599,31 +14610,26 @@ AlertDialog.Description = AlertDialogDescription;
|
|
|
14599
14610
|
AlertDialog.Action = AlertDialogAction;
|
|
14600
14611
|
AlertDialog.Cancel = AlertDialogCancel;
|
|
14601
14612
|
|
|
14602
|
-
const ChatThreads = ({
|
|
14603
|
-
|
|
14604
|
-
computeThreadLink,
|
|
14605
|
-
threads,
|
|
14606
|
-
isLoading,
|
|
14607
|
-
threadId,
|
|
14608
|
-
onDelete
|
|
14609
|
-
}) => {
|
|
14610
|
-
const { Link } = useLinkComponent();
|
|
14613
|
+
const ChatThreads = ({ threads, isLoading, threadId, onDelete, resourceId, resourceType }) => {
|
|
14614
|
+
const { Link, paths } = useLinkComponent();
|
|
14611
14615
|
const [deleteId, setDeleteId] = React.useState(null);
|
|
14612
14616
|
if (isLoading) {
|
|
14613
14617
|
return /* @__PURE__ */ jsxRuntime.jsx(ChatThreadSkeleton, {});
|
|
14614
14618
|
}
|
|
14615
14619
|
const reverseThreads = [...threads].reverse();
|
|
14620
|
+
const newThreadLink = resourceType === "agent" ? paths.agentNewThreadLink(resourceId) : paths.networkNewThreadLink(resourceId);
|
|
14616
14621
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "overflow-y-auto h-full w-full", children: [
|
|
14617
14622
|
/* @__PURE__ */ jsxRuntime.jsx(Threads, { children: /* @__PURE__ */ jsxRuntime.jsxs(ThreadList, { children: [
|
|
14618
|
-
/* @__PURE__ */ jsxRuntime.jsx(ThreadItem, { children: /* @__PURE__ */ jsxRuntime.jsx(ThreadLink, { as: Link, to:
|
|
14623
|
+
/* @__PURE__ */ jsxRuntime.jsx(ThreadItem, { children: /* @__PURE__ */ jsxRuntime.jsx(ThreadLink, { as: Link, to: newThreadLink, children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-accent1 flex items-center gap-4", children: [
|
|
14619
14624
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { className: "bg-surface4 rounded-lg", size: "lg", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, {}) }),
|
|
14620
14625
|
"New Chat"
|
|
14621
14626
|
] }) }) }),
|
|
14622
14627
|
reverseThreads.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "p", variant: "ui-sm", className: "text-icon3 py-3 px-5 max-w-[12rem]", children: "Your conversations will appear here once you start chatting!" }),
|
|
14623
14628
|
reverseThreads.map((thread) => {
|
|
14624
14629
|
const isActive = thread.id === threadId;
|
|
14630
|
+
const threadLink = resourceType === "agent" ? paths.agentThreadLink(resourceId, thread.id) : paths.networkThreadLink(resourceId, thread.id);
|
|
14625
14631
|
return /* @__PURE__ */ jsxRuntime.jsxs(ThreadItem, { isActive, children: [
|
|
14626
|
-
/* @__PURE__ */ jsxRuntime.jsxs(ThreadLink, { as: Link, to:
|
|
14632
|
+
/* @__PURE__ */ jsxRuntime.jsxs(ThreadLink, { as: Link, to: threadLink, children: [
|
|
14627
14633
|
/* @__PURE__ */ jsxRuntime.jsx(ThreadTitle, { title: thread.title }),
|
|
14628
14634
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: formatDay(thread.createdAt) })
|
|
14629
14635
|
] }),
|
|
@@ -15673,8 +15679,8 @@ const columns = [
|
|
|
15673
15679
|
}
|
|
15674
15680
|
];
|
|
15675
15681
|
|
|
15676
|
-
const NetworkTable = ({ networks, isLoading
|
|
15677
|
-
const { navigate } = useLinkComponent();
|
|
15682
|
+
const NetworkTable = ({ networks, isLoading }) => {
|
|
15683
|
+
const { navigate, paths } = useLinkComponent();
|
|
15678
15684
|
const allNetworks = React.useMemo(
|
|
15679
15685
|
() => [
|
|
15680
15686
|
...networks?.map((network) => ({
|
|
@@ -15700,7 +15706,7 @@ const NetworkTable = ({ networks, isLoading, computeLink }) => {
|
|
|
15700
15706
|
}
|
|
15701
15707
|
return /* @__PURE__ */ jsxRuntime.jsx(ScrollableContainer, { children: /* @__PURE__ */ jsxRuntime.jsxs(Table$1, { children: [
|
|
15702
15708
|
/* @__PURE__ */ jsxRuntime.jsx(Thead, { className: "sticky top-0", children: ths.headers.map((header) => /* @__PURE__ */ jsxRuntime.jsx(Th, { style: { width: header.index === 0 ? "auto" : header.column.getSize() }, children: reactTable.flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }),
|
|
15703
|
-
/* @__PURE__ */ jsxRuntime.jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(Row, { onClick: () => navigate(
|
|
15709
|
+
/* @__PURE__ */ jsxRuntime.jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsxRuntime.jsx(Row, { onClick: () => navigate(paths.networkLink(row.original.id)), className: "cursor-pointer", children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsxRuntime.jsx(React.Fragment, { children: reactTable.flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) })
|
|
15704
15710
|
] }) });
|
|
15705
15711
|
};
|
|
15706
15712
|
const NetworkTableEmpty = () => {
|
|
@@ -15841,17 +15847,13 @@ const EntityContent = ({ children, className }) => {
|
|
|
15841
15847
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children });
|
|
15842
15848
|
};
|
|
15843
15849
|
|
|
15844
|
-
const ToolList = ({ tools, agents, isLoading
|
|
15850
|
+
const ToolList = ({ tools, agents, isLoading }) => {
|
|
15845
15851
|
const toolsWithAgents = React.useMemo(() => prepareAgents(tools, agents), [tools, agents]);
|
|
15846
15852
|
if (isLoading)
|
|
15847
15853
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "max-w-5xl w-full mx-auto px-4 pt-8", children: /* @__PURE__ */ jsxRuntime.jsx(ToolListSkeleton, {}) });
|
|
15848
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ToolListInner, { toolsWithAgents
|
|
15854
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ToolListInner, { toolsWithAgents });
|
|
15849
15855
|
};
|
|
15850
|
-
const ToolListInner = ({
|
|
15851
|
-
toolsWithAgents,
|
|
15852
|
-
computeLink,
|
|
15853
|
-
computeAgentLink
|
|
15854
|
-
}) => {
|
|
15856
|
+
const ToolListInner = ({ toolsWithAgents }) => {
|
|
15855
15857
|
const [filteredTools, setFilteredTools] = React.useState(toolsWithAgents);
|
|
15856
15858
|
const [value, setValue] = React.useState("");
|
|
15857
15859
|
if (filteredTools.length === 0 && !value) return /* @__PURE__ */ jsxRuntime.jsx(ToolListEmpty, {});
|
|
@@ -15872,22 +15874,22 @@ const ToolListInner = ({
|
|
|
15872
15874
|
/* @__PURE__ */ jsxRuntime.jsx(Searchbar, { onSearch: handleSearch, label: "Search for a tool", placeholder: "Search for a tool" }),
|
|
15873
15875
|
filteredTools.length === 0 && /* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "p", className: "text-icon3 py-2", children: "No tools found matching your search." })
|
|
15874
15876
|
] }),
|
|
15875
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid md:grid-cols-2 xl:grid-cols-3 gap-4 max-w-5xl mx-auto py-8", children: filteredTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsx(ToolEntity, { tool
|
|
15877
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid md:grid-cols-2 xl:grid-cols-3 gap-4 max-w-5xl mx-auto py-8", children: filteredTools.map((tool) => /* @__PURE__ */ jsxRuntime.jsx(ToolEntity, { tool }, tool.id)) })
|
|
15876
15878
|
] });
|
|
15877
15879
|
};
|
|
15878
|
-
const ToolEntity = ({ tool
|
|
15880
|
+
const ToolEntity = ({ tool }) => {
|
|
15879
15881
|
const linkRef = React.useRef(null);
|
|
15880
|
-
const { Link } = useLinkComponent();
|
|
15882
|
+
const { Link, paths } = useLinkComponent();
|
|
15881
15883
|
return /* @__PURE__ */ jsxRuntime.jsxs(Entity, { onClick: () => linkRef.current?.click(), children: [
|
|
15882
15884
|
/* @__PURE__ */ jsxRuntime.jsx(EntityIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(ToolsIcon, { className: "group-hover/entity:text-[#ECB047]" }) }),
|
|
15883
15885
|
/* @__PURE__ */ jsxRuntime.jsxs(EntityContent, { children: [
|
|
15884
|
-
/* @__PURE__ */ jsxRuntime.jsx(EntityName, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { ref: linkRef, href:
|
|
15886
|
+
/* @__PURE__ */ jsxRuntime.jsx(EntityName, { children: /* @__PURE__ */ jsxRuntime.jsx(Link, { ref: linkRef, href: paths.toolLink(tool.id), children: tool.id }) }),
|
|
15885
15887
|
/* @__PURE__ */ jsxRuntime.jsx(EntityDescription, { children: tool.description }),
|
|
15886
15888
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "inline-flex flex-wrap gap-2 pt-4", children: tool.agents.map((agent) => {
|
|
15887
15889
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15888
15890
|
Link,
|
|
15889
15891
|
{
|
|
15890
|
-
href:
|
|
15892
|
+
href: paths.agentToolLink(agent.id, tool.id),
|
|
15891
15893
|
onClick: (e) => e.stopPropagation(),
|
|
15892
15894
|
className: "group/link",
|
|
15893
15895
|
children: /* @__PURE__ */ jsxRuntime.jsx(Badge$1, { icon: /* @__PURE__ */ jsxRuntime.jsx(AgentIcon, { className: "group-hover/link:text-accent3" }), className: "bg-surface5 ", children: agent.name })
|
|
@@ -17869,14 +17871,15 @@ function TraceSpanUsage({ traceUsage, traceSpans = [], spanUsage, className }) {
|
|
|
17869
17871
|
);
|
|
17870
17872
|
}
|
|
17871
17873
|
|
|
17872
|
-
function
|
|
17874
|
+
function useTraceInfo(trace) {
|
|
17875
|
+
const { paths } = useLinkComponent();
|
|
17873
17876
|
if (!trace) {
|
|
17874
17877
|
return [];
|
|
17875
17878
|
}
|
|
17876
|
-
const agentsLink =
|
|
17877
|
-
const workflowsLink =
|
|
17878
|
-
const agentLink =
|
|
17879
|
-
const workflowLink =
|
|
17879
|
+
const agentsLink = paths.agentsLink();
|
|
17880
|
+
const workflowsLink = paths.workflowsLink();
|
|
17881
|
+
const agentLink = paths.agentLink(trace?.metadata?.resourceId);
|
|
17882
|
+
const workflowLink = paths.workflowLink(trace?.metadata?.resourceId);
|
|
17880
17883
|
return [
|
|
17881
17884
|
{
|
|
17882
17885
|
key: "entityId",
|
|
@@ -18025,15 +18028,14 @@ function TraceDialog({
|
|
|
18025
18028
|
onClose,
|
|
18026
18029
|
onNext,
|
|
18027
18030
|
onPrevious,
|
|
18028
|
-
isLoadingSpans
|
|
18029
|
-
computeAgentsLink,
|
|
18030
|
-
computeWorkflowsLink
|
|
18031
|
+
isLoadingSpans
|
|
18031
18032
|
}) {
|
|
18032
18033
|
const { Link } = useLinkComponent();
|
|
18033
18034
|
const [dialogIsOpen, setDialogIsOpen] = React.useState(false);
|
|
18034
18035
|
const [selectedSpanId, setSelectedSpanId] = React.useState(void 0);
|
|
18035
18036
|
const [combinedView, setCombinedView] = React.useState(false);
|
|
18036
18037
|
const selectedSpan = traceSpans.find((span) => span.spanId === selectedSpanId);
|
|
18038
|
+
const traceInfo = useTraceInfo(traceDetails);
|
|
18037
18039
|
const hierarchicalSpans = React.useMemo(() => {
|
|
18038
18040
|
return formatHierarchicalSpans(traceSpans);
|
|
18039
18041
|
}, [traceSpans]);
|
|
@@ -18077,7 +18079,6 @@ function TraceDialog({
|
|
|
18077
18079
|
const currentIndex = flatSpans.findIndex((span) => span.id === selectedSpanId);
|
|
18078
18080
|
return currentIndex > 0;
|
|
18079
18081
|
};
|
|
18080
|
-
const traceInfo = getTraceInfo(traceDetails, computeAgentsLink, computeWorkflowsLink);
|
|
18081
18082
|
const selectedSpanInfo = getSpanInfo({ span: selectedSpan, withTraceId: !combinedView, withSpanId: combinedView });
|
|
18082
18083
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
18083
18084
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -18300,7 +18301,7 @@ function MainContentContent({
|
|
|
18300
18301
|
"items-start content-start": !isCentered && !isDivided && !hasLeftServiceColumn,
|
|
18301
18302
|
"grid place-items-center": isCentered,
|
|
18302
18303
|
"grid-cols-[1fr_1fr]": isDivided && !hasLeftServiceColumn,
|
|
18303
|
-
"grid-cols-[
|
|
18304
|
+
"grid-cols-[12rem_1fr_1fr]": isDivided && hasLeftServiceColumn,
|
|
18304
18305
|
"grid-cols-[auto_1fr]": !isDivided && hasLeftServiceColumn
|
|
18305
18306
|
},
|
|
18306
18307
|
className
|