Skip to content

The agent that grows with you

fmt(js): `npm run fix` on merge (#85140)

hermes-seaeye[bot]90c7180dceb4
diff --git a/apps/desktop/src/app/chat/composer/suggestion-pills.tsx b/apps/desktop/src/app/chat/composer/suggestion-pills.tsx
index 6165c08d0db..ce926433c1e 100644
--- a/apps/desktop/src/app/chat/composer/suggestion-pills.tsx
+++ b/apps/desktop/src/app/chat/composer/suggestion-pills.tsx
@@ -47,6 +47,7 @@ export function SuggestionPills({ sessionId }: { sessionId: null | string }) {
const label =
phase === 'working' ? suggestion.workingLabel : phase === 'done' ? suggestion.doneLabel : suggestion.label
+
const tip = phase === 'working' ? suggestion.workingTip : phase === 'done' ? suggestion.doneTip : suggestion.tip
const invoke = async () => {
diff --git a/apps/desktop/src/app/session/hooks/use-prompt-actions/rewind.ts b/apps/desktop/src/app/session/hooks/use-prompt-actions/rewind.ts
index 40ac314bf9b..5726a98aa3c 100644
--- a/apps/desktop/src/app/session/hooks/use-prompt-actions/rewind.ts
+++ b/apps/desktop/src/app/session/hooks/use-prompt-actions/rewind.ts
@@ -97,6 +97,7 @@ export function truncateSubmitParams(
): Record<string, unknown> {
const hasOrdinal = typeof truncateOrdinal === 'number' && Number.isInteger(truncateOrdinal) && truncateOrdinal >= 0
const hasRowId = typeof truncateRowId === 'number' && Number.isInteger(truncateRowId)
+
// Renderer ids are ephemeral (`${timestamp}-${index}-${role}` from
// chat-messages.ts, plus older `user-…` / `assistant-…` shapes). Gateway
// history never carries them — only durable `row_id` / platform message_id.
@@ -106,6 +107,7 @@ export function truncateSubmitParams(
truncateMessageId.startsWith('assistant-') ||
truncateMessageId.includes('-synthetic-') ||
/^\d+-\d+-(user|assistant|tools)\b/.test(truncateMessageId))
+
const hasMessageId = typeof truncateMessageId === 'string' && truncateMessageId.length > 0 && !isSyntheticId
if (!hasOrdinal && !hasMessageId && !hasRowId) {
diff --git a/apps/desktop/src/store/cron-model-impact-scope.test.ts b/apps/desktop/src/store/cron-model-impact-scope.test.ts
index 1bc9af64ad3..fcf7e64fc1e 100644
--- a/apps/desktop/src/store/cron-model-impact-scope.test.ts
+++ b/apps/desktop/src/store/cron-model-impact-scope.test.ts
@@ -4,11 +4,7 @@ import type { HermesConnection } from '@/global'
import { getCronModelImpactScope, syncCronModelImpactConnection } from './cron-model-impact-scope'
-function connection(
- baseUrl: string,
- wsUrl: string,
- overrides: Partial<HermesConnection> = {}
-): HermesConnection {
+function connection(baseUrl: string, wsUrl: string, overrides: Partial<HermesConnection> = {}): HermesConnection {
return {
baseUrl,
isFullscreen: false,
@@ -43,6 +39,7 @@ describe('cron model impact backend identity', () => {
remoteIdentity: 'operator@remote-box',
remoteHost: 'remote-box'
}
+
syncCronModelImpactConnection(connection('http://127.0.0.1:41001', 'ws://127.0.0.1:41001', ssh))
const first = getCronModelImpactScope()
diff --git a/apps/desktop/src/store/cron-model-impact-scope.ts b/apps/desktop/src/store/cron-model-impact-scope.ts
index 25f43e7b883..24d24a9d151 100644
--- a/apps/desktop/src/store/cron-model-impact-scope.ts
+++ b/apps/desktop/src/store/cron-model-impact-scope.ts
@@ -40,9 +40,7 @@ function identityForConnection(connection: HermesConnection | null): string {
? connection.remoteIdentity || connection.remoteHost || ''
: connection.remoteIdentity || connection.baseUrl
- return [connection.mode ?? '', connection.remoteKind ?? '', backendIdentity, connection.profile ?? ''].join(
- '\u0000'
- )
+ return [connection.mode ?? '', connection.remoteKind ?? '', backendIdentity, connection.profile ?? ''].join('\u0000')
}
/** Keep pending responses and action closures bound to the backend that issued
diff --git a/apps/desktop/src/store/cron-model-impact.test.ts b/apps/desktop/src/store/cron-model-impact.test.ts
index aaaac73b33b..04f5e54d565 100644
--- a/apps/desktop/src/store/cron-model-impact.test.ts
+++ b/apps/desktop/src/store/cron-model-impact.test.ts
@@ -18,9 +18,7 @@ import {
setMainModelAssignment
} from '@/store/cron-model-impact'
-function response(
- impact: ModelAssignmentResponse['cron_model_impact']
-): ModelAssignmentResponse {
+function response(impact: ModelAssignmentResponse['cron_model_impact']): ModelAssignmentResponse {
return {
ok: true,
scope: 'main',
@@ -42,9 +40,11 @@ function positive(name = 'Morning summary'): ModelAssignmentResponse['cron_model
function deferred<T>() {
let resolve!: (value: T) => void
+
const promise = new Promise<T>(res => {
resolve = res
})
+
return { promise, resolve }
}
@@ -135,9 +135,9 @@ describe('setMainModelAssignment', () => {
confirm_message: 'Confirm this expensive model.'
} satisfies ModelAssignmentResponse)
- await expect(
- setMainModelAssignment({ provider: 'openrouter', model: 'openai/gpt-5.5-pro' })
- ).rejects.toThrow('Confirm this expensive model.')
+ await expect(setMainModelAssignment({ provider: 'openrouter', model: 'openai/gpt-5.5-pro' })).rejects.toThrow(
+ 'Confirm this expensive model.'
+ )
expect($notifications.get()).toHaveLength(1)
const action = $notifications.get()[0].action
const reviewCount = $cronReviewRequest.get()
diff --git a/apps/desktop/src/store/cron-model-impact.ts b/apps/desktop/src/store/cron-model-impact.ts
index 27fe59e219a..88d7467edfc 100644
--- a/apps/desktop/src/store/cron-model-impact.ts
+++ b/apps/desktop/src/store/cron-model-impact.ts
@@ -23,7 +23,6 @@ const MAX_ID_CODE_POINTS = 256
const MAX_NAME_CODE_POINTS = 120
const ALLOWED_AXES = new Set<CronModelDriftAxis>(['provider', 'model'])
-
function profileIdentity(): string {
return getApiRequestProfile()?.trim() || 'default'
}
@@ -114,17 +113,10 @@ function detailFor(impact: CronModelImpact): string {
const visible = impact.jobs.slice(0, 3).map(job => job.name)
const remaining = impact.affected_count - visible.length
- return remaining > 0
- ? translateNow('cron.modelImpact.detailMore', visible.join(', '), remaining)
- : visible.join(', ')
+ return remaining > 0 ? translateNow('cron.modelImpact.detailMore', visible.join(', '), remaining) : visible.join(', ')
}
-function publishImpact(
- impact: CronModelImpact,
- profile: string,
- connection: string,
- generation: number
-): void {
+function publishImpact(impact: CronModelImpact, profile: string, connection: string, generation: number): void {
if (!impact.available) {
return
}
diff --git a/apps/desktop/src/store/layout.ts b/apps/desktop/src/store/layout.ts
index 6af7e8c2166..6bac6980e98 100644
--- a/apps/desktop/src/store/layout.ts
+++ b/apps/desktop/src/store/layout.ts
@@ -210,6 +210,7 @@ export const $sidebarMessagingOpenIds = persistentAtom(
// workspaces" bug. The flat key keeps its historical name so an existing
// choice survives the update.
const $sidebarFlatAgentsGrouped = persistentAtom(SIDEBAR_AGENTS_GROUPED_STORAGE_KEY, false, Codecs.bool)
+
const $sidebarAllProfilesAgentsGrouped = persistentAtom(
SIDEBAR_ALL_PROFILES_AGENTS_GROUPED_STORAGE_KEY,
false,
diff --git a/apps/desktop/src/store/onboarding.test.ts b/apps/desktop/src/store/onboarding.test.ts
index d6b1f6698a4..f9696599206 100644
--- a/apps/desktop/src/store/onboarding.test.ts
+++ b/apps/desktop/src/store/onboarding.test.ts
@@ -423,12 +423,15 @@ describe('OAuth onboarding', () => {
if (path === '/api/providers/oauth/nous/submit') {
return { ok: true, status: 'approved' }
}
+
if (path.startsWith('/api/model/options')) {
return { providers: [{ name: 'Nous Portal', slug: 'nous', models: [model] }] }
}
+
if (path.startsWith('/api/model/recommended-default?')) {
return { provider: 'nous', model, free_tier: false }
}
+
if (path === '/api/model/set') {
return {
ok: false,
@@ -449,6 +452,7 @@ describe('OAuth onboarding', () => {
throw new Error(`unexpected gateway method: ${method}`)
})
+
const requestGateway = requestGatewayMock as OnboardingContext['requestGateway']
$desktopOnboarding.set(
baseState({
diff --git a/apps/desktop/src/store/session.ts b/apps/desktop/src/store/session.ts
index b06fc5d243a..c64a194ef59 100644
--- a/apps/desktop/src/store/session.ts
+++ b/apps/desktop/src/store/session.ts
@@ -626,6 +626,7 @@ export const setConnection = (next: Updater<HermesConnection | null>) => {
updateAtom($connection, next)
syncCronModelImpactConnection($connection.get())
}
+
export const setGatewayState = (next: Updater<ConnectionState>) => updateAtom($gatewayState, next)
export const setSessions = (next: Updater<SessionInfo[]>) => updateAtom($sessions, next)
export const setCronSessions = (next: Updater<SessionInfo[]>) => updateAtom($cronSessions, next)
diff --git a/apps/desktop/src/store/suggestion-providers/repair.ts b/apps/desktop/src/store/suggestion-providers/repair.ts
index e8e58c8ec0c..f0ee2265c00 100644
--- a/apps/desktop/src/store/suggestion-providers/repair.ts
+++ b/apps/desktop/src/store/suggestion-providers/repair.ts
@@ -22,7 +22,8 @@ import { notifyError } from '@/store/notifications'
// narrow: a tool erroring on its own semantics ("issue not found") must not
// pill a reconnect. Matched against the error/result string. Exported for
// tests.
-export const REPAIR_RE = /\b(401|403|unauthorized|forbidden|token .*(expired|invalid)|oauth|authenticat\w+ (failed|required|expired)|connection (refused|closed|reset|failed)|server (unavailable|disconnected|not connected)|ECONNREFUSED)\b/i
+export const REPAIR_RE =
+ /\b(401|403|unauthorized|forbidden|token .*(expired|invalid)|oauth|authenticat\w+ (failed|required|expired)|connection (refused|closed|reset|failed)|server (unavailable|disconnected|not connected)|ECONNREFUSED)\b/i
/** `mcp__figma__get_design_context` → `figma`; null for non-MCP tools. */
export const mcpServerFromToolName = (toolName: string): string | null => {
diff --git a/apps/desktop/src/store/suggestion-providers/skill.ts b/apps/desktop/src/store/suggestion-providers/skill.ts
index 0cee93dbd74..94b84f88859 100644
--- a/apps/desktop/src/store/suggestion-providers/skill.ts
+++ b/apps/desktop/src/store/suggestion-providers/skill.ts
@@ -39,11 +39,7 @@ const escape = (value: string) => value.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
* underscores in the name also match spaces — people type "pr ready", the
* skill is `pr-ready` — while "already" can never match a skill `read`. */
export function skillPattern(name: string): RegExp {
- const flexible = name
- .toLowerCase()
- .split(/[-_]/)
- .map(escape)
- .join('[-_ ]')
+ const flexible = name.toLowerCase().split(/[-_]/).map(escape).join('[-_ ]')
return new RegExp(`(?<![\\p{L}\\p{N}])${flexible}(?![\\p{L}\\p{N}-])`, 'u')
}