@@ -34,6 +34,7 @@ import {
|
34 | 34 | DREAMING_SESSION_INGESTION_FILES_NAMESPACE, |
35 | 35 | DREAMING_SESSION_INGESTION_SEEN_NAMESPACE, |
36 | 36 | SESSION_SEEN_HASHES_PER_CHUNK, |
| 37 | +normalizeMemoryCoreWorkspaceKey, |
37 | 38 | readMemoryCoreWorkspaceEntries, |
38 | 39 | writeMemoryCoreWorkspaceEntries, |
39 | 40 | } from "./dreaming-state.js"; |
@@ -542,11 +543,6 @@ type SessionIngestionCollectionResult = {
|
542 | 543 | changed: boolean; |
543 | 544 | }; |
544 | 545 | |
545 | | -function normalizeWorkspaceKey(workspaceDir: string): string { |
546 | | -const resolved = path.resolve(workspaceDir).replace(/\\/g, "/"); |
547 | | -return process.platform === "win32" ? resolved.toLowerCase() : resolved; |
548 | | -} |
549 | | - |
550 | 546 | export function normalizeSessionIngestionState(raw: unknown): SessionIngestionState { |
551 | 547 | const record = asRecord(raw); |
552 | 548 | const filesRaw = asRecord(record?.files); |
@@ -749,15 +745,17 @@ function resolveSessionAgentsForWorkspace(params: {
|
749 | 745 | if (!cfg) { |
750 | 746 | return []; |
751 | 747 | } |
752 | | -const target = normalizeWorkspaceKey(workspaceDir); |
| 748 | +const target = normalizeMemoryCoreWorkspaceKey(workspaceDir); |
753 | 749 | const workspaces = resolveMemoryDreamingWorkspaces( |
754 | 750 | cfg as Parameters<typeof resolveMemoryDreamingWorkspaces>[0], |
755 | 751 | { |
756 | 752 | primaryWorkspaceDir, |
757 | 753 | primaryAgentId: "main", |
758 | 754 | }, |
759 | 755 | ); |
760 | | -const match = workspaces.find((entry) => normalizeWorkspaceKey(entry.workspaceDir) === target); |
| 756 | +const match = workspaces.find( |
| 757 | +(entry) => normalizeMemoryCoreWorkspaceKey(entry.workspaceDir) === target, |
| 758 | +); |
761 | 759 | if (!match) { |
762 | 760 | return []; |
763 | 761 | } |
|