Skip to content

Commit 521ac7c

Browse files
t3dotggclaude
andauthored
feat(settings): clean up Labs: promote tool calls, remove plan mode and old toggles (#33131)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 9028d76 commit 521ac7c

87 files changed

Lines changed: 350 additions & 2360 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎apps/desktop/src/settings/DesktopClientSettings.test.ts‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ const clientSettings: ClientSettings = {
3434
confirmThreadArchive: true,
3535
confirmThreadDelete: false,
3636
confirmThreadUnpin: false,
37-
contextWindowMeterEnabled: false,
3837
diffFilesCollapsed: true,
3938
diffIgnoreWhitespace: true,
4039
diffLayout: "stacked",
@@ -52,7 +51,6 @@ const clientSettings: ClientSettings = {
5251
glassOpacity: 80,
5352
onboardingCompletedAt: null,
5453
panelAnimationDurationMs: 0,
55-
planModeEnabled: false,
5654
proactivePanelsEnabled: true,
5755
showSkillsInSlashMenu: false,
5856
persistComposerContextStrip: true,
@@ -67,7 +65,6 @@ const clientSettings: ClientSettings = {
6765
boringSidebarMultilineRows: false,
6866
threadDetailsUsageEnabled: false,
6967
threadDetailsItems: {},
70-
legacySidebarEnabled: false,
7168
sidebarWorkingShelfEnabled: false,
7269
loadBalancingEnabled: false,
7370
loadBalancingWeights: { "environment-1": 75, "environment-2": 0 },

‎apps/mobile/src/features/settings/SettingsAppearanceRouteScreen.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { CodeAppearanceSection } from "./appearance/sections/CodeAppearanceSecti
88
import { TerminalAppearanceSection } from "./appearance/sections/TerminalAppearanceSection";
99
import { TextAppearanceSection } from "./appearance/sections/TextAppearanceSection";
1010
import { ThemeAppearanceSection } from "./appearance/sections/ThemeAppearanceSection";
11+
import { ToolCallsAppearanceSection } from "./appearance/sections/ToolCallsAppearanceSection";
1112

1213
export function SettingsAppearanceRouteScreen() {
1314
const insets = useSafeAreaInsets();
@@ -28,6 +29,7 @@ export function SettingsAppearanceRouteScreen() {
2829
<TextAppearanceSection />
2930
<TerminalAppearanceSection />
3031
<CodeAppearanceSection />
32+
<ToolCallsAppearanceSection />
3133
</ScrollView>
3234
</SettingsScreen>
3335
);

‎apps/mobile/src/features/settings/ThreadSettingsSections.tsx‎

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ import { serverEnvironment } from "../../state/server";
2222
import { useAtomCommand } from "../../state/use-atom-command";
2323
import { SettingsSection } from "./components/SettingsSection";
2424
import { SettingsSwitchRow } from "./components/SettingsSwitchRow";
25-
import { ListChoiceRow } from "../../components/ui/ListChoiceRow";
26-
import type { ToolCallVisibility } from "@t3tools/contracts/settings";
2725
import { SettingsScreen } from "./components/SettingsScreen";
2826
import { planAutoSettleSettingsSync, type AutoSettleSettings } from "./autoSettleSettingsSync";
2927
import { useSettingsEnvironmentFilter } from "./settings-environment-filter";
@@ -45,7 +43,6 @@ export function SettingsLabsRouteScreen() {
4543
contentContainerClassName="gap-6 px-5 pt-4"
4644
contentContainerStyle={{ paddingBottom: Math.max(insets.bottom, 18) + 18 }}
4745
>
48-
<ToolCallVisibilitySection />
4946
<MachineBetaSection
5047
title="Linked environments"
5148
icon="link"
@@ -60,7 +57,6 @@ export function SettingsLabsRouteScreen() {
6057
setting="fastWorktreeCheckout"
6158
description="On a Mac, clone new worktrees from a checkout cached in the T3 home folder instead of writing every file. Uses Git’s normal checkout when it can’t. Turning it off deletes the cache."
6259
/>
63-
<LegacySettingsSection />
6460
</ScrollView>
6561
</SettingsScreen>
6662
);
@@ -303,66 +299,3 @@ function MachineBetaSection({
303299
</View>
304300
);
305301
}
306-
307-
const TOOL_CALL_VISIBILITY_OPTIONS: ReadonlyArray<{
308-
readonly value: ToolCallVisibility;
309-
readonly label: string;
310-
}> = [
311-
{ value: "showAll", label: "Show all" },
312-
{ value: "hideSuccessful", label: "Hide successful" },
313-
{ value: "hideAll", label: "Hide all" },
314-
{ value: "zen", label: "Zen" },
315-
];
316-
317-
function ToolCallVisibilitySection() {
318-
const savePreferences = useAtomSet(updateMobilePreferencesAtom);
319-
const preferences = useAtomValue(mobilePreferencesAtom);
320-
const selected = AsyncResult.isSuccess(preferences)
321-
? (preferences.value.toolCallVisibility ?? "showAll")
322-
: null;
323-
324-
return (
325-
<View className="gap-3">
326-
<SettingsSection title="Beta: Tool calls in chat">
327-
{TOOL_CALL_VISIBILITY_OPTIONS.map((option, index) => (
328-
<ListChoiceRow
329-
key={option.value}
330-
label={option.label}
331-
selected={selected === option.value}
332-
separated={index > 0}
333-
disabled={selected === null}
334-
onPress={() => savePreferences({ toolCallVisibility: option.value })}
335-
/>
336-
))}
337-
</SettingsSection>
338-
<Text className="px-2 text-sm text-foreground-muted">
339-
Hide the commands, edits, and searches agents run. Hide successful keeps failures. Zen shows
340-
only final answers. Approvals, questions, and errors always show.
341-
</Text>
342-
</View>
343-
);
344-
}
345-
346-
function LegacySettingsSection() {
347-
const savePreferences = useAtomSet(updateMobilePreferencesAtom);
348-
const preferences = useAtomValue(mobilePreferencesAtom);
349-
const planModeEnabled =
350-
AsyncResult.isSuccess(preferences) && preferences.value.planModeEnabled === true;
351-
352-
return (
353-
<View className="gap-3">
354-
<SettingsSection title="Legacy">
355-
<SettingsSwitchRow
356-
icon="hammer"
357-
label="Plan Mode"
358-
value={planModeEnabled}
359-
onValueChange={(value) => savePreferences({ planModeEnabled: value })}
360-
/>
361-
</SettingsSection>
362-
<Text className="px-2 text-sm text-foreground-muted">
363-
Opt into retired interfaces kept for compatibility. Plan Mode restores the Build/Plan
364-
control; otherwise every task runs in Build mode.
365-
</Text>
366-
</View>
367-
);
368-
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { useAtomSet, useAtomValue } from "@effect/atom-react";
2+
import type { ToolCallVisibility } from "@t3tools/contracts/settings";
3+
import { AsyncResult } from "effect/reactivity";
4+
import { View } from "react-native";
5+
6+
import { AppText as Text } from "../../../../components/ui/AppText";
7+
import { ListChoiceRow } from "../../../../components/ui/ListChoiceRow";
8+
import { mobilePreferencesAtom, updateMobilePreferencesAtom } from "../../../../state/preferences";
9+
import { SettingsSection } from "../../components/SettingsSection";
10+
11+
const TOOL_CALL_VISIBILITY_OPTIONS: ReadonlyArray<{
12+
readonly value: ToolCallVisibility;
13+
readonly label: string;
14+
}> = [
15+
{ value: "showAll", label: "Show all" },
16+
{ value: "hideSuccessful", label: "Hide successful" },
17+
{ value: "hideAll", label: "Hide all" },
18+
{ value: "zen", label: "Zen" },
19+
];
20+
21+
export function ToolCallsAppearanceSection() {
22+
const savePreferences = useAtomSet(updateMobilePreferencesAtom);
23+
const preferences = useAtomValue(mobilePreferencesAtom);
24+
const selected = AsyncResult.isSuccess(preferences)
25+
? (preferences.value.toolCallVisibility ?? "showAll")
26+
: null;
27+
28+
return (
29+
<View className="gap-3">
30+
<SettingsSection title="Tool calls in chat">
31+
{TOOL_CALL_VISIBILITY_OPTIONS.map((option, index) => (
32+
<ListChoiceRow
33+
key={option.value}
34+
label={option.label}
35+
selected={selected === option.value}
36+
separated={index > 0}
37+
disabled={selected === null}
38+
onPress={() => savePreferences({ toolCallVisibility: option.value })}
39+
/>
40+
))}
41+
</SettingsSection>
42+
<Text className="px-2 text-sm text-foreground-muted">
43+
Hide the commands, edits, and searches agents run. Hide successful keeps failures. Zen shows
44+
only final answers. Approvals, questions, and errors always show.
45+
</Text>
46+
</View>
47+
);
48+
}

‎apps/mobile/src/features/settings/settings-search.ts‎

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ const SETTINGS_SEARCH_TERMS = {
2626
"terminal",
2727
"word break",
2828
"math",
29+
"tool calls in chat",
30+
"hide tool calls",
31+
"commands edits searches",
32+
"work log",
33+
"zen",
34+
"final answers only",
2935
],
3036
SettingsNavigation: ["tabs", "tab order", "reorder", "hide tabs"],
3137
SettingsKeyboard: ["return key", "send message", "new line", "hardware keyboard"],
@@ -99,19 +105,11 @@ const SETTINGS_SEARCH_TERMS = {
99105
"start from remote",
100106
],
101107
SettingsLabs: [
102-
"legacy",
103-
"plan mode",
104108
"beta",
105109
"linked environments",
106110
"link machine",
107111
"fast worktree checkout",
108112
"clone cache",
109-
"tool calls in chat",
110-
"hide tool calls",
111-
"commands edits searches",
112-
"work log",
113-
"zen",
114-
"final answers only",
115113
],
116114
SettingsEnvironmentMaintenance: ["updates", "provider updates", "restart", "manage environments"],
117115
SettingsAbout: [

‎apps/mobile/src/features/threads/NewTaskDraftScreen.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import { KeyboardController } from "react-native-keyboard-controller";
3333

3434
import {
3535
AuthOrchestrationOperateScope,
36+
DEFAULT_PROVIDER_INTERACTION_MODE,
3637
PROVIDER_SEND_TURN_MAX_ATTACHMENTS,
3738
resolveEnvironmentMachineKind,
3839
} from "@t3tools/contracts";
@@ -873,7 +874,7 @@ export function NewTaskDraftScreen(props: {
873874
threadId: ThreadId.make(creationMetadata.threadId),
874875
modelSelection: flow.selectedModel,
875876
runtimeMode: flow.runtimeMode,
876-
interactionMode: flow.interactionMode,
877+
interactionMode: DEFAULT_PROVIDER_INTERACTION_MODE,
877878
branch: flow.selectedBranchName,
878879
worktreePath: flow.selectedWorktreePath,
879880
createdAt: creationMetadata.createdAt,
@@ -971,7 +972,6 @@ export function NewTaskDraftScreen(props: {
971972
offersSideChat={false}
972973
onReconnectEnvironment={() => onReconnectEnvironment(selectedProject.environmentId)}
973974
canSwitchThreadProvider
974-
onUpdateThreadInteractionMode={flow.planModeEnabled ? flow.setInteractionMode : undefined}
975975
onRespondToApproval={async () => {}}
976976
onSelectUserInputOption={() => {}}
977977
onChangeUserInputCustomAnswer={() => {}}

‎apps/mobile/src/features/threads/ThreadComposer.tsx‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
type EnvironmentId,
2222
type MessageId,
2323
type ModelSelection,
24-
type ProviderInteractionMode,
2524
type ServerConfig as T3ServerConfig,
2625
type UsageLimitsReport,
2726
} from "@t3tools/contracts";
@@ -253,7 +252,6 @@ export interface ThreadComposerProps {
253252
) => Promise<MessageId | null>;
254253
readonly onShowUsageLimits: (report: UsageLimitsReport | null) => void;
255254
readonly canSwitchProvider: boolean;
256-
readonly onUpdateInteractionMode?: (interactionMode: ProviderInteractionMode) => void;
257255
readonly onHeightChange?: (height: number) => void;
258256
readonly onEditorFocusChange?: (focused: boolean) => void;
259257
}
@@ -558,10 +556,6 @@ export const ThreadComposer = function ThreadComposer(props: ThreadComposerProps
558556
hasThread: !props.isDraft,
559557
hasCompactableConversation: props.hasCompactableConversation,
560558
onChangeDraftMessage: props.onChangeDraftMessage,
561-
onUpdateInteractionMode:
562-
selectedProviderStatus?.showInteractionModeToggle === false
563-
? undefined
564-
: props.onUpdateInteractionMode,
565559
offersUsageLimits: usageLimitsOffered,
566560
onUsageLimits:
567561
usageLimitsOffered && draftAttachments.length === 0 ? openUsageLimits : undefined,

‎apps/mobile/src/features/threads/ThreadDetailScreen.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import { deriveBottomControlInsets, type NativeLayoutMetrics } from "../../lib/r
4141
import type {
4242
EnvironmentId,
4343
MessageId,
44-
ProviderInteractionMode,
4544
RuntimeRequestId,
4645
ScopedThreadRef,
4746
ServerConfig as T3ServerConfig,
@@ -301,7 +300,6 @@ export interface ThreadDetailScreenProps {
301300
) => Promise<MessageId | null>;
302301
readonly onReconnectEnvironment: () => void;
303302
readonly canSwitchThreadProvider: boolean;
304-
readonly onUpdateThreadInteractionMode?: (interactionMode: ProviderInteractionMode) => void;
305303
readonly onRespondToApproval: ApprovalResponder;
306304
readonly onSelectUserInputOption: (
307305
requestId: RuntimeRequestId,
@@ -1933,7 +1931,6 @@ function ThreadDetailBody(
19331931
onSendMessage={handleSendMessage}
19341932
onShowUsageLimits={showUsageLimits}
19351933
canSwitchProvider={props.canSwitchThreadProvider}
1936-
onUpdateInteractionMode={props.onUpdateThreadInteractionMode}
19371934
onHeightChange={handleComposerHeightChange}
19381935
onEditorFocusChange={handleOwnedInputFocusChange}
19391936
/>

‎apps/mobile/src/features/threads/ThreadRouteScreen.tsx‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,6 @@ function ThreadRouteContent(
10631063
offersSideChat={composer.sideChatUnavailableReason === null}
10641064
onReconnectEnvironment={handleReconnectEnvironment}
10651065
canSwitchThreadProvider={composer.canSwitchThreadProvider}
1066-
onUpdateThreadInteractionMode={composer.onUpdateInteractionMode}
10671066
onRespondToApproval={requests.onRespondToApproval}
10681067
onSelectUserInputOption={requests.onSelectUserInputOption}
10691068
onChangeUserInputCustomAnswer={requests.onChangeUserInputCustomAnswer}

‎apps/mobile/src/features/threads/ThreadSettingsSheet.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,7 +1338,7 @@ export function ExistingThreadSettingsRouteScreen({
13381338
option.selection.model === modelSelection.model,
13391339
) ?? null;
13401340
const updateModelSelection = (selection: ModelSelection) =>
1341-
updateThreadDraftModelSelection(threadKey, selection, serverConfig?.providers ?? []);
1341+
updateThreadDraftModelSelection(threadKey, selection);
13421342

13431343
return (
13441344
<ThreadSettingsPickerScreen

0 commit comments

Comments
 (0)