mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
fmt(js): npm run fix on merge (#69048)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
367810a942
commit
5c4c419307
3 changed files with 9 additions and 4 deletions
|
|
@ -2,7 +2,10 @@ import { beforeEach, describe, expect, it } from 'vitest'
|
|||
|
||||
import { $backendThemes, $pendingSkinApply, __resetBackendSkinSync, ingestBackendSkin } from './backend-sync'
|
||||
|
||||
const skin = (name: string) => ({ name, colors: { background: '#101020', ui_accent: '#ff33aa', banner_text: '#eeeeee' } })
|
||||
const skin = (name: string) => ({
|
||||
name,
|
||||
colors: { background: '#101020', ui_accent: '#ff33aa', banner_text: '#eeeeee' }
|
||||
})
|
||||
|
||||
describe('ingestBackendSkin', () => {
|
||||
beforeEach(() => __resetBackendSkinSync())
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ export function __resetBackendSkinSync(): void {
|
|||
* change. Built-in names keep the desktop's own palette but can still be applied.
|
||||
*/
|
||||
export function ingestBackendSkin(skin: HermesSkin | undefined | null, { apply }: { apply: boolean }): void {
|
||||
const name = (skin && typeof skin === 'object' ? skin.name ?? '' : '').trim()
|
||||
const name = (skin && typeof skin === 'object' ? (skin.name ?? '') : '').trim()
|
||||
|
||||
if (!name) {
|
||||
return
|
||||
|
|
|
|||
|
|
@ -68,8 +68,10 @@ export function skinToDesktopTheme(skin: HermesSkin): DesktopTheme | null {
|
|||
const sidebar = mix(background, foreground, dark ? 0.02 : 0.012)
|
||||
const accent = ensureContrast(accentSeed, sidebar, ACCENT_MIN_CONTRAST)
|
||||
|
||||
const border = pick(colors, ['ui_border', 'banner_border'], background) ?? mix(background, foreground, dark ? 0.16 : 0.14)
|
||||
const mutedForeground = pick(colors, ['banner_dim', 'session_border'], background) ?? mix(foreground, background, 0.45)
|
||||
const border =
|
||||
pick(colors, ['ui_border', 'banner_border'], background) ?? mix(background, foreground, dark ? 0.16 : 0.14)
|
||||
const mutedForeground =
|
||||
pick(colors, ['banner_dim', 'session_border'], background) ?? mix(foreground, background, 0.45)
|
||||
const destructive = pick(colors, ['ui_error'], background) ?? '#e25563'
|
||||
|
||||
const palette: DesktopThemeColors = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue