feat(modality)!: SnapOtter 2.0 phase 3 modality framework: media/doc engines, pool routing, display modes (#218)

This commit is contained in:
SnapOtter
2026-06-13 10:18:39 +08:00
parent c451b939c7
commit d647d8ed19
99 changed files with 4380 additions and 1813 deletions
+19
View File
@@ -0,0 +1,19 @@
import { describe, expect, it } from "vitest";
import { resolveToolPool, shouldSkipSyncWindow } from "../../apps/api/src/lib/pool.js";
describe("pool routing", () => {
it("image tools stay on the image pool", () => {
expect(resolveToolPool("resize")).toBe("image");
});
it("ai tools route to the ai pool regardless of modality", () => {
expect(resolveToolPool("remove-background")).toBe("ai");
});
it("unknown tools default to image", () => {
expect(resolveToolPool("not-a-tool")).toBe("image");
});
it("long hint skips the sync window", () => {
expect(shouldSkipSyncWindow("long")).toBe(true);
expect(shouldSkipSyncWindow("fast")).toBe(false);
expect(shouldSkipSyncWindow(undefined)).toBe(false);
});
});