@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.
Files changed (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +1258 -0
  3. package/dist/App.d.ts +2 -0
  4. package/dist/api/chat.d.ts +17 -0
  5. package/dist/api/client.d.ts +2 -0
  6. package/dist/api/files.d.ts +10 -0
  7. package/dist/api/models.d.ts +4 -0
  8. package/dist/api/sessions.d.ts +75 -0
  9. package/dist/api/tools.d.ts +3 -0
  10. package/dist/components/ChatInterface.d.ts +6 -0
  11. package/dist/components/FileCard.d.ts +10 -0
  12. package/dist/components/LeftSidebar.d.ts +5 -0
  13. package/dist/components/MessageList.d.ts +7 -0
  14. package/dist/components/RightSidebar.d.ts +7 -0
  15. package/dist/components/SessionSidebar.d.ts +10 -0
  16. package/dist/components/SettingsModal.d.ts +6 -0
  17. package/dist/components/UnifiedChatInterface.d.ts +9 -0
  18. package/dist/components/common/BackendStatusBanner.d.ts +1 -0
  19. package/dist/components/common/ErrorBoundary.d.ts +18 -0
  20. package/dist/components/common/MarkdownRenderer.d.ts +7 -0
  21. package/dist/components/research/DeepResearchPanel.d.ts +2 -0
  22. package/dist/components/research/ResearchResultsView.d.ts +7 -0
  23. package/dist/hooks/useBackendStatus.d.ts +11 -0
  24. package/dist/index.d.ts +29 -0
  25. package/dist/index.js +22703 -0
  26. package/dist/index.js.map +1 -0
  27. package/dist/lib/utils.d.ts +4 -0
  28. package/dist/services/deepResearchService.d.ts +36 -0
  29. package/dist/store/chatStore.d.ts +17 -0
  30. package/dist/store/deepResearchStore.d.ts +18 -0
  31. package/dist/store/fileStore.d.ts +12 -0
  32. package/dist/store/sessionStore.d.ts +32 -0
  33. package/dist/store/settingsStore.d.ts +24 -0
  34. package/dist/types/index.d.ts +170 -0
  35. package/package.json +90 -0
package/dist/App.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ declare function App(): import("react/jsx-runtime").JSX.Element;
2
+ export default App;
@@ -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,2 @@
1
+ export declare const apiClient: import('axios').AxiosInstance;
2
+ export default apiClient;
@@ -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,4 @@
1
+ export interface ModelsResponse {
2
+ models: string[];
3
+ }
4
+ export declare function getModels(backend: string): Promise<string[]>;
@@ -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,3 @@
1
+ import { SearchResult, RAGResult } from '../types';
2
+ export declare function webSearch(query: string, maxResults?: number): Promise<SearchResult[]>;
3
+ export declare function ragQuery(query: string, fileIds?: string[], topK?: number): Promise<RAGResult[]>;
@@ -0,0 +1,6 @@
1
+ interface ChatInterfaceProps {
2
+ onToggleRightSidebar: () => void;
3
+ isRightSidebarOpen: boolean;
4
+ }
5
+ export default function ChatInterface({ onToggleRightSidebar, isRightSidebarOpen, }: ChatInterfaceProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,10 @@
1
+ interface FileCardProps {
2
+ filename: string;
3
+ size: number;
4
+ type?: string;
5
+ chunks?: number;
6
+ onRemove?: () => void;
7
+ compact?: boolean;
8
+ }
9
+ declare const FileCard: React.FC<FileCardProps>;
10
+ export default FileCard;
@@ -0,0 +1,5 @@
1
+ interface LeftSidebarProps {
2
+ onOpenSettings: () => void;
3
+ }
4
+ export default function LeftSidebar({ onOpenSettings }: LeftSidebarProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,7 @@
1
+ import { Message } from '../types';
2
+ interface MessageListProps {
3
+ messages: Message[];
4
+ isLoading: boolean;
5
+ }
6
+ export default function MessageList({ messages, isLoading }: MessageListProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ interface RightSidebarProps {
2
+ width?: number;
3
+ onToggle?: () => void;
4
+ onResize?: (width: number) => void;
5
+ }
6
+ export default function RightSidebar({ width, onToggle, onResize }: RightSidebarProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -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,6 @@
1
+ interface SettingsModalProps {
2
+ isOpen: boolean;
3
+ onClose: () => void;
4
+ }
5
+ export default function SettingsModal({ isOpen, onClose }: SettingsModalProps): import("react/jsx-runtime").JSX.Element;
6
+ 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 {};
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface MarkdownRendererProps {
3
+ content: string;
4
+ className?: string;
5
+ }
6
+ export declare const MarkdownRenderer: React.FC<MarkdownRendererProps>;
7
+ export {};
@@ -0,0 +1,2 @@
1
+ import { default as React } from 'react';
2
+ export declare const DeepResearchPanel: React.FC;
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { ResearchResult } from '../../types';
3
+ interface ResearchResultsViewProps {
4
+ research: ResearchResult;
5
+ }
6
+ export declare const ResearchResultsView: React.FC<ResearchResultsViewProps>;
7
+ export {};
@@ -0,0 +1,11 @@
1
+ interface BackendStatus {
2
+ isOnline: boolean;
3
+ isChecking: boolean;
4
+ lastChecked: Date | null;
5
+ backends: {
6
+ ollama: boolean;
7
+ lmstudio: boolean;
8
+ };
9
+ }
10
+ export declare function useBackendStatus(checkInterval?: number): BackendStatus;
11
+ export {};
@@ -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';