fix: preserve exploration demonstration source and recording scope

This commit is contained in:
chenmingxuan committed 2026-10-18 23:20:50 +08:00
1 parent f4cb55c030
commit 973ccae679
22 files changed
+624 -55

No files matched your search

+6 -2
View File
@@ -241,7 +241,9 @@ class PluginRecordings:
)
temporary.replace(target)
async def observe(self, source_id: str, plugin_id: str, source: EvidenceSource):
async def observe(
self, source_id: str, plugin_id: str, source: EvidenceSource, *, exclusive: bool = False
):
if not self.enabled:
return
async with self._lock:
@@ -277,7 +279,9 @@ class PluginRecordings:
if self.config.computer_scope == "window":
for other in list(self.active):
previous = self.sources[other]
if other != track_id and previous.get("target_id") == source.target_id:
if other != track_id and (
exclusive or previous.get("target_id") == source.target_id
):
await self._finish(other)
track["target_id"] = source.target_id
if track_id in self.active or track_id in self.failed: