mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-10-09 15:58:34 +00:00
f191a9b449
Add a global dynamic tab title mode, default to agent-only titles, remove the per-host disable control, and keep terminal UI refresh paths in sync with the setting.
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
import assert from "node:assert/strict";
|
|
import test from "node:test";
|
|
|
|
import * as terminalBehaviorSettings from "./tabs/TerminalBehaviorSettings.tsx";
|
|
|
|
const middleClickBehaviorOptions = (
|
|
terminalBehaviorSettings as {
|
|
MIDDLE_CLICK_BEHAVIOR_OPTIONS?: Array<{ value: string; labelKey: string }>;
|
|
}
|
|
).MIDDLE_CLICK_BEHAVIOR_OPTIONS;
|
|
|
|
const dynamicTabTitleModeOptions = (
|
|
terminalBehaviorSettings as {
|
|
DYNAMIC_TAB_TITLE_MODE_OPTIONS?: Array<{ value: string; labelKey: string }>;
|
|
}
|
|
).DYNAMIC_TAB_TITLE_MODE_OPTIONS;
|
|
|
|
test("middle-click settings expose only supported behaviors", () => {
|
|
assert.ok(Array.isArray(middleClickBehaviorOptions));
|
|
assert.deepEqual(
|
|
middleClickBehaviorOptions.map((option) => option.value),
|
|
["context-menu", "paste", "disabled"],
|
|
);
|
|
});
|
|
|
|
test("dynamic tab title settings expose off, agent-only, and all modes", () => {
|
|
assert.ok(Array.isArray(dynamicTabTitleModeOptions));
|
|
assert.deepEqual(
|
|
dynamicTabTitleModeOptions.map((option) => option.value),
|
|
["off", "agent", "all"],
|
|
);
|
|
});
|