mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-20 15:19:16 +00:00
Adds a Settings > AI switch to hide the automatic Add to Conversation button on terminal selection while keeping the context menu action available. Closes #1397
26 lines
647 B
TypeScript
26 lines
647 B
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import { terminalPropsAreEqual } from "./terminalMemo.ts";
|
|
import type { TerminalProps } from "./terminalHelpers.ts";
|
|
|
|
const baseProps = {
|
|
host: {},
|
|
keys: [],
|
|
identities: [],
|
|
snippets: [],
|
|
isVisible: true,
|
|
fontFamilyId: "default",
|
|
fontSize: 14,
|
|
terminalTheme: {},
|
|
sessionId: "session-1",
|
|
showSelectionAIAction: true,
|
|
} as unknown as TerminalProps;
|
|
|
|
test("terminal memo refreshes when selection AI action visibility changes", () => {
|
|
assert.equal(
|
|
terminalPropsAreEqual(baseProps, { ...baseProps, showSelectionAIAction: false }),
|
|
false,
|
|
);
|
|
});
|