From 3d5ebc32101fc8501c1b28322152ea4522819bd7 Mon Sep 17 00:00:00 2001 From: Yichen Jiang Date: Fri, 7 Aug 2026 16:34:50 +0800 Subject: [PATCH] style(ui-agent-preset): match the repo's type-literal and arrow-parens style --- .../client/ui-agent-preset/src/client/section-store.ts | 2 +- .../client/ui-agent-preset/src/client/settings-store.ts | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/client/ui-agent-preset/src/client/section-store.ts b/packages/client/ui-agent-preset/src/client/section-store.ts index 5f2662844c..41d7d19235 100644 --- a/packages/client/ui-agent-preset/src/client/section-store.ts +++ b/packages/client/ui-agent-preset/src/client/section-store.ts @@ -138,7 +138,7 @@ export class AgentPresetSectionController { */ async load(): Promise { const roster = await beginRosterRead( - this.api, () => this.store.getSnapshot().status, patch => { this.set(patch) }, + this.api, () => this.store.getSnapshot().status, (patch) => { this.set(patch) }, ) if (roster === undefined) return const { presets, authorable } = roster diff --git a/packages/client/ui-agent-preset/src/client/settings-store.ts b/packages/client/ui-agent-preset/src/client/settings-store.ts index bd173a254c..c69076afde 100644 --- a/packages/client/ui-agent-preset/src/client/settings-store.ts +++ b/packages/client/ui-agent-preset/src/client/settings-store.ts @@ -84,7 +84,7 @@ export interface RosterValue { } /** The roster, or the message to show in its place. */ -export type RosterRead = { ok: true, value: RosterValue } | { ok: false, error: string } +export type RosterRead = { ok: true; value: RosterValue } | { ok: false; error: string } /** * Read the roster, folding both refusal shapes into one message. @@ -122,7 +122,7 @@ export async function readRoster(api: Pick): Promise export async function beginRosterRead( api: Pick, status: () => string, - set: (patch: { status?: 'loading' | 'error', error?: string | null }) => void, + set: (patch: { status?: 'loading' | 'error'; error?: string | null }) => void, ): Promise { if (status() === 'loading') return undefined set({ status: 'loading', error: null }) @@ -143,7 +143,7 @@ export async function beginRosterRead( * @returns one option per preset, in roster order. */ export function presetOptions( - presets: readonly { id: string, trust: 'system' | 'user', name?: string, description?: string }[], + presets: readonly { id: string; trust: 'system' | 'user'; name?: string; description?: string }[], ): AgentPresetOption[] { return presets.map(preset => ({ id: preset.id, @@ -197,7 +197,7 @@ export class AgentPresetSettingsController { */ async load(): Promise { const roster = await beginRosterRead( - this.api, () => this.store.getSnapshot().status, patch => { this.set(patch) }, + this.api, () => this.store.getSnapshot().status, (patch) => { this.set(patch) }, ) if (roster === undefined) return const { presets } = roster