@lebiraja/plugintool 1.0.0
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/LICENSE +21 -0
- package/README.md +1258 -0
- package/dist/App.d.ts +2 -0
- package/dist/api/chat.d.ts +17 -0
- package/dist/api/client.d.ts +2 -0
- package/dist/api/files.d.ts +10 -0
- package/dist/api/models.d.ts +4 -0
- package/dist/api/sessions.d.ts +75 -0
- package/dist/api/tools.d.ts +3 -0
- package/dist/components/ChatInterface.d.ts +6 -0
- package/dist/components/FileCard.d.ts +10 -0
- package/dist/components/LeftSidebar.d.ts +5 -0
- package/dist/components/MessageList.d.ts +7 -0
- package/dist/components/RightSidebar.d.ts +7 -0
- package/dist/components/SessionSidebar.d.ts +10 -0
- package/dist/components/SettingsModal.d.ts +6 -0
- package/dist/components/UnifiedChatInterface.d.ts +9 -0
- package/dist/components/common/BackendStatusBanner.d.ts +1 -0
- package/dist/components/common/ErrorBoundary.d.ts +18 -0
- package/dist/components/common/MarkdownRenderer.d.ts +7 -0
- package/dist/components/research/DeepResearchPanel.d.ts +2 -0
- package/dist/components/research/ResearchResultsView.d.ts +7 -0
- package/dist/hooks/useBackendStatus.d.ts +11 -0
- package/dist/index.d.ts +29 -0
- package/dist/index.js +22703 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/utils.d.ts +4 -0
- package/dist/services/deepResearchService.d.ts +36 -0
- package/dist/store/chatStore.d.ts +17 -0
- package/dist/store/deepResearchStore.d.ts +18 -0
- package/dist/store/fileStore.d.ts +12 -0
- package/dist/store/sessionStore.d.ts +32 -0
- package/dist/store/settingsStore.d.ts +24 -0
- package/dist/types/index.d.ts +170 -0
- package/package.json +90 -0
package/dist/App.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ModelConfig } from '../types';
|
|
2
|
+
export interface ChatResponse {
|
|
3
|
+
content: string;
|
|
4
|
+
tokens?: {
|
|
5
|
+
prompt: number;
|
|
6
|
+
completion: number;
|
|
7
|
+
total: number;
|
|
8
|
+
};
|
|
9
|
+
model?: string;
|
|
10
|
+
backend?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function sendMessage(message: string, backend: string, model: string, config: ModelConfig, history?: Array<{
|
|
13
|
+
role: string;
|
|
14
|
+
content: string;
|
|
15
|
+
}>): Promise<ChatResponse>;
|
|
16
|
+
export declare function streamMessage(message: string, backend: string, model: string, config: ModelConfig, onChunk: (chunk: string) => void): Promise<void>;
|
|
17
|
+
export declare function getAvailableModels(backend: string): Promise<string[]>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface UploadResponse {
|
|
2
|
+
fileId: string;
|
|
3
|
+
name: string;
|
|
4
|
+
size: number;
|
|
5
|
+
processed: boolean;
|
|
6
|
+
chunks?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare function uploadFile(file: File): Promise<UploadResponse>;
|
|
9
|
+
export declare function deleteFile(fileId: string): Promise<void>;
|
|
10
|
+
export declare function getFilesList(): Promise<UploadResponse[]>;
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export interface CreateSessionRequest {
|
|
2
|
+
backend: string;
|
|
3
|
+
model: string;
|
|
4
|
+
config?: {
|
|
5
|
+
temperature?: number;
|
|
6
|
+
topP?: number;
|
|
7
|
+
maxTokens?: number;
|
|
8
|
+
frequencyPenalty?: number;
|
|
9
|
+
presencePenalty?: number;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export interface Session {
|
|
13
|
+
session_id: string;
|
|
14
|
+
title: string;
|
|
15
|
+
last_message_preview: string;
|
|
16
|
+
updated_at: string;
|
|
17
|
+
message_count: number;
|
|
18
|
+
total_tokens: number;
|
|
19
|
+
}
|
|
20
|
+
export interface SessionDetail {
|
|
21
|
+
session_id: string;
|
|
22
|
+
title: string;
|
|
23
|
+
created_at: string;
|
|
24
|
+
updated_at: string;
|
|
25
|
+
model_config: {
|
|
26
|
+
backend: string;
|
|
27
|
+
model: string;
|
|
28
|
+
temperature: number;
|
|
29
|
+
maxTokens: number;
|
|
30
|
+
};
|
|
31
|
+
messages: any[];
|
|
32
|
+
files: any[];
|
|
33
|
+
metadata: {
|
|
34
|
+
total_messages: number;
|
|
35
|
+
total_tokens: number;
|
|
36
|
+
tools_usage_count: {
|
|
37
|
+
web_search: number;
|
|
38
|
+
rag: number;
|
|
39
|
+
deep_research: number;
|
|
40
|
+
};
|
|
41
|
+
last_message_preview: string;
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
export interface SendMessageRequest {
|
|
45
|
+
message: string;
|
|
46
|
+
config?: any;
|
|
47
|
+
tools_enabled?: {
|
|
48
|
+
web_search?: boolean;
|
|
49
|
+
rag?: boolean;
|
|
50
|
+
deep_research?: boolean;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
export declare const sessionApi: {
|
|
54
|
+
createSession(request: CreateSessionRequest): Promise<{
|
|
55
|
+
session_id: string;
|
|
56
|
+
title: string;
|
|
57
|
+
}>;
|
|
58
|
+
listSessions(skip?: number, limit?: number, sort?: string): Promise<{
|
|
59
|
+
sessions: Session[];
|
|
60
|
+
total: number;
|
|
61
|
+
}>;
|
|
62
|
+
getSession(sessionId: string): Promise<SessionDetail>;
|
|
63
|
+
sendMessage(sessionId: string, request: SendMessageRequest): Promise<any>;
|
|
64
|
+
generateTitle(sessionId: string): Promise<{
|
|
65
|
+
title: string;
|
|
66
|
+
}>;
|
|
67
|
+
renameSession(sessionId: string, title: string): Promise<{
|
|
68
|
+
success: boolean;
|
|
69
|
+
title: string;
|
|
70
|
+
}>;
|
|
71
|
+
deleteSession(sessionId: string): Promise<{
|
|
72
|
+
success: boolean;
|
|
73
|
+
}>;
|
|
74
|
+
uploadFile(_sessionId: string, file: File): Promise<any>;
|
|
75
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface SessionSidebarProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
width?: number;
|
|
5
|
+
onToggle?: () => void;
|
|
6
|
+
onResize?: (width: number) => void;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const SessionSidebar: React.FC<SessionSidebarProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface UnifiedChatInterfaceProps {
|
|
3
|
+
onToggleLeftSidebar?: () => void;
|
|
4
|
+
onToggleRightSidebar: () => void;
|
|
5
|
+
isLeftSidebarOpen?: boolean;
|
|
6
|
+
isRightSidebarOpen: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const UnifiedChatInterface: React.FC<UnifiedChatInterfaceProps>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function BackendStatusBanner(): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Component, ErrorInfo, ReactNode } from 'react';
|
|
2
|
+
interface Props {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
fallback?: ReactNode;
|
|
5
|
+
onError?: (error: Error, errorInfo: ErrorInfo) => void;
|
|
6
|
+
}
|
|
7
|
+
interface State {
|
|
8
|
+
hasError: boolean;
|
|
9
|
+
error: Error | null;
|
|
10
|
+
}
|
|
11
|
+
export declare class ErrorBoundary extends Component<Props, State> {
|
|
12
|
+
state: State;
|
|
13
|
+
static getDerivedStateFromError(error: Error): State;
|
|
14
|
+
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
|
15
|
+
private handleReset;
|
|
16
|
+
render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<ReactNode> | null | undefined;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export { default as App } from './App';
|
|
2
|
+
export { UnifiedChatInterface } from './components/UnifiedChatInterface';
|
|
3
|
+
export { default as ChatInterface } from './components/ChatInterface';
|
|
4
|
+
export { default as MessageList } from './components/MessageList';
|
|
5
|
+
export { SessionSidebar } from './components/SessionSidebar';
|
|
6
|
+
export { default as RightSidebar } from './components/RightSidebar';
|
|
7
|
+
export { default as SettingsModal } from './components/SettingsModal';
|
|
8
|
+
export { default as FileCard } from './components/FileCard';
|
|
9
|
+
export { default as LeftSidebar } from './components/LeftSidebar';
|
|
10
|
+
export { ErrorBoundary } from './components/common/ErrorBoundary';
|
|
11
|
+
export { BackendStatusBanner } from './components/common/BackendStatusBanner';
|
|
12
|
+
export { MarkdownRenderer } from './components/common/MarkdownRenderer';
|
|
13
|
+
export { DeepResearchPanel } from './components/research/DeepResearchPanel';
|
|
14
|
+
export { ResearchResultsView } from './components/research/ResearchResultsView';
|
|
15
|
+
export { useChatStore } from './store/chatStore';
|
|
16
|
+
export { useSettingsStore } from './store/settingsStore';
|
|
17
|
+
export { useSessionStore } from './store/sessionStore';
|
|
18
|
+
export { useFileStore } from './store/fileStore';
|
|
19
|
+
export { useDeepResearchStore } from './store/deepResearchStore';
|
|
20
|
+
export { useBackendStatus } from './hooks/useBackendStatus';
|
|
21
|
+
export * from './api/chat';
|
|
22
|
+
export * from './api/client';
|
|
23
|
+
export * from './api/files';
|
|
24
|
+
export * from './api/models';
|
|
25
|
+
export * from './api/sessions';
|
|
26
|
+
export * from './api/tools';
|
|
27
|
+
export { deepResearchService } from './services/deepResearchService';
|
|
28
|
+
export type { Message, Citation, RetrievedChunk, ReasoningStep, LLMBackend, ModelConfig, ToolsConfig, ConversationMode, UploadedFile, AppSettings, ChatStats, SearchResult, RAGResult, ResearchPlan, Evidence, ResearchReasoningStep, ResearchReport, ResearchMetadata, ResearchResult, DeepResearchRequest, ResearchStage, ResearchProgress, } from './types';
|
|
29
|
+
export { cn } from './lib/utils';
|