mirror of
https://github.com/stablyai/orca
synced 2026-04-21 14:17:16 +00:00
fix: eval command displays result instead of undefined
Agent-browser returns { origin, result } for eval but the type declared
{ value } and the CLI formatter read v.value. Updated type and formatter
to match the actual response shape.
This commit is contained in:
parent
e3d1b9e549
commit
c8b98a1908
2 changed files with 3 additions and 2 deletions
|
|
@ -954,7 +954,7 @@ export async function main(argv = process.argv.slice(2), cwd = process.cwd()): P
|
|||
const expression = getRequiredStringFlag(parsed.flags, 'expression')
|
||||
const worktree = await getBrowserWorktreeSelector(parsed.flags, cwd, client)
|
||||
const result = await client.call<BrowserEvalResult>('browser.eval', { expression, worktree })
|
||||
return printResult(result, json, (v) => v.value)
|
||||
return printResult(result, json, (v) => v.result)
|
||||
}
|
||||
|
||||
if (matches(commandPath, ['tab', 'list'])) {
|
||||
|
|
|
|||
|
|
@ -210,7 +210,8 @@ export type BrowserScreenshotResult = {
|
|||
}
|
||||
|
||||
export type BrowserEvalResult = {
|
||||
value: string
|
||||
result: string
|
||||
origin: string
|
||||
}
|
||||
|
||||
export type BrowserTabInfo = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue