fix(browser): reuse chrome mcp screenshot format · openclaw/openclaw@1564e70
obviyus
·
2026-05-11
·
via Recent Commits to openclaw:main
File tree
extensions/browser/src/browser
| Original file line number | Diff line number | Diff line change |
|---|
@@ -906,20 +906,20 @@ export async function takeChromeMcpScreenshot(params: {
|
906 | 906 | timeoutMs?: number; |
907 | 907 | }): Promise<Buffer> { |
908 | 908 | return await withTempFile(async (filePath) => { |
| 909 | +const format = params.format ?? "png"; |
909 | 910 | await callTool( |
910 | 911 | params.profileName, |
911 | 912 | chromeMcpProfileOptionsFromParams(params), |
912 | 913 | "take_screenshot", |
913 | 914 | { |
914 | 915 | pageId: parsePageId(params.targetId), |
915 | 916 | filePath, |
916 | | -format: params.format ?? "png", |
| 917 | + format, |
917 | 918 | ...(params.uid ? { uid: params.uid } : {}), |
918 | 919 | ...(params.fullPage ? { fullPage: true } : {}), |
919 | 920 | }, |
920 | 921 | { timeoutMs: params.timeoutMs }, |
921 | 922 | ); |
922 | | -const format = params.format ?? "png"; |
923 | 923 | return await fs.readFile(`${filePath}.${format}`); |
924 | 924 | }); |
925 | 925 | } |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。