Skip to content

The agent that grows with you

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

hermes-seaeye[bot]f7cd8bf084ed
diff --git a/apps/desktop/electron/guest-onboarding.ts b/apps/desktop/electron/guest-onboarding.ts
index ae399eb280d..20290ea6ee4 100644
--- a/apps/desktop/electron/guest-onboarding.ts
+++ b/apps/desktop/electron/guest-onboarding.ts
@@ -19,7 +19,10 @@ export function guestOnboardingEnabled(
return env[GUEST_ONBOARDING_ENV] === '1' || argv.includes(GUEST_ONBOARDING_FLAG)
}
-export function skipIntroEnabled(argv: readonly string[] = process.argv, env: NodeJS.ProcessEnv = process.env): boolean {
+export function skipIntroEnabled(
+ argv: readonly string[] = process.argv,
+ env: NodeJS.ProcessEnv = process.env
+): boolean {
return env[SKIP_INTRO_ENV] === '1' || argv.includes(SKIP_INTRO_FLAG)
}
diff --git a/apps/desktop/src/app/chat/composer/hooks/use-composer-submit.test.tsx b/apps/desktop/src/app/chat/composer/hooks/use-composer-submit.test.tsx
index eefc217e65e..d17c486257c 100644
--- a/apps/desktop/src/app/chat/composer/hooks/use-composer-submit.test.tsx
+++ b/apps/desktop/src/app/chat/composer/hooks/use-composer-submit.test.tsx
@@ -176,23 +176,26 @@ describe('useComposerSubmit external request routing', () => {
expect(onSubmit).not.toHaveBeenCalled()
})
- it.each([true, false])('delivers a busy hidden request as a steer with no user turn and queues it hidden on refusal (%s)', async accepted => {
- const { onSteer, onSteerHidden, onSubmit, loadIntoComposer, stashAt } = renderSubmitHook({ busy: true })
- onSteerHidden.mockResolvedValue(accepted)
-
- await act(async () => {
- requestComposerSubmit('[setup] links opened', { target: 'main', displayKind: 'hidden' })
- })
+ it.each([true, false])(
+ 'delivers a busy hidden request as a steer with no user turn and queues it hidden on refusal (%s)',
+ async accepted => {
+ const { onSteer, onSteerHidden, onSubmit, loadIntoComposer, stashAt } = renderSubmitHook({ busy: true })
+ onSteerHidden.mockResolvedValue(accepted)
+
+ await act(async () => {
+ requestComposerSubmit('[setup] links opened', { target: 'main', displayKind: 'hidden' })
+ })
- expect(onSteerHidden).toHaveBeenCalledExactlyOnceWith('[setup] links opened')
- expect(onSteer).not.toHaveBeenCalled()
- expect(onSubmit).not.toHaveBeenCalled()
- expect(getQueuedPrompts('stored-session').map(({ text, displayKind }) => ({ text, displayKind }))).toEqual(
- accepted ? [] : [{ text: '[setup] links opened', displayKind: 'hidden' }]
- )
- expect(loadIntoComposer).not.toHaveBeenCalled()
- expect(stashAt).not.toHaveBeenCalled()
- })
+ expect(onSteerHidden).toHaveBeenCalledExactlyOnceWith('[setup] links opened')
+ expect(onSteer).not.toHaveBeenCalled()
+ expect(onSubmit).not.toHaveBeenCalled()
+ expect(getQueuedPrompts('stored-session').map(({ text, displayKind }) => ({ text, displayKind }))).toEqual(
+ accepted ? [] : [{ text: '[setup] links opened', displayKind: 'hidden' }]
+ )
+ expect(loadIntoComposer).not.toHaveBeenCalled()
+ expect(stashAt).not.toHaveBeenCalled()
+ }
+ )
it('drops an idle hidden request the gateway rejects instead of restoring it into the draft', async () => {
const { onSteer, onSubmit, loadIntoComposer, stashAt } = renderSubmitHook({ busy: false })
diff --git a/apps/desktop/src/app/chat/composer/hooks/use-composer-submit.ts b/apps/desktop/src/app/chat/composer/hooks/use-composer-submit.ts
index d1ee2c15045..990d0d172e6 100644
--- a/apps/desktop/src/app/chat/composer/hooks/use-composer-submit.ts
+++ b/apps/desktop/src/app/chat/composer/hooks/use-composer-submit.ts
@@ -145,7 +145,8 @@ export function useComposerSubmit({
const queueKey = activeQueueSessionKeyRef.current
// External requests contain only text; the unsent draft and its attachments stay in the composer.
- const enqueue = () => void enqueueQueuedPrompt(queueKey, { text, attachments: [], ...(displayKind ? { displayKind } : {}) })
+ const enqueue = () =>
+ void enqueueQueuedPrompt(queueKey, { text, attachments: [], ...(displayKind ? { displayKind } : {}) })
// A hidden note never becomes a user turn: it rides session.steer into
// the model's next tool result, and keeps its kind if it has to queue.
diff --git a/apps/desktop/src/components/assistant-ui/connector-tool.tsx b/apps/desktop/src/components/assistant-ui/connector-tool.tsx
index d94e6210dbb..24dafa891cf 100644
--- a/apps/desktop/src/components/assistant-ui/connector-tool.tsx
+++ b/apps/desktop/src/components/assistant-ui/connector-tool.tsx
@@ -297,7 +297,9 @@ export function ConnectorOffer({ flow, onSkipped }: ConnectorOfferProps) {
</Button>
</p>
) : null}
- {!state.available && !state.error ? <p className="px-1 text-xs text-muted-foreground">{copy.unavailable}</p> : null}
+ {!state.available && !state.error ? (
+ <p className="px-1 text-xs text-muted-foreground">{copy.unavailable}</p>
+ ) : null}
{catalog ? <SearchField onChange={setQuery} placeholder={copy.search} value={query} /> : null}
<div className={cn('grid min-w-0', catalog && 'max-h-96 overflow-y-auto')}>
{rows.map(row => (
diff --git a/apps/desktop/src/components/assistant-ui/mcp-setup-tool.tsx b/apps/desktop/src/components/assistant-ui/mcp-setup-tool.tsx
index 4e825909f08..25ec46366c4 100644
--- a/apps/desktop/src/components/assistant-ui/mcp-setup-tool.tsx
+++ b/apps/desktop/src/components/assistant-ui/mcp-setup-tool.tsx
@@ -74,9 +74,13 @@ const SHELL_CLASS = `${WIDGET_SHELL_CLASS} text-[length:var(--conversation-text-
/** The card's strings, from this tool's own copy. The verb changes with the
* action (Install / Enable / Authorize); the rest is the shared consent
* vocabulary every connector card speaks. */
-function cardCopy(copy: ReturnType<typeof useI18n>['t']['assistant']['mcpSetup'], action: SetupAction): ConnectorCardCopy {
+function cardCopy(
+ copy: ReturnType<typeof useI18n>['t']['assistant']['mcpSetup'],
+ action: SetupAction
+): ConnectorCardCopy {
return {
- connectAction: action === 'enable' ? copy.enableAction : action === 'authorize' ? copy.authorizeAction : copy.installAction,
+ connectAction:
+ action === 'enable' ? copy.enableAction : action === 'authorize' ? copy.authorizeAction : copy.installAction,
connectTitle:
action === 'enable' ? copy.enableTitle : action === 'authorize' ? copy.authorizeTitle : copy.installTitle,
decline: copy.decline,
diff --git a/apps/desktop/src/components/onboarding-chat/cards/build.tsx b/apps/desktop/src/components/onboarding-chat/cards/build.tsx
index 28f70a9c4d5..2303c37bc20 100644
--- a/apps/desktop/src/components/onboarding-chat/cards/build.tsx
+++ b/apps/desktop/src/components/onboarding-chat/cards/build.tsx
@@ -54,7 +54,10 @@ export function FirstBuildCard({ attrs, locked }: CardProps) {
const answeredInComposer = answeredAfter(useStore(view.$messages), messageId)
- const committed = useStore($onboardingAnswers).committed.find(step => step.startsWith('first:'))?.slice(6) ?? null
+ const committed =
+ useStore($onboardingAnswers)
+ .committed.find(step => step.startsWith('first:'))
+ ?.slice(6) ?? null
const picked = committed ?? (answeredInComposer ? '' : null)
// The 60-character limit keeps an option on one chip. The dedupe is case-insensitive because models repeat
diff --git a/apps/desktop/src/components/onboarding-chat/cards/setup.tsx b/apps/desktop/src/components/onboarding-chat/cards/setup.tsx
index b4240cf9bbe..fc8d5802aff 100644
--- a/apps/desktop/src/components/onboarding-chat/cards/setup.tsx
+++ b/apps/desktop/src/components/onboarding-chat/cards/setup.tsx
@@ -56,8 +56,15 @@ export function ConnectorsCard({ locked }: CardProps) {
// The step still has to end, so the card offers Skip.
if (catalog.status === 'unavailable' || (catalog.status === 'ready' && rows.length === 0)) {
return (
- <CardFrame continueLabel="Skip this" done={done} locked={locked} onContinue={() => commit('apps I use: none for now')}>
- <p className="text-sm text-muted-foreground">Connections aren’t available right now — this can be set up later.</p>
+ <CardFrame
+ continueLabel="Skip this"
+ done={done}
+ locked={locked}
+ onContinue={() => commit('apps I use: none for now')}
+ >
+ <p className="text-sm text-muted-foreground">
+ Connections aren’t available right now — this can be set up later.
+ </p>
</CardFrame>
)
}
diff --git a/apps/desktop/src/store/onboarding-never-forces-sign-in.test.ts b/apps/desktop/src/store/onboarding-never-forces-sign-in.test.ts
index 013da475d3c..539a5a2857d 100644
--- a/apps/desktop/src/store/onboarding-never-forces-sign-in.test.ts
+++ b/apps/desktop/src/store/onboarding-never-forces-sign-in.test.ts
@@ -46,13 +46,18 @@ it.each(['cinematic', 'guided', 'handoff'])('the provider picker never opens ove
expect(onboarding.$desktopOnboarding.get().requested).toBe(false)
})
-it.each(['cinematic', 'guided', 'handoff'])('a credential warning during the guide is dropped, not deferred (%s)', async phase => {
- const { onboarding } = await load(phase)
+it.each(['cinematic', 'guided', 'handoff'])(
+ 'a credential warning during the guide is dropped, not deferred (%s)',
+ async phase => {
+ const { onboarding } = await load(phase)
- onboarding.requestDesktopOnboardingForCredentialWarning("No API key configured for provider 'nous'. First message will fail.")
+ onboarding.requestDesktopOnboardingForCredentialWarning(
+ "No API key configured for provider 'nous'. First message will fail."
+ )
- expect(onboarding.consumePendingCredentialWarning()).toBeNull()
-})
+ expect(onboarding.consumePendingCredentialWarning()).toBeNull()
+ }
+)
it.each(['idle', 'skipped', 'done'])('outside the guide the picker opens as before (%s)', async phase => {
const { onboarding } = await load(phase)