Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix: update 2nd message send button

statxcf246233b3f4a
diff --git a/web-app/src/containers/ChatInput.tsx b/web-app/src/containers/ChatInput.tsx
index 7f45b60ed..ea815189c 100644
--- a/web-app/src/containers/ChatInput.tsx
+++ b/web-app/src/containers/ChatInput.tsx
@@ -2068,8 +2068,7 @@ const ChatInput = memo(function ChatInput({
</div>
)}
- {/* Two-stage stop: first click clears the queue, second click stops streaming */}
- {isStreaming && (
+ {isStreaming ? (
<Tooltip>
<TooltipTrigger asChild>
<Button
@@ -2093,17 +2092,18 @@ const ChatInput = memo(function ChatInput({
<p>{queueLength > 0 ? `Clear ${queueLength} queued message(s)` : 'Stop generating'}</p>
</TooltipContent>
</Tooltip>
+ ) : (
+ <Button
+ variant="default"
+ size="icon-sm"
+ disabled={!prompt.trim() || ingestingAny}
+ data-test-id="send-message-button"
+ onClick={() => handleSendMessage(prompt)}
+ className="rounded-full mr-1 mb-1"
+ >
+ <ArrowRight className="text-primary-fg" />
+ </Button>
)}
- <Button
- variant="default"
- size="icon-sm"
- disabled={!prompt.trim() || ingestingAny}
- data-test-id="send-message-button"
- onClick={() => handleSendMessage(prompt)}
- className="rounded-full mr-1 mb-1"
- >
- <ArrowRight className="text-primary-fg" />
- </Button>
</div>
</div>
</div>