Skip to content

Commit 46cbf38

Browse files
committed
refactor(web): name the setting followUpBehavior
1 parent 3e26c26 commit 46cbf38

5 files changed

Lines changed: 20 additions & 22 deletions

File tree

‎apps/web/src/components/ChatView.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7514,7 +7514,7 @@ export default function ChatView(props: ChatViewProps) {
75147514
!directAnnotation &&
75157515
phase === "running" &&
75167516
activeThreadKey &&
7517-
settings.busyMessageBehavior === "queue"
7517+
settings.followUpBehavior === "queue"
75187518
) {
75197519
if (composerRef.current?.validateProviderInput(promptForSend) === false) {
75207520
return;

‎apps/web/src/components/settings/SettingsPanels.tsx‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ export function useSettingsRestore(onRestored?: () => void) {
578578
...(settings.composerCollapseOnScroll !== DEFAULT_UNIFIED_SETTINGS.composerCollapseOnScroll
579579
? ["Collapse composer on scroll"]
580580
: []),
581-
...(settings.busyMessageBehavior !== DEFAULT_UNIFIED_SETTINGS.busyMessageBehavior
581+
...(settings.followUpBehavior !== DEFAULT_UNIFIED_SETTINGS.followUpBehavior
582582
? ["Follow-up behavior"]
583583
: []),
584584
...(settings.contextWindowMeterEnabled !== DEFAULT_UNIFIED_SETTINGS.contextWindowMeterEnabled
@@ -639,7 +639,7 @@ export function useSettingsRestore(onRestored?: () => void) {
639639
settings.confirmThreadDelete,
640640
settings.confirmThreadUnpin,
641641
settings.composerCollapseOnScroll,
642-
settings.busyMessageBehavior,
642+
settings.followUpBehavior,
643643
settings.addProjectBaseDirectory,
644644
settings.defaultThreadEnvMode,
645645
settings.newWorktreesStartFromOrigin,
@@ -752,7 +752,7 @@ export function useSettingsRestore(onRestored?: () => void) {
752752
proactivePanelsEnabled: DEFAULT_UNIFIED_SETTINGS.proactivePanelsEnabled,
753753
showSkillsInSlashMenu: DEFAULT_UNIFIED_SETTINGS.showSkillsInSlashMenu,
754754
composerCollapseOnScroll: DEFAULT_UNIFIED_SETTINGS.composerCollapseOnScroll,
755-
busyMessageBehavior: DEFAULT_UNIFIED_SETTINGS.busyMessageBehavior,
755+
followUpBehavior: DEFAULT_UNIFIED_SETTINGS.followUpBehavior,
756756
contextWindowMeterEnabled: DEFAULT_UNIFIED_SETTINGS.contextWindowMeterEnabled,
757757
environmentIdentificationMode: DEFAULT_UNIFIED_SETTINGS.environmentIdentificationMode,
758758
glassOpacity: DEFAULT_UNIFIED_SETTINGS.glassOpacity,
@@ -2595,32 +2595,32 @@ export function GeneralSettingsPanel() {
25952595
/>
25962596

25972597
<SettingsRow
2598-
{...searchableSetting("busy-message-behavior")}
2598+
{...searchableSetting("follow-up-behavior")}
25992599
description="Queue follow-ups while the agent runs or steer the current turn."
26002600
resetAction={
2601-
settings.busyMessageBehavior !== DEFAULT_UNIFIED_SETTINGS.busyMessageBehavior ? (
2601+
settings.followUpBehavior !== DEFAULT_UNIFIED_SETTINGS.followUpBehavior ? (
26022602
<SettingResetButton
26032603
label="follow-up behavior"
26042604
onClick={() =>
26052605
updateSettings({
2606-
busyMessageBehavior: DEFAULT_UNIFIED_SETTINGS.busyMessageBehavior,
2606+
followUpBehavior: DEFAULT_UNIFIED_SETTINGS.followUpBehavior,
26072607
})
26082608
}
26092609
/>
26102610
) : null
26112611
}
26122612
control={
26132613
<Select
2614-
value={settings.busyMessageBehavior}
2614+
value={settings.followUpBehavior}
26152615
onValueChange={(value) => {
26162616
if (value === "queue" || value === "steer") {
2617-
updateSettings({ busyMessageBehavior: value });
2617+
updateSettings({ followUpBehavior: value });
26182618
}
26192619
}}
26202620
>
26212621
<SelectTrigger size="sm" className="w-full sm:w-40" aria-label="Follow-up behavior">
26222622
<SelectValue>
2623-
{settings.busyMessageBehavior === "queue" ? "Queue" : "Steer"}
2623+
{settings.followUpBehavior === "queue" ? "Queue" : "Steer"}
26242624
</SelectValue>
26252625
</SelectTrigger>
26262626
<SelectPopup align="end" alignItemWithTrigger={false}>

‎apps/web/src/components/settings/settingsSearch.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ export const SETTINGS_SEARCH_ITEMS = [
299299
searchTerms: ["composer rest resting scroll wheel conversation timeline shrink minimize"],
300300
},
301301
{
302-
id: "busy-message-behavior",
302+
id: "follow-up-behavior",
303303
title: "Follow-up behavior",
304304
to: "/settings/general",
305305
searchTerms: ["queue steer running turn send default behavior composer"],

‎packages/contracts/src/settings.test.ts‎

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -529,18 +529,16 @@ describe("ClientSettings context window meter", () => {
529529
});
530530
});
531531

532-
describe("ClientSettings busy message behavior", () => {
532+
describe("ClientSettings follow-up behavior", () => {
533533
it("defaults to queue and accepts either behavior", () => {
534-
expect(decodeClientSettings({}).busyMessageBehavior).toBe("queue");
535-
for (const busyMessageBehavior of ["queue", "steer"]) {
536-
expect(decodeClientSettings({ busyMessageBehavior }).busyMessageBehavior).toBe(
537-
busyMessageBehavior,
538-
);
539-
expect(decodeClientSettingsPatch({ busyMessageBehavior }).busyMessageBehavior).toBe(
540-
busyMessageBehavior,
534+
expect(decodeClientSettings({}).followUpBehavior).toBe("queue");
535+
for (const followUpBehavior of ["queue", "steer"]) {
536+
expect(decodeClientSettings({ followUpBehavior }).followUpBehavior).toBe(followUpBehavior);
537+
expect(decodeClientSettingsPatch({ followUpBehavior }).followUpBehavior).toBe(
538+
followUpBehavior,
541539
);
542540
}
543-
expect(() => decodeClientSettingsPatch({ busyMessageBehavior: "invalid" })).toThrow();
541+
expect(() => decodeClientSettingsPatch({ followUpBehavior: "invalid" })).toThrow();
544542
});
545543
});
546544

‎packages/contracts/src/settings.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ export const ClientSettingsSchema = Schema.Struct({
430430
// Desktop resting composer: scrolling an existing thread's conversation
431431
// settles the composer into its single-line layout. Losing focus never does.
432432
composerCollapseOnScroll: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true))),
433-
busyMessageBehavior: Schema.Literals(["queue", "steer"]).pipe(
433+
followUpBehavior: Schema.Literals(["queue", "steer"]).pipe(
434434
Schema.withDecodingDefault(Effect.succeed("queue")),
435435
),
436436
proactivePanelsEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))),
@@ -1502,7 +1502,7 @@ export const ClientSettingsPatch = Schema.Struct({
15021502
planModeEnabled: Schema.optionalKey(Schema.Boolean),
15031503
contextWindowMeterEnabled: Schema.optionalKey(Schema.Boolean),
15041504
composerCollapseOnScroll: Schema.optionalKey(Schema.Boolean),
1505-
busyMessageBehavior: Schema.optionalKey(Schema.Literals(["queue", "steer"])),
1505+
followUpBehavior: Schema.optionalKey(Schema.Literals(["queue", "steer"])),
15061506
proactivePanelsEnabled: Schema.optionalKey(Schema.Boolean),
15071507
showSkillsInSlashMenu: Schema.optionalKey(Schema.Boolean),
15081508
legacySidebarEnabled: Schema.optionalKey(Schema.Boolean),

0 commit comments

Comments
 (0)