@mastra/playground-ui 6.2.1 → 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 +13 -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/dist/index.es.js
CHANGED
|
@@ -8461,10 +8461,24 @@ const ScrollableContainer = ({
|
|
|
8461
8461
|
const LinkComponentContext = createContext({
|
|
8462
8462
|
Link: forwardRef(() => null),
|
|
8463
8463
|
navigate: () => {
|
|
8464
|
+
},
|
|
8465
|
+
paths: {
|
|
8466
|
+
agentLink: () => "",
|
|
8467
|
+
agentsLink: () => "",
|
|
8468
|
+
agentToolLink: () => "",
|
|
8469
|
+
agentThreadLink: () => "",
|
|
8470
|
+
agentNewThreadLink: () => "",
|
|
8471
|
+
workflowsLink: () => "",
|
|
8472
|
+
workflowLink: () => "",
|
|
8473
|
+
networkLink: () => "",
|
|
8474
|
+
networkNewThreadLink: () => "",
|
|
8475
|
+
networkThreadLink: () => "",
|
|
8476
|
+
scorerLink: () => "",
|
|
8477
|
+
toolLink: () => ""
|
|
8464
8478
|
}
|
|
8465
8479
|
});
|
|
8466
|
-
const LinkComponentProvider = ({ children, Link, navigate }) => {
|
|
8467
|
-
return /* @__PURE__ */ jsx(LinkComponentContext.Provider, { value: { Link, navigate }, children });
|
|
8480
|
+
const LinkComponentProvider = ({ children, Link, navigate, paths }) => {
|
|
8481
|
+
return /* @__PURE__ */ jsx(LinkComponentContext.Provider, { value: { Link, navigate, paths }, children });
|
|
8468
8482
|
};
|
|
8469
8483
|
const useLinkComponent = () => {
|
|
8470
8484
|
const ctx = useContext(LinkComponentContext);
|
|
@@ -8509,8 +8523,8 @@ const columns$3 = [
|
|
|
8509
8523
|
}
|
|
8510
8524
|
];
|
|
8511
8525
|
|
|
8512
|
-
function WorkflowTable({ workflows, legacyWorkflows, isLoading
|
|
8513
|
-
const { navigate } = useLinkComponent();
|
|
8526
|
+
function WorkflowTable({ workflows, legacyWorkflows, isLoading }) {
|
|
8527
|
+
const { navigate, paths } = useLinkComponent();
|
|
8514
8528
|
const workflowData = useMemo(() => {
|
|
8515
8529
|
const _workflowsData = Object.keys(workflows ?? {}).map((key) => {
|
|
8516
8530
|
const workflow = workflows?.[key];
|
|
@@ -8519,7 +8533,7 @@ function WorkflowTable({ workflows, legacyWorkflows, isLoading, computeLink }) {
|
|
|
8519
8533
|
name: workflow?.name || "N/A",
|
|
8520
8534
|
stepsCount: Object.keys(workflow?.steps ?? {})?.length,
|
|
8521
8535
|
isLegacy: false,
|
|
8522
|
-
link:
|
|
8536
|
+
link: paths.workflowLink(key)
|
|
8523
8537
|
};
|
|
8524
8538
|
});
|
|
8525
8539
|
const legacyWorkflowsData = Object.keys(legacyWorkflows ?? {}).map((key) => {
|
|
@@ -8529,7 +8543,7 @@ function WorkflowTable({ workflows, legacyWorkflows, isLoading, computeLink }) {
|
|
|
8529
8543
|
name: workflow?.name || "N/A",
|
|
8530
8544
|
stepsCount: Object.keys(workflow?.steps ?? {})?.length,
|
|
8531
8545
|
isLegacy: true,
|
|
8532
|
-
link:
|
|
8546
|
+
link: paths.workflowLink(key)
|
|
8533
8547
|
};
|
|
8534
8548
|
});
|
|
8535
8549
|
return [..._workflowsData, ...legacyWorkflowsData];
|
|
@@ -12241,8 +12255,8 @@ const columns$2 = [
|
|
|
12241
12255
|
}
|
|
12242
12256
|
];
|
|
12243
12257
|
|
|
12244
|
-
function AgentsTable({ agents, isLoading
|
|
12245
|
-
const { navigate } = useLinkComponent();
|
|
12258
|
+
function AgentsTable({ agents, isLoading }) {
|
|
12259
|
+
const { navigate, paths } = useLinkComponent();
|
|
12246
12260
|
const projectData = useMemo(
|
|
12247
12261
|
() => Object.keys(agents).map((key) => {
|
|
12248
12262
|
const agent = agents[key];
|
|
@@ -12256,7 +12270,7 @@ function AgentsTable({ agents, isLoading, computeLink }) {
|
|
|
12256
12270
|
repoUrl: void 0,
|
|
12257
12271
|
tools: agent.tools,
|
|
12258
12272
|
modelId: agent.modelId,
|
|
12259
|
-
link:
|
|
12273
|
+
link: paths.agentLink(key)
|
|
12260
12274
|
};
|
|
12261
12275
|
}),
|
|
12262
12276
|
[agents]
|
|
@@ -13994,8 +14008,8 @@ const columns$1 = [
|
|
|
13994
14008
|
}
|
|
13995
14009
|
];
|
|
13996
14010
|
|
|
13997
|
-
function ScorersTable({ scorers, isLoading
|
|
13998
|
-
const { navigate } = useLinkComponent();
|
|
14011
|
+
function ScorersTable({ scorers, isLoading }) {
|
|
14012
|
+
const { navigate, paths } = useLinkComponent();
|
|
13999
14013
|
const scorersData = useMemo(
|
|
14000
14014
|
() => Object.keys(scorers).map((key) => {
|
|
14001
14015
|
const scorer = scorers[key];
|
|
@@ -14020,7 +14034,7 @@ function ScorersTable({ scorers, isLoading, computeScorerLink }) {
|
|
|
14020
14034
|
}
|
|
14021
14035
|
return /* @__PURE__ */ jsx(ScrollableContainer, { children: /* @__PURE__ */ jsxs(Table$1, { children: [
|
|
14022
14036
|
/* @__PURE__ */ jsx(Thead, { className: "sticky top-0", children: ths.headers.map((header) => /* @__PURE__ */ jsx(Th, { style: { width: header.index === 0 ? "auto" : header.column.getSize() }, children: flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }),
|
|
14023
|
-
/* @__PURE__ */ jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsx(Row, { onClick: () => navigate(
|
|
14037
|
+
/* @__PURE__ */ jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsx(Row, { onClick: () => navigate(paths.scorerLink(row.original.id)), children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(React__default.Fragment, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) })
|
|
14024
14038
|
] }) });
|
|
14025
14039
|
}
|
|
14026
14040
|
const ScorersTableSkeleton = () => /* @__PURE__ */ jsxs(Table$1, { children: [
|
|
@@ -14305,21 +14319,18 @@ const AgentMetadataModelSwitcher = ({
|
|
|
14305
14319
|
] }) });
|
|
14306
14320
|
};
|
|
14307
14321
|
|
|
14308
|
-
const AgentMetadataNetworkList = ({ agents
|
|
14309
|
-
const { Link } = useLinkComponent();
|
|
14322
|
+
const AgentMetadataNetworkList = ({ agents }) => {
|
|
14323
|
+
const { Link, paths } = useLinkComponent();
|
|
14310
14324
|
if (agents.length === 0) {
|
|
14311
|
-
return /* @__PURE__ */ jsx(AgentMetadataListEmpty, { children: "No
|
|
14325
|
+
return /* @__PURE__ */ jsx(AgentMetadataListEmpty, { children: "No agents" });
|
|
14312
14326
|
}
|
|
14313
|
-
return /* @__PURE__ */ jsx(AgentMetadataList, { children: agents.map((agent) => /* @__PURE__ */ jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsx(Link, { href:
|
|
14327
|
+
return /* @__PURE__ */ jsx(AgentMetadataList, { children: agents.map((agent) => /* @__PURE__ */ jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsx(Link, { href: paths.agentLink(agent.id), children: /* @__PURE__ */ jsx(Badge$1, { variant: "success", icon: /* @__PURE__ */ jsx(AgentIcon, {}), children: agent.name }) }) }, agent.id)) });
|
|
14314
14328
|
};
|
|
14315
14329
|
const AgentMetadata = ({
|
|
14330
|
+
agentId,
|
|
14316
14331
|
agent,
|
|
14317
14332
|
promptSlot,
|
|
14318
14333
|
hasMemoryEnabled,
|
|
14319
|
-
computeAgentLink,
|
|
14320
|
-
computeToolLink,
|
|
14321
|
-
computeWorkflowLink,
|
|
14322
|
-
computeScorerLink,
|
|
14323
14334
|
updateModel,
|
|
14324
14335
|
modelProviders
|
|
14325
14336
|
}) => {
|
|
@@ -14373,7 +14384,7 @@ const AgentMetadata = ({
|
|
|
14373
14384
|
link: "https://mastra.ai/en/docs/agents/overview",
|
|
14374
14385
|
title: "Agents documentation"
|
|
14375
14386
|
},
|
|
14376
|
-
children: /* @__PURE__ */ jsx(AgentMetadataNetworkList, { agents: networkAgents
|
|
14387
|
+
children: /* @__PURE__ */ jsx(AgentMetadataNetworkList, { agents: networkAgents })
|
|
14377
14388
|
}
|
|
14378
14389
|
),
|
|
14379
14390
|
/* @__PURE__ */ jsx(
|
|
@@ -14384,7 +14395,7 @@ const AgentMetadata = ({
|
|
|
14384
14395
|
link: "https://mastra.ai/en/docs/agents/using-tools-and-mcp",
|
|
14385
14396
|
title: "Using Tools and MCP documentation"
|
|
14386
14397
|
},
|
|
14387
|
-
children: /* @__PURE__ */ jsx(AgentMetadataToolList, { tools,
|
|
14398
|
+
children: /* @__PURE__ */ jsx(AgentMetadataToolList, { tools, agentId })
|
|
14388
14399
|
}
|
|
14389
14400
|
),
|
|
14390
14401
|
/* @__PURE__ */ jsx(
|
|
@@ -14395,29 +14406,29 @@ const AgentMetadata = ({
|
|
|
14395
14406
|
link: "https://mastra.ai/en/docs/workflows/overview",
|
|
14396
14407
|
title: "Workflows documentation"
|
|
14397
14408
|
},
|
|
14398
|
-
children: /* @__PURE__ */ jsx(AgentMetadataWorkflowList, { workflows
|
|
14409
|
+
children: /* @__PURE__ */ jsx(AgentMetadataWorkflowList, { workflows })
|
|
14399
14410
|
}
|
|
14400
14411
|
),
|
|
14401
|
-
/* @__PURE__ */ jsx(AgentMetadataSection, { title: "Scorers", children: /* @__PURE__ */ jsx(AgentMetadataScorerList, { entityId: agent.name, entityType: "AGENT"
|
|
14412
|
+
/* @__PURE__ */ jsx(AgentMetadataSection, { title: "Scorers", children: /* @__PURE__ */ jsx(AgentMetadataScorerList, { entityId: agent.name, entityType: "AGENT" }) }),
|
|
14402
14413
|
/* @__PURE__ */ jsx(AgentMetadataSection, { title: "System Prompt", children: promptSlot })
|
|
14403
14414
|
] });
|
|
14404
14415
|
};
|
|
14405
|
-
const AgentMetadataToolList = ({ tools,
|
|
14406
|
-
const { Link } = useLinkComponent();
|
|
14416
|
+
const AgentMetadataToolList = ({ tools, agentId }) => {
|
|
14417
|
+
const { Link, paths } = useLinkComponent();
|
|
14407
14418
|
if (tools.length === 0) {
|
|
14408
14419
|
return /* @__PURE__ */ jsx(AgentMetadataListEmpty, { children: "No tools" });
|
|
14409
14420
|
}
|
|
14410
|
-
return /* @__PURE__ */ jsx(AgentMetadataList, { children: tools.map((tool) => /* @__PURE__ */ jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsx(Link, { href:
|
|
14421
|
+
return /* @__PURE__ */ jsx(AgentMetadataList, { children: tools.map((tool) => /* @__PURE__ */ jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsx(Link, { href: paths.agentToolLink(agentId, tool.id), children: /* @__PURE__ */ jsx(Badge$1, { icon: /* @__PURE__ */ jsx(ToolsIcon, { className: "text-[#ECB047]" }), children: tool.id }) }) }, tool.id)) });
|
|
14411
14422
|
};
|
|
14412
|
-
const AgentMetadataWorkflowList = ({ workflows
|
|
14413
|
-
const { Link } = useLinkComponent();
|
|
14423
|
+
const AgentMetadataWorkflowList = ({ workflows }) => {
|
|
14424
|
+
const { Link, paths } = useLinkComponent();
|
|
14414
14425
|
if (workflows.length === 0) {
|
|
14415
14426
|
return /* @__PURE__ */ jsx(AgentMetadataListEmpty, { children: "No workflows" });
|
|
14416
14427
|
}
|
|
14417
|
-
return /* @__PURE__ */ jsx(AgentMetadataList, { children: workflows.map((workflow) => /* @__PURE__ */ jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsx(Link, { href:
|
|
14428
|
+
return /* @__PURE__ */ jsx(AgentMetadataList, { children: workflows.map((workflow) => /* @__PURE__ */ jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsx(Link, { href: paths.workflowLink(workflow.id), children: /* @__PURE__ */ jsx(Badge$1, { icon: /* @__PURE__ */ jsx(WorkflowIcon, { className: "text-accent3" }), children: workflow.name }) }) }, workflow.id)) });
|
|
14418
14429
|
};
|
|
14419
|
-
const AgentMetadataScorerList = ({ entityId, entityType
|
|
14420
|
-
const { Link } = useLinkComponent();
|
|
14430
|
+
const AgentMetadataScorerList = ({ entityId, entityType }) => {
|
|
14431
|
+
const { Link, paths } = useLinkComponent();
|
|
14421
14432
|
const { scorers, isLoading } = useScorers();
|
|
14422
14433
|
const scorerList = Object.keys(scorers).filter((scorerKey) => {
|
|
14423
14434
|
const scorer = scorers[scorerKey];
|
|
@@ -14432,7 +14443,7 @@ const AgentMetadataScorerList = ({ entityId, entityType, computeScorerLink }) =>
|
|
|
14432
14443
|
if (scorerList.length === 0) {
|
|
14433
14444
|
return /* @__PURE__ */ jsx(AgentMetadataListEmpty, { children: "No Scorers" });
|
|
14434
14445
|
}
|
|
14435
|
-
return /* @__PURE__ */ jsx(AgentMetadataList, { children: scorerList.map((scorer) => /* @__PURE__ */ jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsx(Link, { href:
|
|
14446
|
+
return /* @__PURE__ */ jsx(AgentMetadataList, { children: scorerList.map((scorer) => /* @__PURE__ */ jsx(AgentMetadataListItem, { children: /* @__PURE__ */ jsx(Link, { href: paths.scorerLink(scorer.id), children: /* @__PURE__ */ jsx(Badge$1, { icon: /* @__PURE__ */ jsx(GaugeIcon, { className: "text-icon3" }), children: scorer.scorer.config.name }) }) }, scorer.id)) });
|
|
14436
14447
|
};
|
|
14437
14448
|
|
|
14438
14449
|
const AgentMetadataPrompt = ({ prompt }) => {
|
|
@@ -14565,31 +14576,26 @@ AlertDialog.Description = AlertDialogDescription;
|
|
|
14565
14576
|
AlertDialog.Action = AlertDialogAction;
|
|
14566
14577
|
AlertDialog.Cancel = AlertDialogCancel;
|
|
14567
14578
|
|
|
14568
|
-
const ChatThreads = ({
|
|
14569
|
-
|
|
14570
|
-
computeThreadLink,
|
|
14571
|
-
threads,
|
|
14572
|
-
isLoading,
|
|
14573
|
-
threadId,
|
|
14574
|
-
onDelete
|
|
14575
|
-
}) => {
|
|
14576
|
-
const { Link } = useLinkComponent();
|
|
14579
|
+
const ChatThreads = ({ threads, isLoading, threadId, onDelete, resourceId, resourceType }) => {
|
|
14580
|
+
const { Link, paths } = useLinkComponent();
|
|
14577
14581
|
const [deleteId, setDeleteId] = useState(null);
|
|
14578
14582
|
if (isLoading) {
|
|
14579
14583
|
return /* @__PURE__ */ jsx(ChatThreadSkeleton, {});
|
|
14580
14584
|
}
|
|
14581
14585
|
const reverseThreads = [...threads].reverse();
|
|
14586
|
+
const newThreadLink = resourceType === "agent" ? paths.agentNewThreadLink(resourceId) : paths.networkNewThreadLink(resourceId);
|
|
14582
14587
|
return /* @__PURE__ */ jsxs("div", { className: "overflow-y-auto h-full w-full", children: [
|
|
14583
14588
|
/* @__PURE__ */ jsx(Threads, { children: /* @__PURE__ */ jsxs(ThreadList, { children: [
|
|
14584
|
-
/* @__PURE__ */ jsx(ThreadItem, { children: /* @__PURE__ */ jsx(ThreadLink, { as: Link, to:
|
|
14589
|
+
/* @__PURE__ */ jsx(ThreadItem, { children: /* @__PURE__ */ jsx(ThreadLink, { as: Link, to: newThreadLink, children: /* @__PURE__ */ jsxs("span", { className: "text-accent1 flex items-center gap-4", children: [
|
|
14585
14590
|
/* @__PURE__ */ jsx(Icon, { className: "bg-surface4 rounded-lg", size: "lg", children: /* @__PURE__ */ jsx(Plus, {}) }),
|
|
14586
14591
|
"New Chat"
|
|
14587
14592
|
] }) }) }),
|
|
14588
14593
|
reverseThreads.length === 0 && /* @__PURE__ */ 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!" }),
|
|
14589
14594
|
reverseThreads.map((thread) => {
|
|
14590
14595
|
const isActive = thread.id === threadId;
|
|
14596
|
+
const threadLink = resourceType === "agent" ? paths.agentThreadLink(resourceId, thread.id) : paths.networkThreadLink(resourceId, thread.id);
|
|
14591
14597
|
return /* @__PURE__ */ jsxs(ThreadItem, { isActive, children: [
|
|
14592
|
-
/* @__PURE__ */ jsxs(ThreadLink, { as: Link, to:
|
|
14598
|
+
/* @__PURE__ */ jsxs(ThreadLink, { as: Link, to: threadLink, children: [
|
|
14593
14599
|
/* @__PURE__ */ jsx(ThreadTitle, { title: thread.title }),
|
|
14594
14600
|
/* @__PURE__ */ jsx("span", { children: formatDay(thread.createdAt) })
|
|
14595
14601
|
] }),
|
|
@@ -15639,8 +15645,8 @@ const columns = [
|
|
|
15639
15645
|
}
|
|
15640
15646
|
];
|
|
15641
15647
|
|
|
15642
|
-
const NetworkTable = ({ networks, isLoading
|
|
15643
|
-
const { navigate } = useLinkComponent();
|
|
15648
|
+
const NetworkTable = ({ networks, isLoading }) => {
|
|
15649
|
+
const { navigate, paths } = useLinkComponent();
|
|
15644
15650
|
const allNetworks = useMemo(
|
|
15645
15651
|
() => [
|
|
15646
15652
|
...networks?.map((network) => ({
|
|
@@ -15666,7 +15672,7 @@ const NetworkTable = ({ networks, isLoading, computeLink }) => {
|
|
|
15666
15672
|
}
|
|
15667
15673
|
return /* @__PURE__ */ jsx(ScrollableContainer, { children: /* @__PURE__ */ jsxs(Table$1, { children: [
|
|
15668
15674
|
/* @__PURE__ */ jsx(Thead, { className: "sticky top-0", children: ths.headers.map((header) => /* @__PURE__ */ jsx(Th, { style: { width: header.index === 0 ? "auto" : header.column.getSize() }, children: flexRender(header.column.columnDef.header, header.getContext()) }, header.id)) }),
|
|
15669
|
-
/* @__PURE__ */ jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsx(Row, { onClick: () => navigate(
|
|
15675
|
+
/* @__PURE__ */ jsx(Tbody, { children: rows.map((row) => /* @__PURE__ */ jsx(Row, { onClick: () => navigate(paths.networkLink(row.original.id)), className: "cursor-pointer", children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx(React__default.Fragment, { children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id)) }, row.id)) })
|
|
15670
15676
|
] }) });
|
|
15671
15677
|
};
|
|
15672
15678
|
const NetworkTableEmpty = () => {
|
|
@@ -15807,17 +15813,13 @@ const EntityContent = ({ children, className }) => {
|
|
|
15807
15813
|
return /* @__PURE__ */ jsx("div", { className, children });
|
|
15808
15814
|
};
|
|
15809
15815
|
|
|
15810
|
-
const ToolList = ({ tools, agents, isLoading
|
|
15816
|
+
const ToolList = ({ tools, agents, isLoading }) => {
|
|
15811
15817
|
const toolsWithAgents = useMemo(() => prepareAgents(tools, agents), [tools, agents]);
|
|
15812
15818
|
if (isLoading)
|
|
15813
15819
|
return /* @__PURE__ */ jsx("div", { className: "max-w-5xl w-full mx-auto px-4 pt-8", children: /* @__PURE__ */ jsx(ToolListSkeleton, {}) });
|
|
15814
|
-
return /* @__PURE__ */ jsx(ToolListInner, { toolsWithAgents
|
|
15820
|
+
return /* @__PURE__ */ jsx(ToolListInner, { toolsWithAgents });
|
|
15815
15821
|
};
|
|
15816
|
-
const ToolListInner = ({
|
|
15817
|
-
toolsWithAgents,
|
|
15818
|
-
computeLink,
|
|
15819
|
-
computeAgentLink
|
|
15820
|
-
}) => {
|
|
15822
|
+
const ToolListInner = ({ toolsWithAgents }) => {
|
|
15821
15823
|
const [filteredTools, setFilteredTools] = useState(toolsWithAgents);
|
|
15822
15824
|
const [value, setValue] = useState("");
|
|
15823
15825
|
if (filteredTools.length === 0 && !value) return /* @__PURE__ */ jsx(ToolListEmpty, {});
|
|
@@ -15838,22 +15840,22 @@ const ToolListInner = ({
|
|
|
15838
15840
|
/* @__PURE__ */ jsx(Searchbar, { onSearch: handleSearch, label: "Search for a tool", placeholder: "Search for a tool" }),
|
|
15839
15841
|
filteredTools.length === 0 && /* @__PURE__ */ jsx(Txt, { as: "p", className: "text-icon3 py-2", children: "No tools found matching your search." })
|
|
15840
15842
|
] }),
|
|
15841
|
-
/* @__PURE__ */ 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__ */ jsx(ToolEntity, { tool
|
|
15843
|
+
/* @__PURE__ */ 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__ */ jsx(ToolEntity, { tool }, tool.id)) })
|
|
15842
15844
|
] });
|
|
15843
15845
|
};
|
|
15844
|
-
const ToolEntity = ({ tool
|
|
15846
|
+
const ToolEntity = ({ tool }) => {
|
|
15845
15847
|
const linkRef = useRef(null);
|
|
15846
|
-
const { Link } = useLinkComponent();
|
|
15848
|
+
const { Link, paths } = useLinkComponent();
|
|
15847
15849
|
return /* @__PURE__ */ jsxs(Entity, { onClick: () => linkRef.current?.click(), children: [
|
|
15848
15850
|
/* @__PURE__ */ jsx(EntityIcon, { children: /* @__PURE__ */ jsx(ToolsIcon, { className: "group-hover/entity:text-[#ECB047]" }) }),
|
|
15849
15851
|
/* @__PURE__ */ jsxs(EntityContent, { children: [
|
|
15850
|
-
/* @__PURE__ */ jsx(EntityName, { children: /* @__PURE__ */ jsx(Link, { ref: linkRef, href:
|
|
15852
|
+
/* @__PURE__ */ jsx(EntityName, { children: /* @__PURE__ */ jsx(Link, { ref: linkRef, href: paths.toolLink(tool.id), children: tool.id }) }),
|
|
15851
15853
|
/* @__PURE__ */ jsx(EntityDescription, { children: tool.description }),
|
|
15852
15854
|
/* @__PURE__ */ jsx("div", { className: "inline-flex flex-wrap gap-2 pt-4", children: tool.agents.map((agent) => {
|
|
15853
15855
|
return /* @__PURE__ */ jsx(
|
|
15854
15856
|
Link,
|
|
15855
15857
|
{
|
|
15856
|
-
href:
|
|
15858
|
+
href: paths.agentToolLink(agent.id, tool.id),
|
|
15857
15859
|
onClick: (e) => e.stopPropagation(),
|
|
15858
15860
|
className: "group/link",
|
|
15859
15861
|
children: /* @__PURE__ */ jsx(Badge$1, { icon: /* @__PURE__ */ jsx(AgentIcon, { className: "group-hover/link:text-accent3" }), className: "bg-surface5 ", children: agent.name })
|
|
@@ -17835,14 +17837,15 @@ function TraceSpanUsage({ traceUsage, traceSpans = [], spanUsage, className }) {
|
|
|
17835
17837
|
);
|
|
17836
17838
|
}
|
|
17837
17839
|
|
|
17838
|
-
function
|
|
17840
|
+
function useTraceInfo(trace) {
|
|
17841
|
+
const { paths } = useLinkComponent();
|
|
17839
17842
|
if (!trace) {
|
|
17840
17843
|
return [];
|
|
17841
17844
|
}
|
|
17842
|
-
const agentsLink =
|
|
17843
|
-
const workflowsLink =
|
|
17844
|
-
const agentLink =
|
|
17845
|
-
const workflowLink =
|
|
17845
|
+
const agentsLink = paths.agentsLink();
|
|
17846
|
+
const workflowsLink = paths.workflowsLink();
|
|
17847
|
+
const agentLink = paths.agentLink(trace?.metadata?.resourceId);
|
|
17848
|
+
const workflowLink = paths.workflowLink(trace?.metadata?.resourceId);
|
|
17846
17849
|
return [
|
|
17847
17850
|
{
|
|
17848
17851
|
key: "entityId",
|
|
@@ -17991,15 +17994,14 @@ function TraceDialog({
|
|
|
17991
17994
|
onClose,
|
|
17992
17995
|
onNext,
|
|
17993
17996
|
onPrevious,
|
|
17994
|
-
isLoadingSpans
|
|
17995
|
-
computeAgentsLink,
|
|
17996
|
-
computeWorkflowsLink
|
|
17997
|
+
isLoadingSpans
|
|
17997
17998
|
}) {
|
|
17998
17999
|
const { Link } = useLinkComponent();
|
|
17999
18000
|
const [dialogIsOpen, setDialogIsOpen] = useState(false);
|
|
18000
18001
|
const [selectedSpanId, setSelectedSpanId] = useState(void 0);
|
|
18001
18002
|
const [combinedView, setCombinedView] = useState(false);
|
|
18002
18003
|
const selectedSpan = traceSpans.find((span) => span.spanId === selectedSpanId);
|
|
18004
|
+
const traceInfo = useTraceInfo(traceDetails);
|
|
18003
18005
|
const hierarchicalSpans = useMemo(() => {
|
|
18004
18006
|
return formatHierarchicalSpans(traceSpans);
|
|
18005
18007
|
}, [traceSpans]);
|
|
@@ -18043,7 +18045,6 @@ function TraceDialog({
|
|
|
18043
18045
|
const currentIndex = flatSpans.findIndex((span) => span.id === selectedSpanId);
|
|
18044
18046
|
return currentIndex > 0;
|
|
18045
18047
|
};
|
|
18046
|
-
const traceInfo = getTraceInfo(traceDetails, computeAgentsLink, computeWorkflowsLink);
|
|
18047
18048
|
const selectedSpanInfo = getSpanInfo({ span: selectedSpan, withTraceId: !combinedView, withSpanId: combinedView });
|
|
18048
18049
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
18049
18050
|
/* @__PURE__ */ jsxs(
|
|
@@ -18266,7 +18267,7 @@ function MainContentContent({
|
|
|
18266
18267
|
"items-start content-start": !isCentered && !isDivided && !hasLeftServiceColumn,
|
|
18267
18268
|
"grid place-items-center": isCentered,
|
|
18268
18269
|
"grid-cols-[1fr_1fr]": isDivided && !hasLeftServiceColumn,
|
|
18269
|
-
"grid-cols-[
|
|
18270
|
+
"grid-cols-[12rem_1fr_1fr]": isDivided && hasLeftServiceColumn,
|
|
18270
18271
|
"grid-cols-[auto_1fr]": !isDivided && hasLeftServiceColumn
|
|
18271
18272
|
},
|
|
18272
18273
|
className
|