diff --git a/src/main/codex-accounts/runtime-home-service.test.ts b/src/main/codex-accounts/runtime-home-service.test.ts index ffac70d432b..be863bb3742 100644 --- a/src/main/codex-accounts/runtime-home-service.test.ts +++ b/src/main/codex-accounts/runtime-home-service.test.ts @@ -88,7 +88,6 @@ function createSettings(overrides: Partial = {}): GlobalSettings terminalMacOptionAsAltMigrated: true, experimentalTerminalDaemon: false, experimentalTerminalDaemonNoticeShown: false, - terminalForceHyperlink: true, terminalWindowsShell: 'powershell.exe', enableGitHubAttribution: true, ...overrides diff --git a/src/main/codex-accounts/service.test.ts b/src/main/codex-accounts/service.test.ts index f4831d4bd51..166b536b64a 100644 --- a/src/main/codex-accounts/service.test.ts +++ b/src/main/codex-accounts/service.test.ts @@ -82,7 +82,6 @@ function createSettings(overrides: Partial = {}): GlobalSettings terminalMacOptionAsAltMigrated: true, experimentalTerminalDaemon: false, experimentalTerminalDaemonNoticeShown: false, - terminalForceHyperlink: true, terminalWindowsShell: 'powershell.exe', enableGitHubAttribution: true, ...overrides diff --git a/src/main/ipc/pty.ts b/src/main/ipc/pty.ts index b6f6088d535..f9b963e9a66 100644 --- a/src/main/ipc/pty.ts +++ b/src/main/ipc/pty.ts @@ -186,7 +186,6 @@ export function registerPtyHandlers( if (localProvider instanceof LocalPtyProvider) { localProvider.configure({ isHistoryEnabled: () => getSettings?.()?.terminalScopeHistoryByWorktree ?? true, - isForceHyperlinkEnabled: () => getSettings?.()?.terminalForceHyperlink ?? true, getWindowsShell: () => getSettings?.()?.terminalWindowsShell, buildSpawnEnv: (id, baseEnv) => { const selectedCodexHomePath = getSelectedCodexHomePath?.() ?? null diff --git a/src/main/providers/local-pty-provider.test.ts b/src/main/providers/local-pty-provider.test.ts index a0858301967..6166d84be8f 100644 --- a/src/main/providers/local-pty-provider.test.ts +++ b/src/main/providers/local-pty-provider.test.ts @@ -120,22 +120,6 @@ describe('LocalPtyProvider', () => { expect(spawnCall[2].env.CUSTOM_VAR).toBe('custom-value') }) - it('sets FORCE_HYPERLINK=1 by default to preserve legacy behavior', async () => { - await provider.spawn({ cols: 80, rows: 24 }) - const spawnCall = spawnMock.mock.calls.at(-1)! - expect(spawnCall[2].env.FORCE_HYPERLINK).toBe('1') - }) - - it('omits FORCE_HYPERLINK when isForceHyperlinkEnabled returns false', async () => { - // Why: users with heavy shell init (oh-my-zsh + p10k + nvm + pyenv) can - // disable FORCE_HYPERLINK from Settings. Verify the opt-out reaches the - // spawn env so OSC-8-reading tools stop emitting the extra escapes. - provider.configure({ isForceHyperlinkEnabled: () => false }) - await provider.spawn({ cols: 80, rows: 24 }) - const spawnCall = spawnMock.mock.calls.at(-1)! - expect(spawnCall[2].env.FORCE_HYPERLINK).toBeUndefined() - }) - it('combines HOMEDRIVE and HOMEPATH for Windows default cwd', async () => { const platform = Object.getOwnPropertyDescriptor(process, 'platform') const originalUserProfile = process.env.USERPROFILE diff --git a/src/main/providers/local-pty-provider.ts b/src/main/providers/local-pty-provider.ts index 09c7b3d65fe..c429e580f54 100644 --- a/src/main/providers/local-pty-provider.ts +++ b/src/main/providers/local-pty-provider.ts @@ -92,12 +92,6 @@ export type LocalPtyProviderOptions = { /** Whether worktree-scoped shell history is enabled. When true (or absent) * and a worktreeId is provided, HISTFILE is scoped per-worktree. */ isHistoryEnabled?: () => boolean - /** Whether to set FORCE_HYPERLINK=1 in spawned PTYs. Historically always on; - * now user-togglable because the extra OSC-8 emission branches in oh-my-zsh, - * coreutils, and the Rust supports-hyperlinks crate can compound to a - * significant shell-startup slowdown with heavy rc files. When absent, - * defaults to the prior behavior (on). */ - isForceHyperlinkEnabled?: () => boolean /** Why: COMSPEC is always cmd.exe on a stock Windows machine, so reading it * directly would ignore the user's shell preference. This callback lets the * IPC layer inject the persisted setting without coupling the provider to the @@ -194,21 +188,6 @@ export class LocalPtyProvider implements IPtyProvider { delete spawnEnv[key] } - // Why: FORCE_HYPERLINK=1 is read by oh-my-zsh's supports_hyperlinks(), the - // Rust supports-hyperlinks crate, GNU coreutils, and other tooling. - // Forcing it on makes every subprocess invoked during shell init take - // extra branches and emit OSC-8 escapes, which compounded with a heavy - // zshrc (oh-my-zsh + p10k + nvm + pyenv + conda) can 3×+ the startup time - // — reported by users as a multi-minute-to-hour "terminal hang." - // We keep the historical default (on) so existing users don't lose link - // emission silently, but expose it as a toggle so users with heavy rc - // files can opt out. Orca's xterm still renders OSC-8 hyperlinks when - // tools emit them on their own detection, so link support is preserved - // for the typical modern CLI even when this toggle is off. - if (this.opts.isForceHyperlinkEnabled?.() ?? true) { - spawnEnv.FORCE_HYPERLINK = '1' - } - spawnEnv.LANG ??= 'en_US.UTF-8' // Why: On Windows, LANG alone does not control the console code page. diff --git a/src/renderer/src/components/settings/TerminalPane.tsx b/src/renderer/src/components/settings/TerminalPane.tsx index a086211cc5e..e4b097d8b62 100644 --- a/src/renderer/src/components/settings/TerminalPane.tsx +++ b/src/renderer/src/components/settings/TerminalPane.tsx @@ -701,58 +701,6 @@ export function TerminalPane({ ) : null} - -
- -

- Sets{' '} - FORCE_HYPERLINK=1 in - every spawned terminal so tools like ls, git, and{' '} - eza emit OSC-8 clickable links. Disable if your shell startup feels slow - — heavy setups (oh-my-zsh, powerlevel10k, nvm, pyenv, conda) can take measurably - longer with this on. Only affects newly spawned terminals. -

-
- -
- {isMac ? (