Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
import { describe, expect, it } from "vite-plus/test";
import { normalizePreviewOpenInput } from "./handlers.ts";
describe("normalizePreviewOpenInput", () => {
it("leaves an unstated visibility for the client preference to decide", () => {
expect(normalizePreviewOpenInput({})).toEqual({ reuseExistingTab: true });
});
it("preserves an explicit background-only opt-out", () => {
expect(normalizePreviewOpenInput({ open: false })).toEqual({
open: false,
reuseExistingTab: true,
show: false,
});
});
it("supports show as a legacy alias while preferring open", () => {
expect(normalizePreviewOpenInput({ show: false })).toEqual({
open: false,
reuseExistingTab: true,
show: false,
});
expect(normalizePreviewOpenInput({ open: true, show: false })).toEqual({
open: true,
reuseExistingTab: true,
show: true,
});
});
});