@admin-layout/demo-perplexity-browser 12.2.4-alpha.0 → 12.2.4-alpha.100
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/lib/api/index.d.ts +2 -0
- package/lib/api/index.d.ts.map +1 -0
- package/lib/api/llm.d.ts +34 -0
- package/lib/api/llm.d.ts.map +1 -0
- package/lib/api/llm.js +200 -0
- package/lib/api/llm.js.map +1 -0
- package/lib/api/stt.d.ts +21 -0
- package/lib/api/stt.d.ts.map +1 -0
- package/lib/api/stt.js +111 -0
- package/lib/api/stt.js.map +1 -0
- package/lib/components/AttachmentPreview.d.ts +10 -0
- package/lib/components/AttachmentPreview.d.ts.map +1 -0
- package/lib/components/AttachmentPreview.js +50 -0
- package/lib/components/AttachmentPreview.js.map +1 -0
- package/lib/components/AudioRecorder.d.ts +8 -0
- package/lib/components/AudioRecorder.d.ts.map +1 -0
- package/lib/components/AudioRecorder.js +221 -0
- package/lib/components/AudioRecorder.js.map +1 -0
- package/lib/components/AudioVisualizer.d.ts +7 -0
- package/lib/components/AudioVisualizer.d.ts.map +1 -0
- package/lib/components/AudioVisualizer.js +116 -0
- package/lib/components/AudioVisualizer.js.map +1 -0
- package/lib/components/ChatFiles.d.ts +8 -0
- package/lib/components/ChatFiles.d.ts.map +1 -0
- package/lib/components/ChatFiles.js +76 -0
- package/lib/components/ChatFiles.js.map +1 -0
- package/lib/components/ChatScreenshot.d.ts +7 -0
- package/lib/components/ChatScreenshot.d.ts.map +1 -0
- package/lib/components/ChatScreenshot.js +113 -0
- package/lib/components/ChatScreenshot.js.map +1 -0
- package/lib/components/SearchBar.d.ts +18 -1
- package/lib/components/SearchBar.d.ts.map +1 -1
- package/lib/components/SearchBar.js +184 -240
- package/lib/components/SearchBar.js.map +1 -1
- package/lib/config/constants.d.ts +108 -0
- package/lib/config/constants.d.ts.map +1 -0
- package/lib/config/constants.js +115 -0
- package/lib/config/constants.js.map +1 -0
- package/lib/config/env.d.ts +20 -0
- package/lib/config/env.d.ts.map +1 -0
- package/lib/config/env.js +22 -0
- package/lib/config/env.js.map +1 -0
- package/lib/config/index.d.ts +4 -0
- package/lib/config/index.d.ts.map +1 -0
- package/lib/config/providers.d.ts +54 -0
- package/lib/config/providers.d.ts.map +1 -0
- package/lib/config/providers.js +65 -0
- package/lib/config/providers.js.map +1 -0
- package/lib/pages/home/HomePage.d.ts +1 -3
- package/lib/pages/home/HomePage.d.ts.map +1 -1
- package/lib/pages/home/HomePage.js +288 -4
- package/lib/pages/home/HomePage.js.map +1 -1
- package/lib/platform/browser.d.ts +18 -0
- package/lib/platform/browser.d.ts.map +1 -0
- package/lib/platform/context.d.ts +76 -0
- package/lib/platform/context.d.ts.map +1 -0
- package/lib/platform/index.d.ts +25 -0
- package/lib/platform/index.d.ts.map +1 -0
- package/lib/platform/tauri.d.ts +35 -0
- package/lib/platform/tauri.d.ts.map +1 -0
- package/lib/platform/types.d.ts +164 -0
- package/lib/platform/types.d.ts.map +1 -0
- package/lib/state/chatMachine.d.ts +148 -0
- package/lib/state/chatMachine.d.ts.map +1 -0
- package/lib/state/chatMachine.js +458 -0
- package/lib/state/chatMachine.js.map +1 -0
- package/lib/state/index.d.ts +3 -0
- package/lib/state/index.d.ts.map +1 -0
- package/lib/state/useChatWithPlatform.d.ts +43 -0
- package/lib/state/useChatWithPlatform.d.ts.map +1 -0
- package/lib/types/chat.d.ts +56 -0
- package/lib/types/chat.d.ts.map +1 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/utils/chatStorage.d.ts +25 -0
- package/lib/utils/chatStorage.d.ts.map +1 -0
- package/lib/utils/chatStorage.js +17 -0
- package/lib/utils/chatStorage.js.map +1 -0
- package/package.json +11 -7
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {jsx
|
|
1
|
+
import {jsxs,Fragment,jsx}from'react/jsx-runtime';import {useState,useRef,useEffect,useCallback}from'react';import {ArrowUpRight,Mic,Search,Sparkles,Lightbulb,Globe}from'lucide-react';import {cn}from'../utils/index.js';import {AttachmentPreview}from'./AttachmentPreview.js';import {AudioRecorder}from'./AudioRecorder.js';import {ChatFiles}from'./ChatFiles.js';import {ChatScreenshot}from'./ChatScreenshot.js';function IconButton({
|
|
2
2
|
icon,
|
|
3
3
|
label,
|
|
4
4
|
variant = 'ghost',
|
|
@@ -6,13 +6,15 @@ import {jsx,jsxs}from'react/jsx-runtime';import*as React from'react';import {Pap
|
|
|
6
6
|
type = 'button',
|
|
7
7
|
className,
|
|
8
8
|
onClick,
|
|
9
|
-
isActive = false
|
|
9
|
+
isActive = false,
|
|
10
|
+
disabled = false
|
|
10
11
|
}) {
|
|
11
12
|
return jsx("button", {
|
|
12
13
|
type: type,
|
|
13
14
|
"aria-label": label,
|
|
14
15
|
onClick: onClick,
|
|
15
|
-
|
|
16
|
+
disabled: disabled,
|
|
17
|
+
className: cn('inline-flex items-center justify-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:opacity-50 disabled:pointer-events-none', size === 'sm' && 'h-7 w-7', size === 'md' && 'h-8 w-8', size === 'lg' && 'h-9 w-9', variant === 'ghost' && 'bg-transparent text-muted-foreground hover:bg-secondary/70', variant === 'primary' && 'bg-primary text-primary-foreground hover:bg-primary/90', variant === 'outline' && !isActive && 'border border-primary/50 bg-card text-primary hover:border-primary hover:text-primary', variant === 'outline' && isActive && 'border border-primary bg-primary text-primary-foreground', className),
|
|
16
18
|
children: icon
|
|
17
19
|
});
|
|
18
20
|
}
|
|
@@ -22,19 +24,19 @@ function IconToggleGroup({
|
|
|
22
24
|
}) {
|
|
23
25
|
const toggles = [{
|
|
24
26
|
icon: jsx(Search, {
|
|
25
|
-
className: "h-
|
|
27
|
+
className: "h-3.5 w-3.5"
|
|
26
28
|
}),
|
|
27
29
|
label: 'Search mode',
|
|
28
30
|
mode: 'search'
|
|
29
31
|
}, {
|
|
30
32
|
icon: jsx(Sparkles, {
|
|
31
|
-
className: "h-
|
|
33
|
+
className: "h-3.5 w-3.5"
|
|
32
34
|
}),
|
|
33
35
|
label: 'Creative mode',
|
|
34
36
|
mode: 'creative'
|
|
35
37
|
}, {
|
|
36
38
|
icon: jsx(Lightbulb, {
|
|
37
|
-
className: "h-
|
|
39
|
+
className: "h-3.5 w-3.5"
|
|
38
40
|
}),
|
|
39
41
|
label: 'Insights mode',
|
|
40
42
|
mode: 'insights'
|
|
@@ -57,287 +59,229 @@ function IconToggleGroup({
|
|
|
57
59
|
});
|
|
58
60
|
}
|
|
59
61
|
function UtilityActions({
|
|
60
|
-
|
|
62
|
+
onScreenshot,
|
|
63
|
+
onFilesSelected,
|
|
64
|
+
onMicClick,
|
|
65
|
+
currentFileCount
|
|
61
66
|
}) {
|
|
62
|
-
const fileInputRef = React.useRef(null);
|
|
63
|
-
const actions = [{
|
|
64
|
-
icon: jsx(Globe, {
|
|
65
|
-
className: "h-5 w-5"
|
|
66
|
-
}),
|
|
67
|
-
label: 'Global scope',
|
|
68
|
-
action: 'global'
|
|
69
|
-
}, {
|
|
70
|
-
icon: jsx(Grid3X3, {
|
|
71
|
-
className: "h-5 w-5"
|
|
72
|
-
}),
|
|
73
|
-
label: 'Discover',
|
|
74
|
-
action: 'discover'
|
|
75
|
-
}, {
|
|
76
|
-
icon: jsx(Paperclip, {
|
|
77
|
-
className: "h-5 w-5"
|
|
78
|
-
}),
|
|
79
|
-
label: 'Add file',
|
|
80
|
-
action: 'file'
|
|
81
|
-
}];
|
|
82
|
-
const handleFileClick = () => {
|
|
83
|
-
fileInputRef.current?.click();
|
|
84
|
-
};
|
|
85
|
-
const handleFileChange = event => {
|
|
86
|
-
const files = event.target.files;
|
|
87
|
-
if (files && files.length > 0) {
|
|
88
|
-
const file = files[0];
|
|
89
|
-
onAction(`file:${file.name}:${file.size}`);
|
|
90
|
-
}
|
|
91
|
-
// Reset the input so the same file can be selected again if needed
|
|
92
|
-
event.target.value = '';
|
|
93
|
-
};
|
|
94
67
|
return jsxs("div", {
|
|
95
68
|
className: "flex flex-wrap items-center gap-1 text-muted-foreground",
|
|
96
|
-
children: [
|
|
69
|
+
children: [jsx("button", {
|
|
97
70
|
type: "button",
|
|
98
|
-
"aria-label":
|
|
99
|
-
onClick:
|
|
100
|
-
className: "inline-flex h-
|
|
101
|
-
children:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
71
|
+
"aria-label": "Global scope",
|
|
72
|
+
onClick: () => console.log('Global scope'),
|
|
73
|
+
className: "inline-flex h-7 w-7 items-center justify-center rounded-2xl transition-colors hover:bg-secondary/70 active:bg-secondary",
|
|
74
|
+
children: jsx(Globe, {
|
|
75
|
+
className: "h-4 w-4"
|
|
76
|
+
})
|
|
77
|
+
}), jsx(ChatScreenshot, {
|
|
78
|
+
onScreenshot: onScreenshot
|
|
79
|
+
}), jsx(ChatFiles, {
|
|
80
|
+
onFilesSelected: onFilesSelected,
|
|
81
|
+
currentFileCount: currentFileCount
|
|
108
82
|
})]
|
|
109
83
|
});
|
|
110
84
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
})
|
|
131
|
-
}, {
|
|
132
|
-
label: 'dmv',
|
|
133
|
-
icon: jsx(Search, {
|
|
134
|
-
className: "h-4 w-4"
|
|
135
|
-
})
|
|
136
|
-
}, {
|
|
137
|
-
label: 'daum',
|
|
138
|
-
icon: jsx(Globe, {
|
|
139
|
-
className: "h-4 w-4"
|
|
140
|
-
})
|
|
141
|
-
}];
|
|
142
|
-
function PerplexitySearch() {
|
|
143
|
-
const [query, setQuery] = React.useState('');
|
|
144
|
-
const [activeMode, setActiveMode] = React.useState('search');
|
|
145
|
-
const [focusEnabled, setFocusEnabled] = React.useState(false);
|
|
146
|
-
const [spacesEnabled, setSpacesEnabled] = React.useState(false);
|
|
147
|
-
const [isRecording, setIsRecording] = React.useState(false);
|
|
148
|
-
const [statusMessage, setStatusMessage] = React.useState('');
|
|
149
|
-
const [attachedFile, setAttachedFile] = React.useState(null);
|
|
85
|
+
function PerplexitySearch({
|
|
86
|
+
onSubmit,
|
|
87
|
+
isLoading = false,
|
|
88
|
+
disabled = false,
|
|
89
|
+
prefill
|
|
90
|
+
}) {
|
|
91
|
+
const [query, setQuery] = useState('');
|
|
92
|
+
const [activeMode, setActiveMode] = useState('search');
|
|
93
|
+
const [statusMessage, setStatusMessage] = useState('');
|
|
94
|
+
const [attachments, setAttachments] = useState([]);
|
|
95
|
+
const [showAudioRecorder, setShowAudioRecorder] = useState(false);
|
|
96
|
+
const textareaRef = useRef(null);
|
|
97
|
+
// Push external prefill (e.g. inbound channel message) into the textarea.
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
if (!prefill?.text) return;
|
|
100
|
+
setQuery(prev => prefill.replace || !prev ? prefill.text : `${prev} ${prefill.text}`);
|
|
101
|
+
setTimeout(() => textareaRef.current?.focus(), 0);
|
|
102
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
103
|
+
}, [prefill?.nonce]);
|
|
150
104
|
const trimmedQuery = query.trim();
|
|
151
105
|
const hasQuery = trimmedQuery.length > 0;
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
}
|
|
156
|
-
const normalized = trimmedQuery.toLowerCase();
|
|
157
|
-
const matches = suggestionPool.filter(suggestion => suggestion.label.toLowerCase().includes(normalized));
|
|
158
|
-
return matches.length > 0 ? matches : suggestionPool;
|
|
159
|
-
}, [hasQuery, trimmedQuery]);
|
|
160
|
-
const showStatus = message => {
|
|
106
|
+
const hasAttachments = attachments.length > 0;
|
|
107
|
+
const canSubmit = hasQuery || hasAttachments;
|
|
108
|
+
const showStatus = useCallback(message => {
|
|
161
109
|
setStatusMessage(message);
|
|
162
110
|
setTimeout(() => setStatusMessage(''), 2000);
|
|
163
|
-
};
|
|
164
|
-
const
|
|
111
|
+
}, []);
|
|
112
|
+
const generateId = () => `${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
113
|
+
const adjustTextareaHeight = useCallback(() => {
|
|
114
|
+
if (textareaRef.current) {
|
|
115
|
+
textareaRef.current.style.height = 'auto';
|
|
116
|
+
textareaRef.current.style.height = textareaRef.current.scrollHeight + 'px';
|
|
117
|
+
}
|
|
118
|
+
}, []);
|
|
119
|
+
const handleScreenshot = useCallback(dataUrl => {
|
|
120
|
+
const newAttachment = {
|
|
121
|
+
id: generateId(),
|
|
122
|
+
name: `Screenshot ${new Date().toLocaleTimeString()}`,
|
|
123
|
+
type: 'screenshot',
|
|
124
|
+
dataUrl
|
|
125
|
+
};
|
|
126
|
+
setAttachments(prev => [...prev, newAttachment]);
|
|
127
|
+
showStatus('Screenshot captured!');
|
|
128
|
+
}, [showStatus]);
|
|
129
|
+
const handleFilesSelected = useCallback(async files => {
|
|
130
|
+
// Read all files as base64 data URLs for AI processing
|
|
131
|
+
const readFileAsDataUrl = file => {
|
|
132
|
+
return new Promise((resolve, reject) => {
|
|
133
|
+
const reader = new FileReader();
|
|
134
|
+
reader.onload = () => resolve(reader.result);
|
|
135
|
+
reader.onerror = () => reject(new Error(`Failed to read file: ${file.name}`));
|
|
136
|
+
reader.readAsDataURL(file);
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
try {
|
|
140
|
+
const newAttachments = await Promise.all(files.map(async file => {
|
|
141
|
+
// Read all files as base64 so AI can access their content
|
|
142
|
+
const dataUrl = await readFileAsDataUrl(file);
|
|
143
|
+
return {
|
|
144
|
+
id: generateId(),
|
|
145
|
+
name: file.name,
|
|
146
|
+
size: file.size,
|
|
147
|
+
type: 'file',
|
|
148
|
+
file,
|
|
149
|
+
dataUrl
|
|
150
|
+
};
|
|
151
|
+
}));
|
|
152
|
+
setAttachments(prev => [...prev, ...newAttachments]);
|
|
153
|
+
showStatus(`${files.length} file(s) attached!`);
|
|
154
|
+
} catch (error) {
|
|
155
|
+
console.error('Error reading files:', error);
|
|
156
|
+
showStatus('Error reading files');
|
|
157
|
+
}
|
|
158
|
+
}, [showStatus]);
|
|
159
|
+
const handleRemoveAttachment = useCallback(id => {
|
|
160
|
+
setAttachments(prev => prev.filter(a => a.id !== id));
|
|
161
|
+
}, []);
|
|
162
|
+
const handleClearAttachments = useCallback(() => {
|
|
163
|
+
setAttachments([]);
|
|
164
|
+
}, []);
|
|
165
|
+
const handleSubmit = useCallback(event => {
|
|
165
166
|
event.preventDefault();
|
|
166
|
-
if (
|
|
167
|
-
|
|
167
|
+
if (canSubmit && !isLoading && !disabled) {
|
|
168
|
+
onSubmit(trimmedQuery, activeMode, attachments.length > 0 ? attachments : undefined);
|
|
169
|
+
setQuery('');
|
|
170
|
+
handleClearAttachments();
|
|
171
|
+
adjustTextareaHeight();
|
|
168
172
|
}
|
|
169
|
-
}, [trimmedQuery, activeMode,
|
|
170
|
-
const
|
|
171
|
-
if (
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
setIsRecording(false);
|
|
179
|
-
setQuery('What is the weather today?');
|
|
180
|
-
showStatus('Voice input received!');
|
|
181
|
-
}, 3000);
|
|
182
|
-
} else {
|
|
183
|
-
showStatus('Recording stopped.');
|
|
173
|
+
}, [trimmedQuery, activeMode, canSubmit, isLoading, disabled, onSubmit, attachments, handleClearAttachments, adjustTextareaHeight]);
|
|
174
|
+
const handleKeyDown = useCallback(event => {
|
|
175
|
+
if (event.key === 'Enter' && !event.shiftKey) {
|
|
176
|
+
event.preventDefault();
|
|
177
|
+
if (canSubmit && !isLoading && !disabled) {
|
|
178
|
+
onSubmit(trimmedQuery, activeMode, attachments.length > 0 ? attachments : undefined);
|
|
179
|
+
setQuery('');
|
|
180
|
+
handleClearAttachments();
|
|
181
|
+
adjustTextareaHeight();
|
|
184
182
|
}
|
|
185
183
|
}
|
|
186
|
-
}, [
|
|
187
|
-
const
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
break;
|
|
195
|
-
case 'settings':
|
|
196
|
-
showStatus('Settings opened');
|
|
197
|
-
break;
|
|
198
|
-
case 'link':
|
|
199
|
-
const url = prompt('Enter URL to attach:');
|
|
200
|
-
if (url) {
|
|
201
|
-
showStatus(`Link attached: ${url}`);
|
|
202
|
-
}
|
|
203
|
-
break;
|
|
204
|
-
default:
|
|
205
|
-
if (action.startsWith('file:')) {
|
|
206
|
-
const fileParts = action.substring(5).split(':');
|
|
207
|
-
const fileName = fileParts[0];
|
|
208
|
-
const fileSize = fileParts.length > 1 ? parseInt(fileParts[1]) : undefined;
|
|
209
|
-
setAttachedFile({
|
|
210
|
-
name: fileName,
|
|
211
|
-
size: fileSize
|
|
212
|
-
});
|
|
213
|
-
showStatus(`File attached: ${fileName}`);
|
|
214
|
-
}
|
|
184
|
+
}, [canSubmit, isLoading, disabled, trimmedQuery, activeMode, onSubmit, attachments, handleClearAttachments, adjustTextareaHeight]);
|
|
185
|
+
const handleChange = useCallback(event => {
|
|
186
|
+
setQuery(event.target.value);
|
|
187
|
+
setTimeout(adjustTextareaHeight, 0);
|
|
188
|
+
}, [adjustTextareaHeight]);
|
|
189
|
+
const handleMicClick = useCallback(() => {
|
|
190
|
+
if (!hasQuery) {
|
|
191
|
+
setShowAudioRecorder(true);
|
|
215
192
|
}
|
|
193
|
+
}, [hasQuery]);
|
|
194
|
+
const handleTranscriptionComplete = useCallback(text => {
|
|
195
|
+
setQuery(prev => prev ? `${prev} ${text}` : text);
|
|
196
|
+
setShowAudioRecorder(false);
|
|
197
|
+
textareaRef.current?.focus();
|
|
198
|
+
setTimeout(adjustTextareaHeight, 0);
|
|
199
|
+
}, [adjustTextareaHeight]);
|
|
200
|
+
const handleAudioCancel = useCallback(() => {
|
|
201
|
+
setShowAudioRecorder(false);
|
|
216
202
|
}, []);
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
return jsxs("div", {
|
|
225
|
-
className: "flex min-h-[80vh] w-full flex-col items-center justify-center gap-10 px-6",
|
|
226
|
-
children: [jsx("header", {
|
|
227
|
-
className: "text-center",
|
|
228
|
-
children: jsx("p", {
|
|
229
|
-
className: "text-balance text-4xl font-semibold tracking-tight text-foreground",
|
|
230
|
-
children: "perplexity"
|
|
231
|
-
})
|
|
232
|
-
}), statusMessage && jsx("div", {
|
|
203
|
+
// Focus textarea on mount
|
|
204
|
+
useEffect(() => {
|
|
205
|
+
textareaRef.current?.focus();
|
|
206
|
+
adjustTextareaHeight();
|
|
207
|
+
}, [adjustTextareaHeight]);
|
|
208
|
+
return jsxs(Fragment, {
|
|
209
|
+
children: [statusMessage && jsx("div", {
|
|
233
210
|
className: "fixed top-4 right-4 z-50 max-w-sm rounded-lg bg-primary px-4 py-2 text-sm text-primary-foreground shadow-lg",
|
|
234
211
|
children: statusMessage
|
|
235
212
|
}), jsxs("section", {
|
|
236
|
-
className: "w-full
|
|
237
|
-
children: [
|
|
213
|
+
className: "w-full overflow-hidden rounded-[24px] border border-border/70 bg-card shadow-md",
|
|
214
|
+
children: [showAudioRecorder && jsx("div", {
|
|
215
|
+
className: "px-4 pt-4 sm:px-5 sm:pt-5",
|
|
216
|
+
children: jsx(AudioRecorder, {
|
|
217
|
+
onTranscriptionComplete: handleTranscriptionComplete,
|
|
218
|
+
onCancel: handleAudioCancel,
|
|
219
|
+
onError: error => showStatus(`Error: ${error}`)
|
|
220
|
+
})
|
|
221
|
+
}), jsxs("form", {
|
|
238
222
|
onSubmit: handleSubmit,
|
|
239
|
-
className: "flex flex-col gap-
|
|
223
|
+
className: "flex flex-col gap-2 px-3 py-3 sm:px-4 sm:py-4",
|
|
240
224
|
"aria-label": "Perplexity style search",
|
|
241
|
-
children: [
|
|
242
|
-
className: "
|
|
243
|
-
children: [
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
}), attachedFile.size && jsxs("span", {
|
|
250
|
-
className: "text-xs",
|
|
251
|
-
children: [(attachedFile.size / 1024).toFixed(1), " KB"]
|
|
252
|
-
})]
|
|
253
|
-
}), jsx("button", {
|
|
225
|
+
children: [hasAttachments && jsxs("div", {
|
|
226
|
+
className: "flex flex-wrap items-center gap-2",
|
|
227
|
+
children: [attachments.map(attachment => jsx(AttachmentPreview, {
|
|
228
|
+
attachment: attachment,
|
|
229
|
+
onRemove: handleRemoveAttachment,
|
|
230
|
+
showPreview: attachments.length === 1,
|
|
231
|
+
isCancellable: true
|
|
232
|
+
}, attachment.id)), attachments.length > 1 && jsx("button", {
|
|
254
233
|
type: "button",
|
|
255
|
-
onClick:
|
|
256
|
-
className: "
|
|
257
|
-
|
|
258
|
-
children: jsxs("svg", {
|
|
259
|
-
width: "16",
|
|
260
|
-
height: "16",
|
|
261
|
-
viewBox: "0 0 24 24",
|
|
262
|
-
fill: "none",
|
|
263
|
-
stroke: "currentColor",
|
|
264
|
-
strokeWidth: "2",
|
|
265
|
-
strokeLinecap: "round",
|
|
266
|
-
strokeLinejoin: "round",
|
|
267
|
-
children: [jsx("line", {
|
|
268
|
-
x1: "18",
|
|
269
|
-
y1: "6",
|
|
270
|
-
x2: "6",
|
|
271
|
-
y2: "18"
|
|
272
|
-
}), jsx("line", {
|
|
273
|
-
x1: "6",
|
|
274
|
-
y1: "6",
|
|
275
|
-
x2: "18",
|
|
276
|
-
y2: "18"
|
|
277
|
-
})]
|
|
278
|
-
})
|
|
234
|
+
onClick: handleClearAttachments,
|
|
235
|
+
className: "text-xs text-muted-foreground hover:text-destructive transition-colors px-2 py-1",
|
|
236
|
+
children: "Clear all"
|
|
279
237
|
})]
|
|
280
238
|
}), jsxs("div", {
|
|
281
239
|
children: [jsx("label", {
|
|
282
240
|
htmlFor: "search-input",
|
|
283
241
|
className: "sr-only",
|
|
284
|
-
children: "Ask anything
|
|
285
|
-
}), jsx("
|
|
242
|
+
children: "Ask anything"
|
|
243
|
+
}), jsx("textarea", {
|
|
244
|
+
ref: textareaRef,
|
|
286
245
|
id: "search-input",
|
|
287
246
|
name: "query",
|
|
288
|
-
type: "text",
|
|
289
247
|
value: query,
|
|
290
|
-
onChange:
|
|
291
|
-
|
|
292
|
-
|
|
248
|
+
onChange: handleChange,
|
|
249
|
+
onKeyDown: handleKeyDown,
|
|
250
|
+
placeholder: "Ask anything...",
|
|
251
|
+
disabled: isLoading || disabled || showAudioRecorder,
|
|
252
|
+
rows: 1,
|
|
253
|
+
className: "w-full outline-none border-none ring-0 focus:outline-none focus:ring-0 bg-transparent text-base text-foreground placeholder:text-muted-foreground disabled:opacity-50 resize-none overflow-hidden"
|
|
293
254
|
})]
|
|
294
255
|
}), jsxs("div", {
|
|
295
|
-
className: "flex flex-wrap items-center gap-3 border-t border-border/60 pt-
|
|
256
|
+
className: "flex flex-wrap items-center gap-3 border-t border-border/60 pt-2",
|
|
296
257
|
children: [jsx(IconToggleGroup, {
|
|
297
258
|
activeMode: activeMode,
|
|
298
259
|
onModeChange: setActiveMode
|
|
299
260
|
}), jsxs("div", {
|
|
300
261
|
className: "flex flex-1 flex-wrap items-center justify-end gap-2",
|
|
301
262
|
children: [jsx(UtilityActions, {
|
|
302
|
-
|
|
263
|
+
onScreenshot: handleScreenshot,
|
|
264
|
+
onFilesSelected: handleFilesSelected,
|
|
265
|
+
onMicClick: handleMicClick,
|
|
266
|
+
currentFileCount: attachments.length
|
|
303
267
|
}), jsx(IconButton, {
|
|
304
|
-
icon:
|
|
305
|
-
className: "h-
|
|
306
|
-
}) :
|
|
307
|
-
className: "h-
|
|
308
|
-
}) : jsx(
|
|
309
|
-
className: "h-
|
|
268
|
+
icon: isLoading ? jsx("div", {
|
|
269
|
+
className: "h-4 w-4 animate-spin rounded-full border-2 border-primary-foreground border-t-transparent"
|
|
270
|
+
}) : canSubmit ? jsx(ArrowUpRight, {
|
|
271
|
+
className: "h-4 w-4"
|
|
272
|
+
}) : jsx(Mic, {
|
|
273
|
+
className: "h-4 w-4"
|
|
310
274
|
}),
|
|
311
|
-
label:
|
|
275
|
+
label: isLoading ? 'Loading...' : canSubmit ? 'Send message' : 'Start audio search',
|
|
312
276
|
variant: "primary",
|
|
313
277
|
size: "lg",
|
|
314
|
-
type:
|
|
315
|
-
onClick: !
|
|
278
|
+
type: canSubmit ? 'submit' : 'button',
|
|
279
|
+
onClick: !canSubmit ? handleMicClick : undefined,
|
|
280
|
+
disabled: isLoading || disabled || showAudioRecorder,
|
|
316
281
|
className: "rounded-2xl"
|
|
317
282
|
})]
|
|
318
283
|
})]
|
|
319
284
|
})]
|
|
320
|
-
}), filteredSuggestions.length > 0 && jsx("div", {
|
|
321
|
-
className: "border-t border-border/60 bg-card/95 px-4 py-2 sm:px-6 sm:py-3",
|
|
322
|
-
children: jsx("ul", {
|
|
323
|
-
className: "flex flex-col gap-1",
|
|
324
|
-
children: filteredSuggestions.map(suggestion => jsx("li", {
|
|
325
|
-
children: jsxs("button", {
|
|
326
|
-
type: "button",
|
|
327
|
-
onClick: () => handleSuggestionSelect(suggestion),
|
|
328
|
-
className: "flex w-full items-center justify-between rounded-2xl px-2 py-2 text-left transition-colors hover:bg-secondary/70 active:bg-secondary",
|
|
329
|
-
children: [jsxs("span", {
|
|
330
|
-
className: "flex items-center gap-3 text-sm text-foreground",
|
|
331
|
-
children: [jsx("span", {
|
|
332
|
-
className: "inline-flex h-8 w-8 items-center justify-center rounded-full bg-secondary text-muted-foreground",
|
|
333
|
-
children: suggestion.icon
|
|
334
|
-
}), suggestion.label]
|
|
335
|
-
}), jsx(ChevronRight, {
|
|
336
|
-
className: "h-4 w-4 text-muted-foreground"
|
|
337
|
-
})]
|
|
338
|
-
})
|
|
339
|
-
}, suggestion.label))
|
|
340
|
-
})
|
|
341
285
|
})]
|
|
342
286
|
})]
|
|
343
287
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchBar.js","sources":["../../src/components/SearchBar.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":"
|
|
1
|
+
{"version":3,"file":"SearchBar.js","sources":["../../src/components/SearchBar.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":"yZAoCA,SAAS,UAAU,CAAC;MAWhB;AAcgB,EAAA,KAAA;AACA,EAAA,OAAA,GAAA,OAAA;AAQpB,EAAC,IAAA,GAAA,IAAA;AAED,EAAA,IAAA,GAAS;AAOL,EAAA;AACI,EAAA,OAAA;AACA,EAAA,QAAE,QAAM;AACR,EAAA,QAAE;;AAGN,EAAA,OAAAA,GACI,CAAA,QAAA,EAAA;AAeR,IAAC,IAAA,EAAA,IAAA;AAED,IAAA,YAAS,EAAA,KAAc;IAWnB,OAAO,EACH,OAAA;AAaR,IAAC,QAAA,EAAA,QAAA;AAED,IAAA,SAAM,EAAA,EAAU,CAAA,kQAAkG,EAAA,IAAA,KAAA,IAAA,IAAA,SAAA,EAAA,IAAA,KAAA,IAAA,IAAA,SAAA,EAAA,IAAA,KAAA,IAAA,IAAA,SAAA,EAAA,OAAA,KAAA,OAAA,IAAA,4DAAA,EAAA,OAAA,KAAA,SAAA,IAAA,wDAAA,EAAA,OAAA,KAAA,SAAA,IAAA,CAAA,QAAA,IAAA,uFAAA,EAAA,OAAA,KAAA,SAAA,IAAA,QAAA,IAAA,0DAAA,EAAA,SAAA,CAAA;IAC9G,QAAO,EAAA;IACP;;SAEA,eAAoB,CAAA;YACb;AACP,EAAA;;QAGA,UAAa,CAAE;QACX,EAAAA,GAAK,CAAA,MAAO,EAAE;eAAM,EAAA;AACpB,KAAA,CAAA;AACA,IAAA,KAAA,EAAA,aAAgB;QAChB,EAAA;AACJ,GAAA,EAAC;AAED,IAAA,I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QAAA;UAEQ,EAAA,EAAA,UAAgB,EAAE;UAClB,IAAA,EAAA,IAAA,CAAA,IAAA;AACA,UAAA,IAAA,EAAA,IAAY,CAAA,IAAA;AACZ,UAAA,IAAA,EAAA,MAAW;AACf,UACC,IAAA;AAGL,UAAM;SACF;MACH,CAAE,CAAA,CAAE;MAEL,cAAA,CAAA,IAAA,IAAA,CAA0B,GAAA,IAAA,EAAA,GAAA,cAAA,CAAA,CAAA;MAC1B,WAAa,CAAA,EAAE,KAAA,CAAA,MAAA,CAAA,kBAAA,CAAA,CAAA;AACX,IAAA,CAAA,CAAA,OAAA,KAAA,EAAY;AACZ,MAAA,OAAA,CAAA,KAAA,CAAA,sBAAuB,EAAA,KAAA,CAAA;AAC3B,MAAC,UAAG,CAAA,qBAAuB,CAAA;AAE3B,IAAA;AAqGJ,EAAC,CAAA,EAAA,CAAA,UAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Perplexity Demo Module Configuration
|
|
3
|
+
*/
|
|
4
|
+
export declare const STORAGE_KEYS: {
|
|
5
|
+
readonly CHAT_HISTORY: "perplexity_chat_history";
|
|
6
|
+
readonly SCREENSHOT_CONFIG: "perplexity_screenshot_config";
|
|
7
|
+
readonly CUSTOM_AI_PROVIDERS: "perplexity_custom_ai_providers";
|
|
8
|
+
readonly SELECTED_AI_PROVIDER: "perplexity_selected_ai_provider";
|
|
9
|
+
readonly SYSTEM_PROMPT: "perplexity_system_prompt";
|
|
10
|
+
};
|
|
11
|
+
export declare const MAX_FILES = 6;
|
|
12
|
+
export declare const MAX_FILE_SIZE_BYTES: number;
|
|
13
|
+
export declare const ACCEPTED_FILE_TYPES: {
|
|
14
|
+
readonly DOCUMENTS: readonly [".pdf", ".doc", ".docx", ".txt", ".md"];
|
|
15
|
+
readonly IMAGES: readonly [".png", ".jpg", ".jpeg", ".gif", ".webp"];
|
|
16
|
+
};
|
|
17
|
+
export declare const ACCEPTED_FILE_TYPES_STRING: string;
|
|
18
|
+
/**
|
|
19
|
+
* Centralized LLM Provider Configuration
|
|
20
|
+
* All API endpoints, models, and provider settings
|
|
21
|
+
*/
|
|
22
|
+
export declare const LLM_CONFIG: {
|
|
23
|
+
readonly ENDPOINTS: {
|
|
24
|
+
readonly GROQ_BASE: "https://api.groq.com/openai/v1";
|
|
25
|
+
readonly GROQ_STT: "https://api.groq.com/openai/v1/audio/transcriptions";
|
|
26
|
+
readonly OPENROUTER_BASE: "https://openrouter.ai/api/v1";
|
|
27
|
+
readonly TOGETHER_BASE: "https://api.together.xyz/v1";
|
|
28
|
+
};
|
|
29
|
+
readonly ENV_KEYS: {
|
|
30
|
+
readonly GROQ_API_KEY: "GROQ_API_KEY";
|
|
31
|
+
readonly OPENROUTER_API_KEY: "OPENROUTER_API_KEY";
|
|
32
|
+
readonly TOGETHER_API_KEY: "TOGETHER_API_KEY";
|
|
33
|
+
};
|
|
34
|
+
readonly MODELS: {
|
|
35
|
+
readonly GROQ_VISION_SCOUT: {
|
|
36
|
+
readonly id: "meta-llama/llama-4-scout-17b-16e-instruct";
|
|
37
|
+
readonly name: "Meta Llama 4 Scout 17B (Vision)";
|
|
38
|
+
readonly contextWindow: 128000;
|
|
39
|
+
readonly supportsVision: true;
|
|
40
|
+
readonly description: "Vision-capable model for image and file processing";
|
|
41
|
+
};
|
|
42
|
+
readonly GROQ_GPT_OSS: {
|
|
43
|
+
readonly id: "openai/gpt-oss-120B";
|
|
44
|
+
readonly name: "GPT OSS 120B";
|
|
45
|
+
readonly contextWindow: 128000;
|
|
46
|
+
readonly supportsVision: false;
|
|
47
|
+
readonly description: "Best quality text-only model";
|
|
48
|
+
};
|
|
49
|
+
readonly OPENROUTER_LLAMA_8B: {
|
|
50
|
+
readonly id: "meta-llama/llama-3.1-8b-instruct:free";
|
|
51
|
+
readonly name: "Llama 3.1 8B (Free)";
|
|
52
|
+
readonly contextWindow: 131072;
|
|
53
|
+
readonly supportsVision: false;
|
|
54
|
+
readonly description: "Free tier model";
|
|
55
|
+
};
|
|
56
|
+
readonly OPENROUTER_GEMMA_9B: {
|
|
57
|
+
readonly id: "google/gemma-2-9b-it:free";
|
|
58
|
+
readonly name: "Gemma 2 9B (Free)";
|
|
59
|
+
readonly contextWindow: 8192;
|
|
60
|
+
readonly supportsVision: false;
|
|
61
|
+
readonly description: "Free tier model";
|
|
62
|
+
};
|
|
63
|
+
readonly OPENROUTER_MISTRAL_7B: {
|
|
64
|
+
readonly id: "mistralai/mistral-7b-instruct:free";
|
|
65
|
+
readonly name: "Mistral 7B (Free)";
|
|
66
|
+
readonly contextWindow: 32768;
|
|
67
|
+
readonly supportsVision: false;
|
|
68
|
+
readonly description: "Free tier model";
|
|
69
|
+
};
|
|
70
|
+
readonly OPENROUTER_QWEN_7B: {
|
|
71
|
+
readonly id: "qwen/qwen-2-7b-instruct:free";
|
|
72
|
+
readonly name: "Qwen 2 7B (Free)";
|
|
73
|
+
readonly contextWindow: 32768;
|
|
74
|
+
readonly supportsVision: false;
|
|
75
|
+
readonly description: "Free tier model";
|
|
76
|
+
};
|
|
77
|
+
readonly TOGETHER_LLAMA_8B: {
|
|
78
|
+
readonly id: "meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo";
|
|
79
|
+
readonly name: "Llama 3.1 8B Turbo";
|
|
80
|
+
readonly contextWindow: 131072;
|
|
81
|
+
readonly supportsVision: false;
|
|
82
|
+
readonly description: "Fast and efficient";
|
|
83
|
+
};
|
|
84
|
+
readonly TOGETHER_LLAMA_70B: {
|
|
85
|
+
readonly id: "meta-llama/Meta-Llama-3.1-70B-Instruct-Turbo";
|
|
86
|
+
readonly name: "Llama 3.1 70B Turbo";
|
|
87
|
+
readonly contextWindow: 131072;
|
|
88
|
+
readonly supportsVision: false;
|
|
89
|
+
readonly description: "Best quality";
|
|
90
|
+
};
|
|
91
|
+
readonly TOGETHER_MIXTRAL: {
|
|
92
|
+
readonly id: "mistralai/Mixtral-8x7B-Instruct-v0.1";
|
|
93
|
+
readonly name: "Mixtral 8x7B";
|
|
94
|
+
readonly contextWindow: 32768;
|
|
95
|
+
readonly supportsVision: false;
|
|
96
|
+
readonly description: "Good balance";
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
readonly STT: {
|
|
100
|
+
readonly MODEL: "whisper-large-v3-turbo";
|
|
101
|
+
readonly DEFAULT_LANGUAGE: "en";
|
|
102
|
+
};
|
|
103
|
+
readonly DEFAULTS: {
|
|
104
|
+
readonly PROVIDER_ID: "groq";
|
|
105
|
+
readonly MODEL_ID: "openai/gpt-oss-120B";
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/config/constants.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,YAAY;;;;;;CAMf,CAAC;AAKX,eAAO,MAAM,SAAS,IAAI,CAAC;AAG3B,eAAO,MAAM,mBAAmB,QAAmB,CAAC;AAGpD,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAGX,eAAO,MAAM,0BAA0B,QAA8E,CAAC;AAItH;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkGb,CAAC"}
|