research-agent-ui 0.1.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/README.md +177 -0
- package/dist/api/handlers/agents.d.ts +4 -0
- package/dist/api/handlers/article-followups.d.ts +2 -0
- package/dist/api/handlers/article-qa.d.ts +2 -0
- package/dist/api/handlers/autocomplete.d.ts +8 -0
- package/dist/api/handlers/chats.d.ts +23 -0
- package/dist/api/handlers/mcpservers.d.ts +24 -0
- package/dist/api/handlers/messages.d.ts +4 -0
- package/dist/api/handlers/providers.d.ts +29 -0
- package/dist/api/handlers/rewrite.d.ts +4 -0
- package/dist/api/handlers/search.d.ts +7 -0
- package/dist/api/handlers/suggestions.d.ts +3 -0
- package/dist/api/handlers/test-models.d.ts +3 -0
- package/dist/api/handlers/transcript.d.ts +4 -0
- package/dist/api/handlers/validate-openrouter.d.ts +5 -0
- package/dist/api/handlers/voice.d.ts +4 -0
- package/dist/api/index.d.ts +16 -0
- package/dist/api/types.d.ts +86 -0
- package/dist/api.cjs +22 -0
- package/dist/api.mjs +768 -0
- package/dist/components/ArticleReader/ArticleAIResponse.d.ts +11 -0
- package/dist/components/ArticleReader/ArticleActionButtons.d.ts +18 -0
- package/dist/components/ArticleReader/ArticleContent.d.ts +8 -0
- package/dist/components/ArticleReader/ArticleExtractPanel.d.ts +4 -0
- package/dist/components/ArticleReader/ArticleFollowupQuestions.d.ts +12 -0
- package/dist/components/ArticleReader/ArticlePanelHeader.d.ts +9 -0
- package/dist/components/ArticleReader/ArticlePromptInput.d.ts +11 -0
- package/dist/components/ArticleReader/ExtractPanelContext.d.ts +18 -0
- package/dist/components/ArticleReader/LexicalArticleViewer.d.ts +15 -0
- package/dist/components/ArticleReader/index.d.ts +12 -0
- package/dist/components/ArticleReader/unified-markdown.d.ts +19 -0
- package/dist/components/ChatConversation/ChatConversationThread.d.ts +10 -0
- package/dist/components/ChatConversation/ChatHeaderNavigationBar.d.ts +2 -0
- package/dist/components/ChatConversation/ChatHomepage.d.ts +6 -0
- package/dist/components/ChatConversation/ChatMessageBubble.d.ts +19 -0
- package/dist/components/ChatConversation/ChatMessageInputBar.d.ts +10 -0
- package/dist/components/ChatConversation/ChatWindow.d.ts +75 -0
- package/dist/components/ChatConversation/EmptyStateChatMessageInput.d.ts +9 -0
- package/dist/components/ChatConversation/MessageBubble/AssistantMessageActions.d.ts +15 -0
- package/dist/components/ChatConversation/MessageBubble/FollowUpSuggestions.d.ts +15 -0
- package/dist/components/ChatConversation/MessageBubble/ThinkTagProcessor.d.ts +13 -0
- package/dist/components/ChatConversation/MessageBubble/UserMessageHeader.d.ts +20 -0
- package/dist/components/ChatConversation/MessageReasoningPanel.d.ts +14 -0
- package/dist/components/ChatConversation/RecentHistoryChips.d.ts +1 -0
- package/dist/components/ChatConversation/SearchModeSpotlightPanel.d.ts +10 -0
- package/dist/components/ChatConversation/background-art.d.ts +11 -0
- package/dist/components/ChatHistoryDropdown/HistoryChatItem.d.ts +9 -0
- package/dist/components/ChatHistoryDropdown/HistoryDialogs.d.ts +14 -0
- package/dist/components/ChatHistoryDropdown/HistoryDropdown.d.ts +6 -0
- package/dist/components/ChatHistoryDropdown/HistoryHeader.d.ts +10 -0
- package/dist/components/ChatHistoryDropdown/index.d.ts +4 -0
- package/dist/components/ChatHistoryDropdown/useHistoryState.d.ts +27 -0
- package/dist/components/ConfigError.d.ts +1 -0
- package/dist/components/FileUpload/CompactFileAttachmentButton.d.ts +2 -0
- package/dist/components/FileUpload/FileAttachmentButton.d.ts +2 -0
- package/dist/components/FileUpload/FilePreviewCard.d.ts +13 -0
- package/dist/components/FileUpload/FileUploadDropdown.d.ts +7 -0
- package/dist/components/FileUpload/GoogleDrivePicker.d.ts +4 -0
- package/dist/components/FileUpload/useFileHandling.d.ts +26 -0
- package/dist/components/Footer.d.ts +19 -0
- package/dist/components/MessageActions/CopyMessageButton.d.ts +6 -0
- package/dist/components/MessageActions/DeleteChatSessionButton.d.ts +8 -0
- package/dist/components/MessageActions/RewriteMessageButton.d.ts +5 -0
- package/dist/components/MessageComposer/ActionBar.d.ts +17 -0
- package/dist/components/MessageComposer/ChatInputBox.d.ts +6 -0
- package/dist/components/MessageComposer/MessageInputIconSet.d.ts +24 -0
- package/dist/components/MessageComposer/PastedContentCard.d.ts +12 -0
- package/dist/components/SearchConfig/CategoriesMenu.d.ts +2 -0
- package/dist/components/SearchConfig/ChatModelSelector.d.ts +2 -0
- package/dist/components/SearchConfig/ModelSelector.d.ts +8 -0
- package/dist/components/SearchConfig/ModelSelectorSubmenu.d.ts +2 -0
- package/dist/components/SearchConfig/ResearchFocusToggleButton.d.ts +2 -0
- package/dist/components/SearchConfig/SearchOptimizationSelector.d.ts +2 -0
- package/dist/components/SearchConfig/categories.d.ts +10 -0
- package/dist/components/SearchResults/MessageSources.d.ts +11 -0
- package/dist/components/SearchResults/NewsArticleWidget.d.ts +2 -0
- package/dist/components/SearchResults/SearchProgressIndicator.d.ts +8 -0
- package/dist/components/SearchResults/WebCitationBadge.d.ts +7 -0
- package/dist/config.cjs +1 -0
- package/dist/config.d.ts +54 -0
- package/dist/config.mjs +16 -0
- package/dist/hooks/useChat/ChatContext.d.ts +147 -0
- package/dist/hooks/useChat/ChatProvider.d.ts +35 -0
- package/dist/hooks/useChat/buildSections.d.ts +39 -0
- package/dist/hooks/useChat/chatConfig.d.ts +31 -0
- package/dist/hooks/useChat/chatMessages.d.ts +48 -0
- package/dist/hooks/useChat/index.d.ts +58 -0
- package/dist/hooks/useChat/sendMessage.d.ts +91 -0
- package/dist/hooks/useChat/useChat.d.ts +3 -0
- package/dist/hooks/useChat/useChatState.d.ts +127 -0
- package/dist/hooks/useSession.d.ts +21 -0
- package/dist/hooks/voice/useInteruptionDetection.d.ts +16 -0
- package/dist/hooks/voice/useSpeechToTranscript.d.ts +5 -0
- package/dist/hooks/voice/useTextToVoice.d.ts +13 -0
- package/dist/icons/IconSearchAcademic.d.ts +1 -0
- package/dist/icons/IconSearchFiles.d.ts +1 -0
- package/dist/icons/IconSearchImages.d.ts +1 -0
- package/dist/icons/IconSearchNews.d.ts +1 -0
- package/dist/icons/IconSearchTech.d.ts +1 -0
- package/dist/icons/IconSearchVideos.d.ts +1 -0
- package/dist/icons/IconSearchWeb.d.ts +1 -0
- package/dist/index.cjs +52 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.mjs +5847 -0
- package/dist/lib/cdn-loader.d.ts +2 -0
- package/dist/lib/export.d.ts +17 -0
- package/dist/lib/guest.d.ts +19 -0
- package/dist/lib/suggestions.d.ts +2 -0
- package/dist/lib/url-autolink.d.ts +21 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/rolldown-runtime-CMqjfN_6.cjs +1 -0
- package/dist/types/chat.d.ts +132 -0
- package/dist/types/research.d.ts +81 -0
- package/dist/ui/Loader.d.ts +2 -0
- package/dist/ui/badge.d.ts +9 -0
- package/dist/ui/button.d.ts +11 -0
- package/dist/ui/dialog.d.ts +15 -0
- package/dist/ui/dropdown-menu.d.ts +25 -0
- package/dist/ui/glowing-effect.d.ts +14 -0
- package/dist/ui/gradient-blur.d.ts +9 -0
- package/dist/ui/live-waveform.d.ts +23 -0
- package/dist/ui/popover.d.ts +9 -0
- package/dist/ui/tooltip.d.ts +7 -0
- package/dist/ui/visually-hidden.d.ts +2 -0
- package/package.json +96 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Convert HTML content to Markdown
|
|
3
|
+
*/
|
|
4
|
+
export declare function exportAsMarkdown(title: string, htmlContent: string): Promise<void>;
|
|
5
|
+
/**
|
|
6
|
+
* Export content as DOCX using docx library (loaded from CDN)
|
|
7
|
+
*/
|
|
8
|
+
export declare function exportAsDocx(title: string, htmlContent: string): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Export content as PDF
|
|
11
|
+
*/
|
|
12
|
+
export declare function exportAsPdf(title: string, htmlContent: string): Promise<void>;
|
|
13
|
+
/**
|
|
14
|
+
* Export to Google Docs
|
|
15
|
+
* Opens a new Google Docs document with the content copied to clipboard
|
|
16
|
+
*/
|
|
17
|
+
export declare function exportToGoogleDocs(title: string, htmlContent: string): Promise<void>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Message } from "../components/ChatConversation/ChatWindow";
|
|
2
|
+
import type { ChatFile as File } from "../types/chat";
|
|
3
|
+
export interface GuestChat {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
createdAt: string;
|
|
7
|
+
focusMode: string;
|
|
8
|
+
files?: File[];
|
|
9
|
+
messages: Message[];
|
|
10
|
+
}
|
|
11
|
+
export declare function getGuestChats(): GuestChat[];
|
|
12
|
+
export declare function getGuestChat(chatId: string): GuestChat | null;
|
|
13
|
+
export declare function saveGuestChat(chat: GuestChat): void;
|
|
14
|
+
export declare function deleteGuestChat(chatId: string): void;
|
|
15
|
+
export declare function clearAllGuestChats(): void;
|
|
16
|
+
export declare function addMessageToGuestChat(chatId: string, message: Message): void;
|
|
17
|
+
export declare function createGuestChat(chatId: string, title: string, focusMode: string, files?: File[]): GuestChat;
|
|
18
|
+
export declare function updateGuestChatTitle(chatId: string, title: string): void;
|
|
19
|
+
export declare function updateGuestChatFiles(chatId: string, files: File[]): void;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* URL Auto-linking Utility
|
|
3
|
+
*
|
|
4
|
+
* Detects plain URLs (with or without protocol) and converts them to markdown links.
|
|
5
|
+
* Handles patterns like:
|
|
6
|
+
* - github.com/kubet/mk-blog
|
|
7
|
+
* - https://github.com/kubet/mk-blog
|
|
8
|
+
* - www.example.com
|
|
9
|
+
* - example.com/path
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* Auto-links plain URLs in text by converting them to markdown links
|
|
13
|
+
*
|
|
14
|
+
* @param text - The text to process
|
|
15
|
+
* @returns Text with plain URLs converted to markdown links
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* autoLinkUrls("Check out github.com/kubet/mk-blog")
|
|
19
|
+
* // Returns: "Check out [github.com/kubet/mk-blog](https://github.com/kubet/mk-blog)"
|
|
20
|
+
*/
|
|
21
|
+
export declare function autoLinkUrls(text: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,a)=>(a=n==null?{}:e(i(n)),o(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return s}});
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Type definitions for the chat system.
|
|
3
|
+
* Contains interfaces and types used across all chat-related modules.
|
|
4
|
+
* @module components/ResearchAgent/state/chat/types
|
|
5
|
+
*/
|
|
6
|
+
import { AssistantMessage, ChatTurn, Message, SearchingMessage, SourceMessage, UserMessage } from "../components/ChatConversation/ChatWindow";
|
|
7
|
+
/**
|
|
8
|
+
* Represents a section of the chat UI, grouping related messages together.
|
|
9
|
+
* Each section contains a user message and its corresponding AI response,
|
|
10
|
+
* sources, and follow-up suggestions.
|
|
11
|
+
*/
|
|
12
|
+
export type Section = {
|
|
13
|
+
/** The user's input message */
|
|
14
|
+
userMessage: UserMessage;
|
|
15
|
+
/** The AI assistant's response, if available */
|
|
16
|
+
assistantMessage: AssistantMessage | undefined;
|
|
17
|
+
/** The processed message content with citations and formatting applied */
|
|
18
|
+
parsedAssistantMessage: string | undefined;
|
|
19
|
+
/** The message content optimized for text-to-speech */
|
|
20
|
+
speechMessage: string | undefined;
|
|
21
|
+
/** Sources/references used to generate the response */
|
|
22
|
+
sourceMessage: SourceMessage | undefined;
|
|
23
|
+
/** Live search progress (queries + statuses) while the agent is running */
|
|
24
|
+
searchingMessage: SearchingMessage | undefined;
|
|
25
|
+
/** Whether the AI has finished its reasoning/thinking phase */
|
|
26
|
+
thinkingEnded: boolean;
|
|
27
|
+
/** Follow-up question suggestions for the user */
|
|
28
|
+
suggestions?: string[];
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Represents an uploaded file attached to a chat.
|
|
32
|
+
*/
|
|
33
|
+
export interface ChatFile {
|
|
34
|
+
/** The original name of the file */
|
|
35
|
+
fileName: string;
|
|
36
|
+
/** The file extension (e.g., 'pdf', 'txt') */
|
|
37
|
+
fileExtension: string;
|
|
38
|
+
/** Unique identifier for the uploaded file */
|
|
39
|
+
fileId: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Configuration for the chat model provider.
|
|
43
|
+
* Determines which AI model and provider to use for generating responses.
|
|
44
|
+
*/
|
|
45
|
+
export interface ChatModelProvider {
|
|
46
|
+
/** The specific model key (e.g., 'llama-3.1-70b') */
|
|
47
|
+
key: string;
|
|
48
|
+
/** The provider identifier (e.g., 'groq', 'openai') */
|
|
49
|
+
providerId: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* The complete context type for the chat system.
|
|
53
|
+
* Contains all state values and action functions available to chat consumers.
|
|
54
|
+
*/
|
|
55
|
+
export type ChatContextType = {
|
|
56
|
+
/** All messages in the current chat */
|
|
57
|
+
messages: Message[];
|
|
58
|
+
/** Filtered list containing only user and assistant messages */
|
|
59
|
+
chatTurns: ChatTurn[];
|
|
60
|
+
/** Parsed sections for UI rendering */
|
|
61
|
+
sections: Section[];
|
|
62
|
+
/** History of conversation turns as [role, content] pairs */
|
|
63
|
+
chatHistory: [string, string][];
|
|
64
|
+
/** Files attached to the chat */
|
|
65
|
+
files: ChatFile[];
|
|
66
|
+
/** IDs of attached files */
|
|
67
|
+
fileIds: string[];
|
|
68
|
+
/** Current search/focus mode (e.g., 'webSearch', 'academic') */
|
|
69
|
+
focusMode: string;
|
|
70
|
+
/** Current category for the search */
|
|
71
|
+
category: string;
|
|
72
|
+
/** Unique identifier for the current chat session */
|
|
73
|
+
chatId: string | undefined;
|
|
74
|
+
/** Optimization mode (e.g., 'speed', 'quality') */
|
|
75
|
+
optimizationMode: string;
|
|
76
|
+
/** Whether messages have been loaded from storage/API */
|
|
77
|
+
isMessagesLoaded: boolean;
|
|
78
|
+
/** Whether a message is currently being sent/streamed */
|
|
79
|
+
loading: boolean;
|
|
80
|
+
/** Whether the requested chat was not found */
|
|
81
|
+
notFound: boolean;
|
|
82
|
+
/** Whether the AI response has started appearing */
|
|
83
|
+
messageAppeared: boolean;
|
|
84
|
+
/** Whether the chat system is fully initialized and ready */
|
|
85
|
+
isReady: boolean;
|
|
86
|
+
/** Whether an error occurred during initialization */
|
|
87
|
+
hasError: boolean;
|
|
88
|
+
/** Current chat model provider configuration */
|
|
89
|
+
chatModelProvider: ChatModelProvider;
|
|
90
|
+
/**
|
|
91
|
+
* Sets the optimization mode for responses.
|
|
92
|
+
* @param mode - The optimization mode to use
|
|
93
|
+
*/
|
|
94
|
+
setOptimizationMode: (mode: string) => void;
|
|
95
|
+
/**
|
|
96
|
+
* Sets the search/focus mode.
|
|
97
|
+
* @param mode - The focus mode to use
|
|
98
|
+
*/
|
|
99
|
+
setFocusMode: (mode: string) => void;
|
|
100
|
+
/**
|
|
101
|
+
* Sets the search category.
|
|
102
|
+
* @param category - The category to use
|
|
103
|
+
*/
|
|
104
|
+
setCategory: (category: string) => void;
|
|
105
|
+
/**
|
|
106
|
+
* Sets the attached files.
|
|
107
|
+
* @param files - Array of chat files
|
|
108
|
+
*/
|
|
109
|
+
setFiles: (files: ChatFile[]) => void;
|
|
110
|
+
/**
|
|
111
|
+
* Sets the file IDs for attached files.
|
|
112
|
+
* @param fileIds - Array of file IDs
|
|
113
|
+
*/
|
|
114
|
+
setFileIds: (fileIds: string[]) => void;
|
|
115
|
+
/**
|
|
116
|
+
* Sends a message to the chat.
|
|
117
|
+
* @param message - The message content to send
|
|
118
|
+
* @param messageId - Optional custom message ID
|
|
119
|
+
* @param rewrite - Whether this is a rewrite of a previous message
|
|
120
|
+
*/
|
|
121
|
+
sendMessage: (message: string, messageId?: string, rewrite?: boolean) => Promise<void>;
|
|
122
|
+
/**
|
|
123
|
+
* Rewrites a previous AI response.
|
|
124
|
+
* @param messageId - The ID of the message to rewrite
|
|
125
|
+
*/
|
|
126
|
+
rewrite: (messageId: string) => void;
|
|
127
|
+
/**
|
|
128
|
+
* Updates the chat model provider configuration.
|
|
129
|
+
* @param provider - The new provider configuration
|
|
130
|
+
*/
|
|
131
|
+
setChatModelProvider: (provider: ChatModelProvider) => void;
|
|
132
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions used by the ResearchAgent area of the ResearchAgent feature.
|
|
3
|
+
*/
|
|
4
|
+
import { ChatFile, ChatModelProvider } from "./chat";
|
|
5
|
+
export type { ChatModelProvider };
|
|
6
|
+
export interface Article {
|
|
7
|
+
html?: string;
|
|
8
|
+
cite?: string;
|
|
9
|
+
title?: string;
|
|
10
|
+
url?: string;
|
|
11
|
+
author?: string;
|
|
12
|
+
author_cite?: string;
|
|
13
|
+
author_short?: string;
|
|
14
|
+
author_type?: string;
|
|
15
|
+
date?: string;
|
|
16
|
+
source?: string;
|
|
17
|
+
word_count?: number;
|
|
18
|
+
followUpQuestions?: string[];
|
|
19
|
+
qaHistory?: Array<{
|
|
20
|
+
question: string;
|
|
21
|
+
answer: string;
|
|
22
|
+
}>;
|
|
23
|
+
}
|
|
24
|
+
export type SearchCategory = "general" | "news" | "videos" | "images" | "science" | "tech" | "files";
|
|
25
|
+
export interface CategoryTab {
|
|
26
|
+
code: SearchCategory;
|
|
27
|
+
name: string;
|
|
28
|
+
icon: string;
|
|
29
|
+
}
|
|
30
|
+
export interface SearchParams {
|
|
31
|
+
q: string;
|
|
32
|
+
cat: SearchCategory;
|
|
33
|
+
page: number;
|
|
34
|
+
}
|
|
35
|
+
export interface SearchResult {
|
|
36
|
+
title: string;
|
|
37
|
+
url: string;
|
|
38
|
+
snippet?: string;
|
|
39
|
+
score: number;
|
|
40
|
+
date?: string;
|
|
41
|
+
source?: string;
|
|
42
|
+
domain?: string;
|
|
43
|
+
favicon?: string;
|
|
44
|
+
thumbnail?: string;
|
|
45
|
+
content?: string;
|
|
46
|
+
img_src?: string;
|
|
47
|
+
iframe_src?: string;
|
|
48
|
+
}
|
|
49
|
+
export interface ChatMessage {
|
|
50
|
+
role: "user" | "assistant";
|
|
51
|
+
content: string;
|
|
52
|
+
time: string;
|
|
53
|
+
}
|
|
54
|
+
export interface ArticleExtractPanelProps {
|
|
55
|
+
isOpen?: boolean;
|
|
56
|
+
onClose?: () => void;
|
|
57
|
+
url?: string;
|
|
58
|
+
searchText?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface AttachedFile {
|
|
61
|
+
id: string;
|
|
62
|
+
file: File;
|
|
63
|
+
type: string;
|
|
64
|
+
preview: string | null;
|
|
65
|
+
uploadStatus: string;
|
|
66
|
+
content?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface PastedContent {
|
|
69
|
+
id: string;
|
|
70
|
+
content: string;
|
|
71
|
+
timestamp: Date;
|
|
72
|
+
}
|
|
73
|
+
export interface Chat {
|
|
74
|
+
id: string;
|
|
75
|
+
title: string;
|
|
76
|
+
createdAt: string;
|
|
77
|
+
focusMode: string;
|
|
78
|
+
userId?: string | null;
|
|
79
|
+
files?: ChatFile[];
|
|
80
|
+
messageCount?: number;
|
|
81
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const badgeVariants: (props?: {
|
|
4
|
+
variant?: "default" | "destructive" | "secondary" | "outline" | "new" | "beta" | "highlight";
|
|
5
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
6
|
+
declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
}): React.JSX.Element;
|
|
9
|
+
export { Badge, badgeVariants };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare const buttonVariants: (props?: {
|
|
4
|
+
variant?: "default" | "link" | "destructive" | "secondary" | "outline" | "ghost";
|
|
5
|
+
size?: "default" | "icon" | "sm" | "lg";
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) => string;
|
|
7
|
+
export interface ButtonProps extends React.ComponentProps<"button">, VariantProps<typeof buttonVariants> {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function Button({ className, variant, size, asChild, ...props }: ButtonProps): React.JSX.Element;
|
|
11
|
+
export { Button, buttonVariants };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
declare function Dialog({ ...props }: React.ComponentProps<typeof DialogPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function DialogTrigger({ ...props }: React.ComponentProps<typeof DialogPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function DialogPortal({ ...props }: React.ComponentProps<typeof DialogPrimitive.Portal>): React.JSX.Element;
|
|
6
|
+
declare function DialogClose({ ...props }: React.ComponentProps<typeof DialogPrimitive.Close>): React.JSX.Element;
|
|
7
|
+
declare function DialogOverlay({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Overlay>): React.JSX.Element;
|
|
8
|
+
declare function DialogContent({ className, children, hideCloseButton, ...props }: React.ComponentProps<typeof DialogPrimitive.Content> & {
|
|
9
|
+
hideCloseButton?: boolean;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
12
|
+
declare function DialogFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
|
|
13
|
+
declare function DialogTitle({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Title>): React.JSX.Element;
|
|
14
|
+
declare function DialogDescription({ className, ...props }: React.ComponentProps<typeof DialogPrimitive.Description>): React.JSX.Element;
|
|
15
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
3
|
+
declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
|
|
5
|
+
declare function DropdownMenuTrigger({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function DropdownMenuContent({ className, sideOffset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
declare function DropdownMenuGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Group>): React.JSX.Element;
|
|
8
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {
|
|
9
|
+
inset?: boolean;
|
|
10
|
+
variant?: "default" | "destructive";
|
|
11
|
+
}): React.JSX.Element;
|
|
12
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>): React.JSX.Element;
|
|
13
|
+
declare function DropdownMenuRadioGroup({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>): React.JSX.Element;
|
|
14
|
+
declare function DropdownMenuRadioItem({ className, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>): React.JSX.Element;
|
|
15
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {
|
|
16
|
+
inset?: boolean;
|
|
17
|
+
}): React.JSX.Element;
|
|
18
|
+
declare function DropdownMenuSeparator({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>): React.JSX.Element;
|
|
19
|
+
declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
|
|
20
|
+
declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
|
|
21
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {
|
|
22
|
+
inset?: boolean;
|
|
23
|
+
}): React.JSX.Element;
|
|
24
|
+
declare function DropdownMenuSubContent({ className, ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>): React.JSX.Element;
|
|
25
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface GlowingEffectProps {
|
|
2
|
+
blur?: number;
|
|
3
|
+
inactiveZone?: number;
|
|
4
|
+
proximity?: number;
|
|
5
|
+
spread?: number;
|
|
6
|
+
variant?: "default" | "white";
|
|
7
|
+
glow?: boolean;
|
|
8
|
+
className?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
movementDuration?: number;
|
|
11
|
+
borderWidth?: number;
|
|
12
|
+
}
|
|
13
|
+
declare const GlowingEffect: import("react").MemoExoticComponent<({ blur, inactiveZone, proximity, spread, variant, glow, className, movementDuration, borderWidth, disabled, }: GlowingEffectProps) => import("react").JSX.Element>;
|
|
14
|
+
export { GlowingEffect };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface GradientBlurProps {
|
|
2
|
+
radius?: number;
|
|
3
|
+
opacityDecay?: number;
|
|
4
|
+
backgroundColor?: string;
|
|
5
|
+
color?: [number, number, number];
|
|
6
|
+
colorGenerator?: () => [number, number, number];
|
|
7
|
+
}
|
|
8
|
+
export declare function GradientBlur({ radius, opacityDecay, backgroundColor, color, colorGenerator, }: GradientBlurProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
export interface LiveWaveformProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onError'> {
|
|
3
|
+
active?: boolean;
|
|
4
|
+
processing?: boolean;
|
|
5
|
+
barWidth?: number;
|
|
6
|
+
barHeight?: number;
|
|
7
|
+
barGap?: number;
|
|
8
|
+
barRadius?: number;
|
|
9
|
+
barColor?: string;
|
|
10
|
+
fadeEdges?: boolean;
|
|
11
|
+
fadeWidth?: number;
|
|
12
|
+
height?: string | number;
|
|
13
|
+
sensitivity?: number;
|
|
14
|
+
smoothingTimeConstant?: number;
|
|
15
|
+
fftSize?: number;
|
|
16
|
+
historySize?: number;
|
|
17
|
+
updateRate?: number;
|
|
18
|
+
mode?: "scrolling" | "static";
|
|
19
|
+
onError?: (error: Error) => void;
|
|
20
|
+
onStreamReady?: (stream: MediaStream) => void;
|
|
21
|
+
onStreamEnd?: () => void;
|
|
22
|
+
}
|
|
23
|
+
export declare const LiveWaveform: import("react").ForwardRefExoticComponent<LiveWaveformProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
3
|
+
declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
|
|
4
|
+
declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
|
|
5
|
+
declare function PopoverContent({ className, align, sideOffset, container, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content> & {
|
|
6
|
+
container?: HTMLElement;
|
|
7
|
+
}): React.JSX.Element;
|
|
8
|
+
declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
|
|
9
|
+
export { Popover, PopoverTrigger, PopoverContent, PopoverAnchor };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
+
declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
|
|
4
|
+
declare function Tooltip({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element;
|
|
5
|
+
declare function TooltipTrigger({ ...props }: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
|
|
6
|
+
declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element;
|
|
7
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
package/package.json
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "research-agent-ui",
|
|
3
|
+
"description": "Chat research agent UI: conversation window, article reader, search config, file uploads, and chat history",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"author": "vtempest",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/OpenSourceAGI/qwksearch-research-agent.git",
|
|
9
|
+
"directory": "packages/research-agent-ui"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "./dist/index.cjs",
|
|
13
|
+
"module": "./dist/index.mjs",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.mjs",
|
|
19
|
+
"require": "./dist/index.cjs"
|
|
20
|
+
},
|
|
21
|
+
"./config": {
|
|
22
|
+
"types": "./dist/config.d.ts",
|
|
23
|
+
"import": "./dist/config.mjs",
|
|
24
|
+
"require": "./dist/config.cjs"
|
|
25
|
+
},
|
|
26
|
+
"./api": {
|
|
27
|
+
"types": "./dist/api.d.ts",
|
|
28
|
+
"import": "./dist/api.mjs",
|
|
29
|
+
"require": "./dist/api.cjs"
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist",
|
|
34
|
+
"README.md"
|
|
35
|
+
],
|
|
36
|
+
"sideEffects": false,
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "vite build && (tsc --project tsconfig.build.json || true)",
|
|
39
|
+
"type-check": "tsc --noEmit",
|
|
40
|
+
"prepublishOnly": "bun run build"
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"chat",
|
|
44
|
+
"research-agent",
|
|
45
|
+
"search",
|
|
46
|
+
"article-reader",
|
|
47
|
+
"shadcn",
|
|
48
|
+
"react"
|
|
49
|
+
],
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"next": ">=14",
|
|
52
|
+
"react": ">=18",
|
|
53
|
+
"react-dom": ">=18"
|
|
54
|
+
},
|
|
55
|
+
"dependencies": {
|
|
56
|
+
"@huggingface/transformers": "^3.8.1",
|
|
57
|
+
"@radix-ui/react-dialog": "^1.1.16",
|
|
58
|
+
"@radix-ui/react-dropdown-menu": "^2.1.17",
|
|
59
|
+
"@radix-ui/react-popover": "^1.1.16",
|
|
60
|
+
"@radix-ui/react-slot": "^1.2.5",
|
|
61
|
+
"@radix-ui/react-tooltip": "^1.2.9",
|
|
62
|
+
"@ricky0123/vad-web": "^0.0.30",
|
|
63
|
+
"chat-agent-toolkit": "^1.2.18",
|
|
64
|
+
"domain-rank": "^0.1.7",
|
|
65
|
+
"drizzle-orm": "^0.45.2",
|
|
66
|
+
"fuse.js": "^7.1.0",
|
|
67
|
+
"class-variance-authority": "^0.7.1",
|
|
68
|
+
"clsx": "^2.1.1",
|
|
69
|
+
"dompurify": "^3.4.9",
|
|
70
|
+
"extract-webpage": "^1.2.20",
|
|
71
|
+
"framer-motion": "^12.40.0",
|
|
72
|
+
"grab-url": "^1.6.22",
|
|
73
|
+
"html2canvas": "^1.4.1",
|
|
74
|
+
"lucide-react": "^1.17.0",
|
|
75
|
+
"markdown-to-jsx": "^9.8.2",
|
|
76
|
+
"motion": "^12.40.0",
|
|
77
|
+
"quantum-sphere-loading-icon": "^1.0.3",
|
|
78
|
+
"react-icons": "^5.6.0",
|
|
79
|
+
"react-textarea-autosize": "^8.5.9",
|
|
80
|
+
"sonner": "^2.0.7",
|
|
81
|
+
"streamdown": "^2.5.0",
|
|
82
|
+
"tailwind-merge": "^3.6.0",
|
|
83
|
+
"turndown": "^7.2.4"
|
|
84
|
+
},
|
|
85
|
+
"devDependencies": {
|
|
86
|
+
"@types/react": "^19.0.0",
|
|
87
|
+
"@types/react-dom": "^19.0.0",
|
|
88
|
+
"@types/turndown": "^5.0.5",
|
|
89
|
+
"@vitejs/plugin-react": "^6.0.3",
|
|
90
|
+
"next": "^16.2.10",
|
|
91
|
+
"react": "^19.2.7",
|
|
92
|
+
"react-dom": "^19.2.7",
|
|
93
|
+
"typescript": "^5.7.2",
|
|
94
|
+
"vite": "^8.1.3"
|
|
95
|
+
}
|
|
96
|
+
}
|