mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-06 05:17:15 +00:00
fmt(js): npm run fix on merge (#134819)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
1 parent
8620effe53
commit
e675225af2
8 files changed
+28
-14
No files matched your search
@@ -73,7 +73,7 @@ test('createLinkTitleWindow hides and zeroes opacity so Windows cannot flash a b
|
||||
calls.hide += 1
|
||||
}
|
||||
|
||||
this.setOpacity = (value) => {
|
||||
this.setOpacity = value => {
|
||||
calls.opacity.push(value)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,6 +179,7 @@ function switchProviderFor(
|
||||
}
|
||||
|
||||
setSelectedModel('')
|
||||
|
||||
return slug
|
||||
})
|
||||
|
||||
|
||||
@@ -6,7 +6,13 @@ import { afterEach, beforeEach, describe, expect, it, type MockInstance, vi } fr
|
||||
import { PRIMARY_SESSION_VIEW, type SessionView, SessionViewProvider } from '@/app/chat/session-view'
|
||||
import { accentsFor, NOUS_ACCENT } from '@/components/onboarding-chat/options'
|
||||
import { I18nProvider } from '@/i18n'
|
||||
import { answerSetupCard, type ClarifyRequest, clearClarifyRequest, setClarifyRequest, type SetupChooseSpec } from '@/store/clarify'
|
||||
import {
|
||||
answerSetupCard,
|
||||
type ClarifyRequest,
|
||||
clearClarifyRequest,
|
||||
setClarifyRequest,
|
||||
type SetupChooseSpec
|
||||
} from '@/store/clarify'
|
||||
import { rememberServerRequest, resetServerRequestsForTests } from '@/store/server-requests'
|
||||
import { $accentOverride } from '@/themes/accent-override'
|
||||
|
||||
|
||||
@@ -14,7 +14,10 @@ const CAPTION = 'text-[length:var(--conversation-caption-font-size)] text-(--ui-
|
||||
const stringArg = (value: unknown): null | string => (typeof value === 'string' ? value : null)
|
||||
|
||||
/** Card title before the session row exists: outcome title, then the requested title, then the message head. */
|
||||
export function requestedTitle(started: null | { title?: null | string }, args: Record<string, unknown>): null | string {
|
||||
export function requestedTitle(
|
||||
started: null | { title?: null | string },
|
||||
args: Record<string, unknown>
|
||||
): null | string {
|
||||
const message = stringArg(args.message)?.trim() ?? ''
|
||||
|
||||
return started?.title || stringArg(args.title)?.trim() || message.slice(0, TITLE_LIMIT) || null
|
||||
|
||||
@@ -438,7 +438,11 @@ const AssistantStatusSlot: FC = () => {
|
||||
return null
|
||||
}
|
||||
|
||||
return slot === 'placeholder' ? <ResponseLoadingIndicator /> : <TurnActivityIndicator thinking={slot === 'thinking'} />
|
||||
return slot === 'placeholder' ? (
|
||||
<ResponseLoadingIndicator />
|
||||
) : (
|
||||
<TurnActivityIndicator thinking={slot === 'thinking'} />
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,9 +40,7 @@ describe('OnboardingChatGate', () => {
|
||||
const { OnboardingChatGate, gate, onboarding } = await loadWindow()
|
||||
|
||||
onboarding.requestDesktopOnboarding('No provider configured')
|
||||
render(
|
||||
<OnboardingChatGate enabled onKickoff={neverKicksOff} requestGateway={unseenFirstRun} runsIntro={false} />
|
||||
)
|
||||
render(<OnboardingChatGate enabled onKickoff={neverKicksOff} requestGateway={unseenFirstRun} runsIntro={false} />)
|
||||
|
||||
await waitFor(() => expect(onboarding.$desktopOnboarding.get().requested).toBe(true))
|
||||
expect(gate.$onboardingGate.get().phase).toBe('idle')
|
||||
|
||||
@@ -16,11 +16,13 @@ async function waitFor(selector: string, timeoutMs = 6000, ready = () => true):
|
||||
const deadline = Date.now() + timeoutMs
|
||||
|
||||
while (Date.now() < deadline) {
|
||||
const visible = ready() && [...document.querySelectorAll(selector)].some(node => {
|
||||
const { width, height } = node.getBoundingClientRect()
|
||||
const visible =
|
||||
ready() &&
|
||||
[...document.querySelectorAll(selector)].some(node => {
|
||||
const { width, height } = node.getBoundingClientRect()
|
||||
|
||||
return width > 0 && height > 0 && !node.closest('[data-pane-hidden]')
|
||||
})
|
||||
return width > 0 && height > 0 && !node.closest('[data-pane-hidden]')
|
||||
})
|
||||
|
||||
if (visible) {
|
||||
return true
|
||||
|
||||
@@ -30,9 +30,11 @@ describe('inline image preview envelope (#74564)', () => {
|
||||
})
|
||||
|
||||
const maxWidth = Number(stylesheet.match(/--image-preview-max-width:\s*([\d.]+)rem/)?.[1])
|
||||
|
||||
const heightClamp = stylesheet.match(
|
||||
/--image-preview-height:\s*clamp\(([\d.]+)rem,\s*calc\(var\(--vsq\)\s*\*\s*([\d.]+)\),\s*([\d.]+)rem\)/
|
||||
)
|
||||
|
||||
const [floor, vsqFactor, ceiling] = (heightClamp?.slice(1) ?? []).map(Number)
|
||||
|
||||
it('guarantees a landscape frame can span the full preview width', () => {
|
||||
@@ -62,9 +64,7 @@ describe('inline image preview envelope (#74564)', () => {
|
||||
})
|
||||
|
||||
it('keeps the natural-size cap so a small image is never upscaled', () => {
|
||||
const { result } = renderHook(() =>
|
||||
useMediaImage('/home/user/out/shot.png', 16 / 9, { width: 640, height: 360 })
|
||||
)
|
||||
const { result } = renderHook(() => useMediaImage('/home/user/out/shot.png', 16 / 9, { width: 640, height: 360 }))
|
||||
|
||||
expect(String(result.current.frameStyle?.width)).toContain('640px')
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user