The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): restore modeLayout.hold and the unlisted preset field the demo layout needs
alt-glitch78f96a2d9a15
diff --git a/apps/desktop/src/components/assistant-ui/thread/turn-activity.ts b/apps/desktop/src/components/assistant-ui/thread/turn-activity.tsindex a93392b56cb..ad3d2624ab7 100644--- a/apps/desktop/src/components/assistant-ui/thread/turn-activity.ts+++ b/apps/desktop/src/components/assistant-ui/thread/turn-activity.ts@@ -45,8 +45,8 @@ export function activitySignature(content: readonly ActivityPart[], reasoningSholet settledTools = 0for (const part of content) {- // Reasoning the transcript does not draw (the user turned it off) is the- // model thinking in silence, not progress on screen.+ // Reasoning the transcript does not draw (the guided chat, or the user+ // turned it off) is the model thinking in silence, not progress on screen.if (!reasoningShown && part.type === 'reasoning') {continue}diff --git a/apps/desktop/src/components/pane-shell/tree/presets.ts b/apps/desktop/src/components/pane-shell/tree/presets.tsindex 10bcdc2ef49..5e6cd13b10e 100644--- a/apps/desktop/src/components/pane-shell/tree/presets.ts+++ b/apps/desktop/src/components/pane-shell/tree/presets.ts@@ -27,6 +27,8 @@ export const LAYOUTS_AREA = 'layouts'*/export interface LayoutPresetSpec extends Tiered {id: string+ /** `false` keeps a preset off every picker and out of `apply_layout`; only its owner applies it. */+ listed?: falseorder: numberresting?: readonly string[]title: string@@ -41,7 +43,14 @@ export function registerBundledPresets(bundled: readonly LayoutPresetSpec[]) {}return registry.registerMany(- bundled.map(({ id, order, title, tree }) => ({ id, area: LAYOUTS_AREA, title, order, data: tree }))+ bundled.map(({ id, listed, order, title, tree }) => ({+ id,+ area: LAYOUTS_AREA,+ title,+ order,+ data: tree,+ ...(listed === false && { enabled: false })+ })))}diff --git a/apps/desktop/src/lib/layout-persistence.ts b/apps/desktop/src/lib/layout-persistence.tsindex 6e5a2a5415e..2c94b4b18fb 100644--- a/apps/desktop/src/lib/layout-persistence.ts+++ b/apps/desktop/src/lib/layout-persistence.ts@@ -67,6 +67,7 @@ export function createLayoutPersistence(initialMode: InterfaceMode, persistent:const snapshots = new Set<string>()let mode = initialModelet restoring = false+ let held = falseconst legacy = persistent ? migrateLayoutScopes(initialMode) : new Map<string, string>()@@ -76,7 +77,7 @@ export function createLayoutPersistence(initialMode: InterfaceMode, persistent:if (!restoring) {snapshots.add(keyFor(key))- if (persistent) {+ if (persistent && !held) {// Explicit empties keep migration retries from reviving cleared state.writeKey(keyFor(key), mode === 'simple' ? (raw ?? 'null') : raw)}@@ -140,6 +141,11 @@ export function createLayoutPersistence(initialMode: InterfaceMode, persistent:get restoring() {return restoring},+ /** While held, layout changes stay in memory: a borrowed layout (the first-run demo) is never+ * written over the user's own, and a relaunch opens on the user's layout. */+ hold(next: boolean) {+ held = next+ },has(key: string) {return snapshots.has(keyFor(key))},