Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): new-thread defaults ignored for remote environments #4276

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/4276/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

Showing 3 changed files with 27 additions and 23 deletions.

x
0 of 3 viewed, 3 left
8 additions and 3 deletionsapps/web/src/components/ChatView.tsxModified
View file
@@ -188,6 +188,7 @@
import {
primaryServerAvailableEditorsAtom,
primaryServerKeybindingsAtom,
+ primaryServerSettingsAtom,
serverEnvironment,
} from "../state/server";
import { terminalEnvironment } from "../state/terminal";
@@ -1139,6 +1140,10 @@
(store) => store.threadLastVisitedAtById[routeThreadKey],
const settings = useEnvironmentSettings(environmentId);
+ // New-thread defaults live in the primary environment's settings.json (the
+ // settings UI never writes to remote environments), so read them from the
+ // primary server rather than the thread's environment.
+ const primaryServerSettings = useAtomValue(primaryServerSettingsAtom);
const setStickyComposerModelSelection = useComposerDraftStore(
(store) => store.setStickyModelSelection,
@@ -3734,7 +3739,7 @@
? (draftThread?.startFromOrigin ?? false)
: canOverrideServerThreadEnvMode
? (pendingServerThreadStartFromOriginByThreadId[activeThread?.id ?? ""] ??
- settings.newWorktreesStartFromOrigin)
+ primaryServerSettings.newWorktreesStartFromOrigin)
: false;
const sendEnvMode = resolveSendEnvMode({
requestedEnvMode: envMode,