@mastra/playground-ui 5.1.8 → 5.1.9
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/{colors-CBG_Mm7P.js → colors-BauMYA7t.js} +3 -2
- package/dist/colors-BauMYA7t.js.map +1 -0
- package/dist/{colors-Du4i-E0i.cjs → colors-BjoU9dWU.cjs} +3 -2
- package/dist/colors-BjoU9dWU.cjs.map +1 -0
- package/dist/index.cjs.js +826 -298
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +818 -296
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/ui/entry.d.ts +7 -0
- package/dist/src/components/ui/radio-group.d.ts +5 -0
- package/dist/src/domains/agents/components/agent-advanced-settings.d.ts +1 -0
- package/dist/src/domains/agents/components/agent-model-settings.d.ts +1 -0
- package/dist/src/domains/agents/context/agent-context.d.ts +18 -0
- package/dist/src/domains/agents/hooks/use-agent-model-settings-state.d.ts +15 -0
- package/dist/src/domains/agents/index.d.ts +5 -4
- package/dist/src/domains/workflows/context/use-current-run.d.ts +2 -1
- package/dist/src/domains/workflows/context/workflow-nested-graph-context.d.ts +5 -1
- package/dist/src/domains/workflows/context/workflow-run-context.d.ts +3 -2
- package/dist/src/domains/workflows/utils.d.ts +2 -2
- package/dist/src/domains/workflows/workflow/workflow-default-node.d.ts +3 -1
- package/dist/src/domains/workflows/workflow/workflow-nested-graph.d.ts +5 -1
- package/dist/src/domains/workflows/workflow/workflow-nested-node.d.ts +7 -2
- package/dist/src/domains/workflows/workflow/workflow-status.d.ts +2 -1
- package/dist/src/domains/workflows/workflow/workflow-step-action-bar.d.ts +3 -1
- package/dist/src/domains/workflows/workflow/workflow-trigger.d.ts +12 -10
- package/dist/src/ds/tokens/colors.d.ts +1 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/types.d.ts +17 -0
- package/dist/tokens.cjs.js +1 -1
- package/dist/tokens.es.js +1 -1
- package/package.json +6 -5
- package/dist/colors-CBG_Mm7P.js.map +0 -1
- package/dist/colors-Du4i-E0i.cjs.map +0 -1
- package/dist/src/domains/agents/agent/context/agent-context.d.ts +0 -19
- package/dist/src/store/agent-store.d.ts +0 -20
- /package/dist/src/domains/agents/{agent → components}/agent-chat.d.ts +0 -0
- /package/dist/src/domains/agents/{agent → components}/agent-evals.d.ts +0 -0
- /package/dist/src/domains/agents/{agent → components}/agent-traces.d.ts +0 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const RadioGroupItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export { RadioGroup, RadioGroupItem };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const AgentAdvancedSettings: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function AgentModelSettings(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ReactNode } from '../../../../node_modules/@types/react';
|
|
2
|
+
import { ModelSettings } from '../../../types';
|
|
3
|
+
|
|
4
|
+
type AgentContextType = {
|
|
5
|
+
modelSettings: ModelSettings;
|
|
6
|
+
chatWithGenerate: boolean;
|
|
7
|
+
setModelSettings: (modelSettings: ModelSettings) => void;
|
|
8
|
+
resetModelSettings: () => void;
|
|
9
|
+
setChatWithGenerate: (chatWithGenerate: boolean) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const AgentSettingsContext: import('../../../../node_modules/@types/react').Context<AgentContextType>;
|
|
12
|
+
export interface AgentSettingsProviderProps {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
agentId: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function AgentSettingsProvider({ children, agentId }: AgentSettingsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export declare const useAgentSettings: () => AgentContextType;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ModelSettings } from '../../../types';
|
|
2
|
+
|
|
3
|
+
export interface AgentModelSettingsStateProps {
|
|
4
|
+
initialModelSettings?: ModelSettings;
|
|
5
|
+
initialChatWithGenerate?: boolean;
|
|
6
|
+
agentId: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const defaultModelSettings: ModelSettings;
|
|
9
|
+
export declare function useAgentModelSettingsState({ agentId }: AgentModelSettingsStateProps): {
|
|
10
|
+
modelSettings: ModelSettings | undefined;
|
|
11
|
+
chatWithGenerate: boolean;
|
|
12
|
+
setModelSettings: (modelSettingsValue: ModelSettings) => void;
|
|
13
|
+
setChatWithGenerate: (chatWithGenerateValue: boolean) => void;
|
|
14
|
+
resetAll: () => void;
|
|
15
|
+
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
export * from './
|
|
2
|
-
export * from './
|
|
3
|
-
export * from './
|
|
4
|
-
export * from './
|
|
1
|
+
export * from './components/agent-chat';
|
|
2
|
+
export * from './components/agent-evals';
|
|
3
|
+
export * from './components/agent-traces';
|
|
4
|
+
export * from './context/agent-context';
|
|
5
|
+
export * from './components/agent-model-settings';
|
|
@@ -2,9 +2,10 @@ export type Step = {
|
|
|
2
2
|
error?: any;
|
|
3
3
|
startedAt: number;
|
|
4
4
|
endedAt?: number;
|
|
5
|
-
status: 'running' | 'success' | 'failed' | 'suspended';
|
|
5
|
+
status: 'running' | 'success' | 'failed' | 'suspended' | 'waiting';
|
|
6
6
|
output?: any;
|
|
7
7
|
input?: any;
|
|
8
|
+
resumeData?: any;
|
|
8
9
|
};
|
|
9
10
|
type UseCurrentRunReturnType = {
|
|
10
11
|
steps: Record<string, Step>;
|
|
@@ -9,7 +9,11 @@ type WorkflowNestedGraphContextType = {
|
|
|
9
9
|
closeNestedGraph: () => void;
|
|
10
10
|
};
|
|
11
11
|
export declare const WorkflowNestedGraphContext: import('../../../../node_modules/@types/react').Context<WorkflowNestedGraphContextType>;
|
|
12
|
-
export declare function WorkflowNestedGraphProvider({ children }: {
|
|
12
|
+
export declare function WorkflowNestedGraphProvider({ children, onShowTrace, }: {
|
|
13
13
|
children: React.ReactNode;
|
|
14
|
+
onShowTrace?: ({ runId, stepName }: {
|
|
15
|
+
runId: string;
|
|
16
|
+
stepName: string;
|
|
17
|
+
}) => void;
|
|
14
18
|
}): import("react/jsx-runtime").JSX.Element;
|
|
15
19
|
export {};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ExtendedLegacyWorkflowRunResult
|
|
1
|
+
import { ExtendedLegacyWorkflowRunResult } from '../../../hooks/use-workflows';
|
|
2
2
|
import { WorkflowRunState } from '@mastra/core';
|
|
3
|
+
import { WorkflowWatchResult } from '@mastra/client-js';
|
|
3
4
|
|
|
4
5
|
type WorkflowRunContextType = {
|
|
5
6
|
legacyResult: ExtendedLegacyWorkflowRunResult | null;
|
|
6
7
|
setLegacyResult: React.Dispatch<React.SetStateAction<any>>;
|
|
7
|
-
result:
|
|
8
|
+
result: WorkflowWatchResult | null;
|
|
8
9
|
setResult: React.Dispatch<React.SetStateAction<any>>;
|
|
9
10
|
payload: any;
|
|
10
11
|
setPayload: React.Dispatch<React.SetStateAction<any>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { WorkflowRunState } from '@mastra/core/workflows';
|
|
2
|
-
import {
|
|
2
|
+
import { WorkflowWatchResult } from '@mastra/client-js';
|
|
3
3
|
|
|
4
|
-
export declare function convertWorkflowRunStateToWatchResult(runState: WorkflowRunState):
|
|
4
|
+
export declare function convertWorkflowRunStateToWatchResult(runState: WorkflowRunState): WorkflowWatchResult;
|
|
@@ -6,9 +6,11 @@ export type DefaultNode = Node<{
|
|
|
6
6
|
withoutTopHandle?: boolean;
|
|
7
7
|
withoutBottomHandle?: boolean;
|
|
8
8
|
mapConfig?: string;
|
|
9
|
+
event?: string;
|
|
10
|
+
duration?: number;
|
|
11
|
+
date?: Date;
|
|
9
12
|
}, 'default-node'>;
|
|
10
13
|
export interface WorkflowDefaultNodeProps {
|
|
11
|
-
data: DefaultNode['data'];
|
|
12
14
|
onShowTrace?: ({ runId, stepName }: {
|
|
13
15
|
runId: string;
|
|
14
16
|
stepName: string;
|
|
@@ -4,5 +4,9 @@ export interface WorkflowNestedGraphProps {
|
|
|
4
4
|
stepGraph: SerializedStepFlowEntry[];
|
|
5
5
|
open: boolean;
|
|
6
6
|
workflowName: string;
|
|
7
|
+
onShowTrace?: ({ runId, stepName }: {
|
|
8
|
+
runId: string;
|
|
9
|
+
stepName: string;
|
|
10
|
+
}) => void;
|
|
7
11
|
}
|
|
8
|
-
export declare function WorkflowNestedGraph({ stepGraph, open, workflowName }: WorkflowNestedGraphProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function WorkflowNestedGraph({ stepGraph, open, workflowName, onShowTrace }: WorkflowNestedGraphProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -9,6 +9,11 @@ export type NestedNode = Node<{
|
|
|
9
9
|
stepGraph: StepFlowEntry[];
|
|
10
10
|
mapConfig?: string;
|
|
11
11
|
}, 'nested-node'>;
|
|
12
|
-
export
|
|
12
|
+
export interface WorkflowNestedNodeProps {
|
|
13
|
+
onShowTrace?: ({ runId, stepName }: {
|
|
14
|
+
runId: string;
|
|
15
|
+
stepName: string;
|
|
16
|
+
}) => void;
|
|
13
17
|
parentWorkflowName?: string;
|
|
14
|
-
}
|
|
18
|
+
}
|
|
19
|
+
export declare function WorkflowNestedNode({ data, parentWorkflowName, onShowTrace, }: NodeProps<NestedNode> & WorkflowNestedNodeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export interface WorkflowStatusProps {
|
|
2
2
|
stepId: string;
|
|
3
3
|
status: string;
|
|
4
|
+
result: Record<string, unknown>;
|
|
4
5
|
}
|
|
5
|
-
export declare const WorkflowStatus: ({ stepId, status }: WorkflowStatusProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const WorkflowStatus: ({ stepId, status, result }: WorkflowStatusProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
export interface WorkflowStepActionBarProps {
|
|
2
2
|
input?: any;
|
|
3
3
|
output?: any;
|
|
4
|
+
resumeData?: any;
|
|
4
5
|
error?: any;
|
|
5
6
|
stepName: string;
|
|
6
7
|
mapConfig?: string;
|
|
7
8
|
onShowTrace?: () => void;
|
|
9
|
+
onShowNestedGraph?: () => void;
|
|
8
10
|
}
|
|
9
|
-
export declare const WorkflowStepActionBar: ({ input, output, error, mapConfig, stepName, onShowTrace, }: WorkflowStepActionBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const WorkflowStepActionBar: ({ input, output, resumeData, error, mapConfig, stepName, onShowTrace, onShowNestedGraph, }: WorkflowStepActionBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { GetWorkflowResponse } from '@mastra/client-js';
|
|
1
|
+
import { GetWorkflowResponse, WorkflowWatchResult } from '@mastra/client-js';
|
|
3
2
|
|
|
4
3
|
interface WorkflowTriggerProps {
|
|
5
4
|
workflowId: string;
|
|
@@ -12,10 +11,11 @@ interface WorkflowTriggerProps {
|
|
|
12
11
|
}) => Promise<{
|
|
13
12
|
runId: string;
|
|
14
13
|
}>;
|
|
15
|
-
|
|
14
|
+
isStreamingWorkflow: boolean;
|
|
15
|
+
streamWorkflow: ({ workflowId, runId, inputData, runtimeContext, }: {
|
|
16
16
|
workflowId: string;
|
|
17
17
|
runId: string;
|
|
18
|
-
|
|
18
|
+
inputData: Record<string, unknown>;
|
|
19
19
|
runtimeContext: Record<string, unknown>;
|
|
20
20
|
}) => Promise<void>;
|
|
21
21
|
resumeWorkflow: ({ workflowId, step, runId, resumeData, runtimeContext, }: {
|
|
@@ -27,13 +27,15 @@ interface WorkflowTriggerProps {
|
|
|
27
27
|
}) => Promise<{
|
|
28
28
|
message: string;
|
|
29
29
|
}>;
|
|
30
|
-
|
|
30
|
+
streamResult: WorkflowWatchResult | null;
|
|
31
|
+
isResumingWorkflow: boolean;
|
|
32
|
+
isCancellingWorkflowRun: boolean;
|
|
33
|
+
cancelWorkflowRun: ({ workflowId, runId }: {
|
|
31
34
|
workflowId: string;
|
|
32
35
|
runId: string;
|
|
33
|
-
}) => Promise<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
isResumingWorkflow: boolean;
|
|
36
|
+
}) => Promise<{
|
|
37
|
+
message: string;
|
|
38
|
+
}>;
|
|
37
39
|
}
|
|
38
|
-
export declare function WorkflowTrigger({ workflowId, setRunId, workflow, isLoading, createWorkflowRun,
|
|
40
|
+
export declare function WorkflowTrigger({ workflowId, setRunId, workflow, isLoading, createWorkflowRun, resumeWorkflow, streamWorkflow, isStreamingWorkflow, streamResult, isResumingWorkflow, isCancellingWorkflowRun, cancelWorkflowRun, }: WorkflowTriggerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
39
41
|
export {};
|
package/dist/src/index.d.ts
CHANGED
|
@@ -21,5 +21,7 @@ export * from './ds/components/EmptyState/index';
|
|
|
21
21
|
export * from './ds/icons/index';
|
|
22
22
|
export * from './lib/polls';
|
|
23
23
|
export * from './hooks/use-speech-recognition';
|
|
24
|
+
export * from './components/ui/radio-group';
|
|
25
|
+
export * from './components/ui/entry';
|
|
24
26
|
export type { TraceContextType } from './domains/traces/context/trace-context';
|
|
25
27
|
export * from './store/playground-store';
|
package/dist/src/types.d.ts
CHANGED
|
@@ -8,6 +8,23 @@ export interface Message {
|
|
|
8
8
|
text?: string;
|
|
9
9
|
}>;
|
|
10
10
|
}
|
|
11
|
+
export interface AssistantMessage {
|
|
12
|
+
id: string;
|
|
13
|
+
formattedMessageId: string;
|
|
14
|
+
finalStepId: string;
|
|
15
|
+
routingDecision?: {
|
|
16
|
+
resourceId: string;
|
|
17
|
+
resourceType: string;
|
|
18
|
+
selectionReason: string;
|
|
19
|
+
prompt: string;
|
|
20
|
+
};
|
|
21
|
+
finalResponse: string;
|
|
22
|
+
taskCompleteDecision?: {
|
|
23
|
+
isComplete: boolean;
|
|
24
|
+
finalResult: string;
|
|
25
|
+
completionReason: string;
|
|
26
|
+
};
|
|
27
|
+
}
|
|
11
28
|
export interface ModelSettings {
|
|
12
29
|
frequencyPenalty?: number;
|
|
13
30
|
presencePenalty?: number;
|
package/dist/tokens.cjs.js
CHANGED
package/dist/tokens.es.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.1.
|
|
4
|
+
"version": "5.1.9",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -54,6 +54,7 @@
|
|
|
54
54
|
"@radix-ui/react-dialog": "^1.1.14",
|
|
55
55
|
"@radix-ui/react-label": "^2.1.7",
|
|
56
56
|
"@radix-ui/react-popover": "^1.1.14",
|
|
57
|
+
"@radix-ui/react-radio-group": "^1.3.7",
|
|
57
58
|
"@radix-ui/react-scroll-area": "^1.2.9",
|
|
58
59
|
"@radix-ui/react-select": "^2.2.5",
|
|
59
60
|
"@radix-ui/react-slider": "^1.3.5",
|
|
@@ -69,9 +70,9 @@
|
|
|
69
70
|
"@xyflow/react": "^12.6.4",
|
|
70
71
|
"cmdk": "^1.1.1",
|
|
71
72
|
"date-fns": "^4.1.0",
|
|
72
|
-
"prettier": "^3.5.3",
|
|
73
73
|
"json-schema-to-zod": "^2.6.1",
|
|
74
74
|
"motion": "^12.16.0",
|
|
75
|
+
"prettier": "^3.5.3",
|
|
75
76
|
"prism-react-renderer": "^2.4.1",
|
|
76
77
|
"react-code-block": "1.1.3",
|
|
77
78
|
"react-day-picker": "^8.10.1",
|
|
@@ -92,10 +93,10 @@
|
|
|
92
93
|
"use-debounce": "^10.0.5",
|
|
93
94
|
"zod": "^3.25.67",
|
|
94
95
|
"zustand": "^5.0.5",
|
|
95
|
-
"@mastra/client-js": "^0.10.
|
|
96
|
+
"@mastra/client-js": "^0.10.8"
|
|
96
97
|
},
|
|
97
98
|
"peerDependencies": {
|
|
98
|
-
"@mastra/core": "
|
|
99
|
+
"@mastra/core": ">=0.10.9-0 <0.11.0-0",
|
|
99
100
|
"lucide-react": "^0.474.0",
|
|
100
101
|
"react": ">=19.0.0",
|
|
101
102
|
"react-dom": ">=19.0.0",
|
|
@@ -117,7 +118,7 @@
|
|
|
117
118
|
"vite": "^6.3.5",
|
|
118
119
|
"vite-plugin-dts": "^3.9.1",
|
|
119
120
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
120
|
-
"@mastra/core": "0.10.
|
|
121
|
+
"@mastra/core": "0.10.9"
|
|
121
122
|
},
|
|
122
123
|
"scripts": {
|
|
123
124
|
"dev": "vite",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colors-CBG_Mm7P.js","sources":["../src/ds/tokens/colors.ts"],"sourcesContent":["export const Colors = {\n surface1: '#000000',\n surface2: '#0F0F0F',\n surface3: '#141414',\n surface4: '#1A1A1A',\n surface5: 'rgba(46, 46, 46, 0.9)',\n accent1: '#1AFB6F',\n accent2: '#FF4931',\n accent3: '#267AD2',\n accent4: '#9E57B3',\n};\n\nexport const BorderColors = {\n border1: 'rgba(48, 48, 48, 1)',\n border2: 'rgba(66, 66, 66, 1)',\n};\n\nexport const IconColors = {\n icon1: '#5C5C5C',\n icon2: '#707070',\n icon3: '#939393',\n icon4: '#A9A9A9',\n icon5: '#E6E6E6',\n icon6: '#FFFFFF',\n};\n"],"names":[],"mappings":"AAAO,MAAM,MAAA,GAAS;AAAA,EACpB,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,uBAAA;AAAA,EACV,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS;AACX;AAEO,MAAM,YAAA,GAAe;AAAA,EAC1B,OAAA,EAAS,qBAAA;AAAA,EACT,OAAA,EAAS;AACX;AAEO,MAAM,UAAA,GAAa;AAAA,EACxB,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO;AACT;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"colors-Du4i-E0i.cjs","sources":["../src/ds/tokens/colors.ts"],"sourcesContent":["export const Colors = {\n surface1: '#000000',\n surface2: '#0F0F0F',\n surface3: '#141414',\n surface4: '#1A1A1A',\n surface5: 'rgba(46, 46, 46, 0.9)',\n accent1: '#1AFB6F',\n accent2: '#FF4931',\n accent3: '#267AD2',\n accent4: '#9E57B3',\n};\n\nexport const BorderColors = {\n border1: 'rgba(48, 48, 48, 1)',\n border2: 'rgba(66, 66, 66, 1)',\n};\n\nexport const IconColors = {\n icon1: '#5C5C5C',\n icon2: '#707070',\n icon3: '#939393',\n icon4: '#A9A9A9',\n icon5: '#E6E6E6',\n icon6: '#FFFFFF',\n};\n"],"names":[],"mappings":";;AAAO,MAAM,MAAA,GAAS;AAAA,EACpB,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,SAAA;AAAA,EACV,QAAA,EAAU,uBAAA;AAAA,EACV,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS,SAAA;AAAA,EACT,OAAA,EAAS;AACX;AAEO,MAAM,YAAA,GAAe;AAAA,EAC1B,OAAA,EAAS,qBAAA;AAAA,EACT,OAAA,EAAS;AACX;AAEO,MAAM,UAAA,GAAa;AAAA,EACxB,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO,SAAA;AAAA,EACP,KAAA,EAAO;AACT;;;;;;"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from '../../../../../node_modules/@types/react';
|
|
2
|
-
import { ModelSettings } from '../../../../types';
|
|
3
|
-
import { GetAgentResponse } from '@mastra/client-js';
|
|
4
|
-
|
|
5
|
-
type AgentContextType = {
|
|
6
|
-
modelSettings: ModelSettings;
|
|
7
|
-
chatWithGenerate: boolean;
|
|
8
|
-
setModelSettings: (modelSettings: ModelSettings) => void;
|
|
9
|
-
resetModelSettings: () => void;
|
|
10
|
-
setChatWithGenerate: (chatWithGenerate: boolean) => void;
|
|
11
|
-
};
|
|
12
|
-
export declare const AgentContext: import('../../../../../node_modules/@types/react').Context<AgentContextType>;
|
|
13
|
-
export declare function AgentProvider({ agentId, defaultGenerateOptions, defaultStreamOptions, children, }: {
|
|
14
|
-
agentId: string;
|
|
15
|
-
defaultGenerateOptions?: GetAgentResponse['defaultGenerateOptions'];
|
|
16
|
-
defaultStreamOptions?: GetAgentResponse['defaultStreamOptions'];
|
|
17
|
-
children: ReactNode;
|
|
18
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export {};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ModelSettings } from '../types';
|
|
2
|
-
|
|
3
|
-
interface AgentStore {
|
|
4
|
-
modelSettings: Record<string, ModelSettings | null>;
|
|
5
|
-
setModelSettings: (modelSettings: Record<string, ModelSettings | null>) => void;
|
|
6
|
-
chatWithGenerate: Record<string, boolean>;
|
|
7
|
-
setChatWithGenerate: (chatWithGenerate: Record<string, boolean>) => void;
|
|
8
|
-
}
|
|
9
|
-
export declare const useAgentStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<AgentStore>, "persist"> & {
|
|
10
|
-
persist: {
|
|
11
|
-
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<AgentStore, AgentStore>>) => void;
|
|
12
|
-
clearStorage: () => void;
|
|
13
|
-
rehydrate: () => Promise<void> | void;
|
|
14
|
-
hasHydrated: () => boolean;
|
|
15
|
-
onHydrate: (fn: (state: AgentStore) => void) => () => void;
|
|
16
|
-
onFinishHydration: (fn: (state: AgentStore) => void) => () => void;
|
|
17
|
-
getOptions: () => Partial<import('zustand/middleware').PersistOptions<AgentStore, AgentStore>>;
|
|
18
|
-
};
|
|
19
|
-
}>;
|
|
20
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|