Files
paseo/public-docs/browser-tools.zh-CN.md
T
Mohamed Boudra bd15e40e94 Serve paseo.sh in Simplified Chinese (#7373)
* feat(website): serve paseo.sh in Simplified Chinese

Every page of the website now has a Simplified Chinese version under
/zh-CN: the interface, docs, blog posts, comparison pages, legal pages,
all changelog releases and the homepage mockup. English URLs are unchanged.

The URL alone decides the language. There is no browser-language redirect
and no stored preference, because either would have to redirect the
unprefixed English URLs that people share and search engines index.
Internal links carry the page's language instead, and hreflang alternates
point Chinese search results at /zh-CN.

Translated headings pin the English anchor with {#id}, so section links
work in both languages. content-translations.test.ts fails when a page
has no translation or a translation's headings drift from the English.
Changelog releases and plugin listings without a translation render
whole in English under a notice, so a release never waits on one.

Plugin manifests and the registry gain optional translations and
OVERVIEW.zh-CN.md fields; older clients and registries ignore them.

* feat(website): replace the native language select with an EN/ZH menu

The header showed an OS-native select whose popup did not match the site.
The trigger now shows the language abbreviated (EN, ZH) and opens a menu in
the app's dropdown style that names each language in itself, with its name
in the page language underneath. Rows are real links to the same page in
that language; arrows, Escape, outside presses and taps behave as a menu
button, and the menu keeps itself on screen when a narrow header pushes the
trigger toward an edge.

Also drops the stray space after the full-width comma in the Chinese
homepage subtitle.

* docs(website): translate main's new docs and 0.12.0 release notes

Main added Keep run workspaces to the schedules docs, rewrote plugin icons
around inline SVG, and promoted 0.12.0 with new entries. Bring the Chinese
pages and changelog in line so no section falls back to English.

* fix(server): leave plugin listing translations to the registry

The daemon rejected manifests whose translations the registry would refuse,
so a plugin main installs could fail to load here. Paseo never reads
translations; the registry validates them at publish. Docs now say which
checks are automated at publish and which are human review.

* docs(plugins): describe the registry's final overview translation discovery

* style(server): format manifest test

* test(app): measure sidebar rows one at a time

After a reload the developer error toast appears while expectVerticalOrder
measures every row at once. Each concurrent boundingBox runs the toast
locator handler, and only one of them resumes, so the poll timed out on
every attempt since #7424. Measuring sequentially keeps one action in flight.

* test(app): return sidebar row measuring to main

#7480 hides the developer toast instead of running a locator handler, so
measuring the rows concurrently no longer races it. Reverts 41ac23016.

* test(app): wait for the compact shell before opening compact Changes

The shell survives the breakpoint, so right after the resize the wide
Explorer could still be visible: the test skipped the Explorer toggle and
the tab then disappeared, or toggled at the wrong time. Wait for the
compact-shell marker, as the composer helpers do since #7424.

* docs(website): translate main's plugin file panel docs

* test(app): edit the code font size after the font family remount

A committed appearance change remounts the settings screen through
AppearanceStyleBoundary, and the new form starts from the stored size.
Filling the size before that remount lost the edit in CI.

* docs(website): translate main's client/ui import docs

Follows #7474: one /client/ui entry, StreamedText instead of useRevealedText,
SettingsGroup dropped from the settings table, and the new
'UI imports in v0.13' migration section.

* test(app): wait for the previous layout's file panel picker to leave

After a resize the old layout's picker animates out while the new one is
already mounted, so the Use button matched two elements and the strict
locator failed. Wait for the shell's layout and a single picker first.
2026-10-21 13:13:03 +07:00

6.2 KiB
Raw Blame History

title, description, nav
title description nav
浏览器工具 Agent 用来操作 Paseo 浏览器标签页的 browser_* MCP 工具。 工具参考

浏览器工具

启用浏览器自动化后,browser_* 工具会和其他 Paseo MCP 工具一起注入到 Agent 中。

通用概念:

  • browserId 标识一个标签页。它来自 browser_new_tab 或 browser_list_tabs,所有针对标签页的工具都需要它。
  • ref 标识一个元素,例如 @e3。引用来自同一标签页最新的 browser_snapshot,页面变化后会失效;过期的引用会返回错误,而不是作用到错误的元素上。
  • 每个结果都会报告命令执行期间页面打开的对话框(alert 会被接受;confirm/prompt/beforeunload 会被取消)。

标记为 ? 的参数是可选的。

标签页

工具 参数 用途
browser_list_tabs — 列出 Agent 工作区在所有已连接宿主上打开的标签页。
browser_new_tab url? 在后台打开一个标签页并返回它的 browserId。
browser_close_tab browserId 关闭标签页并清理它的 webview。
browser_resize browserId, width, height 调整标签页视口大小,用手机或平板的尺寸检查布局。

读取页面

工具 参数 用途
browser_snapshot browserId 以带元素引用的无障碍树形式返回页面。
browser_screenshot browserId, fullPage? 截取视口的 PNG;传入 fullPage 时截取整个页面。
browser_logs browserId, maxEntries? 读取最近的控制台消息和网络耗时条目。
browser_wait browserId, text? | url?, timeoutMs? 等待页面包含某段文本或到达某个 URL 片段(两者必须且只能提供一个)。

交互

工具 参数 用途
browser_click browserId, ref, button?, doubleClick?, modifiers? 点击元素:左键/右键/中键、双击、键盘修饰键。
browser_fill browserId, ref, value 设置输入类元素的值。
browser_type browserId, text, ref? 向元素输入文本;省略 ref 时输入到当前获得焦点的元素。
browser_keypress browserId, key, ref? 在元素或当前焦点元素上按键(Enter、Escape、Tab、Space 等)。
browser_hover browserId, ref 悬停在元素上,会触发真实的 CSS :hover。
browser_select browserId, ref, value 在 <select> 中选择一个选项。
browser_drag browserId, sourceRef, targetRef 把一个元素拖到另一个元素上。
browser_upload browserId, ref, filePaths 为文件输入框设置文件。路径必须位于 Agent 的工作区内。
browser_scroll browserId, deltaX, deltaY, ref? 滚动页面;传入 ref 时把滚轮输入定位到该元素中心。

导航

工具 参数 用途
browser_navigate browserId, url 跳转到一个 http(s) URL。
browser_back browserId 后退;没有可后退的历史记录时报错。
browser_forward browserId 前进;没有可前进的条目时报错。
browser_reload browserId 重新加载页面。

脚本

工具 参数 用途
browser_evaluate browserId, function, ref? 在页面中运行一个 JavaScript 函数。传入 ref 时,解析出的元素作为第一个参数传入。结果以有大小限制的 JSON 返回。

错误

工具会返回结构化的错误,而不是静默失败。Agent 最常遇到的错误:

错误码 含义
browser_disabled 该主机上的浏览器工具已关闭。
browser_no_host 没有已连接的浏览器宿主(桌面应用)。可以重试。
browser_stale_ref 引用与页面不再匹配,请重新获取快照。
browser_timeout 元素始终无法操作,或等待条件始终未满足。
browser_denied 不允许该操作,例如非 http(s) 的 URL,或没有可导航的历史记录。