show image gen button

This commit is contained in:
2023-11-10 22:13:19 +08:00
parent adeadd3586
commit bd6edb4ca8
2 changed files with 5 additions and 2 deletions

View File

@@ -262,7 +262,9 @@ export function App() {
chatStore.tts_key, chatStore.tts_key,
chatStore.tts_speed, chatStore.tts_speed,
chatStore.tts_speed_enabled, chatStore.tts_speed_enabled,
chatStore.toolsString chatStore.toolsString,
chatStore.image_gen_api,
chatStore.image_gen_key
) )
); );
setSelectedChatIndex(newKey as number); setSelectedChatIndex(newKey as number);

View File

@@ -675,7 +675,8 @@ export default function ChatBOX(props: {
)} )}
<div className="flex justify-between"> <div className="flex justify-between">
{chatStore.model.match("vision") && ( {(chatStore.model.match("vision") ||
(chatStore.image_gen_api && chatStore.image_gen_key)) && (
<button <button
className="disabled:line-through disabled:bg-slate-500 rounded m-1 p-1 border-2 bg-cyan-400 hover:bg-cyan-600" className="disabled:line-through disabled:bg-slate-500 rounded m-1 p-1 border-2 bg-cyan-400 hover:bg-cyan-600"
disabled={showGenerating || !chatStore.apiKey} disabled={showGenerating || !chatStore.apiKey}