fmt(js): npm run fix on merge (#86813)

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
hermes-seaeye[bot]
2026-08-15 08:13:01 +00:00
committed by GitHub
parent fbe4d73051
commit 77be513de1
9 changed files with 22 additions and 19 deletions

View File

@@ -5902,6 +5902,7 @@ function installDevToolsShortcut(window) {
if (input.key === 'F12') {
if (f12Blocked) {
event.preventDefault()
return
}
// Not blocked — fall through to open DevTools.

View File

@@ -157,6 +157,7 @@ describe('composer IME composition — send button visibility (#39614)', () => {
if (composingRef.current) {
return
}
flushEditorToDraft(event.currentTarget)
}}
onKeyDown={handleKeyDown}

View File

@@ -401,9 +401,7 @@ export const ChatView = memo(function ChatView({
// direct nav). Derived in render so the swap reads instantly: the same frame
// the id changes we drop the old transcript and show the loader, instead of
// waiting for the resume effect (which paints a frame later) to clear them.
const routeSessionMismatch = isPrimary
? isRouteSessionMismatch(routedSessionId, selectedSessionId, sessions)
: false
const routeSessionMismatch = isPrimary ? isRouteSessionMismatch(routedSessionId, selectedSessionId, sessions) : false
// The compact new-session pop-out skips the wordmark/tagline intro — it's a
// scratch window, not the full-height empty state.

View File

@@ -25,7 +25,6 @@ export function isRouteSessionMismatch(
}
return !sessions.some(
session =>
sessionMatchesStoredId(session, routedSessionId) && sessionMatchesStoredId(session, selectedSessionId)
session => sessionMatchesStoredId(session, routedSessionId) && sessionMatchesStoredId(session, selectedSessionId)
)
}

View File

@@ -60,9 +60,7 @@ export const SystemMessage: FC = () => {
<Codicon className="text-muted-foreground/55" name="compass" size="0.75rem" />
<span className="text-muted-foreground/55">steered</span>
<span className="text-muted-foreground/35">·</span>
<span className="whitespace-pre-wrap">{steerNote.groups.text.trim()}</span>
{' '}
<MessageTimelineTimestamp />
<span className="whitespace-pre-wrap">{steerNote.groups.text.trim()}</span> <MessageTimelineTimestamp />
</MessagePrimitive.Root>
)
}
@@ -93,8 +91,7 @@ export const SystemMessage: FC = () => {
<span className="mx-1.5 text-muted-foreground/35">·</span>
<LinkifiedText className="whitespace-pre-wrap" explicitOnly pretty={false} text={output} />
</>
)}
{' '}
)}{' '}
<MessageTimelineTimestamp className={cn(multiline ? 'mt-0.5 block' : 'ml-1.5')} />
</MessagePrimitive.Root>
)
@@ -111,8 +108,7 @@ export const SystemMessage: FC = () => {
data-role="system"
data-slot="aui_system-message-root"
>
<LinkifiedText className="whitespace-pre-wrap" explicitOnly pretty={false} text={text} />
{' '}
<LinkifiedText className="whitespace-pre-wrap" explicitOnly pretty={false} text={text} />{' '}
<MessageTimelineTimestamp className={cn(multiline ? 'mt-0.5 block' : 'ml-1.5')} />
</MessagePrimitive.Root>
)

View File

@@ -45,8 +45,7 @@ export const TimelineTimestamp: FC<{
return null
}
const completed =
validUnixSeconds(completedAt) && completedAt > timestamp ? unixDate(completedAt) : null
const completed = validUnixSeconds(completedAt) && completedAt > timestamp ? unixDate(completedAt) : null
const validCompletedAt = completed && validUnixSeconds(completedAt) ? completedAt : undefined
const startLabel = formatTimelineRange(timestamp, undefined)
@@ -96,7 +95,8 @@ export const MessageTimelineTimestamp: FC<{
timelineTimestamp?: unknown
}
const solePart = s.message.parts.length === 1 ? (s.message.parts[0] as { completedAt?: unknown; timestamp?: unknown }) : null
const solePart =
s.message.parts.length === 1 ? (s.message.parts[0] as { completedAt?: unknown; timestamp?: unknown }) : null
return (
Boolean(solePart) &&

View File

@@ -1270,7 +1270,9 @@ const assistantTimelineMatch = (stored: ChatMessage, local: ChatMessage) => {
}
const localToolIds = new Set(
local.parts.filter(part => part.type === 'tool-call').map(part => (part.type === 'tool-call' ? part.toolCallId : ''))
local.parts
.filter(part => part.type === 'tool-call')
.map(part => (part.type === 'tool-call' ? part.toolCallId : ''))
)
const toolMatch = stored.parts.some(part => part.type === 'tool-call' && localToolIds.has(part.toolCallId))
@@ -1338,7 +1340,9 @@ export function reconcileLocalAssistantTimeline(
const unusedLocalParts = new Set(local.parts.map((_, index) => index))
const parts = message.parts.map(part => {
const localIndex = local.parts.findIndex((candidate, index) => unusedLocalParts.has(index) && timelinePartMatch(part, candidate))
const localIndex = local.parts.findIndex(
(candidate, index) => unusedLocalParts.has(index) && timelinePartMatch(part, candidate)
)
if (localIndex === -1) {
return part

View File

@@ -536,7 +536,10 @@ export function coalesceToolOnlyAssistants(messages: ChatMessage[], cache: ToolM
...prev,
completedAt: [prev.completedAt, message.completedAt, ...message.parts.map(part => part.completedAt)]
.filter((value): value is number => value !== undefined)
.reduce<number | undefined>((latest, value) => (latest === undefined ? value : Math.max(latest, value)), undefined),
.reduce<number | undefined>(
(latest, value) => (latest === undefined ? value : Math.max(latest, value)),
undefined
),
parts: [...prev.parts, ...message.parts]
}

View File

@@ -31,7 +31,8 @@ export const toTranscriptMessages = (rows: unknown): Msg[] => {
const { context, display_kind, name, role, text, timestamp } = row as TranscriptRow
const createdAt = typeof timestamp === 'number' && Number.isFinite(timestamp) && timestamp > 0 ? timestamp : undefined
const createdAt =
typeof timestamp === 'number' && Number.isFinite(timestamp) && timestamp > 0 ? timestamp : undefined
if (role === 'tool') {
pending.push(buildToolTrailLine(name ?? 'tool', context ?? ''))