Spaces:
Paused
Paused
matt HOFFNER
commited on
Commit
·
eead8ca
1
Parent(s):
e8e1872
bring back plugins but keep them really hidden
Browse files
components/Chat/ChatInput.tsx
CHANGED
|
@@ -280,7 +280,7 @@ export const ChatInput = ({
|
|
| 280 |
)}
|
| 281 |
|
| 282 |
<div className="relative mx-2 flex w-full flex-grow flex-col rounded-md border border-black/10 bg-white shadow-[0_0_10px_rgba(0,0,0,0.10)] dark:border-gray-900/50 dark:bg-[#40414F] dark:text-white dark:shadow-[0_0_15px_rgba(0,0,0,0.10)] sm:mx-4">
|
| 283 |
-
|
| 284 |
className="absolute left-2 top-2 rounded-sm p-1 text-neutral-800 opacity-60 hover:bg-neutral-200 hover:text-neutral-900 dark:bg-opacity-50 dark:text-neutral-100 dark:hover:text-neutral-200"
|
| 285 |
onClick={() => setShowPluginSelect(!showPluginSelect)}
|
| 286 |
onKeyDown={(e) => {}}
|
|
|
|
| 280 |
)}
|
| 281 |
|
| 282 |
<div className="relative mx-2 flex w-full flex-grow flex-col rounded-md border border-black/10 bg-white shadow-[0_0_10px_rgba(0,0,0,0.10)] dark:border-gray-900/50 dark:bg-[#40414F] dark:text-white dark:shadow-[0_0_15px_rgba(0,0,0,0.10)] sm:mx-4">
|
| 283 |
+
<button
|
| 284 |
className="absolute left-2 top-2 rounded-sm p-1 text-neutral-800 opacity-60 hover:bg-neutral-200 hover:text-neutral-900 dark:bg-opacity-50 dark:text-neutral-100 dark:hover:text-neutral-200"
|
| 285 |
onClick={() => setShowPluginSelect(!showPluginSelect)}
|
| 286 |
onKeyDown={(e) => {}}
|
components/Chat/PluginSelect.tsx
CHANGED
|
@@ -60,5 +60,44 @@ export const PluginSelect: FC<Props> = ({
|
|
| 60 |
}
|
| 61 |
}, []);
|
| 62 |
|
| 63 |
-
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
};
|
|
|
|
| 60 |
}
|
| 61 |
}, []);
|
| 62 |
|
| 63 |
+
return (
|
| 64 |
+
<div className="flex flex-col">
|
| 65 |
+
<div className="mb-1 w-full rounded border border-neutral-200 bg-transparent pr-2 text-neutral-900 dark:border-neutral-600 dark:text-white">
|
| 66 |
+
<select
|
| 67 |
+
ref={selectRef}
|
| 68 |
+
className="w-full cursor-pointer bg-transparent p-2"
|
| 69 |
+
placeholder={t('Select a plugin') || ''}
|
| 70 |
+
value={plugin?.id || ''}
|
| 71 |
+
onChange={(e) => {
|
| 72 |
+
onPluginChange(
|
| 73 |
+
PluginList.find(
|
| 74 |
+
(plugin) => plugin.id === e.target.value,
|
| 75 |
+
) as Plugin,
|
| 76 |
+
);
|
| 77 |
+
}}
|
| 78 |
+
onKeyDown={(e) => {
|
| 79 |
+
handleKeyDown(e);
|
| 80 |
+
}}
|
| 81 |
+
>
|
| 82 |
+
<option
|
| 83 |
+
key="chatgpt"
|
| 84 |
+
value="chatgpt"
|
| 85 |
+
className="dark:bg-[#343541] dark:text-white"
|
| 86 |
+
>
|
| 87 |
+
LLM
|
| 88 |
+
</option>
|
| 89 |
+
|
| 90 |
+
{PluginList.map((plugin) => (
|
| 91 |
+
<option
|
| 92 |
+
key={plugin.id}
|
| 93 |
+
value={plugin.id}
|
| 94 |
+
className="dark:bg-[#343541] dark:text-white"
|
| 95 |
+
>
|
| 96 |
+
{plugin.name}
|
| 97 |
+
</option>
|
| 98 |
+
))}
|
| 99 |
+
</select>
|
| 100 |
+
</div>
|
| 101 |
+
</div>
|
| 102 |
+
);
|
| 103 |
};
|