This commit is contained in:
vee
2026-08-14 15:01:29 +08:00
parent 6d768aaef4
commit f77dda70fe
20 changed files with 1125 additions and 122 deletions
+6 -1
View File
@@ -19,7 +19,12 @@ function createConversationId() {
function loadConversationId() {
const stored = sessionStorage.getItem("cognitive-agent.conversation-id");
if (stored?.startsWith("conv-")) return stored;
// A browser runtime restart is a new virtual run. Do not reuse the old
// conversation actuator state; hardware mode will repopulate this fresh
// context from authoritative CAN feedback when it is selected.
if (stored?.startsWith("conv-")) {
sessionStorage.removeItem("cognitive-agent.conversation-id");
}
const conversationId = createConversationId();
sessionStorage.setItem("cognitive-agent.conversation-id", conversationId);
return conversationId;