mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
fix(desktop): minor type fixes and devShell cage dep
- Type gatewayState in session store - Electron main.ts: force-show window for e2e test workers - tsconfig: include e2e test types - nix/devShell.nix: add cage for headless visual testing on tiling WMs
This commit is contained in:
parent
69fc7a8d1f
commit
c5111388c7
4 changed files with 15 additions and 2 deletions
|
|
@ -7608,6 +7608,14 @@ function createWindow() {
|
|||
}
|
||||
})
|
||||
|
||||
// Under Playright testing, instantly show the window.
|
||||
// `ready-to-show` doesn't fire in some testing envs.
|
||||
if (process.env.TEST_WORKER_INDEX !== undefined) {
|
||||
if (mainWindow && !mainWindow.isDestroyed() && !mainWindow.isVisible()) {
|
||||
mainWindow.show()
|
||||
}
|
||||
}
|
||||
|
||||
mainWindow.on('will-enter-full-screen', () => sendWindowStateChanged(true))
|
||||
mainWindow.on('enter-full-screen', () => sendWindowStateChanged(true))
|
||||
mainWindow.on('will-leave-full-screen', () => sendWindowStateChanged(false))
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import type { ConnectionState } from '@hermes/shared'
|
||||
import { atom, computed } from 'nanostores'
|
||||
|
||||
import { lastVisibleMessageIsUser } from '@/app/chat/thread-loading'
|
||||
|
|
@ -213,7 +214,7 @@ export function mergeSessionPage(
|
|||
}
|
||||
|
||||
export const $connection = atom<HermesConnection | null>(null)
|
||||
export const $gatewayState = atom('idle')
|
||||
export const $gatewayState = atom<ConnectionState>('idle')
|
||||
export const $sessions = atom<SessionInfo[]>([])
|
||||
export const $sessionsTotal = atom<number>(0)
|
||||
// Cron-job sessions (source === 'cron') are fetched as their own list so the
|
||||
|
|
@ -319,7 +320,7 @@ export const $modelPickerOpen = atom(false)
|
|||
export const $sessionPickerOpen = atom(false)
|
||||
|
||||
export const setConnection = (next: Updater<HermesConnection | null>) => updateAtom($connection, next)
|
||||
export const setGatewayState = (next: Updater<string>) => updateAtom($gatewayState, next)
|
||||
export const setGatewayState = (next: Updater<ConnectionState>) => updateAtom($gatewayState, next)
|
||||
export const setSessions = (next: Updater<SessionInfo[]>) => updateAtom($sessions, next)
|
||||
export const setSessionsTotal = (next: Updater<number>) => updateAtom($sessionsTotal, next)
|
||||
export const setCronSessions = (next: Updater<SessionInfo[]>) => updateAtom($cronSessions, next)
|
||||
|
|
|
|||
|
|
@ -23,5 +23,6 @@
|
|||
}
|
||||
},
|
||||
"include": ["src", "../shared/src"],
|
||||
"exclude": ["e2e", "electron", "playwright.config.ts"],
|
||||
"references": [{ "path": "./tsconfig.electron.json" }]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,9 @@
|
|||
${combinedNonNpm}
|
||||
${hermesNpmLib.mkNpmDevShellHook npmPackageJsonPaths}
|
||||
|
||||
# Force Node to use Nix's playwright-test binary instead of node_modules/.bin
|
||||
export PATH="${pkgs.playwright-test}/bin:$PATH"
|
||||
|
||||
# for the devshell to pick up the src
|
||||
export HERMES_PYTHON_SRC_ROOT=$(git rev-parse --show-toplevel)
|
||||
echo "Hermes Agent dev shell in $HERMES_PYTHON_SRC_ROOT"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue