mirror of
https://github.com/R0m1k3/Loki.git
synced 2026-10-22 14:38:12 +02:00
add stop streaming and robust code copy
This commit is contained in:
1 parent
c794d58718
commit
b9bccac4ba
4 files changed
+90
-18
No files matched your search
@@ -24,6 +24,7 @@ export function ChatPanel() {
|
||||
approveShell,
|
||||
rejectShell,
|
||||
sessions,
|
||||
stopStreaming,
|
||||
} = useStore();
|
||||
|
||||
const activeTools = config
|
||||
@@ -154,12 +155,14 @@ export function ChatPanel() {
|
||||
</>
|
||||
)}
|
||||
<button
|
||||
onClick={submit}
|
||||
disabled={streaming || !draft.trim()}
|
||||
className="flex h-[38px] items-center gap-1.5 border-[3px] border-line bg-card-deep px-4 text-[14px] text-white shadow-hard-accent disabled:opacity-40"
|
||||
onClick={streaming ? stopStreaming : submit}
|
||||
disabled={!streaming && !draft.trim()}
|
||||
className={`flex h-[38px] items-center gap-1.5 border-[3px] border-line px-4 text-[14px] text-white shadow-hard-accent disabled:opacity-40 ${
|
||||
streaming ? "bg-warn" : "bg-card-deep"
|
||||
}`}
|
||||
style={{ borderRadius: 7 }}
|
||||
>
|
||||
{streaming ? "…" : "ENVOYER"}
|
||||
{streaming ? "ARRÊTER" : "ENVOYER"}
|
||||
{!streaming && <SendIcon />}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user