Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(ai): enumerate audio pills too, now that RegionKind carries them

EtienneLescotf07fa5a07185
diff --git a/electron/ai-edition/agent-tools.ts b/electron/ai-edition/agent-tools.ts
index 753a7c860..bb25b8448 100644
--- a/electron/ai-edition/agent-tools.ts
+++ b/electron/ai-edition/agent-tools.ts
@@ -94,6 +94,12 @@ function modifierIds(document: AxcutDocument, kind: ModifierKind): string[] {
return ((legacy.cameraFullscreenRegions as Array<{ id: string }> | undefined) ?? []).map(
(region) => region.id,
);
+ case "audio":
+ // Fragments of one user-visible track share `trackId` and render as a single pill,
+ // so the id that disappears is the group key once, not one per fragment.
+ // `removeRegion` applies the same grouping by routing this kind through
+ // `removeAudioTrack`.
+ return [...new Set(document.audioTracks.map(trackGroupId))];
}
}