@sciol/xyzen 0.2.0 → 0.2.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/dist/components/base/LoadingSpinner.d.ts +2 -1
- package/dist/components/base/Modal.d.ts +2 -1
- package/dist/components/modals/ToolTestModal.d.ts +10 -0
- package/dist/store/slices/index.d.ts +1 -0
- package/dist/store/slices/mcpToolSlice.d.ts +36 -0
- package/dist/store/types.d.ts +4 -3
- package/dist/xyzen.es.js +14974 -14406
- package/dist/xyzen.umd.js +64 -62
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
interface LoadingSpinnerProps {
|
|
2
2
|
size?: "sm" | "md" | "lg";
|
|
3
3
|
className?: string;
|
|
4
|
+
centered?: boolean;
|
|
4
5
|
}
|
|
5
|
-
export declare function LoadingSpinner({ size, className, }: LoadingSpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function LoadingSpinner({ size, className, centered, }: LoadingSpinnerProps): import("react/jsx-runtime").JSX.Element;
|
|
6
7
|
export {};
|
|
@@ -4,6 +4,7 @@ interface ModalProps {
|
|
|
4
4
|
onClose: () => void;
|
|
5
5
|
title: string;
|
|
6
6
|
children: ReactNode;
|
|
7
|
+
maxWidth?: string;
|
|
7
8
|
}
|
|
8
|
-
export declare function Modal({ isOpen, onClose, title, children }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare function Modal({ isOpen, onClose, title, children, maxWidth, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { McpServer } from '../../types/mcp';
|
|
2
|
+
interface ToolTestModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
server: McpServer;
|
|
6
|
+
toolName: string;
|
|
7
|
+
toolDescription?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare const ToolTestModal: React.FC<ToolTestModalProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { McpServer } from '../../types/mcp';
|
|
2
|
+
import { StateCreator } from 'zustand';
|
|
3
|
+
import { XyzenState } from '../types';
|
|
4
|
+
export interface McpToolState {
|
|
5
|
+
toolTestModal: {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
server?: McpServer;
|
|
8
|
+
toolName?: string;
|
|
9
|
+
toolDescription?: string;
|
|
10
|
+
};
|
|
11
|
+
toolExecutionHistory: ToolExecution[];
|
|
12
|
+
}
|
|
13
|
+
export interface ToolExecution {
|
|
14
|
+
id: string;
|
|
15
|
+
serverId: string;
|
|
16
|
+
toolName: string;
|
|
17
|
+
parameters: Record<string, unknown>;
|
|
18
|
+
result?: unknown;
|
|
19
|
+
success: boolean;
|
|
20
|
+
error?: string;
|
|
21
|
+
executionTime: number;
|
|
22
|
+
timestamp: Date;
|
|
23
|
+
}
|
|
24
|
+
export interface McpToolActions {
|
|
25
|
+
openToolTestModal: (server: McpServer, toolName: string, toolDescription?: string) => void;
|
|
26
|
+
closeToolTestModal: () => void;
|
|
27
|
+
addToolExecution: (execution: Omit<ToolExecution, "id" | "timestamp">) => void;
|
|
28
|
+
clearToolExecutionHistory: () => void;
|
|
29
|
+
getToolExecutionHistory: (serverId?: string, toolName?: string) => ToolExecution[];
|
|
30
|
+
}
|
|
31
|
+
export interface McpToolSlice extends McpToolState, McpToolActions {
|
|
32
|
+
}
|
|
33
|
+
export declare const createMcpToolSlice: StateCreator<XyzenState, [
|
|
34
|
+
["zustand/immer", never]
|
|
35
|
+
], [
|
|
36
|
+
], McpToolSlice>;
|
package/dist/store/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentSlice, AuthSlice, ChatSlice, LoadingSlice, McpSlice, ProviderSlice, UiSlice } from './slices';
|
|
1
|
+
import { AgentSlice, AuthSlice, ChatSlice, LoadingSlice, McpSlice, McpToolSlice, ProviderSlice, UiSlice } from './slices';
|
|
2
2
|
export interface Message {
|
|
3
3
|
id: string;
|
|
4
4
|
content: string;
|
|
@@ -12,7 +12,7 @@ export interface ChatChannel {
|
|
|
12
12
|
sessionId: string;
|
|
13
13
|
title: string;
|
|
14
14
|
messages: Message[];
|
|
15
|
-
|
|
15
|
+
agentId?: string;
|
|
16
16
|
connected: boolean;
|
|
17
17
|
error: string | null;
|
|
18
18
|
}
|
|
@@ -39,6 +39,7 @@ export interface SessionResponse {
|
|
|
39
39
|
id: string;
|
|
40
40
|
name: string;
|
|
41
41
|
user_id: string;
|
|
42
|
+
agent_id?: string;
|
|
42
43
|
topics: TopicResponse[];
|
|
43
44
|
}
|
|
44
|
-
export type XyzenState = UiSlice & ChatSlice & AgentSlice & McpSlice & ProviderSlice & AuthSlice & LoadingSlice;
|
|
45
|
+
export type XyzenState = UiSlice & ChatSlice & AgentSlice & McpSlice & McpToolSlice & ProviderSlice & AuthSlice & LoadingSlice;
|