@railtownai/railtracks-visualizer 0.0.60 → 0.0.62
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/cjs/index.js +1185 -1639
- package/dist/esm/index.js +1185 -1640
- package/dist/types/components/nodes/AgentNode.d.ts +4 -0
- package/dist/types/components/nodes/InputsOutputsCollapse.d.ts +35 -0
- package/dist/types/components/nodes/NodeDetailsDrawer.d.ts +7 -0
- package/dist/types/components/nodes/index.d.ts +0 -1
- package/dist/types/lib/utils.d.ts +6 -0
- package/package.json +1 -1
- package/dist/types/components/nodes/CodeBlock.d.ts +0 -8
- package/dist/types/components/nodes/ExpandableTextarea.d.ts +0 -9
- package/dist/types/components/nodes/OutputRenderer.d.ts +0 -9
|
@@ -39,6 +39,10 @@ export declare const getNodeIcon: (options?: GetNodeIconOptions) => string | JSX
|
|
|
39
39
|
* @returns The provider label for the model.
|
|
40
40
|
*/
|
|
41
41
|
export declare const getProviderLabel: (modelName?: string, modelProvider?: string) => string;
|
|
42
|
+
/**
|
|
43
|
+
* Display label for a Railtracks model_name slug (frontend copy only; does not alter data).
|
|
44
|
+
*/
|
|
45
|
+
export declare const getModelLabel: (modelName?: string | null) => string;
|
|
42
46
|
export declare const getOverviewLlmDetails: (llmDetails: LLMDetails[]) => LLMDetails | null;
|
|
43
47
|
export declare const sumTotalCost: (llmDetails: LLMDetails[]) => number;
|
|
44
48
|
export declare const sumTotalInputTokens: (llmDetails: LLMDetails[]) => number;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { LLMContent } from "../../dto/AgentRunNode";
|
|
3
|
+
export declare function formatContentAsText(content: any): string;
|
|
4
|
+
export declare function isTabularData(data: any): boolean;
|
|
5
|
+
export declare function formatOutputAsText(output: {
|
|
6
|
+
role: string;
|
|
7
|
+
content: any;
|
|
8
|
+
} | null, toolOutput: any): string;
|
|
9
|
+
export declare function renderContentForDisplay(content: any): string;
|
|
10
|
+
export declare function filterKeysWithName(obj: any): any;
|
|
11
|
+
export interface LLMInputsRendererProps {
|
|
12
|
+
input: LLMContent[];
|
|
13
|
+
modelProvider?: string;
|
|
14
|
+
modelName?: string;
|
|
15
|
+
toolStatusMap?: Map<string, string>;
|
|
16
|
+
}
|
|
17
|
+
export declare const LLMInputsRenderer: React.FC<LLMInputsRendererProps>;
|
|
18
|
+
export interface InputsOutputsCollapseProps {
|
|
19
|
+
inputs: LLMContent[];
|
|
20
|
+
output: {
|
|
21
|
+
role: string;
|
|
22
|
+
content: any;
|
|
23
|
+
} | null;
|
|
24
|
+
toolOutput: any | null;
|
|
25
|
+
modelProvider?: string;
|
|
26
|
+
modelName?: string;
|
|
27
|
+
toolStatusMap?: Map<string, string>;
|
|
28
|
+
/** When true, Inputs panel uses a read-only textarea (Tool node shape in session panel). */
|
|
29
|
+
toolInputAsTextarea?: boolean;
|
|
30
|
+
/** When true, Inputs label uses Typography.Title level 2 (run-level session view). */
|
|
31
|
+
largeInputsTitle?: boolean;
|
|
32
|
+
/** Override whether the Inputs panel has content (e.g. require Agent/Tool node type). */
|
|
33
|
+
hasInputs?: boolean;
|
|
34
|
+
}
|
|
35
|
+
export declare const InputsOutputsCollapse: React.FC<InputsOutputsCollapseProps>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import type { LLMContent } from "../../dto/AgentRunNode";
|
|
2
3
|
interface NodeData {
|
|
3
4
|
label: string;
|
|
4
5
|
nodeType?: "Tool" | "Agent";
|
|
@@ -20,5 +21,11 @@ interface NodeDetailsDrawerProps {
|
|
|
20
21
|
}
|
|
21
22
|
/** Merged tool internals + first edge detail (same shape ToolNode used on-canvas). */
|
|
22
23
|
export declare function buildToolDrawerPayload(nodeData: NodeData): Record<string, unknown> | null;
|
|
24
|
+
/** Tool drawer I/O from first edge detail (aligned with session-details getNodeInputsOutputs for Tool). */
|
|
25
|
+
export declare function buildToolDrawerIo(nodeData: NodeData): {
|
|
26
|
+
inputs: LLMContent[];
|
|
27
|
+
toolOutput: any;
|
|
28
|
+
toolStatusMap: Map<string, string>;
|
|
29
|
+
};
|
|
23
30
|
export declare const NodeDetailsDrawer: React.FC<NodeDetailsDrawerProps>;
|
|
24
31
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type ClassValue } from "clsx";
|
|
2
|
+
import type { AgentRun } from "../dto/AgentRun";
|
|
2
3
|
import { ToolCall } from "../dto/AgentRunNode";
|
|
3
4
|
export declare function cn(...inputs: ClassValue[]): string;
|
|
4
5
|
/**
|
|
@@ -143,6 +144,11 @@ export declare function formatMetricValue(evaluator: EvaluatorMetricInfo | null
|
|
|
143
144
|
* @returns The Ant Design color name for Tag component
|
|
144
145
|
*/
|
|
145
146
|
export declare function getStatusColor(status: string): string;
|
|
147
|
+
/**
|
|
148
|
+
* Last timeline step for a run: max of stamp track (`stamps` / `steps`) and all node/edge stamp steps.
|
|
149
|
+
* Used so the visualizer defaults past step 0 when the graph only appears at later steps.
|
|
150
|
+
*/
|
|
151
|
+
export declare function getDefaultTimelineStepForRun(run: AgentRun): number;
|
|
146
152
|
/**
|
|
147
153
|
* Formats tool calls for display in a code block
|
|
148
154
|
*/
|
package/package.json
CHANGED