refactor: group shared native chat shell environment policy (#34301)

This commit is contained in:
Neil
2026-10-27 00:30:13 -07:00
committed by GitHub
parent cbbaa2d763
commit 2c6dd27276
10 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -12618,7 +12618,7 @@
"src/shared/native-chat-session-option-defaults.test.ts": 61,
"src/shared/native-chat-session-option-snapshot.test.ts": 100,
"src/shared/native-chat-session-option-state.test.ts": 52,
"src/shared/native-chat-shell-environment.test.ts": 30,
"src/shared/native-chat/native-chat-shell-environment.test.ts": 30,
"src/shared/native-chat-slash-commands.omp.test.ts": 54,
"src/shared/native-chat-slash-commands.test.ts": 52,
"src/shared/native-chat-stopped-send-turn.test.ts": 278,
@@ -8,7 +8,7 @@ import { normalizeAppIconId } from '../../../shared/app-icon'
import { normalizeTerminalCustomThemes } from '../../../shared/terminal-custom-themes'
import { normalizeTerminalDefaultShell } from '../../../shared/terminal-default-shell'
import { projectSourceControlAiToLegacyCommitMessageAi } from '../../../shared/source-control-ai'
import { normalizeNativeChatShellEnvironmentVariables } from '../../../shared/native-chat-shell-environment'
import { normalizeNativeChatShellEnvironmentVariables } from '../../../shared/native-chat/native-chat-shell-environment'
import { publishedLegacyChatPermissionMode } from '../../../shared/agent-chat-permission-mode'
import {
savedChatUiWithTerminalDefaultView,
@@ -21,7 +21,7 @@ import type { OrcaRuntimeService } from './orca-runtime'
import type { RpcRequest, RpcResponse } from './rpc/core'
import type { ClaudeStructuredAuthPolicy } from '../claude-accounts/claude-structured-auth-policy'
import { RpcDispatcher } from './rpc/dispatcher'
import type { NativeChatShellEnvironmentPolicy } from '../../shared/native-chat-shell-environment'
import type { NativeChatShellEnvironmentPolicy } from '../../shared/native-chat/native-chat-shell-environment'
import { STRUCTURED_AGENT_SESSION_METHODS } from './rpc/methods/structured-agent-session'
import {
ensureStructuredAgentSessionHost,
@@ -31,7 +31,7 @@ import type { OrcaRuntimeService } from './orca-runtime'
import { readPersistedTestAgentSessionStoreText } from './agent-session-record-store-test-harness'
import type { RpcRequest, RpcResponse } from './rpc/core'
import { RpcDispatcher } from './rpc/dispatcher'
import type { NativeChatShellEnvironmentPolicy } from '../../shared/native-chat-shell-environment'
import type { NativeChatShellEnvironmentPolicy } from '../../shared/native-chat/native-chat-shell-environment'
import { STRUCTURED_AGENT_SESSION_METHODS } from './rpc/methods/structured-agent-session'
import {
ensureStructuredAgentSessionHost,
@@ -33,7 +33,7 @@ import {
createStructuredAgentSessionOwnerProbe,
createStructuredAgentSessionOwnerProbes
} from './structured-agent-session-owner-probe'
import type { NativeChatShellEnvironmentPolicy } from '../../shared/native-chat-shell-environment'
import type { NativeChatShellEnvironmentPolicy } from '../../shared/native-chat/native-chat-shell-environment'
import { createStructuredAgentEnvironmentResolvers } from './structured-agent-shell-environment'
import type { ClaudeStructuredAuthPolicy } from '../claude-accounts/claude-structured-auth-policy'
import type { StructuredAgentAdapterContext } from './structured-agent-runtime-registration-types'
@@ -8,7 +8,7 @@ import type { GlobalSettings } from '../../shared/global-settings-types'
import {
nativeChatShellEnvironmentPolicy,
type NativeChatShellEnvironmentPolicy
} from '../../shared/native-chat-shell-environment'
} from '../../shared/native-chat/native-chat-shell-environment'
// Even with shell inheritance off, preserve CLI lookup, locale and agent socket.
const BASELINE_SHELL_VARIABLES = ['PATH', 'LANG', 'LC_ALL', 'LC_CTYPE', 'SSH_AUTH_SOCK']
@@ -48,7 +48,7 @@ import {
import { resolveTuiAgentLaunchEnv } from '../../../shared/tui-agent-launch-defaults'
import { preModeChatGetsFullAccess } from '../../../shared/agent-chat-permission-mode'
import { isTuiAgent } from '../../../shared/tui-agent-config'
import { nativeChatShellEnvironmentPolicy } from '../../../shared/native-chat-shell-environment'
import { nativeChatShellEnvironmentPolicy } from '../../../shared/native-chat/native-chat-shell-environment'
import { claudeStructuredAuthPolicyForSettings } from '../../claude-accounts/claude-structured-auth-policy'
import { resolveStructuredAgentCommand } from '../../native-chat/structured-agent-command-resolution'
import { structuredAgentConfiguredArgs } from '../../native-chat/structured-agent-configured-args'
@@ -1,7 +1,7 @@
import { useRef, useState } from 'react'
import { Plus, X } from 'lucide-react'
import type { GlobalSettings } from '../../../../shared/global-settings-types'
import { isNativeChatShellEnvironmentName } from '../../../../shared/native-chat-shell-environment'
import { isNativeChatShellEnvironmentName } from '../../../../shared/native-chat/native-chat-shell-environment'
import { translate } from '@/i18n/i18n'
import { Button } from '../ui/button'
import { Input } from '../ui/input'
@@ -1,4 +1,4 @@
import type { GlobalSettings } from './global-settings-types'
import type { GlobalSettings } from '../global-settings-types'
/** Which login-shell variables a structured native chat child inherits. */
export type NativeChatShellEnvironmentPolicy = {