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

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
hermes-seaeye[bot] 2026-07-28 18:30:19 +00:00 committed by GitHub
parent 5dc6a14c14
commit 2faac36866
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 28 additions and 10 deletions

View file

@ -9272,8 +9272,8 @@ ipcMain.handle('hermes:window:openInstance', async () => {
// shortcuts and the View menu. Reads and writes target the asking window.
ipcMain.handle('hermes:zoom:get', event => {
const window = BrowserWindow.fromWebContents(event.sender)
const level =
window && !window.isDestroyed() ? window.webContents.getZoomLevel() : DEFAULT_ZOOM_LEVEL
const level = window && !window.isDestroyed() ? window.webContents.getZoomLevel() : DEFAULT_ZOOM_LEVEL
return { level, percent: zoomLevelToPercent(level) }
})

View file

@ -558,6 +558,7 @@ export function useSessionActions({
resetViewSync()
setSelectedStoredSessionId(storedSessionId)
selectedStoredSessionIdRef.current = storedSessionId
// A session is EITHER the main thread OR a tile — never both. openSessionTile
// enforces this from the tile side (it refuses to tile the selected session);
// this enforces it from the main side. Loading an existing session into main
@ -570,6 +571,7 @@ export function useSessionActions({
if ($sessionTiles.get().some(t => t.storedSessionId === storedSessionId)) {
closeSessionTile(storedSessionId)
}
// Optimistically clear any prior resume-failure latch for this session:
// we're attempting a fresh resume, so the self-heal in use-route-resume
// must not keep treating it as stranded. It's re-armed below only if THIS

View file

@ -259,7 +259,11 @@ export function ModelMenuPanel({ gateway, onSelectModel, profile = 'default', re
textValue=""
>
<span className="truncate">{group.provider.name}</span>
<DisclosureCaret className="shrink-0 text-(--ui-text-tertiary) opacity-0 transition group-hover/label:opacity-100" open={!collapsed} size="0.625rem" />
<DisclosureCaret
className="shrink-0 text-(--ui-text-tertiary) opacity-0 transition group-hover/label:opacity-100"
open={!collapsed}
size="0.625rem"
/>
</DropdownMenuItem>
{!collapsed &&
group.families.map(family => {

View file

@ -108,9 +108,11 @@ export function ModelVisibilityDialog({
}
const allFamilies = collapseModelFamilies(provider.models ?? [])
const onCount = allFamilies.filter(family =>
visible.has(modelVisibilityKey(provider.slug, family.id))
).length
const checkState = onCount === 0 ? false : onCount === allFamilies.length ? true : 'indeterminate'
const collapsed = collapsedProviders.includes(provider.slug) && !q
@ -138,15 +140,16 @@ export function ModelVisibilityDialog({
const key = modelVisibilityKey(provider.slug, family.id)
return (
<label
className="flex cursor-pointer items-center gap-2 px-3 py-1 text-xs"
key={key}
>
<label className="flex cursor-pointer items-center gap-2 px-3 py-1 text-xs" key={key}>
<span className="min-w-0 flex-1 truncate">
{name}
{tag ? <span className="text-(--ui-text-tertiary)"> {tag}</span> : null}
</span>
<Switch checked={visible.has(key)} onCheckedChange={() => toggle(provider, family.id)} size="xs" />
<Switch
checked={visible.has(key)}
onCheckedChange={() => toggle(provider, family.id)}
size="xs"
/>
</label>
)
})}

View file

@ -84,7 +84,11 @@ test('the leading severity glyph is stripped from the toast message', () => {
test('the trailing "· detail" is split off as a secondary meta line, not inlined', () => {
// Detail-carrying notices split on the first ` · `.
const paused = noticeToToast({ key: 'credits.depleted', level: 'error', text: '✕ Credit access paused · run /topup to top up' })
const paused = noticeToToast({
key: 'credits.depleted',
level: 'error',
text: '✕ Credit access paused · run /topup to top up'
})
expect(paused?.message).toBe('Credit access paused')
expect(paused?.meta).toBe('run /topup to top up')
@ -95,7 +99,10 @@ test('the trailing "· detail" is split off as a secondary meta line, not inline
})
test('splitMeta splits on the first space-middot-space only', () => {
expect(splitMeta('Credit access paused · run /topup to top up')).toEqual(['Credit access paused', 'run /topup to top up'])
expect(splitMeta('Credit access paused · run /topup to top up')).toEqual([
'Credit access paused',
'run /topup to top up'
])
expect(splitMeta('Credit access restored')).toEqual(['Credit access restored', undefined])
// Interior middots after the first split stay in the meta.
expect(splitMeta('a · b · c')).toEqual(['a', 'b · c'])

View file

@ -121,6 +121,7 @@ function expandProviderDefaults(provider: ModelOptionProvider, target: Set<strin
const families = collapseModelFamilies(provider.models ?? [])
const featured = provider.featured_models ?? []
const defaults = featured.length
? families.filter(family => featured.includes(family.id))
: families.slice(0, DEFAULT_VISIBLE_PER_PROVIDER)

View file

@ -845,6 +845,7 @@ describe('createSlashHandler', () => {
await vi.waitFor(() => {
expect(ctx.transcript.send).toHaveBeenCalledWith(skillMessage, true, '/hermes-agent-dev')
})
// The expanded skill body is model-facing: no transcript line may carry it.
for (const [line] of ctx.transcript.sys.mock.calls) {
expect(line).not.toContain('Use this skill to do X')