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.
Files changed (125) hide show
  1. package/README.md +177 -0
  2. package/dist/api/handlers/agents.d.ts +4 -0
  3. package/dist/api/handlers/article-followups.d.ts +2 -0
  4. package/dist/api/handlers/article-qa.d.ts +2 -0
  5. package/dist/api/handlers/autocomplete.d.ts +8 -0
  6. package/dist/api/handlers/chats.d.ts +23 -0
  7. package/dist/api/handlers/mcpservers.d.ts +24 -0
  8. package/dist/api/handlers/messages.d.ts +4 -0
  9. package/dist/api/handlers/providers.d.ts +29 -0
  10. package/dist/api/handlers/rewrite.d.ts +4 -0
  11. package/dist/api/handlers/search.d.ts +7 -0
  12. package/dist/api/handlers/suggestions.d.ts +3 -0
  13. package/dist/api/handlers/test-models.d.ts +3 -0
  14. package/dist/api/handlers/transcript.d.ts +4 -0
  15. package/dist/api/handlers/validate-openrouter.d.ts +5 -0
  16. package/dist/api/handlers/voice.d.ts +4 -0
  17. package/dist/api/index.d.ts +16 -0
  18. package/dist/api/types.d.ts +86 -0
  19. package/dist/api.cjs +22 -0
  20. package/dist/api.mjs +768 -0
  21. package/dist/components/ArticleReader/ArticleAIResponse.d.ts +11 -0
  22. package/dist/components/ArticleReader/ArticleActionButtons.d.ts +18 -0
  23. package/dist/components/ArticleReader/ArticleContent.d.ts +8 -0
  24. package/dist/components/ArticleReader/ArticleExtractPanel.d.ts +4 -0
  25. package/dist/components/ArticleReader/ArticleFollowupQuestions.d.ts +12 -0
  26. package/dist/components/ArticleReader/ArticlePanelHeader.d.ts +9 -0
  27. package/dist/components/ArticleReader/ArticlePromptInput.d.ts +11 -0
  28. package/dist/components/ArticleReader/ExtractPanelContext.d.ts +18 -0
  29. package/dist/components/ArticleReader/LexicalArticleViewer.d.ts +15 -0
  30. package/dist/components/ArticleReader/index.d.ts +12 -0
  31. package/dist/components/ArticleReader/unified-markdown.d.ts +19 -0
  32. package/dist/components/ChatConversation/ChatConversationThread.d.ts +10 -0
  33. package/dist/components/ChatConversation/ChatHeaderNavigationBar.d.ts +2 -0
  34. package/dist/components/ChatConversation/ChatHomepage.d.ts +6 -0
  35. package/dist/components/ChatConversation/ChatMessageBubble.d.ts +19 -0
  36. package/dist/components/ChatConversation/ChatMessageInputBar.d.ts +10 -0
  37. package/dist/components/ChatConversation/ChatWindow.d.ts +75 -0
  38. package/dist/components/ChatConversation/EmptyStateChatMessageInput.d.ts +9 -0
  39. package/dist/components/ChatConversation/MessageBubble/AssistantMessageActions.d.ts +15 -0
  40. package/dist/components/ChatConversation/MessageBubble/FollowUpSuggestions.d.ts +15 -0
  41. package/dist/components/ChatConversation/MessageBubble/ThinkTagProcessor.d.ts +13 -0
  42. package/dist/components/ChatConversation/MessageBubble/UserMessageHeader.d.ts +20 -0
  43. package/dist/components/ChatConversation/MessageReasoningPanel.d.ts +14 -0
  44. package/dist/components/ChatConversation/RecentHistoryChips.d.ts +1 -0
  45. package/dist/components/ChatConversation/SearchModeSpotlightPanel.d.ts +10 -0
  46. package/dist/components/ChatConversation/background-art.d.ts +11 -0
  47. package/dist/components/ChatHistoryDropdown/HistoryChatItem.d.ts +9 -0
  48. package/dist/components/ChatHistoryDropdown/HistoryDialogs.d.ts +14 -0
  49. package/dist/components/ChatHistoryDropdown/HistoryDropdown.d.ts +6 -0
  50. package/dist/components/ChatHistoryDropdown/HistoryHeader.d.ts +10 -0
  51. package/dist/components/ChatHistoryDropdown/index.d.ts +4 -0
  52. package/dist/components/ChatHistoryDropdown/useHistoryState.d.ts +27 -0
  53. package/dist/components/ConfigError.d.ts +1 -0
  54. package/dist/components/FileUpload/CompactFileAttachmentButton.d.ts +2 -0
  55. package/dist/components/FileUpload/FileAttachmentButton.d.ts +2 -0
  56. package/dist/components/FileUpload/FilePreviewCard.d.ts +13 -0
  57. package/dist/components/FileUpload/FileUploadDropdown.d.ts +7 -0
  58. package/dist/components/FileUpload/GoogleDrivePicker.d.ts +4 -0
  59. package/dist/components/FileUpload/useFileHandling.d.ts +26 -0
  60. package/dist/components/Footer.d.ts +19 -0
  61. package/dist/components/MessageActions/CopyMessageButton.d.ts +6 -0
  62. package/dist/components/MessageActions/DeleteChatSessionButton.d.ts +8 -0
  63. package/dist/components/MessageActions/RewriteMessageButton.d.ts +5 -0
  64. package/dist/components/MessageComposer/ActionBar.d.ts +17 -0
  65. package/dist/components/MessageComposer/ChatInputBox.d.ts +6 -0
  66. package/dist/components/MessageComposer/MessageInputIconSet.d.ts +24 -0
  67. package/dist/components/MessageComposer/PastedContentCard.d.ts +12 -0
  68. package/dist/components/SearchConfig/CategoriesMenu.d.ts +2 -0
  69. package/dist/components/SearchConfig/ChatModelSelector.d.ts +2 -0
  70. package/dist/components/SearchConfig/ModelSelector.d.ts +8 -0
  71. package/dist/components/SearchConfig/ModelSelectorSubmenu.d.ts +2 -0
  72. package/dist/components/SearchConfig/ResearchFocusToggleButton.d.ts +2 -0
  73. package/dist/components/SearchConfig/SearchOptimizationSelector.d.ts +2 -0
  74. package/dist/components/SearchConfig/categories.d.ts +10 -0
  75. package/dist/components/SearchResults/MessageSources.d.ts +11 -0
  76. package/dist/components/SearchResults/NewsArticleWidget.d.ts +2 -0
  77. package/dist/components/SearchResults/SearchProgressIndicator.d.ts +8 -0
  78. package/dist/components/SearchResults/WebCitationBadge.d.ts +7 -0
  79. package/dist/config.cjs +1 -0
  80. package/dist/config.d.ts +54 -0
  81. package/dist/config.mjs +16 -0
  82. package/dist/hooks/useChat/ChatContext.d.ts +147 -0
  83. package/dist/hooks/useChat/ChatProvider.d.ts +35 -0
  84. package/dist/hooks/useChat/buildSections.d.ts +39 -0
  85. package/dist/hooks/useChat/chatConfig.d.ts +31 -0
  86. package/dist/hooks/useChat/chatMessages.d.ts +48 -0
  87. package/dist/hooks/useChat/index.d.ts +58 -0
  88. package/dist/hooks/useChat/sendMessage.d.ts +91 -0
  89. package/dist/hooks/useChat/useChat.d.ts +3 -0
  90. package/dist/hooks/useChat/useChatState.d.ts +127 -0
  91. package/dist/hooks/useSession.d.ts +21 -0
  92. package/dist/hooks/voice/useInteruptionDetection.d.ts +16 -0
  93. package/dist/hooks/voice/useSpeechToTranscript.d.ts +5 -0
  94. package/dist/hooks/voice/useTextToVoice.d.ts +13 -0
  95. package/dist/icons/IconSearchAcademic.d.ts +1 -0
  96. package/dist/icons/IconSearchFiles.d.ts +1 -0
  97. package/dist/icons/IconSearchImages.d.ts +1 -0
  98. package/dist/icons/IconSearchNews.d.ts +1 -0
  99. package/dist/icons/IconSearchTech.d.ts +1 -0
  100. package/dist/icons/IconSearchVideos.d.ts +1 -0
  101. package/dist/icons/IconSearchWeb.d.ts +1 -0
  102. package/dist/index.cjs +52 -0
  103. package/dist/index.d.ts +14 -0
  104. package/dist/index.mjs +5847 -0
  105. package/dist/lib/cdn-loader.d.ts +2 -0
  106. package/dist/lib/export.d.ts +17 -0
  107. package/dist/lib/guest.d.ts +19 -0
  108. package/dist/lib/suggestions.d.ts +2 -0
  109. package/dist/lib/url-autolink.d.ts +21 -0
  110. package/dist/lib/utils.d.ts +3 -0
  111. package/dist/rolldown-runtime-CMqjfN_6.cjs +1 -0
  112. package/dist/types/chat.d.ts +132 -0
  113. package/dist/types/research.d.ts +81 -0
  114. package/dist/ui/Loader.d.ts +2 -0
  115. package/dist/ui/badge.d.ts +9 -0
  116. package/dist/ui/button.d.ts +11 -0
  117. package/dist/ui/dialog.d.ts +15 -0
  118. package/dist/ui/dropdown-menu.d.ts +25 -0
  119. package/dist/ui/glowing-effect.d.ts +14 -0
  120. package/dist/ui/gradient-blur.d.ts +9 -0
  121. package/dist/ui/live-waveform.d.ts +23 -0
  122. package/dist/ui/popover.d.ts +9 -0
  123. package/dist/ui/tooltip.d.ts +7 -0
  124. package/dist/ui/visually-hidden.d.ts +2 -0
  125. package/package.json +96 -0
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Displays the AI-generated response to a user's prompt about the current article, with loading spinner and error state.
3
+ */
4
+ import React from 'react';
5
+ interface ArticleAIResponseProps {
6
+ response: string;
7
+ isLoading: boolean;
8
+ error: string;
9
+ }
10
+ declare const ArticleAIResponse: React.FC<ArticleAIResponseProps>;
11
+ export default ArticleAIResponse;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Toolbar with Ask AI, Suggest, Copy, Highlight, and Favorite buttons shown at the top of the article extract panel.
3
+ */
4
+ import React from 'react';
5
+ interface ArticleActionButtonsProps {
6
+ isLoadingAI: boolean;
7
+ isLoadingFollowups: boolean;
8
+ isLoadingFavorite: boolean;
9
+ isFavorited: boolean;
10
+ isHighlightMode: boolean;
11
+ onAskClick: () => void;
12
+ onSuggestClick: () => void;
13
+ onCopyClick: () => void;
14
+ onFavoriteClick: () => void;
15
+ onHighlightToggle: () => void;
16
+ }
17
+ declare const ArticleActionButtons: React.FC<ArticleActionButtonsProps>;
18
+ export default ArticleActionButtons;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { Article } from '../../types/research';
3
+ interface ArticleContentProps {
4
+ article: Article;
5
+ isHighlightMode: boolean;
6
+ }
7
+ declare const ArticleContent: React.FC<ArticleContentProps>;
8
+ export default ArticleContent;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ArticleExtractPanelProps } from '.';
3
+ declare const ArticleExtractPanel: React.FC<ArticleExtractPanelProps>;
4
+ export default ArticleExtractPanel;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Renders a clickable list of AI-generated follow-up question suggestions for the open article.
3
+ */
4
+ import React from 'react';
5
+ interface ArticleFollowupQuestionsProps {
6
+ questions: string[];
7
+ isLoading: boolean;
8
+ error: string;
9
+ onQuestionClick: (question: string) => void;
10
+ }
11
+ declare const ArticleFollowupQuestions: React.FC<ArticleFollowupQuestionsProps>;
12
+ export default ArticleFollowupQuestions;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Minimal header bar for the article extract panel with a close button.
3
+ */
4
+ import React from 'react';
5
+ interface ArticlePanelHeaderProps {
6
+ onClose: () => void;
7
+ }
8
+ declare const ArticlePanelHeader: React.FC<ArticlePanelHeaderProps>;
9
+ export default ArticlePanelHeader;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Single-line text input for entering AI questions about the current article; submits on Enter.
3
+ */
4
+ import React from 'react';
5
+ interface ArticlePromptInputProps {
6
+ value: string;
7
+ onChange: (value: string) => void;
8
+ onSubmit: () => void;
9
+ }
10
+ declare const ArticlePromptInput: React.FC<ArticlePromptInputProps>;
11
+ export default ArticlePromptInput;
@@ -0,0 +1,18 @@
1
+ import React, { ReactNode } from 'react';
2
+ interface ExtractPanelContextType {
3
+ isOpen: boolean;
4
+ url: string;
5
+ searchText: string;
6
+ panelWidth: number;
7
+ setIsOpen: (isOpen: boolean) => void;
8
+ setUrl: (url: string) => void;
9
+ setSearchText: (searchText: string) => void;
10
+ setPanelWidth: (width: number) => void;
11
+ openPanel: (url: string, searchText?: string) => void;
12
+ closePanel: () => void;
13
+ }
14
+ export declare const useExtractPanel: () => ExtractPanelContextType;
15
+ export declare const ExtractPanelProvider: React.FC<{
16
+ children: ReactNode;
17
+ }>;
18
+ export {};
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ interface LexicalArticleViewerProps {
3
+ html: string;
4
+ isHighlightMode?: boolean;
5
+ }
6
+ /**
7
+ * Renders extracted article HTML as sanitized, styled prose.
8
+ *
9
+ * Sanitization runs only in the browser: `dompurify` requires a real DOM, and
10
+ * the isomorphic build pulls in `jsdom`, which cannot be bundled for the
11
+ * Cloudflare Workers runtime. SSR renders an empty container; the sanitized
12
+ * markup is injected after mount.
13
+ */
14
+ declare const LexicalArticleViewer: React.FC<LexicalArticleViewerProps>;
15
+ export default LexicalArticleViewer;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Barrel module that re-exports all ArticleReader components, the Lexical article viewer, and research types.
3
+ */
4
+ export { default as ArticlePanelHeader } from "./ArticlePanelHeader";
5
+ export { default as ArticleActionButtons } from "./ArticleActionButtons";
6
+ export { default as ArticlePromptInput } from "./ArticlePromptInput";
7
+ export { default as ArticleFollowupQuestions } from "./ArticleFollowupQuestions";
8
+ export { default as ArticleAIResponse } from "./ArticleAIResponse";
9
+ export { default as ArticleContent } from "./ArticleContent";
10
+ export { default as LexicalArticleViewer } from "./LexicalArticleViewer";
11
+ export { UnifiedMarkdown, type UnifiedMarkdownProps } from "./unified-markdown";
12
+ export * from "../../types/research";
@@ -0,0 +1,19 @@
1
+ import React from "react";
2
+ export interface UnifiedMarkdownProps {
3
+ content: string;
4
+ className?: string;
5
+ isStreaming?: boolean;
6
+ }
7
+ /**
8
+ * UNIFIED MARKDOWN RENDERER
9
+ *
10
+ * Single source of truth for all markdown rendering across the application.
11
+ * Optimized for Kortix brand with Vercel-level UX/UI polish.
12
+ *
13
+ * Design principles:
14
+ * - Clean, minimal aesthetic
15
+ * - Consistent spacing rhythm
16
+ * - Excellent readability in light & dark modes
17
+ * - Brand-aligned colors and border radius
18
+ */
19
+ export declare const UnifiedMarkdown: React.NamedExoticComponent<UnifiedMarkdownProps>;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Main chat conversation thread component.
3
+ * Renders the sequence of message sections, the floating toolbar, and the input bar.
4
+ * Handles automatic scrolling to the bottom on new messages and manages
5
+ * window resize events for layout adjustments.
6
+ *
7
+ * @returns {JSX.Element} The rendered chat thread
8
+ */
9
+ declare const Chat: () => import("react").JSX.Element;
10
+ export default Chat;
@@ -0,0 +1,2 @@
1
+ declare const Navbar: () => import("react").JSX.Element;
2
+ export default Navbar;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The homepage component for the chat interface.
3
+ * Displays a background artwork (image or video), a settings button,
4
+ * and the main chat input box fixed at the bottom of the screen.
5
+ */
6
+ export default function ChatHomepage(): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import React, { Ref } from 'react';
2
+ import { Section } from '../../hooks/useChat';
3
+ /**
4
+ * Component that renders a single chat section (user message + assistant response).
5
+ * Handles message expansion, editing, copying, text-to-speech, and exports.
6
+ *
7
+ * @param section - The chat section data
8
+ * @param sectionIndex - The index of this section in the conversation
9
+ * @param dividerRef - Optional ref for the divider element
10
+ * @param isLast - Whether this is the last message in the thread
11
+ * @returns {JSX.Element} The rendered message bubble
12
+ */
13
+ declare const MessageBox: ({ section, dividerRef, isLast, }: {
14
+ section: Section;
15
+ sectionIndex: number;
16
+ dividerRef?: Ref<HTMLDivElement>;
17
+ isLast: boolean;
18
+ }) => React.JSX.Element;
19
+ export default MessageBox;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Input bar component for sending chat messages.
3
+ * Features an auto-expanding textarea, file attachment buttons,
4
+ * and search configuration menus (Focus, Category).
5
+ * Handles 'Enter' to send and '/' to focus.
6
+ *
7
+ * @returns {JSX.Element} The rendered message input bar
8
+ */
9
+ declare const MessageInput: () => import("react").JSX.Element;
10
+ export default MessageInput;
@@ -0,0 +1,75 @@
1
+ import type { Document } from 'extract-webpage/search';
2
+ /**
3
+ * Base interface for all chat message types.
4
+ */
5
+ export interface BaseMessage {
6
+ /** ID of the chat session this message belongs to */
7
+ chatId: string;
8
+ /** Unique identifier for the message */
9
+ messageId: string;
10
+ /** Timestamp when the message was created */
11
+ createdAt: Date;
12
+ }
13
+ /**
14
+ * Represents a message sent by the AI assistant.
15
+ */
16
+ export interface AssistantMessage extends BaseMessage {
17
+ role: 'assistant';
18
+ /** The text content of the assistant message */
19
+ content: string;
20
+ /** Optional follow-up suggestions */
21
+ suggestions?: string[];
22
+ }
23
+ /**
24
+ * Represents a message sent by the user.
25
+ */
26
+ export interface UserMessage extends BaseMessage {
27
+ role: 'user';
28
+ /** The text content of the user message */
29
+ content: string;
30
+ }
31
+ /**
32
+ * Represents a message containing search sources or citations.
33
+ */
34
+ export interface SourceMessage extends BaseMessage {
35
+ role: 'source';
36
+ /** Array of documentation sources found during research */
37
+ sources: Document[];
38
+ }
39
+ export interface SuggestionMessage extends BaseMessage {
40
+ role: 'suggestion';
41
+ suggestions: string[];
42
+ }
43
+ export interface SearchQuery {
44
+ query: string;
45
+ /** Display label e.g. "Web", "Academic" */
46
+ category?: string;
47
+ status: 'running' | 'done';
48
+ }
49
+ /** Transient progress message emitted while the agent runs searches. */
50
+ export interface SearchingMessage extends BaseMessage {
51
+ role: 'searching';
52
+ queries: SearchQuery[];
53
+ }
54
+ /**
55
+ * Union type representing all possible message roles in a chat.
56
+ */
57
+ export type Message = AssistantMessage | UserMessage | SourceMessage | SuggestionMessage | SearchingMessage;
58
+ /**
59
+ * Represents a single exchange in the chat (user + assistant).
60
+ */
61
+ export type ChatTurn = UserMessage | AssistantMessage;
62
+ export interface File {
63
+ fileName: string;
64
+ fileExtension: string;
65
+ fileId: string;
66
+ }
67
+ /**
68
+ * Main window component for the chat interface.
69
+ * Ordinates the overall chat flow, handling errors, loading states,
70
+ * and switching between the homepage and the active conversation thread.
71
+ *
72
+ * @returns {JSX.Element} The rendered chat window
73
+ */
74
+ declare const ChatWindow: () => import("react").JSX.Element;
75
+ export default ChatWindow;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Specialized input component for the empty chat state (homepage).
3
+ * Features a larger textarea and additional configuration selectors
4
+ * like Model and Optimization.
5
+ *
6
+ * @returns {JSX.Element} The rendered empty state input
7
+ */
8
+ declare const EmptyChatMessageInput: () => import("react").JSX.Element;
9
+ export default EmptyChatMessageInput;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { Section } from '../../../hooks/useChat';
3
+ interface AssistantMessageActionsProps {
4
+ section: Section;
5
+ speechStatus: string;
6
+ start: () => void;
7
+ stop: () => void;
8
+ handleOpenInLLM: (platform: string) => void;
9
+ }
10
+ /**
11
+ * Component for message actions related to the assistant's response.
12
+ * Includes rewrite, copy, text-to-speech, export, and external LLM links.
13
+ */
14
+ declare const AssistantMessageActions: ({ section, speechStatus, start, stop, handleOpenInLLM, }: AssistantMessageActionsProps) => React.JSX.Element;
15
+ export default AssistantMessageActions;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ import { Section } from '../../../hooks/useChat';
3
+ interface FollowUpSuggestionsProps {
4
+ section: Section;
5
+ isLast: boolean;
6
+ loading: boolean;
7
+ sendMessage: (suggestion: string) => void;
8
+ }
9
+ /**
10
+ * Component for rendering follow-up question suggestions.
11
+ * Always shows suggestions if they exist, regardless of loading state.
12
+ * Supports keyboard shortcuts 1-5 to trigger suggestions when not focused in an input.
13
+ */
14
+ declare const FollowUpSuggestions: ({ section, isLast, loading, sendMessage, }: FollowUpSuggestionsProps) => React.JSX.Element;
15
+ export default FollowUpSuggestions;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ /**
3
+ * Processor for the <think> tag in AI responses.
4
+ * Renders the thinking process inside a ThinkBox component.
5
+ *
6
+ * @param children - The thinking content
7
+ * @param thinkingEnded - Whether the thinking phase has completed
8
+ */
9
+ declare const ThinkTagProcessor: ({ children, thinkingEnded, }: {
10
+ children: React.ReactNode;
11
+ thinkingEnded: boolean;
12
+ }) => React.JSX.Element;
13
+ export default ThinkTagProcessor;
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ import { Section } from '../../../hooks/useChat';
3
+ interface UserMessageHeaderProps {
4
+ section: Section;
5
+ isExpanded: boolean;
6
+ setIsExpanded: (expanded: boolean) => void;
7
+ isEditing: boolean;
8
+ setIsEditing: (editing: boolean) => void;
9
+ editText: string;
10
+ setEditText: (text: string) => void;
11
+ handleEditSubmit: () => void;
12
+ copiedUserMsg: boolean;
13
+ handleCopyUserMsg: () => void;
14
+ }
15
+ /**
16
+ * Component for the user message header in a chat bubble.
17
+ * Handles expansion toggle, message text display, and copy/edit actions.
18
+ */
19
+ declare const UserMessageHeader: ({ section, isExpanded, setIsExpanded, isEditing, setIsEditing, editText, setEditText, handleEditSubmit, copiedUserMsg, handleCopyUserMsg, }: UserMessageHeaderProps) => React.JSX.Element;
20
+ export default UserMessageHeader;
@@ -0,0 +1,14 @@
1
+ interface ThinkBoxProps {
2
+ content: string;
3
+ thinkingEnded: boolean;
4
+ }
5
+ /**
6
+ * Component that renders the AI's "thinking process" or reasoning.
7
+ * Usually displayed as a collapsible box above the assistant message.
8
+ *
9
+ * @param content - The reasoning text content
10
+ * @param thinkingEnded - Whether the thinking phase has finished
11
+ * @returns {JSX.Element} The rendered reasoning panel
12
+ */
13
+ declare const ThinkBox: ({ content, thinkingEnded }: ThinkBoxProps) => import("react").JSX.Element;
14
+ export default ThinkBox;
@@ -0,0 +1 @@
1
+ export default function RecentHistoryChips(): import("react").JSX.Element;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ /**
3
+ * Spotlight search component for the chat interface.
4
+ * Features a blob-like animation, category shortcuts, and model selection.
5
+ * Typically used as the initial interaction point on the homepage.
6
+ *
7
+ * @returns {JSX.Element} The rendered spotlight search panel
8
+ */
9
+ declare const SearchSpotlight: () => React.JSX.Element;
10
+ export default SearchSpotlight;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Gets a random artistic background about graph theory
3
+ * and collective consciousness, 50+ AI-gen artworks found online
4
+ * @returns {string} Imgur URL of random artistic background
5
+ */
6
+ export declare function getBackgroundArtwork(): string;
7
+ /**
8
+ * Get a greeting based on the time of day
9
+ * @returns {string} A random greeting
10
+ */
11
+ export declare const getGreeting: () => string;
@@ -0,0 +1,9 @@
1
+ import { Chat } from '../../types/research';
2
+ interface HistoryChatItemProps {
3
+ chat: Chat;
4
+ isPinned: boolean;
5
+ onTogglePin: (e: React.MouseEvent, chatId: string) => void;
6
+ onDelete: (e: React.MouseEvent, chatId: string) => void;
7
+ }
8
+ export declare function HistoryChatItem({ chat, isPinned, onTogglePin, onDelete }: HistoryChatItemProps): import("react").JSX.Element;
9
+ export {};
@@ -0,0 +1,14 @@
1
+ interface HistoryDialogsProps {
2
+ deleteDialogOpen: boolean;
3
+ setDeleteDialogOpen: (open: boolean) => void;
4
+ chatToDelete: string | null;
5
+ setChatToDelete: (id: string | null) => void;
6
+ deleting: boolean;
7
+ onConfirmDelete: () => void;
8
+ clearAllDialogOpen: boolean;
9
+ setClearAllDialogOpen: (open: boolean) => void;
10
+ clearingAll: boolean;
11
+ onConfirmClearAll: () => void;
12
+ }
13
+ export declare function HistoryDialogs({ deleteDialogOpen, setDeleteDialogOpen, chatToDelete, setChatToDelete, deleting, onConfirmDelete, clearAllDialogOpen, setClearAllDialogOpen, clearingAll, onConfirmClearAll, }: HistoryDialogsProps): import("react").JSX.Element;
14
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ interface HistoryDropdownProps {
3
+ showLabel?: boolean;
4
+ }
5
+ declare const HistoryDropdown: ({ showLabel }: HistoryDropdownProps) => React.JSX.Element;
6
+ export default HistoryDropdown;
@@ -0,0 +1,10 @@
1
+ interface HistoryHeaderProps {
2
+ incognito: boolean;
3
+ onToggleIncognito: () => void;
4
+ showClearAll: boolean;
5
+ onClearAll: () => void;
6
+ searchQuery: string;
7
+ onSearchChange: (query: string) => void;
8
+ }
9
+ export declare function HistoryHeader({ incognito, onToggleIncognito, showClearAll, onClearAll, searchQuery, onSearchChange }: HistoryHeaderProps): import("react").JSX.Element;
10
+ export {};
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Barrel export for the HistoryDropdown component.
3
+ */
4
+ export { default } from './HistoryDropdown';
@@ -0,0 +1,27 @@
1
+ import { Chat } from "../../types/research";
2
+ export declare function useHistoryState(): {
3
+ chats: Chat[];
4
+ sortedChats: Chat[];
5
+ displayChats: Chat[];
6
+ loading: boolean;
7
+ pinnedIds: string[];
8
+ togglePin: (e: React.MouseEvent, chatId: string) => void;
9
+ incognito: boolean;
10
+ toggleIncognito: () => void;
11
+ searchQuery: string;
12
+ searchResults: Chat[];
13
+ searching: boolean;
14
+ handleSearchChange: (query: string) => void;
15
+ deleteDialogOpen: boolean;
16
+ setDeleteDialogOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
17
+ chatToDelete: string;
18
+ setChatToDelete: import("react").Dispatch<import("react").SetStateAction<string>>;
19
+ deleting: boolean;
20
+ handleDeleteClick: (e: React.MouseEvent, chatId: string) => void;
21
+ handleConfirmDelete: () => Promise<void>;
22
+ clearAllDialogOpen: boolean;
23
+ setClearAllDialogOpen: import("react").Dispatch<import("react").SetStateAction<boolean>>;
24
+ clearingAll: boolean;
25
+ handleClearAllClick: () => void;
26
+ handleConfirmClearAll: () => Promise<void>;
27
+ };
@@ -0,0 +1 @@
1
+ export default function ConfigError(): import("react").JSX.Element;
@@ -0,0 +1,2 @@
1
+ declare const AttachSmall: () => import("react").JSX.Element;
2
+ export default AttachSmall;
@@ -0,0 +1,2 @@
1
+ declare const Attach: () => import("react").JSX.Element;
2
+ export default Attach;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Thumbnail card for a single attached file showing an image preview or a file-type icon with name and size;
3
+ * overlays upload status (spinner / error) and a hover-revealed remove button.
4
+ */
5
+ import React from "react";
6
+ import { AttachedFile } from "../../types/research";
7
+ interface FilePreviewCardProps {
8
+ file: AttachedFile;
9
+ onRemove: (id: string) => void;
10
+ }
11
+ export declare const formatFileSize: (bytes: number) => string;
12
+ export declare const FilePreviewCard: React.FC<FilePreviewCardProps>;
13
+ export {};
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface FileUploadDropdownProps {
3
+ onFileSelect: (files: FileList | File[]) => void;
4
+ disabled?: boolean;
5
+ }
6
+ declare const FileUploadDropdown: React.FC<FileUploadDropdownProps>;
7
+ export default FileUploadDropdown;
@@ -0,0 +1,4 @@
1
+ export declare const useGooglePicker: () => {
2
+ openPicker: (accessToken: string, onFilesSelected: (files: google.picker.DocumentObject[]) => void, onError?: (error: string) => void) => Promise<void>;
3
+ };
4
+ export default useGooglePicker;
@@ -0,0 +1,26 @@
1
+ import React from "react";
2
+ import { AttachedFile, PastedContent } from "../../types/research";
3
+ import type { ChatFile } from "../../types/chat";
4
+ interface UseFileHandlingOptions {
5
+ setMessage: React.Dispatch<React.SetStateAction<string>>;
6
+ contextFiles: ChatFile[];
7
+ contextFileIds: string[];
8
+ setContextFiles: (files: ChatFile[]) => void;
9
+ setContextFileIds: (ids: string[]) => void;
10
+ }
11
+ export declare function useFileHandling({ setMessage, contextFiles, contextFileIds, setContextFiles, setContextFileIds, }: UseFileHandlingOptions): {
12
+ files: AttachedFile[];
13
+ setFiles: React.Dispatch<React.SetStateAction<AttachedFile[]>>;
14
+ pastedContent: PastedContent[];
15
+ setPastedContent: React.Dispatch<React.SetStateAction<PastedContent[]>>;
16
+ isDragging: boolean;
17
+ isExtractingUrl: boolean;
18
+ handleFiles: (newFilesList: FileList | File[]) => Promise<void>;
19
+ extractUrl: (url: string) => Promise<boolean>;
20
+ onDragOver: (e: React.DragEvent) => void;
21
+ onDragLeave: (e: React.DragEvent) => void;
22
+ onDrop: (e: React.DragEvent) => void;
23
+ handlePaste: (e: React.ClipboardEvent) => void;
24
+ resetAttachments: () => void;
25
+ };
26
+ export {};
@@ -0,0 +1,19 @@
1
+ interface FooterLink {
2
+ url: string;
3
+ text: string;
4
+ icon?: string;
5
+ }
6
+ interface FooterProps {
7
+ listFooterLinks?: FooterLink[];
8
+ optionShowIcons?: boolean;
9
+ optionBackgroundColor?: string;
10
+ optionColumns?: number;
11
+ }
12
+ /**
13
+ * Footer component that displays a list of links with optional icons
14
+ * @param listFooterLinks - Array of footer links with their properties
15
+ * @param optionShowIcons - Whether to show icons next to links (default: true)
16
+ * @param optionBackgroundColor - Background color class for the footer (default: "bg-black/40")
17
+ */
18
+ export default function Footer({ listFooterLinks, optionShowIcons, optionBackgroundColor, }: FooterProps): import("react").JSX.Element;
19
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Section } from '../../hooks/useChat';
2
+ declare const Copy: ({ section, initialMessage, }: {
3
+ section: Section;
4
+ initialMessage: string;
5
+ }) => import("react").JSX.Element;
6
+ export default Copy;
@@ -0,0 +1,8 @@
1
+ import { Chat } from '../../types/research';
2
+ declare const DeleteChat: ({ chatId, chats, setChats, redirect, }: {
3
+ chatId: string;
4
+ chats: Chat[];
5
+ setChats: (chats: Chat[]) => void;
6
+ redirect?: boolean;
7
+ }) => import("react").JSX.Element;
8
+ export default DeleteChat;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ declare const Rewrite: ({ messageId }: {
3
+ messageId: string;
4
+ }) => React.JSX.Element;
5
+ export default Rewrite;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Bottom action row for the message composer with the file-upload/settings dropdown, an optional microphone
3
+ * button (when speech is supported), and a send/stop-streaming button.
4
+ */
5
+ import React from "react";
6
+ interface ActionBarProps {
7
+ loading: boolean;
8
+ isListening: boolean;
9
+ isSpeechSupported: boolean;
10
+ toggleSpeech: () => void;
11
+ handleFiles: (files: FileList | File[]) => void;
12
+ hasContent: boolean;
13
+ handleSend: () => void;
14
+ onStop?: () => void;
15
+ }
16
+ export declare function ActionBar({ loading, isListening, isSpeechSupported, toggleSpeech, handleFiles, hasContent, handleSend, onStop, }: ActionBarProps): React.JSX.Element;
17
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from "react";
2
+ interface ChatInputBoxProps {
3
+ onNewChat?: () => void;
4
+ }
5
+ declare const ChatInputBox: ({ onNewChat }: ChatInputBoxProps) => React.JSX.Element;
6
+ export default ChatInputBox;