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

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
hermes-seaeye[bot] 2026-08-13 06:44:04 +00:00 committed by GitHub
parent 89a84e1ae6
commit 1ef0a366da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 31 additions and 17 deletions

View File

@ -4,7 +4,13 @@ import { afterEach, describe, expect, it, vi } from 'vitest'
import { $clarifyRequests } from '@/store/clarify'
import type { ComposerAttachment } from '@/store/composer'
import { $gateway } from '@/store/gateway'
import { clearAllPrompts, hasBlockingPromptRequest, setApprovalRequest, setSecretRequest, setSudoRequest } from '@/store/prompts'
import {
clearAllPrompts,
hasBlockingPromptRequest,
setApprovalRequest,
setSecretRequest,
setSudoRequest
} from '@/store/prompts'
import { useComposerSubmit } from './use-composer-submit'

View File

@ -45,7 +45,8 @@ export function SuggestionPills({ sessionId }: { sessionId: null | string }) {
const brand = suggestion.brand ? brandFor(suggestion.brand) : null
const phase = phases[key] ?? 'idle'
const label = phase === 'working' ? suggestion.workingLabel : phase === 'done' ? suggestion.doneLabel : suggestion.label
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 () => {

View File

@ -983,7 +983,11 @@ export function useGatewayEventHandler(deps: GatewayEventDeps) {
setMcpSetupRequest({ action, reason, requestId, server, sessionId: sessionId ?? null })
if (sessionId) {
upsertToolCall(sessionId, { args: { action, reason, server }, name: 'setup_mcp', tool_id: requestId }, 'running')
upsertToolCall(
sessionId,
{ args: { action, reason, server }, name: 'setup_mcp', tool_id: requestId },
'running'
)
updateSessionState(sessionId, state => ({ ...state, needsInput: true }))
}

View File

@ -154,9 +154,7 @@ function McpSetupSettled({ args, result }: ToolCallMessagePartProps) {
}
>
<span className={cn('font-medium', neutral && 'italic text-(--ui-text-tertiary)')}>{line}</span>
{ok && toolCount > 0 && (
<span className="ml-2 text-(--ui-text-tertiary)">{copy.toolCount(toolCount)}</span>
)}
{ok && toolCount > 0 && <span className="ml-2 text-(--ui-text-tertiary)">{copy.toolCount(toolCount)}</span>}
{!ok && !neutral && fromResult.detail ? (
<p className="mt-0.5 text-(--ui-text-secondary)">{fromResult.detail}</p>
) : null}

View File

@ -34,8 +34,7 @@ export function normalizeChoices(choices: unknown): string[] {
}
return choices.filter(
(c): c is string =>
typeof c === 'string' && c.trim().length > 0 && bareChoice(c).length <= 200 && !c.includes('\n')
(c): c is string => typeof c === 'string' && c.trim().length > 0 && bareChoice(c).length <= 200 && !c.includes('\n')
)
}

View File

@ -123,7 +123,11 @@ const eventOfferings = new Map<string, Map<string, ComposerSuggestion[]>>()
/** Offer suggestions from an event provider (session state, tool results,
* connection events). Replaces that provider's previous offerings for the
* session; providers withdraw by offering []. */
export function offerSuggestions(sessionId: string | null | undefined, provider: string, suggestions: ComposerSuggestion[]): void {
export function offerSuggestions(
sessionId: string | null | undefined,
provider: string,
suggestions: ComposerSuggestion[]
): void {
const key = keyFor(sessionId)
let providers = eventOfferings.get(key)

View File

@ -10,9 +10,7 @@ const INDEX = [
describe('matchSuggestions', () => {
it('matches a whole word and reports the keyword that hit', () => {
expect(matchSuggestions('can you check the linear board', INDEX)).toEqual([
{ keyword: 'linear', server: 'linear' }
])
expect(matchSuggestions('can you check the linear board', INDEX)).toEqual([{ keyword: 'linear', server: 'linear' }])
})
it('does not match inside other words', () => {

View File

@ -1,12 +1,16 @@
import { addMcpServer, authMcpServer, cancelMcpOAuthFlow, getMcpOAuthFlow, listMcpServers, removeMcpServer } from '@/hermes'
import {
addMcpServer,
authMcpServer,
cancelMcpOAuthFlow,
getMcpOAuthFlow,
listMcpServers,
removeMcpServer
} from '@/hermes'
import { translateNow } from '@/i18n'
import { completeMcpDesktopOAuth, McpOAuthCancelled } from '@/lib/mcp-dashboard-oauth'
import { directoryEntry, MCP_DIRECTORY } from '@/lib/mcp-directory'
import { prettyName } from '@/lib/text'
import {
type ComposerSuggestion,
registerDraftProvider
} from '@/store/composer-suggestions'
import { type ComposerSuggestion, registerDraftProvider } from '@/store/composer-suggestions'
import { $gateway } from '@/store/gateway'
import { notifyError } from '@/store/notifications'