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

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
hermes-seaeye[bot] 2026-07-30 10:11:53 +00:00 committed by GitHub
parent 9650f555d0
commit 3b47e0c436
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 11 additions and 19 deletions

View file

@ -23,15 +23,17 @@ function gatewayStub(latencyMs = 40) {
function setup(latencyMs = 40) {
const { calls, gateway } = gatewayStub(latencyMs)
const { result } = renderHook(() =>
useAtCompletions({ gateway: gateway as never, sessionId: 's1', cwd: '/repo' })
)
const { result } = renderHook(() => useAtCompletions({ gateway: gateway as never, sessionId: 's1', cwd: '/repo' }))
return { calls, result }
}
/** Type a burst of keystrokes `gapMs` apart, like a person. */
async function type(result: { current: { adapter: { search?: (q: string) => unknown } } }, queries: string[], gapMs: number) {
async function type(
result: { current: { adapter: { search?: (q: string) => unknown } } },
queries: string[],
gapMs: number
) {
for (const q of queries) {
act(() => {
result.current.adapter.search?.(q)

View file

@ -124,6 +124,7 @@ export function useAtCompletions(options: {
const result = await cachedPathCompletion(cacheKey(query), () =>
gateway.request<{ items?: CompletionEntry[] }>('complete.path', params)
)
const items = result.items ?? []
return { items: items.length > 0 ? items : starters, query }

View file

@ -282,8 +282,7 @@ export function useComposerTrigger({
// and a pick must be exactly one undo step.
recordUndoPoint?.()
const rebuildAround = (insert: DocumentFragment | string) =>
rebuildAroundCaret(editor, trigger.tokenLength, insert)
const rebuildAround = (insert: DocumentFragment | string) => rebuildAroundCaret(editor, trigger.tokenLength, insert)
// Action items (e.g. "Browse all sessions…") run a side effect instead of
// inserting a chip: strip the typed trigger token, then fire the action.

View file

@ -93,8 +93,7 @@ const OPTION_ROW_CLASS =
// field-sizing on top of Textarea's shared chrome; kill min-h-16 for one-liners.
const CLARIFY_TEXTAREA_CLASS = 'field-sizing-content max-h-40 min-h-0 resize-none'
const CLARIFY_SHELL_CLASS =
`${WIDGET_SHELL_CLASS} text-[length:var(--conversation-text-font-size)] text-(--ui-text-primary)`
const CLARIFY_SHELL_CLASS = `${WIDGET_SHELL_CLASS} text-[length:var(--conversation-text-font-size)] text-(--ui-text-primary)`
const CLARIFY_ICON_CLASS = 'mt-px size-4 shrink-0 text-(--ui-text-tertiary)'
@ -522,11 +521,7 @@ function ClarifyToolPending({ args }: ToolCallMessagePartProps) {
if (loading) {
return (
<ClarifyShell
aria-label={copy.loadingQuestion}
className="my-1.5 grid min-h-12 place-items-center"
role="status"
>
<ClarifyShell aria-label={copy.loadingQuestion} className="my-1.5 grid min-h-12 place-items-center" role="status">
<Loader2 aria-hidden className="size-4 animate-spin text-(--ui-text-tertiary)" />
</ClarifyShell>
)

View file

@ -45,7 +45,6 @@ export function refAttrsHtml(kind?: string): string {
return kind ? `class="ref" data-ref="${referenceKind(kind)}"` : 'class="ref"'
}
/** SVG markup string for embedding directly in HTML (composer contenteditable). */
export function directiveIconSvg(type: string) {
const inner = iconPathsFor(type)

View file

@ -369,11 +369,7 @@ function MarkdownImageContent({ className, src, alt, ...props }: ComponentProps<
return (
<span className="my-2 block text-sm text-muted-foreground">
Couldn&apos;t load {name}.{' '}
<button
className="ref font-medium text-foreground"
onClick={open}
type="button"
>
<button className="ref font-medium text-foreground" onClick={open} type="button">
Open image
</button>
{openFailed && <OpenMediaFailedNote name={name} />}