@sciol/xyzen 0.1.12 → 0.1.14
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/app/LlmProviders.d.ts +1 -0
- package/dist/assets/LlmIcon.d.ts +6 -0
- package/dist/assets/McpIcon.d.ts +3 -0
- package/dist/components/base/Badge.d.ts +9 -0
- package/dist/components/base/EditableTitle.d.ts +9 -0
- package/dist/components/base/LoadingSpinner.d.ts +1 -0
- package/dist/components/base/Modal.d.ts +9 -0
- package/dist/components/base/Switch.d.ts +9 -0
- package/dist/components/features/AuthStatus.d.ts +5 -0
- package/dist/components/features/index.d.ts +1 -0
- package/dist/components/layouts/XyzenAgent.d.ts +2 -2
- package/dist/components/layouts/components/ChatInput.d.ts +1 -1
- package/dist/components/layouts/components/ChatToolbar.d.ts +6 -0
- package/dist/components/layouts/components/SessionHistory.d.ts +7 -0
- package/dist/components/modals/AddLlmProviderModal.d.ts +1 -0
- package/dist/components/modals/AddMcpServerModal.d.ts +1 -0
- package/dist/components/modals/McpServerItem.d.ts +9 -0
- package/dist/hooks/useAuth.d.ts +14 -0
- package/dist/index.d.ts +1 -1
- package/dist/service/authService.d.ts +52 -0
- package/dist/service/llmProviderService.d.ts +15 -0
- package/dist/service/mcpService.d.ts +2 -2
- package/dist/service/xyzenService.d.ts +1 -1
- package/dist/store/index.d.ts +15 -0
- package/dist/store/slices/agentSlice.d.ts +15 -0
- package/dist/store/slices/authSlice.d.ts +14 -0
- package/dist/store/slices/chatSlice.d.ts +21 -0
- package/dist/store/slices/index.d.ts +6 -0
- package/dist/store/slices/mcpSlice.d.ts +16 -0
- package/dist/store/slices/providerSlice.d.ts +16 -0
- package/dist/store/slices/uiSlice.d.ts +26 -0
- package/dist/store/types.d.ts +44 -0
- package/dist/types/llmProvider.d.ts +34 -0
- package/dist/types/mcp.d.ts +1 -1
- package/dist/xyzen.es.js +16239 -14331
- package/dist/xyzen.umd.js +77 -67
- package/package.json +1 -1
- package/dist/context/XyzenProvider.d.ts +0 -1
- package/dist/store/xyzenStore.d.ts +0 -87
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sciol/xyzen",
|
|
3
3
|
"packageManager": "yarn@4.9.2",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.14",
|
|
5
5
|
"description": "A modern, lightweight, and extensible chat component for React.",
|
|
6
6
|
"author": "Haohui <harveyque@outlook.com>",
|
|
7
7
|
"license": "GPL-3.0-only",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { McpServer, McpServerCreate } from '../types/mcp';
|
|
2
|
-
import { Agent } from '../components/layouts/XyzenAgent';
|
|
3
|
-
export interface Message {
|
|
4
|
-
id: string;
|
|
5
|
-
content: string;
|
|
6
|
-
role: "user" | "assistant" | "system" | "tool";
|
|
7
|
-
created_at: string;
|
|
8
|
-
sender?: "user" | "assistant" | "system";
|
|
9
|
-
timestamp?: string;
|
|
10
|
-
}
|
|
11
|
-
export interface ChatChannel {
|
|
12
|
-
id: string;
|
|
13
|
-
sessionId: string;
|
|
14
|
-
title: string;
|
|
15
|
-
messages: Message[];
|
|
16
|
-
assistantId?: string;
|
|
17
|
-
connected: boolean;
|
|
18
|
-
error: string | null;
|
|
19
|
-
}
|
|
20
|
-
export interface ChatHistoryItem {
|
|
21
|
-
id: string;
|
|
22
|
-
title: string;
|
|
23
|
-
updatedAt: string;
|
|
24
|
-
assistantTitle: string;
|
|
25
|
-
lastMessage?: string;
|
|
26
|
-
isPinned: boolean;
|
|
27
|
-
}
|
|
28
|
-
export interface User {
|
|
29
|
-
username: string;
|
|
30
|
-
avatar: string;
|
|
31
|
-
}
|
|
32
|
-
export type Theme = "light" | "dark" | "system";
|
|
33
|
-
interface XyzenState {
|
|
34
|
-
backendUrl: string;
|
|
35
|
-
isXyzenOpen: boolean;
|
|
36
|
-
panelWidth: number;
|
|
37
|
-
activeChatChannel: string | null;
|
|
38
|
-
user: User | null;
|
|
39
|
-
activeTabIndex: number;
|
|
40
|
-
theme: Theme;
|
|
41
|
-
chatHistory: ChatHistoryItem[];
|
|
42
|
-
chatHistoryLoading: boolean;
|
|
43
|
-
channels: Record<string, ChatChannel>;
|
|
44
|
-
agents: Agent[];
|
|
45
|
-
agentsLoading: boolean;
|
|
46
|
-
mcpServers: McpServer[];
|
|
47
|
-
mcpServersLoading: boolean;
|
|
48
|
-
toggleXyzen: () => void;
|
|
49
|
-
openXyzen: () => void;
|
|
50
|
-
closeXyzen: () => void;
|
|
51
|
-
setPanelWidth: (width: number) => void;
|
|
52
|
-
setActiveChatChannel: (channelUUID: string | null) => void;
|
|
53
|
-
setTabIndex: (index: number) => void;
|
|
54
|
-
setTheme: (theme: Theme) => void;
|
|
55
|
-
setBackendUrl: (url: string) => void;
|
|
56
|
-
fetchChatHistory: () => Promise<void>;
|
|
57
|
-
togglePinChat: (chatId: string) => void;
|
|
58
|
-
activateChannel: (topicId: string) => Promise<void>;
|
|
59
|
-
connectToChannel: (sessionId: string, topicId: string) => void;
|
|
60
|
-
disconnectFromChannel: () => void;
|
|
61
|
-
sendMessage: (message: string) => void;
|
|
62
|
-
createDefaultChannel: (agentId?: string) => Promise<void>;
|
|
63
|
-
fetchAgents: () => Promise<void>;
|
|
64
|
-
createAgent: (agent: Omit<Agent, "id">) => Promise<void>;
|
|
65
|
-
updateAgent: (agent: Agent) => Promise<void>;
|
|
66
|
-
deleteAgent: (id: string) => Promise<void>;
|
|
67
|
-
fetchMcpServers: () => Promise<void>;
|
|
68
|
-
addMcpServer: (server: McpServerCreate) => Promise<void>;
|
|
69
|
-
editMcpServer: (id: number, server: Partial<McpServerCreate>) => Promise<void>;
|
|
70
|
-
removeMcpServer: (id: number) => Promise<void>;
|
|
71
|
-
updateMcpServerInList: (server: McpServer) => void;
|
|
72
|
-
}
|
|
73
|
-
export declare const useXyzen: import('zustand').UseBoundStore<Omit<Omit<import('zustand').StoreApi<XyzenState>, "persist"> & {
|
|
74
|
-
persist: {
|
|
75
|
-
setOptions: (options: Partial<import('zustand/middleware').PersistOptions<XyzenState, unknown>>) => void;
|
|
76
|
-
clearStorage: () => void;
|
|
77
|
-
rehydrate: () => Promise<void> | void;
|
|
78
|
-
hasHydrated: () => boolean;
|
|
79
|
-
onHydrate: (fn: (state: XyzenState) => void) => () => void;
|
|
80
|
-
onFinishHydration: (fn: (state: XyzenState) => void) => () => void;
|
|
81
|
-
getOptions: () => Partial<import('zustand/middleware').PersistOptions<XyzenState, unknown>>;
|
|
82
|
-
};
|
|
83
|
-
}, "setState"> & {
|
|
84
|
-
setState(nextStateOrUpdater: XyzenState | Partial<XyzenState> | ((state: import('immer').WritableDraft<XyzenState>) => void), shouldReplace?: false): void;
|
|
85
|
-
setState(nextStateOrUpdater: XyzenState | ((state: import('immer').WritableDraft<XyzenState>) => void), shouldReplace: true): void;
|
|
86
|
-
}>;
|
|
87
|
-
export {};
|