mirror of
https://github.com/getpaseo/paseo.git
synced 2026-10-24 10:12:44 +00:00
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.
This commit is contained in:
+16
-4
@@ -1,8 +1,8 @@
|
||||
# 更新日志
|
||||
|
||||
## 0.12.0-beta.3 - 2026-10-18
|
||||
## 0.12.0 - 2026-10-19
|
||||
|
||||
后台工作区、新的 Markdown 渲染器(手机上可跨段落选择文本)、重新设计的手机布局,以及近 100 项修复。
|
||||
后台工作区、新的 Markdown 渲染器(手机上可跨段落选择文本)、重新设计的手机布局,以及超过 120 项修复。
|
||||
|
||||
**升级前须知**:`paseo run --background` 已弃用,请改用 `--no-wait`;当 daemon 在 15 秒内未确认时,`paseo permit allow` 和 `deny` 现在会以非零状态退出
|
||||
|
||||
@@ -29,9 +29,10 @@
|
||||
- 手机上的 Settings 改为大图块,并分为 App 和 Host 两组 ([#7129](https://github.com/getpaseo/paseo/pull/7129))
|
||||
- Command Center 现在按匹配度和最近使用对工作区和 Agent 排序,并显示时间戳、项目图标和高亮的匹配内容 ([#7277](https://github.com/getpaseo/paseo/pull/7277))
|
||||
- 子 Agent 列表中每个 Paseo 子 Agent 的标题下方新增其模型、思考、模式和上下文 ([#7290](https://github.com/getpaseo/paseo/pull/7290))
|
||||
- 手机上 Subagents 面板中的子 Agent 行更高了,其归档和分离按钮也使用了标准的按压高亮 ([#7364](https://github.com/getpaseo/paseo/pull/7364))
|
||||
- 聊天中的 Paseo 工具调用现在以操作及其上下文开头,例如 Send message · 提示词的第一行 ([#7283](https://github.com/getpaseo/paseo/pull/7283))
|
||||
- 手机上的 New workspace 表单改为全宽字段,Import session 移到了标题栏 ([#7239](https://github.com/getpaseo/paseo/pull/7239))
|
||||
- 减少了回复流式输出时长聊天的渲染工作量 ([#7052](https://github.com/getpaseo/paseo/pull/7052) by [@colonelpanic8](https://github.com/colonelpanic8))
|
||||
- 减少了回复流式输出时长聊天的渲染工作量 ([#7052](https://github.com/getpaseo/paseo/pull/7052) by [@colonelpanic8](https://github.com/colonelpanic8), [#7342](https://github.com/getpaseo/paseo/pull/7342))
|
||||
- 重新打开侧边栏的速度提升约 45% ([#7157](https://github.com/getpaseo/paseo/pull/7157))
|
||||
- 应用重新连接后,项目和工作区加载更快 ([#7242](https://github.com/getpaseo/paseo/pull/7242))
|
||||
- 一个 Agent 通过 CLI 或 MCP 发给另一个 Agent 的消息现在会引导其正在进行的回合,而不是中断它 ([#5164](https://github.com/getpaseo/paseo/pull/5164) by [@derwells](https://github.com/derwells))
|
||||
@@ -46,6 +47,7 @@
|
||||
- 修复了 `paseo plugin reload` 在重新加载仍在进行时因 60 秒超时而失败的问题 ([#6306](https://github.com/getpaseo/paseo/pull/6306) by [@Mtuchel](https://github.com/Mtuchel))
|
||||
- 修复了插件 ACP Agent 运行期间发送的后续消息失败并提示 "Provider does not support prompt.steer" 的问题 ([#7270](https://github.com/getpaseo/paseo/pull/7270) by [@simonepri](https://github.com/simonepri))
|
||||
- 修复了 Find 在时间线插件绘制的提示词文本中找不到匹配的问题 ([#7253](https://github.com/getpaseo/paseo/pull/7253) by [@a-grasso](https://github.com/a-grasso))
|
||||
- 修复了重新打开聊天后,延迟加载的 Composer 插件胶囊遮挡 Copy 和 Fork 的问题 ([#7341](https://github.com/getpaseo/paseo/pull/7341) by [@sholiday](https://github.com/sholiday))
|
||||
|
||||
### 修复
|
||||
|
||||
@@ -59,6 +61,8 @@
|
||||
- 修复了在 Appearance 中输入不完整的字体名称会破坏应用样式的问题 ([#6695](https://github.com/getpaseo/paseo/pull/6695))
|
||||
- 修复了隐藏窗口没有渲染任何帧时 Linux 桌面窗口始终不出现的问题 ([#6726](https://github.com/getpaseo/paseo/pull/6726) by [@EhEo](https://github.com/EhEo))
|
||||
- 修复了同一主机上另一个 Agent 正在流式输出时,打开其他 Agent 或工作区会卡住的问题 ([#7074](https://github.com/getpaseo/paseo/pull/7074) by [@colonelpanic8](https://github.com/colonelpanic8))
|
||||
- 修复了项目的新建工作区按钮选中第一个主机,而不是当前工作区所在主机的问题 ([#7308](https://github.com/getpaseo/paseo/pull/7308))
|
||||
- 修复了在触屏浏览器中用键盘快捷键切换标签页后,Composer 仍保持聚焦的问题 ([#7352](https://github.com/getpaseo/paseo/pull/7352))
|
||||
- 修复了在大型目录树上同时进行多个目录搜索时 daemon 内存耗尽的问题 ([#7265](https://github.com/getpaseo/paseo/pull/7265))
|
||||
- 修复了打开多个窗格时拖动 Explorer 边缘卡顿的问题 ([#7284](https://github.com/getpaseo/paseo/pull/7284) by [@colonelpanic8](https://github.com/colonelpanic8))
|
||||
- 修复了 Provider 拒绝第一条提示词时,创建 Agent 显示错误和重试草稿的问题 ([#6379](https://github.com/getpaseo/paseo/pull/6379))
|
||||
@@ -68,6 +72,7 @@
|
||||
- 修复了子 Agent 很快完成第一个回合时父 Agent 收不到完成通知的问题 ([#6008](https://github.com/getpaseo/paseo/pull/6008) by [@ahmet-izgi](https://github.com/ahmet-izgi))
|
||||
- 修复了子 Agent 的任务被停止或重新加载时父 Agent 被告知子 Agent 已完成的问题 ([#6660](https://github.com/getpaseo/paseo/pull/6660) by [@Mar-garet](https://github.com/Mar-garet))
|
||||
- 修复了包含 U+2028 或 U+2029 的 Codex 聊天在 Node 24 上无法重新打开的问题 ([#5999](https://github.com/getpaseo/paseo/pull/5999) by [@grahameger](https://github.com/grahameger), [@jtsang4](https://github.com/jtsang4), [@kotusenka](https://github.com/kotusenka))
|
||||
- 修复了恢复的 Codex 目标在继续执行后显示为空闲、且无法停止的问题 ([#7339](https://github.com/getpaseo/paseo/pull/7339) by [@hemaaanth](https://github.com/hemaaanth))
|
||||
- 修复了 macOS 上 Add Project 的目录搜索进入 `~/Library` 后导致 daemon 挂起的问题 ([#5789](https://github.com/getpaseo/paseo/pull/5789) by [@lardissone](https://github.com/lardissone))
|
||||
- 修复了保存的模式不被 Provider 提供时 New workspace 失败并提示 "Invalid mode" 的问题 ([#5847](https://github.com/getpaseo/paseo/pull/5847) by [@mcowger](https://github.com/mcowger))
|
||||
- 修复了回答 OpenCode v2 的多选问题失败并提示 "Invalid answer" 的问题 ([#6149](https://github.com/getpaseo/paseo/pull/6149) by [@gammons](https://github.com/gammons))
|
||||
@@ -99,9 +104,13 @@
|
||||
- 修复了新添加到 `paseo.json` 的服务在 daemon 重启之前无法启动的问题 ([#6542](https://github.com/getpaseo/paseo/pull/6542))
|
||||
- 修复了服务只监听 IPv6 localhost 时工作区服务 URL 返回 502 的问题 ([#6753](https://github.com/getpaseo/paseo/pull/6753) by [@marcelocastrobarbosa](https://github.com/marcelocastrobarbosa))
|
||||
- 修复了命令缺失或立即退出时终端无法关闭的问题 ([#6792](https://github.com/getpaseo/paseo/pull/6792) by [@KiraPC](https://github.com/KiraPC))
|
||||
- 修复了返回工作区后 CJK 终端文本的字符之间多出空格的问题 ([#6452](https://github.com/getpaseo/paseo/pull/6452) by [@jasonhnd](https://github.com/jasonhnd), [@liujin0506](https://github.com/liujin0506), [@seob717](https://github.com/seob717))
|
||||
- 修复了 MCP 终端按键命令输入方向键和修饰键的名称,而不是发送这些按键的问题 ([#7343](https://github.com/getpaseo/paseo/pull/7343) by [@Aling33](https://github.com/Aling33))
|
||||
- 修复了返回工作区后,原生终端中 CJK 文本的字符之间多出空格的问题 ([#6452](https://github.com/getpaseo/paseo/pull/6452) by [@jasonhnd](https://github.com/jasonhnd), [@liujin0506](https://github.com/liujin0506), [@seob717](https://github.com/seob717))
|
||||
- 修复了在 iOS 和 Android 上从终端复制韩文文本时字符之间多出空格或丢失第一个字符的问题 ([#7254](https://github.com/getpaseo/paseo/pull/7254), [#7260](https://github.com/getpaseo/paseo/pull/7260) by [@helloimdevman](https://github.com/helloimdevman))
|
||||
- 修复了在 iOS 和 Android 上长按终端中的韩文单词时只选中一个字符、而不是整个单词的问题 ([#7353](https://github.com/getpaseo/paseo/pull/7353))
|
||||
- 修复了自托管的 Web 应用通过 80 或 443 端口上的反向代理连接失败的问题 ([#6638](https://github.com/getpaseo/paseo/pull/6638) by [@kiawin](https://github.com/kiawin))
|
||||
- 修复了网络静默故障后 Hub 连接再也不会重连的问题 ([#7315](https://github.com/getpaseo/paseo/pull/7315))
|
||||
- 修复了另一个解析出的地址不可达时,远程连接在慢速网络上失败的问题 ([#7336](https://github.com/getpaseo/paseo/pull/7336))
|
||||
- 修复了助手回复中包含空格或非 ASCII 字符的文件链接以 ENOENT 失败的问题 ([#6520](https://github.com/getpaseo/paseo/pull/6520) by [@apple-ouyang](https://github.com/apple-ouyang), [@sunshinehomeyu-blip](https://github.com/sunshinehomeyu-blip))
|
||||
- 修复了 Agent 回复中路径包含空格或非 ASCII 字符的本地图片无法加载的问题 ([#6877](https://github.com/getpaseo/paseo/pull/6877))
|
||||
- 修复了 Markdown 文件预览不显示通过相对路径引用的图片的问题 ([#6750](https://github.com/getpaseo/paseo/pull/6750) by [@apple-ouyang](https://github.com/apple-ouyang))
|
||||
@@ -158,7 +167,10 @@
|
||||
- 修复了在内存少于 15 GB 的 Mac 上 `nix build .#desktop` 内存耗尽的问题 ([#6537](https://github.com/getpaseo/paseo/pull/6537) by [@truelecter](https://github.com/truelecter))
|
||||
- 修复了 Refresh all 之后用量 Provider 的位置互换的问题 ([#6947](https://github.com/getpaseo/paseo/pull/6947) by [@sleroq](https://github.com/sleroq))
|
||||
- 修复了刷新失败时用量卡片丢失最近的值并显示 "Updated" 的问题 ([#7246](https://github.com/getpaseo/paseo/pull/7246))
|
||||
- 修复了用量把不同的 Cursor 账号合并到同一张卡片中的问题 ([#7344](https://github.com/getpaseo/paseo/pull/7344))
|
||||
- 修复了 OpenCode Go 用量图标在深色主题上几乎看不见的问题 ([#6362](https://github.com/getpaseo/paseo/pull/6362) by [@az33zy](https://github.com/az33zy))
|
||||
- 修复了 Provider 列表中 Devin、Hermes、Kiro 和 Antigravity 显示通用图标的问题 ([#7330](https://github.com/getpaseo/paseo/pull/7330) by [@OMEG-Lu](https://github.com/OMEG-Lu), [@kevenhu001-cyber](https://github.com/kevenhu001-cyber))
|
||||
- 修复了翻译后的标签较长时,侧边栏中的设置按钮溢出卡片的问题 ([#7312](https://github.com/getpaseo/paseo/pull/7312) by [@gentslava](https://github.com/gentslava))
|
||||
|
||||
## 0.11.4 - 2026-10-15
|
||||
|
||||
|
||||
@@ -147,6 +147,8 @@ Paseo Agent 默认会收到完成、错误和权限通知;设置 `notifyOnFini
|
||||
|
||||
MCP heartbeat 是临时的:只能创建或删除。要修改一个 heartbeat,请删除它并创建一个替代的。暂停、恢复、更新、查看、日志和单次运行只适用于新建 Agent 的定时任务。
|
||||
|
||||
默认情况下,新建 Agent 的定时任务每次运行结束时都会归档其工作区。`create_schedule` 和 `update_schedule` 不提供 **Archive on finish**(`archiveOnFinish`);要让之后的运行工作区保持活跃,请[在应用中修改该选项](/docs/schedules#keep-run-workspaces)。
|
||||
|
||||
### Agent 配置 {#agent-profiles}
|
||||
|
||||
| 工具 | 功能 |
|
||||
|
||||
@@ -180,7 +180,7 @@ client.addCommandCenterItem({
|
||||
});
|
||||
```
|
||||
|
||||
`icon` 是一个 [Lucide](https://lucide.dev/icons/) 图标名称。
|
||||
`icon` 可以是 [Lucide](https://lucide.dev/icons/) 图标名称、内联 SVG 或组件。参见[图标](/docs/plugins/reference#icons)。
|
||||
|
||||
## 编辑并重新加载 {#edit-and-reload}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ Paseo 为客户端代码提供以下模块:
|
||||
|
||||
这些确切的模块标识符使用宿主的运行时实例。请求其他宿主模块的客户端包会以 `Module "<name>" is not available in plugin client code` 失败。
|
||||
|
||||
不要导入 `lucide-react-native`、`react-native-svg` 或 DOM 库。把贡献的 `icon` 字段设为一个 [Lucide 图标名称](https://lucide.dev/icons/);Paseo 会校验名称并渲染图标。
|
||||
不要导入 `lucide-react-native`、`react-native-svg` 或 DOM 库。把贡献的 `icon` 字段设为一个 [Lucide 图标名称](https://lucide.dev/icons/)、内联 SVG 或组件;Paseo 会校验图标并渲染它。参见[图标](#icons)。
|
||||
|
||||
### 跨平台规则 {#cross-platform-rules}
|
||||
|
||||
@@ -273,7 +273,7 @@ Paseo 刷新 Agent 的方式是关闭它当前的 Provider 会话,再用当前
|
||||
|
||||
使用 `@getpaseo/plugin/server/acp` 中的 `runAcpProvider()` 适配一个基于命令的 ACP。只针对厂商在发现、配置、通知或工具调用方面的差异添加转换器钩子。
|
||||
|
||||
`ProviderRegistration.icon` 是相对于插件目录的文件路径,例如 `icon.svg`。它必须解析到该目录内一个不超过 64 KiB 的普通 SVG 文件。SVG 必须是自包含的:脚本、样式、`foreignObject`、事件处理属性、JavaScript URL 以及外部的 `href` 或 `xlink:href` 引用都会被拒绝。允许 `#mark` 这样的片段引用。Paseo 在插件启动时读取并清理该文件;这个字符串从不是内联 SVG 或 URL。
|
||||
`ProviderRegistration.icon` 是相对于插件目录的文件路径,例如 `icon.svg`。它必须解析到该目录内一个遵循 [SVG 图标规则](#svg-rules)的普通文件。Paseo 在插件启动时读取并校验该文件;这个字符串从不是内联 SVG 或 URL。
|
||||
|
||||
### 用量来源 {#usage-sources}
|
||||
|
||||
@@ -396,7 +396,7 @@ export default function contribute(server: PluginServerContext) {
|
||||
|
||||
不带 ID 调用 `usage.list_reports` 时会发现账号。带 ID 调用时,它会刷新已知的账号,而不重新发现身份。如果某个存储切换了账号,现有卡片会显示新登录的配额,直到下一次发现。报告会缓存五分钟;`forceRefresh` 会绕过缓存。条目携带 `id`、`account.label` 和 `fetchedAt`。失败的账号还会携带可选的 `loginErrors` 条目,其中包含 `harness` 和每个登录失败的 `report`。客户端通过 `server_info.features.usageSources` 判断是否启用此功能。较旧的 `provider.usage.list` RPC 会为 0.10 客户端映射同样的报告,并把问题渲染到它的 `error` 字符串中。
|
||||
|
||||
来源图标遵循上文的 Provider SVG 限制。
|
||||
来源图标是一个文件路径,规则与 Provider 图标相同。
|
||||
|
||||
## 入口与清理 {#entry-point-and-cleanup}
|
||||
|
||||
@@ -819,10 +819,10 @@ export default function contribute(client: PluginClientContext) {
|
||||
|
||||
用 `@getpaseo/plugin/client/ui` 中的侧边栏组件渲染该项:
|
||||
|
||||
| 组件 | 属性与行为 |
|
||||
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `SidebarRow` | 必填 `onPress`;可选 `icon`(Lucide 名称或接收 `{ size, color }` 的组件)、`label`、`active`、`trailing`、`id`。占满整行宽度。`trailing` 渲染在行的可按区域旁边,因此其中的按钮可以单独按下;按下其中其他位置则相当于按下该行。`id` 用于在测试 ID 中区分同一项的多行。 |
|
||||
| `SidebarSeparator` | 没有属性。侧边栏的分隔线,放在各组行之间。 |
|
||||
| 组件 | 属性与行为 |
|
||||
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `SidebarRow` | 必填 `onPress`;可选 `icon`(任意一种[图标](#icons)形式)、`label`、`active`、`trailing`、`id`。占满整行宽度。`trailing` 渲染在行的可按区域旁边,因此其中的按钮可以单独按下;按下其中其他位置则相当于按下该行。`id` 用于在测试 ID 中区分同一项的多行。 |
|
||||
| `SidebarSeparator` | 没有属性。侧边栏的分隔线,放在各组行之间。 |
|
||||
|
||||
弹出框锚定在被按下的那一行,无论按下的是行本身还是它的 `trailing` 内容,因此每行的“More”按钮会在它自己的行旁边打开弹出框。
|
||||
|
||||
@@ -1066,13 +1066,75 @@ async function copyResult() {
|
||||
|
||||
### 图标 {#icons}
|
||||
|
||||
`Icon` 从 Paseo 已安装的图标集中渲染一个 [Lucide 图标](https://lucide.dev/icons/)。插件包不导入 `lucide-react-native` 或 `react-native-svg`。
|
||||
每个贡献的 `icon` 字段都接受以下三种形式之一,类型为 `@getpaseo/plugin/client` 中的 `PluginIcon`:
|
||||
|
||||
| 属性 | 类型 | 是否必填 | 行为 |
|
||||
| ------- | -------- | -------- | --------------------------------------------- |
|
||||
| `name` | `string` | 是 | Lucide 图标名称。未知的名称不会渲染任何内容。 |
|
||||
| `size` | `number` | 否 | 图标的宽度和高度。 |
|
||||
| `color` | `string` | 否 | 图标颜色。请使用插件主题令牌。 |
|
||||
| 形式 | 示例 | 适用场景 |
|
||||
| ----------- | --------------------------- | ----------------------------------------------- |
|
||||
| Lucide 名称 | `icon: "Scan"` | 任意 [Lucide 图标](https://lucide.dev/icons/)。 |
|
||||
| 内联 SVG | `icon: { svg: reviewIcon }` | 品牌标志,或 Lucide 中没有的图标。 |
|
||||
| 组件 | `icon: ReviewBadge` | 随状态变化的图标,例如计数器。 |
|
||||
|
||||
附件来源接受 Lucide 名称或内联 SVG(`PluginSerializableIcon`),因为每个附加的条目都会保存其来源的图标。
|
||||
|
||||
Paseo 在贡献注册时校验图标。未知的 Lucide 名称或违反规则的 SVG 会导致插件加载失败,并给出原因:
|
||||
|
||||
```text
|
||||
Workspace panel review has an invalid icon: script elements are not allowed
|
||||
```
|
||||
|
||||
Paseo 按界面的图标尺寸绘制内联 SVG,并把界面的图标颜色作为 `currentColor` 传入。用 `currentColor` 绘制即可跟随主题;固定的填充色会保持原样。
|
||||
|
||||
组件会收到 `PluginIconProps`,即 `{ size, color }`,并在该尺寸内渲染。头部按钮和 Composer 胶囊传入的是 [`PluginButtonIconProps`](#custom-icons-and-popover-content)。
|
||||
|
||||
#### SVG 规则 {#svg-rules}
|
||||
|
||||
内联 SVG、Provider 图标和用量来源图标遵循相同的规则:
|
||||
|
||||
- 只有一个 `<svg>` 文档,大小不超过 64 KiB。
|
||||
- 不含 `<script>`、`<style>` 或 `<foreignObject>` 元素。
|
||||
- 不含 `onclick` 这类事件处理属性,也不含 `javascript:` URL。
|
||||
- `href` 和 `xlink:href` 只能指向同一文档中的片段,例如 `#mark`。
|
||||
|
||||
#### 提供 SVG 标记 {#ship-svg-markup}
|
||||
|
||||
把标记放在一个客户端模块中:
|
||||
|
||||
```ts
|
||||
// client/icons.ts
|
||||
export const reviewIcon = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
||||
<path d="M4 4h16v16H4z" />
|
||||
</svg>`;
|
||||
```
|
||||
|
||||
或者把一个 `.svg` 文件放进 `client/` 并导入它。插件编译器会把文件的标记打包为字符串。声明一次该模块,让 TypeScript 接受这个导入:
|
||||
|
||||
```ts
|
||||
// client/svg.d.ts
|
||||
declare module "*.svg" {
|
||||
const markup: string;
|
||||
export default markup;
|
||||
}
|
||||
```
|
||||
|
||||
```ts
|
||||
// index.client.tsx
|
||||
import reviewIcon from "./client/review.svg";
|
||||
|
||||
client.addWorkspacePanel({ id: "review", title: "Review", icon: { svg: reviewIcon } /* … */ });
|
||||
```
|
||||
|
||||
#### 渲染图标 {#render-an-icon}
|
||||
|
||||
`@getpaseo/plugin/client/react-native` 中的 `Icon` 用于在你自己的 UI 中绘制图标。插件包不导入 `lucide-react-native` 或 `react-native-svg`。
|
||||
|
||||
| 属性 | 类型 | 是否必填 | 行为 |
|
||||
| ------- | ------------ | ----------------------- | ---------------------------------------------------------- |
|
||||
| `name` | `string` | `name` 或 `icon` 二选一 | Lucide 图标名称。 |
|
||||
| `icon` | `PluginIcon` | `name` 或 `icon` 二选一 | 上文任意一种图标形式。 |
|
||||
| `size` | `number` | 否 | 图标的宽度和高度。默认为 24。 |
|
||||
| `color` | `string` | 否 | 图标颜色,也是 SVG 的 `currentColor`。请使用插件主题令牌。 |
|
||||
|
||||
未知的名称或违反规则的 SVG 不会渲染任何内容。
|
||||
|
||||
## 时间线条目 {#timeline-items}
|
||||
|
||||
@@ -1224,7 +1286,7 @@ export default function contribute(client: PluginClientContext) {
|
||||
|
||||
## 设置界面 {#settings-screens}
|
||||
|
||||
在 `index.client.tsx` 中用 `client.addSettingsScreen({ id, title, icon, Component })` 注册一个组件。它会出现在该主机的 **设置 → 插件 → 你的插件** 下。`id` 在同一次安装中唯一;`icon` 是一个 Lucide 名称。注册返回一个幂等的移除函数,插件销毁时会移除剩余的界面。
|
||||
在 `index.client.tsx` 中用 `client.addSettingsScreen({ id, title, icon, Component })` 注册一个组件。它会出现在该主机的 **设置 → 插件 → 你的插件** 下。`id` 在同一次安装中唯一;`icon` 可以是任意一种[图标](#icons)形式。注册返回一个幂等的移除函数,插件销毁时会移除剩余的界面。
|
||||
|
||||
调用 `client.openSettings(id)` 或 Command Center 回调中的 `openSettings(id)` 可以打开你自己的某个界面。即使多台主机安装了同一个插件,每次安装也有各自的值和路由。
|
||||
|
||||
@@ -1401,14 +1463,14 @@ export default function contribute(client: PluginClientContext) {
|
||||
|
||||
`addWorkspacePanel` 的字段:
|
||||
|
||||
| 字段 | 是否必填 | 含义 |
|
||||
| ----------- | -------- | -------------------------------------------------- |
|
||||
| `id` | 是 | 插件内部的面板 ID。 |
|
||||
| `title` | 是 | 工作区标签页的标题。 |
|
||||
| `icon` | 是 | Lucide 图标名称。 |
|
||||
| `context` | 是 | `workspace` 或 `agent`。 |
|
||||
| `locations` | 否 | `workspace` 和/或 `explorer`。默认为 `workspace`。 |
|
||||
| `Component` | 是 | 与所选上下文的属性相匹配的 React Native 组件。 |
|
||||
| 字段 | 是否必填 | 含义 |
|
||||
| ----------- | -------- | --------------------------------------------------- |
|
||||
| `id` | 是 | 插件内部的面板 ID。 |
|
||||
| `title` | 是 | 工作区标签页的标题。 |
|
||||
| `icon` | 是 | Lucide 名称、`{ svg }` 或组件。参见[图标](#icons)。 |
|
||||
| `context` | 是 | `workspace` 或 `agent`。 |
|
||||
| `locations` | 否 | `workspace` 和/或 `explorer`。默认为 `workspace`。 |
|
||||
| `Component` | 是 | 与所选上下文的属性相匹配的 React Native 组件。 |
|
||||
|
||||
工作区面板接收 `PluginWorkspacePanelProps`:`context: "workspace"`、`theme`、`host`、`layout` 和 `workspaceId`。Agent 面板接收 `PluginAgentPanelProps`:`context: "agent"`、相同的通用字段和 `workspaceId`,外加 `agentId`。
|
||||
|
||||
@@ -1489,14 +1551,14 @@ client.addCommandCenterItem({
|
||||
|
||||
`addCommandCenterItem` 的字段:
|
||||
|
||||
| 字段 | 是否必填 | 含义 |
|
||||
| ---------- | -------- | ---------------------------------- |
|
||||
| `id` | 是 | 插件内部的条目 ID。 |
|
||||
| `title` | 是 | 搜索结果的标题。 |
|
||||
| `icon` | 是 | Lucide 图标名称。 |
|
||||
| `keywords` | 否 | 额外的 Command Center 搜索词。 |
|
||||
| `context` | 是 | `global`、`workspace` 或 `agent`。 |
|
||||
| `onSelect` | 是 | 对应上下文的客户端回调。 |
|
||||
| 字段 | 是否必填 | 含义 |
|
||||
| ---------- | -------- | --------------------------------------------------- |
|
||||
| `id` | 是 | 插件内部的条目 ID。 |
|
||||
| `title` | 是 | 搜索结果的标题。 |
|
||||
| `icon` | 是 | Lucide 名称、`{ svg }` 或组件。参见[图标](#icons)。 |
|
||||
| `keywords` | 否 | 额外的 Command Center 搜索词。 |
|
||||
| `context` | 是 | `global`、`workspace` 或 `agent`。 |
|
||||
| `onSelect` | 是 | 对应上下文的客户端回调。 |
|
||||
|
||||
全局条目出现在该安装所选择的主机上。只有当该主机有一个处于活动状态的缓存工作区时,工作区条目才会出现。只有当获得焦点的工作区标签页是一个 Agent,或者是一个缓存记录属于该工作区的 Agent 上下文插件面板时,Agent 条目才会出现。缺少上下文时条目会被移除,而不是调用插件去获取上下文。
|
||||
|
||||
@@ -1615,14 +1677,14 @@ const pill = client.addComposerPill({
|
||||
|
||||
这些契约从 `@getpaseo/plugin/client` 导出。
|
||||
|
||||
| 字段 | 是否必填 | 含义 |
|
||||
| ---------- | -------- | -------------------------------------------------------- |
|
||||
| `title` | 是 | 非空的无障碍标签、提示文字和底部面板标题。 |
|
||||
| `icon` | 是 | Lucide 名称或 `ComponentType<PluginButtonIconProps>`。 |
|
||||
| `label` | 否 | 非空的显示文字。省略时使用该位置的默认值。 |
|
||||
| `visible` | 否 | 默认为 `true`。为 false 时移除触发器及其占用的布局空间。 |
|
||||
| `disabled` | 否 | 默认为 `false`。按钮保持可见,但无法交互。 |
|
||||
| `behavior` | 是 | 下面三种形式之一。 |
|
||||
| 字段 | 是否必填 | 含义 |
|
||||
| ---------- | -------- | ------------------------------------------------------------------ |
|
||||
| `title` | 是 | 非空的无障碍标签、提示文字和底部面板标题。 |
|
||||
| `icon` | 是 | Lucide 名称、`{ svg }` 或 `ComponentType<PluginButtonIconProps>`。 |
|
||||
| `label` | 否 | 非空的显示文字。省略时使用该位置的默认值。 |
|
||||
| `visible` | 否 | 默认为 `true`。为 false 时移除触发器及其占用的布局空间。 |
|
||||
| `disabled` | 否 | 默认为 `false`。按钮保持可见,但无法交互。 |
|
||||
| `behavior` | 是 | 下面三种形式之一。 |
|
||||
|
||||
```tsx
|
||||
type PluginButtonBehavior =
|
||||
@@ -2011,7 +2073,7 @@ export default function contribute(server: PluginServerContext) {
|
||||
}
|
||||
```
|
||||
|
||||
Composer 菜单、搜索选择器、选中后的胶囊、草稿状态和提交都由 Paseo 负责。`text` 的值就是发送给 Agent 的完整快照。
|
||||
Composer 菜单、搜索选择器、选中后的胶囊、草稿状态和提交都由 Paseo 负责。`text` 的值就是发送给 Agent 的完整快照。`icon` 是 Lucide 名称或 `{ svg }`;参见[图标](#icons)。
|
||||
|
||||
## 主机与生命周期 {#hosts-and-lifecycle}
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ nav: CLI
|
||||
|
||||
`paseo schedule` 在终端中创建和管理新建 Agent 的[定时任务](/docs/schedules),适用于无界面的机器和脚本。每次运行都会启动一个新的 Agent。
|
||||
|
||||
默认情况下,每次运行结束时都会归档其工作区。CLI 没有 **Archive on finish** 参数;要让之后的运行工作区保持活跃,请[在应用中修改该选项](/docs/schedules#keep-run-workspaces)。
|
||||
|
||||
## 创建 {#create}
|
||||
|
||||
在 Codex 上通宵重构:
|
||||
|
||||
@@ -33,3 +33,11 @@ cron 是标准的节奏表示。CLI 接受 `5m` 或 `1h` 这样的简单预设
|
||||
- **[在聊天中](/docs/schedules-chat)**:在聊天中告诉 Agent,它会为你创建定时任务。
|
||||
- **[通过 CLI](/docs/schedules-cli)**:`paseo schedule create`,适用于无界面的机器和脚本。
|
||||
- **[通过 MCP](/docs/mcp)**:Agent 以编程方式创建和管理定时任务。
|
||||
|
||||
## 保留运行工作区 {#keep-run-workspaces}
|
||||
|
||||
新建 Agent 的定时任务每次运行都会创建一个工作区。**Archive on finish** 默认开启:运行结束时,Paseo 会归档该工作区及其 Agent。使用 worktree 隔离时,最后一个使用该 worktree 的活跃工作区被归档后,归档还会删除这个 worktree。
|
||||
|
||||
要保留运行结果,在应用的定时任务视图中打开该定时任务,关闭 **Archive on finish** 并保存。Paseo 会让每次运行的工作区和 Agent 保持活跃,直到你手动归档;在创建 Agent 之前就失败的运行仍会被清理。该选项同样适用于本地隔离;归档本地工作区不会删除项目目录。
|
||||
|
||||
存储的选项是 `target.config.archiveOnFinish`,一个布尔值,省略时默认为 `true`。CLI 和 MCP 的定时任务工具不提供这个选项;请在应用中修改。heartbeat 使用已有的 Agent,没有这个选项。
|
||||
|
||||
@@ -38,6 +38,8 @@ worktree 默认存放在 `$PASEO_HOME/worktrees/` 下,按源检出路径的哈
|
||||
3. 对照基础分支审查 diff
|
||||
4. 合并或归档该工作区;使用该 worktree 的最后一个工作区被归档后,Paseo 会运行 teardown 并删除 worktree
|
||||
|
||||
定时任务的运行默认会在结束时归档其工作区。在定时任务的应用表单中关闭 **Archive on finish**,即可[保留运行工作区](/docs/schedules#keep-run-workspaces)及其 worktree,直到你手动归档。
|
||||
|
||||
## 创建由 worktree 支撑的工作区 {#create-a-worktree-backed-workspace}
|
||||
|
||||
下面的示例以当前目录作为源检出。传入 `--path ~/dev/my-app` 可以从另一个检出创建工作区。
|
||||
|
||||
Reference in New Issue
Block a user