mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-23 16:36:23 +00:00
The desktop color-mix system, ported: a theme is a handful of identity SEEDS (text, primary, accent, border, status hues); every secondary tone (muted, label, surfaces, chips, selection) is a color-mix derivative against the real terminal background. lib/color.ts consolidates the primitives (parse/mix/luminance/contrast/retone + xterm.js's multiplicative liftForContrast). Knobs are grid-search fitted so the math reproduces the classic hand-tuned literals (contract-tested). The display shim renders authored palettes RAW and only rescues near-invisible colors. Boot reads the last resolved theme from $HERMES_HOME/tui-theme-boot.json so the first frame paints in the right palette (no default-dark flash), and the placeholder cursor follows the bubbles textinput pattern.
23 lines
614 B
JavaScript
23 lines
614 B
JavaScript
// Screenshot /tmp/tui-visual.html with the repo's Electron (offscreen).
|
|
import { app, BrowserWindow } from 'electron'
|
|
import { writeFileSync } from 'fs'
|
|
|
|
app.disableHardwareAcceleration()
|
|
|
|
app.whenReady().then(async () => {
|
|
const win = new BrowserWindow({
|
|
height: 2100,
|
|
show: false,
|
|
webPreferences: { offscreen: true },
|
|
width: 1500
|
|
})
|
|
|
|
await win.loadFile('/tmp/tui-visual.html')
|
|
await new Promise(r => setTimeout(r, 700))
|
|
|
|
const image = await win.webContents.capturePage()
|
|
|
|
writeFileSync('/tmp/tui-visual.png', image.toPNG())
|
|
console.log('wrote /tmp/tui-visual.png')
|
|
app.quit()
|
|
})
|