[codex] Add telnet URL deep link support (#1988)

* Add telnet URL deep link support

* Fix telnet deep link review issues

* Keep ssh deep links independent from telnet registration

* Address Codex telnet deep link feedback
This commit is contained in:
陈大猫 authored and GitHub committed 2026-07-07 11:15:57 +08:00
1 parent 1eb877e2aa
commit 1d91c8fbf4
19 files changed
+769 -15

No files matched your search

@@ -0,0 +1,35 @@
import assert from "node:assert/strict";
import test from "node:test";
import type { Host } from "../../domain/models";
import { buildTelnetDeepLinkConnectionHost } from "../../domain/telnetDeepLink";
import { createHostTerminalSession } from "./sessionFactories";
const host = (overrides: Partial<Host>): Host => ({
id: "host-1",
label: "Host",
hostname: "example.com",
username: "alice",
port: 22,
group: "",
tags: [],
os: "linux",
protocol: "ssh",
createdAt: 1,
...overrides,
});
test("createHostTerminalSession keeps telnet deep-link default port for ssh hosts with telnet enabled", () => {
const connectionHost = buildTelnetDeepLinkConnectionHost(
host({
protocol: "ssh",
telnetEnabled: true,
telnetPort: undefined,
}),
);
const session = createHostTerminalSession("session-1", connectionHost);
assert.equal(session.protocol, "telnet");
assert.equal(session.port, 23);
});