@mastra/playground-ui 6.7.2-alpha.0 → 6.7.2-alpha.1
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 +11 -0
- package/dist/index.cjs.js +1903 -746
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +1906 -750
- package/dist/index.es.js.map +1 -1
- package/dist/src/domains/agents/components/agent-information/agent-information.d.ts +5 -0
- package/dist/src/domains/agents/components/agent-information/agent-instructions-enhancer.d.ts +5 -0
- package/dist/src/domains/agents/components/agent-information/agent-memory-config.d.ts +5 -0
- package/dist/src/domains/agents/components/agent-information/agent-memory.d.ts +6 -0
- package/dist/src/domains/agents/components/agent-information/agent-working-memory.d.ts +5 -0
- package/dist/src/domains/agents/components/agent-information/code-display.d.ts +10 -0
- package/dist/src/domains/agents/components/agent-information/current-instructions.d.ts +15 -0
- package/dist/src/domains/agents/components/agent-information/version-actions.d.ts +8 -0
- package/dist/src/domains/agents/components/agent-information/version-history-dialog.d.ts +9 -0
- package/dist/src/domains/agents/components/agent-information/version-history.d.ts +10 -0
- package/dist/src/domains/agents/components/agent-information/version-item.d.ts +14 -0
- package/dist/src/domains/agents/hooks/use-prompt-enhancer.d.ts +19 -0
- package/dist/src/domains/agents/hooks/use-prompt-versions.d.ts +12 -0
- package/dist/src/domains/agents/index.d.ts +1 -0
- package/dist/src/lib/framework.d.ts +1 -1
- package/package.json +6 -6
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface CodeDisplayProps {
|
|
2
|
+
content: string;
|
|
3
|
+
height?: string;
|
|
4
|
+
isCopied?: boolean;
|
|
5
|
+
isDraft?: boolean;
|
|
6
|
+
onCopy?: () => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function CodeDisplay({ content, height, isCopied, isDraft, onCopy, className, }: CodeDisplayProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AgentInstructions } from '@mastra/core/agent';
|
|
2
|
+
interface CurrentInstructionsProps {
|
|
3
|
+
instructions?: AgentInstructions;
|
|
4
|
+
enhancedPrompt: string;
|
|
5
|
+
isEnhancing: boolean;
|
|
6
|
+
userComment: string;
|
|
7
|
+
onEnhance: () => void;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
onSave: () => void;
|
|
10
|
+
onCommentChange: (comment: string) => void;
|
|
11
|
+
agentId: string;
|
|
12
|
+
onShowHistory: () => void;
|
|
13
|
+
}
|
|
14
|
+
export declare function CurrentInstructions({ instructions, enhancedPrompt, isEnhancing, userComment, onEnhance, onCancel, onSave, onCommentChange, onShowHistory, }: CurrentInstructionsProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface VersionActionsProps {
|
|
2
|
+
version: any;
|
|
3
|
+
index: number;
|
|
4
|
+
isUpdating: boolean;
|
|
5
|
+
onSetActive: (version: any, index: number) => Promise<void>;
|
|
6
|
+
onDelete: (index: number) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function VersionActions({ version, index, isUpdating, onSetActive, onDelete }: VersionActionsProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface VersionHistoryDialogProps {
|
|
2
|
+
versions: any[];
|
|
3
|
+
onDelete: (index: number) => void;
|
|
4
|
+
open: boolean;
|
|
5
|
+
onOpenChange: (open: boolean) => void;
|
|
6
|
+
onSetActive: (version: any, index: number) => Promise<void>;
|
|
7
|
+
isUpdating: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const VersionHistoryDialog: ({ open, onOpenChange, onDelete, onSetActive, versions, isUpdating, }: VersionHistoryDialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface VersionHistoryProps {
|
|
2
|
+
versions: any[];
|
|
3
|
+
isUpdating: boolean;
|
|
4
|
+
copiedVersions: Record<string | number, boolean>;
|
|
5
|
+
onCopy: (content: string, key: string | number) => Promise<void>;
|
|
6
|
+
onSetActive: (version: any, index: number) => Promise<void>;
|
|
7
|
+
onDelete: (index: number) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function VersionHistory({ versions, isUpdating, copiedVersions, onCopy, onSetActive, onDelete, }: VersionHistoryProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface VersionItemProps {
|
|
2
|
+
version: any;
|
|
3
|
+
index: number;
|
|
4
|
+
isExpanded: boolean;
|
|
5
|
+
isUpdating: boolean;
|
|
6
|
+
copiedVersions: Record<string | number, boolean>;
|
|
7
|
+
onToggleExpand: () => void;
|
|
8
|
+
onToggleAnalysis: () => void;
|
|
9
|
+
onCopy: (content: string, key: string | number) => Promise<void>;
|
|
10
|
+
onSetActive: (version: any, index: number) => Promise<void>;
|
|
11
|
+
onDelete: (index: number) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function VersionItem({ version, index, isExpanded, isUpdating, onToggleExpand, onToggleAnalysis, onSetActive, onDelete, }: VersionItemProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
interface UsePromptEnhancerProps {
|
|
2
|
+
agentId: string;
|
|
3
|
+
instructions?: string;
|
|
4
|
+
versions: any[];
|
|
5
|
+
onVersionCreate: (version: any) => void;
|
|
6
|
+
onVersionUpdate: (index: number, updates: Partial<any>) => void;
|
|
7
|
+
}
|
|
8
|
+
interface UsePromptEnhancerResult {
|
|
9
|
+
enhancedPrompt: string;
|
|
10
|
+
explanation: string;
|
|
11
|
+
isEnhancing: boolean;
|
|
12
|
+
userComment: string;
|
|
13
|
+
enhancePrompt: () => Promise<void>;
|
|
14
|
+
setUserComment: (comment: string) => void;
|
|
15
|
+
clearEnhancement: () => void;
|
|
16
|
+
applyChanges: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function usePromptEnhancer({ agentId, instructions, versions, onVersionCreate, onVersionUpdate, }: UsePromptEnhancerProps): UsePromptEnhancerResult;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare function usePromptVersions(agentId: string, instructions?: string): {
|
|
2
|
+
versions: any[];
|
|
3
|
+
copiedVersions: Record<number, boolean>;
|
|
4
|
+
isUpdating: boolean;
|
|
5
|
+
versionToDelete: number | null;
|
|
6
|
+
setVersions: import('../../../../node_modules/@types/react').Dispatch<import('../../../../node_modules/@types/react').SetStateAction<any[]>>;
|
|
7
|
+
setVersionToDelete: import('../../../../node_modules/@types/react').Dispatch<import('../../../../node_modules/@types/react').SetStateAction<number | null>>;
|
|
8
|
+
copyToClipboard: (text: string, versionIndex: number) => Promise<() => void>;
|
|
9
|
+
setVersionActive: (version: any, index: number) => Promise<void>;
|
|
10
|
+
deleteVersion: (index: number) => void;
|
|
11
|
+
updateVersion: (index: number, updates: Partial<any>) => Promise<void>;
|
|
12
|
+
};
|
|
@@ -5,7 +5,7 @@ type LinkComponentPaths = {
|
|
|
5
5
|
agentLink: (agentId: string) => string;
|
|
6
6
|
agentsLink: () => string;
|
|
7
7
|
agentToolLink: (agentId: string, toolId: string) => string;
|
|
8
|
-
agentThreadLink: (agentId: string, threadId: string) => string;
|
|
8
|
+
agentThreadLink: (agentId: string, threadId: string, messageId?: string) => string;
|
|
9
9
|
agentNewThreadLink: (agentId: string) => string;
|
|
10
10
|
workflowsLink: () => string;
|
|
11
11
|
workflowLink: (workflowId: string) => string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/playground-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.7.2-alpha.
|
|
4
|
+
"version": "6.7.2-alpha.1",
|
|
5
5
|
"description": "Mastra Playground components",
|
|
6
6
|
"main": "dist/index.umd.js",
|
|
7
7
|
"module": "dist/index.es.js",
|
|
@@ -107,8 +107,8 @@
|
|
|
107
107
|
"react-dom": ">=19.0.0",
|
|
108
108
|
"tailwindcss": "^3.0.0",
|
|
109
109
|
"@tanstack/react-query": "^5.81.5",
|
|
110
|
-
"@mastra/client-js": "^0.16.7-alpha.
|
|
111
|
-
"@mastra/react": "0.0.13-alpha.
|
|
110
|
+
"@mastra/client-js": "^0.16.7-alpha.1",
|
|
111
|
+
"@mastra/react": "0.0.13-alpha.1"
|
|
112
112
|
},
|
|
113
113
|
"devDependencies": {
|
|
114
114
|
"@storybook/addon-docs": "^9.1.10",
|
|
@@ -131,9 +131,9 @@
|
|
|
131
131
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
132
132
|
"vitest": "^3.2.4",
|
|
133
133
|
"@tanstack/react-query": "^5.81.5",
|
|
134
|
-
"@mastra/client-js": "^0.16.7-alpha.
|
|
135
|
-
"@mastra/
|
|
136
|
-
"@mastra/
|
|
134
|
+
"@mastra/client-js": "^0.16.7-alpha.1",
|
|
135
|
+
"@mastra/core": "0.23.2-alpha.1",
|
|
136
|
+
"@mastra/react": "0.0.13-alpha.1"
|
|
137
137
|
},
|
|
138
138
|
"homepage": "https://mastra.ai",
|
|
139
139
|
"repository": {
|