summaryrefslogtreecommitdiff
path: root/src/main/fileSyncBridge.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/fileSyncBridge.ts')
-rw-r--r--src/main/fileSyncBridge.ts11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/fileSyncBridge.ts b/src/main/fileSyncBridge.ts
index 08bf69e..7de04d7 100644
--- a/src/main/fileSyncBridge.ts
+++ b/src/main/fileSyncBridge.ts
@@ -1785,6 +1785,17 @@ export class FileSyncBridge {
return Object.entries(this.fileRefPathMap).map(([id, path]) => ({ id, path }))
}
+ /** Live docId → relPath lookup — unlike the connect-time project snapshot,
+ * this includes docs created mid-session */
+ getDocPath(docId: string): string | undefined {
+ return this.docPathMap[docId]
+ }
+
+ /** Live relPath → docId lookup (see getDocPath) */
+ getDocIdForPath(relPath: string): string | undefined {
+ return this.pathDocMap[relPath]
+ }
+
/** Check if a doc's content is known */
hasDoc(relPath: string): boolean {
return this.lastKnownContent.has(relPath)