Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/host-service/src/terminal/env.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ describe("buildV2TerminalEnv", () => {
const env = buildV2TerminalEnv(baseParams);
expect(env).toMatchObject({
TERM: "xterm-256color",
TERM_PROGRAM: "Superset",
TERM_PROGRAM: "kitty",
TERM_PROGRAM_VERSION: "2.0.0",
COLORTERM: "truecolor",
PWD: "/tmp/workspace",
Expand All @@ -405,7 +405,7 @@ describe("buildV2TerminalEnv", () => {
SUPERSET_AGENT_HOOK_PORT: "51741",
SUPERSET_AGENT_HOOK_VERSION: "2",
});
expect(env.TERM_PROGRAM).toBe("Superset");
expect(env.TERM_PROGRAM).toBe("kitty");
expect(env.LANG).toContain("UTF-8");
});

Expand Down
6 changes: 5 additions & 1 deletion packages/host-service/src/terminal/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,11 @@ export function buildV2TerminalEnv(
Object.assign(env, getShellBootstrapEnv({ shell, baseEnv, supersetHomeDir }));

env.TERM = "xterm-256color";
env.TERM_PROGRAM = "Superset";
// claude-code and similar chat TUIs only parse kitty CSI-u (e.g. Shift+Enter
// → \x1b[13;2u) when TERM_PROGRAM ∈ {ghostty, kitty, iTerm.app, WezTerm,
// WarpTerminal}. xterm.js already emits the right bytes — claim kitty so
// they're parsed instead of submitted as plain Enter.
env.TERM_PROGRAM = "kitty";
env.TERM_PROGRAM_VERSION = hostServiceVersion;
env.COLORTERM = "truecolor";
env.COLORFGBG = themeType === "light" ? "0;15" : "15;0";
Expand Down
Loading