@m6d/cortex-angular 1.4.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1476,9 +1476,11 @@ class CortexChatService {
|
|
|
1476
1476
|
return this.threadService.delete(threadId);
|
|
1477
1477
|
}
|
|
1478
1478
|
mountChat(thread, mode) {
|
|
1479
|
+
const initialMessages = mode === "reload" ? this.chat()?.messages() : undefined;
|
|
1479
1480
|
this.chatInjector?.destroy();
|
|
1480
1481
|
this.dispatchedToolCalls.clear();
|
|
1481
|
-
|
|
1482
|
+
if (mode !== "reload")
|
|
1483
|
+
this.messageMetadata.set(new Map);
|
|
1482
1484
|
this.ownsRun = false;
|
|
1483
1485
|
this.serverAnswered = false;
|
|
1484
1486
|
this.wasAborted = false;
|
|
@@ -1489,6 +1491,7 @@ class CortexChatService {
|
|
|
1489
1491
|
const chat = injectChat({
|
|
1490
1492
|
threadId: thread.id,
|
|
1491
1493
|
persistence: true,
|
|
1494
|
+
initialMessages,
|
|
1492
1495
|
connection: this.createConnection(thread, mode, injector),
|
|
1493
1496
|
onChunk: () => {
|
|
1494
1497
|
this.serverAnswered = true;
|