Files
Netcatty/application/state/sessionFactories.localHostId.test.ts
T
bincxzandCursor b688fc815b fix(terminal): seed Local Terminal autocomplete from shell histfiles
Local Terminal used a per-session hostId, so autocomplete history never
accumulated, and the store never imported ~/.zsh_history. Stabilize the
hostId and seed from local histfiles so prefix suggestions match Ghostty.

Closes #2037

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-09 11:16:41 +08:00

18 lines
529 B
TypeScript

import assert from "node:assert/strict";
import test from "node:test";
import {
LOCAL_TERMINAL_HOST_ID,
createLocalTerminalSession,
} from "./sessionFactories.ts";
test("createLocalTerminalSession uses a stable hostId across sessions", () => {
const a = createLocalTerminalSession("session-a");
const b = createLocalTerminalSession("session-b");
assert.equal(a.hostId, LOCAL_TERMINAL_HOST_ID);
assert.equal(b.hostId, LOCAL_TERMINAL_HOST_ID);
assert.notEqual(a.id, b.id);
assert.equal(a.protocol, "local");
});