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 (#69562)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
bb24364f25
commit
0ec4a873c1
5 changed files with 14 additions and 6 deletions
|
|
@ -130,7 +130,11 @@ describe('usePreviewRouting', () => {
|
|||
)
|
||||
|
||||
act(() =>
|
||||
handleEvent({ payload: { url: 'https://www.cnn.com', label: 'CNN' }, session_id: 'session-1', type: 'preview.open' })
|
||||
handleEvent({
|
||||
payload: { url: 'https://www.cnn.com', label: 'CNN' },
|
||||
session_id: 'session-1',
|
||||
type: 'preview.open'
|
||||
})
|
||||
)
|
||||
|
||||
await waitFor(() => {
|
||||
|
|
|
|||
|
|
@ -116,7 +116,10 @@ export function usePreviewRouting({
|
|||
void normalizeOrLocalPreviewTarget(target, $currentCwd.get() || currentCwd || undefined).then(resolved => {
|
||||
if (resolved) {
|
||||
const trimmedLabel = typeof label === 'string' ? label.trim() : ''
|
||||
setCurrentSessionPreviewTarget(trimmedLabel ? { ...resolved, label: trimmedLabel } : resolved, 'tool-result')
|
||||
setCurrentSessionPreviewTarget(
|
||||
trimmedLabel ? { ...resolved, label: trimmedLabel } : resolved,
|
||||
'tool-result'
|
||||
)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,9 +31,9 @@ describe('JsonRpcGatewayClient connect() URL guard', () => {
|
|||
|
||||
it('rejects a non-string IPC result object', async () => {
|
||||
const client = new JsonRpcGatewayClient()
|
||||
await expect(
|
||||
client.connect({ ok: true, wsUrl: 'ws://127.0.0.1:1/api/ws' } as unknown as string)
|
||||
).rejects.toThrow(/requires a ws:\/\/ or wss:\/\/ URL string, got type "object"/)
|
||||
await expect(client.connect({ ok: true, wsUrl: 'ws://127.0.0.1:1/api/ws' } as unknown as string)).rejects.toThrow(
|
||||
/requires a ws:\/\/ or wss:\/\/ URL string, got type "object"/
|
||||
)
|
||||
})
|
||||
|
||||
it('rejects a non-ws URL string', async () => {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { describe, expect, it } from 'vitest'
|
||||
|
||||
import { DAY, HOUR, MINUTE, SECOND, formatAgo } from './time'
|
||||
import { DAY, formatAgo, HOUR, MINUTE, SECOND } from './time'
|
||||
|
||||
const labels = {
|
||||
ageNow: 'now',
|
||||
|
|
|
|||
|
|
@ -108,6 +108,7 @@ export class JsonRpcGatewayClient {
|
|||
}
|
||||
|
||||
let url: URL
|
||||
|
||||
try {
|
||||
url = new URL(wsUrl)
|
||||
} catch {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue