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.

Merge branch 'dev' into feat/retain-interruption-message

Nghia Doan045baed3a491
diff --cc web-app/src/hooks/useChat.ts
index 3ccf1c902,8564a3d94..fdf3eea2f
--- a/web-app/src/hooks/useChat.ts
+++ b/web-app/src/hooks/useChat.ts
@@@ -803,23 -718,13 +806,26 @@@ export const useChat = () =>
}
)
- builder.addAssistantMessage(accumulatedText, undefined, toolCalls)
+ // If continuing from a message, preserve the ID and set status to Ready
+ if (continueFromMessageId) {
+ finalContent = {
+ ...finalContent,
+ id: continueFromMessageId,
+ status: MessageStatus.Ready,
+ }
+ }
+
+ // Normal completion flow (abort is handled after loop exits)
+ // Don't add assistant message to builder if continuing - it's already there
+ if (!continueFromMessageId) {
+ builder.addAssistantMessage(accumulatedTextRef.value, undefined, toolCalls)
+ }
// Check if proactive mode is enabled for this model
- const isProactiveMode = selectedModel?.capabilities?.includes('proactive') ?? false
+ const isProactiveMode =
+ (selectedModel?.capabilities?.includes('tools') ?? false) &&
+ (selectedModel?.capabilities?.includes('vision') ?? false) &&
+ (selectedModel?.capabilities?.includes('proactive') ?? false)
const updatedMessage = await postMessageProcessing(
toolCalls,