Compare commits

..
Author SHA1 Message Date
Mohamed Boudra 953264a3f9 fix(omp): give unanswered idle notices their own turns
An OMP extension UI notice issued while idle is a complete turn. Give it a fresh ID in the adapter so the existing timeline separates both adjacent executions.
2026-11-18 13:55:04 +01:00
Mohamed Boudra 18b39f195d fix(chat): keep replies visible across idle notices
Mark an OMP extension notice emitted outside a run so it cannot join adjacent turns. The background completion and its reply still carry the same turn ID.
2026-11-18 13:43:06 +01:00
76 changed files with 429 additions and 1516 deletions
+1 -1
View File
@@ -23,7 +23,6 @@
- **Plugin sidebar views:** Plugins can replace the sidebar with their own workspace and agent layout across connected hosts. Choose a view per device in Settings → Sidebar. ([#8906](https://github.com/getpaseo/paseo/pull/8906))
- **Plugin composer controls:** Plugins can add composer controls, edit drafts and attachments, and change agent settings. They can also add New workspace items and save metadata on agents and workspaces. ([#8744](https://github.com/getpaseo/paseo/pull/8744), [#9209](https://github.com/getpaseo/paseo/pull/9209), [#9207](https://github.com/getpaseo/paseo/pull/9207), [#9734](https://github.com/getpaseo/paseo/pull/9734) by [@michaelmwu](https://github.com/michaelmwu))
- **Arrange Usage cards:** Drag provider cards into your preferred order and turn off cards you do not want in the sidebar summary. Choose the host from Usage settings. ([#9660](https://github.com/getpaseo/paseo/pull/9660), [#9740](https://github.com/getpaseo/paseo/pull/9740), [#9748](https://github.com/getpaseo/paseo/pull/9748), [#9780](https://github.com/getpaseo/paseo/pull/9780))
- **fx provider:** Run [fx](https://paseo.sh/docs/supported-providers/fx), the coding agent from Vercel Labs, in Paseo. Add it from the provider catalog in Settings → Hosts → Providers. ([#9160](https://github.com/getpaseo/paseo/pull/9160))
- **Quieter app reopening:** Returning to an unchanged chat no longer flashes “Updating messages.” Paseo keeps healthy connections open and recovers dropped connections when you return. After reconnecting, an up-to-date chat no longer shows an extra update toast. ([#9242](https://github.com/getpaseo/paseo/pull/9242), [#8651](https://github.com/getpaseo/paseo/pull/8651), [#9086](https://github.com/getpaseo/paseo/pull/9086), [#8855](https://github.com/getpaseo/paseo/pull/8855), [#9116](https://github.com/getpaseo/paseo/pull/9116), [#9558](https://github.com/getpaseo/paseo/pull/9558) by [@adamcstephens](https://github.com/adamcstephens))
- **Rebuilt mobile chat:** Expanding turn summaries, todo cards and tool groups keeps your reading position on iOS and Android. Sending during a scroll moves to the new prompt. ([#8717](https://github.com/getpaseo/paseo/pull/8717), [#9085](https://github.com/getpaseo/paseo/pull/9085), [#9806](https://github.com/getpaseo/paseo/pull/9806), [#9693](https://github.com/getpaseo/paseo/pull/9693))
- **Faster diff loading:** Changes shows the file tree before file contents finish loading. Large diffs load in batches and take priority over background worktree scans. ([#8907](https://github.com/getpaseo/paseo/pull/8907), [#9241](https://github.com/getpaseo/paseo/pull/9241), [#9243](https://github.com/getpaseo/paseo/pull/9243), [#9584](https://github.com/getpaseo/paseo/pull/9584))
@@ -37,6 +36,7 @@
- Added a Change base picker for worktree diffs, commits and Git actions ([#8642](https://github.com/getpaseo/paseo/pull/8642), [#8934](https://github.com/getpaseo/paseo/pull/8934) by [@Myasuka](https://github.com/Myasuka))
- Added issue and pull request links that resolve SSH aliases and fork parent repositories ([#8636](https://github.com/getpaseo/paseo/pull/8636), [#9576](https://github.com/getpaseo/paseo/pull/9576))
- Added an iPhone Duo layout with the sidebar and workspace on opposite sides of the fold ([#8741](https://github.com/getpaseo/paseo/pull/8741), [#8901](https://github.com/getpaseo/paseo/pull/8901) by [@zeyugao](https://github.com/zeyugao))
- Added fx as a provider you can add from the provider catalog in Settings → Hosts → Providers ([#9160](https://github.com/getpaseo/paseo/pull/9160))
- Added background agents that stay out of tabs, notifications and default agent lists ([#8683](https://github.com/getpaseo/paseo/pull/8683))
- Added syntax highlighting for Terraform and HCL files (`.tf`, `.tfvars`, `.hcl`) ([#9106](https://github.com/getpaseo/paseo/pull/9106))
- Added `PASEO_WORKSPACE_ID` to each agent's environment so an agent can identify, rename or archive its own workspace ([#8939](https://github.com/getpaseo/paseo/pull/8939) by [@DTTerastar](https://github.com/DTTerastar))
+1 -1
View File
@@ -23,7 +23,6 @@
- **插件侧边栏视图**:插件可以用自己的布局替换侧边栏,展示已连接主机上的工作区和 Agent。在“设置 → 侧边栏”中为每台设备选择视图。 ([#8906](https://github.com/getpaseo/paseo/pull/8906))
- **插件 Composer 控件**:插件可以添加 Composer 控件、编辑草稿和附件,以及更改 Agent 设置。插件还可以添加“新建工作区”条目,并在 Agent 和工作区上保存元数据。 ([#8744](https://github.com/getpaseo/paseo/pull/8744), [#9209](https://github.com/getpaseo/paseo/pull/9209), [#9207](https://github.com/getpaseo/paseo/pull/9207), [#9734](https://github.com/getpaseo/paseo/pull/9734),贡献者:[@michaelmwu](https://github.com/michaelmwu))
- **排列用量卡片**:拖动 Provider 卡片来调整顺序,并关闭不想在侧边栏摘要中显示的卡片。在用量设置中选择主机。 ([#9660](https://github.com/getpaseo/paseo/pull/9660), [#9740](https://github.com/getpaseo/paseo/pull/9740), [#9748](https://github.com/getpaseo/paseo/pull/9748), [#9780](https://github.com/getpaseo/paseo/pull/9780))
- **fx Provider**:在 Paseo 中运行 Vercel Labs 的编程 Agent [fx](https://paseo.sh/zh-CN/docs/supported-providers/fx)。在“设置 → Hosts → 提供方”的 Provider 目录中添加。 ([#9160](https://github.com/getpaseo/paseo/pull/9160))
- **返回应用时更少提示**:返回没有变化的聊天时,不再闪现“正在更新消息”。Paseo 会保留可用的连接,并在你返回时恢复断开的连接。重连后,已是最新状态的聊天也不再显示额外的更新提示。 ([#9242](https://github.com/getpaseo/paseo/pull/9242), [#8651](https://github.com/getpaseo/paseo/pull/8651), [#9086](https://github.com/getpaseo/paseo/pull/9086), [#8855](https://github.com/getpaseo/paseo/pull/8855), [#9116](https://github.com/getpaseo/paseo/pull/9116), [#9558](https://github.com/getpaseo/paseo/pull/9558),贡献者:[@adamcstephens](https://github.com/adamcstephens))
- **重建移动端聊天**:在 iOS 和 Android 上展开轮次摘要、待办卡片和工具组时,阅读位置保持不变。滚动期间发送消息会移到新提示词处。 ([#8717](https://github.com/getpaseo/paseo/pull/8717), [#9085](https://github.com/getpaseo/paseo/pull/9085), [#9806](https://github.com/getpaseo/paseo/pull/9806), [#9693](https://github.com/getpaseo/paseo/pull/9693))
- **更快的 diff 加载**:“更改”在文件内容加载完成前先显示文件树。大型 diff 分批加载,且优先于后台 worktree 扫描。 ([#8907](https://github.com/getpaseo/paseo/pull/8907), [#9241](https://github.com/getpaseo/paseo/pull/9241), [#9243](https://github.com/getpaseo/paseo/pull/9243), [#9584](https://github.com/getpaseo/paseo/pull/9584))
@@ -37,6 +36,7 @@
- 为 worktree 的 diff、提交和 Git 操作新增基准分支选择器(Change base) ([#8642](https://github.com/getpaseo/paseo/pull/8642), [#8934](https://github.com/getpaseo/paseo/pull/8934),贡献者:[@Myasuka](https://github.com/Myasuka))
- 新增可解析 SSH 别名和 fork 上游仓库的 Issue 和 PR 链接 ([#8636](https://github.com/getpaseo/paseo/pull/8636), [#9576](https://github.com/getpaseo/paseo/pull/9576))
- 新增 iPhone Duo 布局,侧边栏和工作区分列折痕两侧 ([#8741](https://github.com/getpaseo/paseo/pull/8741), [#8901](https://github.com/getpaseo/paseo/pull/8901),贡献者:[@zeyugao](https://github.com/zeyugao))
- 新增 fx Provider,可在“设置 → Hosts → 提供方”的 Provider 目录中添加 ([#9160](https://github.com/getpaseo/paseo/pull/9160))
- 新增后台 Agent,不占用标签页、不发送通知,也不出现在默认 Agent 列表中 ([#8683](https://github.com/getpaseo/paseo/pull/8683))
- 新增 Terraform 和 HCL 文件(`.tf`、`.tfvars`、`.hcl`)的语法高亮 ([#9106](https://github.com/getpaseo/paseo/pull/9106))
- 在每个 Agent 的环境中新增 `PASEO_WORKSPACE_ID`,Agent 可据此识别、重命名或归档自己的工作区 ([#8939](https://github.com/getpaseo/paseo/pull/8939),贡献者:[@DTTerastar](https://github.com/DTTerastar))
+2 -6
View File
@@ -91,12 +91,8 @@ You need at least one agent CLI installed and configured with your credentials:
- [GitHub Copilot](https://github.com/features/copilot/cli/)
- [OpenCode](https://github.com/anomalyco/opencode)
- [Pi](https://pi.dev)
- [Antigravity](https://paseo.sh/docs/supported-providers/antigravity)
- [Muse Code](https://paseo.sh/docs/supported-providers/muse-code)
- [fx](https://paseo.sh/docs/supported-providers/fx)
- [Hoplite](https://paseo.sh/docs/supported-providers/hoplite)
Paseo also runs Cursor, Gemini CLI, and many other agents. See [Supported providers](https://paseo.sh/docs/supported-providers) for the full list and setup steps.
- [Antigravity](https://paseo.sh/docs/supported-providers#antigravity)
- [Muse Code](https://paseo.sh/docs/muse-code)
### Desktop app (recommended)
+1 -1
View File
@@ -24,7 +24,7 @@ Math and video are disabled. Task lists and admonitions are enabled; task checkb
Mermaid fences use the existing isolated diagram runtime and fullscreen viewer. Web dispatches them through the library’s code-block override. Native has no block-renderer hook, so the renderer extracts only Mermaid fences and places the existing WebView host between library-rendered segments. This is the only block exception; see [native selection limitations](native-text-selection.md) for diagram grouping and leading inline images. Streaming keeps the last valid diagram visible while the next revision renders.
Native code blocks use the library's copy control and compiled grammars. Web code blocks use `HighlightedCodeBlock` through the library's `renderers.codeBlock` override. Selection copy has to tell links Paseo recognized in the text (paths, forge references, code spans) from links in the Markdown, so the web link renderer marks the recognized ones. Plain-text paste carries them as the text the reply showed, and rich paste keeps them as links only when they point to an `http` or `https` URL. Authored links and parser autolinks such as a bare `www.example.com` copy as links. The patch also keeps the library's block spacing around the web code block override, preserves web list numbering and link titles, marks pending parses with `aria-busy` so Find waits for rendered text, and carries link syntax through native and web tap events. Web inline code inside a link inherits only the link colour; its code font, size and background stay intact. Keep link variants colour-only: native pills replace text runs and prevent paths from wrapping; Android pills also use the surrounding block’s font size. The package patch is tracked by [upstream PR #997](https://github.com/software-mansion/enriched-markdown/pull/997); remove the patch when the pinned release includes it.
Native code blocks use the library's copy control and compiled grammars. Web code blocks use `HighlightedCodeBlock` through the library's `renderers.codeBlock` override. The patch also keeps the library's block spacing around the web code block override, preserves web list numbering and link titles, marks pending parses with `aria-busy` so Find waits for rendered text, and carries link syntax through native and web tap events. Web inline code inside a link inherits only the link colour; its code font, size and background stay intact. Keep link variants colour-only: native pills replace text runs and prevent paths from wrapping; Android pills also use the surrounding block’s font size. The package patch is tracked by [upstream PR #997](https://github.com/software-mansion/enriched-markdown/pull/997); remove the patch when the pinned release includes it.
The package patch also keeps overflowing native horizontal blocks in control of their drags: Android claims parent interception at touch-down and releases it for vertical drags so the chat list can scroll; iOS keeps its scroll recognizer active for outward drags at the leading edge. This prevents compact sidebar pans from taking block scrolling without changing sidebar swipes on prose or non-overflowing blocks. Native changes require a client rebuild.
+1 -1
View File
@@ -129,7 +129,7 @@ availability and a diagnostic after the daemon resolves the executable. Configur
environment, or enablement overrides under `agents.providers.muse`. Omit `extends` to keep
the bundled integration; an entry with `extends` shadows it with a custom provider. See
[provider contributions](#contribute-a-provider) for the contract and
[Muse Code](../public-docs/supported-providers/muse-code.md) for setup, per-agent options, and version limitations.
[Muse Code](../public-docs/muse-code.md) for setup, per-agent options, and version limitations.
## Install from a registry
+2 -2
View File
@@ -19,8 +19,8 @@ provider icon map. You do not need a core manifest entry or provider factory.
| Provider | Transport | Setup and limitations |
| ----------- | ------------------------------------------ | ---------------------------------------------------------------- |
| Antigravity | Installed `agy` CLI | [Antigravity](../public-docs/supported-providers/antigravity.md) |
| Muse Code | MSP over one `muse serve` host per session | [Muse Code](../public-docs/supported-providers/muse-code.md) |
| Antigravity | Installed `agy` CLI | [Antigravity](../public-docs/supported-providers.md#antigravity) |
| Muse Code | MSP over one `muse serve` host per session | [Muse Code](../public-docs/muse-code.md) |
## Provider-native session options
@@ -72,12 +72,14 @@ const ASSISTANT_MARKDOWN = [
"| Current \\| active | ~~obsolete~~ | ready |",
].join("\n");
// text/plain carries the selection as displayed, so an inline code span the renderer
// linked copies without its destination.
const EXPECTED_WHOLE_SELECTION_TEXT = ASSISTANT_MARKDOWN.replace(
const EXPECTED_WHOLE_SELECTION_MARKDOWN = ASSISTANT_MARKDOWN.replace(
"www.example.com stays",
"[www.example.com](http://www.example.com) stays",
)
.replace(
"`https://example.com/generated` stays",
"[`https://example.com/generated`](https://example.com/generated) stays",
)
.replace(`${CROSS_STRUCTURE_MARKDOWN}\n\n`, "")
.replace(
"<https://autolink.example.com>",
@@ -420,7 +422,7 @@ test("copying an assistant selection preserves Markdown structure and links", as
await copySelection(page);
const clipboard = await readRichClipboard(page);
expect(clipboard.plainText).toBe(EXPECTED_WHOLE_SELECTION_TEXT);
expect(clipboard.plainText).toBe(EXPECTED_WHOLE_SELECTION_MARKDOWN);
expect(clipboard.html).not.toContain("<ul>");
expect(clipboard.html).not.toContain("<li>");
expect(clipboard.html).toContain("<div>- ");
@@ -686,77 +688,6 @@ test("copying an assistant selection preserves Markdown structure and links", as
}
});
test("pasting an assistant selection preserves literal underscores and authored links", async ({
context,
page,
}) => {
const agent = await seedMockAgentWorkspace({
repoPrefix: "assistant-selection-paste-",
title: "Assistant selection paste",
initialPrompt: "Render the paste fixture.",
featureValues: {
mockAssistantResponse:
"Keep \\_literal\\_ and `https://example.com/generated` beside [the docs](https://example.com/docs).",
},
});
try {
await allowRichClipboard(context);
await agent.client.waitForAgentUpsert(
agent.agentId,
(snapshot) => snapshot.status === "idle",
30_000,
);
await openAgentRoute(page, agent);
const message = assistantMessageBlocks(page);
await expect(message.locator('a[href="https://example.com/generated"]')).toHaveText(
"https://example.com/generated",
);
await selectAssistantTextRange(page, "Keep _literal_", "the docs.");
await copySelection(page);
await page.evaluate(() => {
const fields = document.createElement("div");
fields.style.cssText =
"position: fixed; bottom: 0; left: 0; z-index: 10000; background: white";
const plainText = document.createElement("textarea");
plainText.setAttribute("aria-label", "Plain text paste");
const richText = document.createElement("div");
richText.contentEditable = "true";
richText.setAttribute("role", "textbox");
richText.setAttribute("aria-label", "Rich text paste");
fields.append(plainText, richText);
document.body.append(fields);
});
const plainText = page.getByRole("textbox", { name: "Plain text paste" });
await plainText.focus();
await page.keyboard.press("ControlOrMeta+v");
await expect(plainText).toHaveValue(
"Keep _literal_ and `https://example.com/generated` beside [the docs](https://example.com/docs).",
);
const richText = page.getByRole("textbox", { name: "Rich text paste" });
await richText.focus();
await page.keyboard.press("ControlOrMeta+v");
await expect(richText).toHaveText(
"Keep _literal_ and https://example.com/generated beside the docs.",
);
await expect(richText.locator("code")).toHaveText("https://example.com/generated");
await expect(richText.getByRole("link")).toHaveCount(2);
await expect(
richText.getByRole("link", { name: "https://example.com/generated" }),
).toHaveAttribute("href", "https://example.com/generated");
await expect(richText.getByRole("link", { name: "the docs" })).toHaveAttribute(
"href",
"https://example.com/docs",
);
} finally {
await agent.cleanup();
}
});
test("copying a selection across an assistant image keeps its Markdown source and alt text", async ({
context,
page,
@@ -23,8 +23,6 @@ import {
outlastUndoWindow,
pressArchiveShortcut,
pressUndoShortcut,
readSidebarListLayout,
recordLastRowBottomPerFrame,
resizeSidebarToMinimum,
rowArchiveButton,
rowKebab,
@@ -123,7 +121,7 @@ test.describe("Workspace archive undo", () => {
expect(shortcutBox.x - (labelBox.x + labelBox.width)).toBeLessThanOrEqual(8.5);
});
test("a long list scrolls its last row clear of the toast, and settles back smoothly after it", async ({
test("a long list ends just below its last row, and the toast over it moves no row", async ({
page,
}) => {
await page.clock.install({ time: Date.now() });
@@ -138,35 +136,18 @@ test.describe("Workspace archive undo", () => {
const worktree = await seedWorktree(page, "archive-toast-long-list");
const resting = await scrollSidebarListToEnd(page);
const restingEndGap = resting.listBottom - resting.rowBottoms.at(-1)!;
expect(restingEndGap).toBeLessThan(resting.rowHeight);
expect(resting.listBottom - resting.rowBottoms.at(-1)!).toBeLessThan(resting.rowHeight);
await archiveFromRowButton(page, worktree.workspaceId);
await page.mouse.move(0, 0);
const withToast = await scrollSidebarListToEnd(page);
const toastBox = await archivedToast(page).boundingBox();
if (!toastBox) throw new Error("Toast is not laid out");
// The list keeps its usual end gap, measured from the toast's top instead of its own bottom.
await expect
.poll(async () => {
const layout = await scrollSidebarListToEnd(page);
return Math.round(toastBox.y - layout.rowBottoms.at(-1)!);
})
.toBe(Math.round(restingEndGap));
expect(toastBox.y + toastBox.height).toBeLessThanOrEqual(withToast.listBottom);
const frames = recordLastRowBottomPerFrame(page, 40);
await outlastUndoWindow(page);
const bottoms = await frames;
await expect(archivedToast(page)).toHaveCount(0);
// Without scrolling again, the list ends just below its last row once more.
const settled = await readSidebarListLayout(page);
expect(settled.listBottom - settled.rowBottoms.at(-1)!).toBeCloseTo(restingEndGap, 0);
// The rows travel down by the toast's height over several frames, never in one jump.
const travel = bottoms.at(-1)! - bottoms[0]!;
expect(travel).toBeGreaterThan(toastBox.height);
const steps = bottoms.slice(1).map((bottom, index) => bottom - bottoms[index]!);
expect(Math.min(...steps)).toBeGreaterThanOrEqual(0);
expect(Math.max(...steps)).toBeLessThan(travel / 2);
expect(await scrollSidebarListToEnd(page)).toEqual(withToast);
} finally {
for (const projectId of fillerProjectIds) {
await client.removeProject(projectId).catch(() => undefined);
@@ -3,7 +3,6 @@ import { gotoAppShell } from "../support/helpers/app";
import { getServerId } from "../support/helpers/server-id";
import { seedWorkspace } from "../support/helpers/seed-client";
import { waitForSidebarHydration } from "../support/helpers/workspace-ui";
import { openWorkspaceSidebarKebab } from "../support/helpers/sidebar";
import { daemonWsRoutePattern } from "../support/helpers/daemon-port";
interface SessionEnvelope {
@@ -115,7 +114,11 @@ async function expectAssigned(
}
async function openWorkspaceLabels(page: import("@playwright/test").Page, workspaceId: string) {
const serverId = await openWorkspaceSidebarKebab(page, workspaceId);
const serverId = getServerId();
const row = page.getByTestId(`sidebar-workspace-row-${serverId}:${workspaceId}`).first();
await expect(row).toBeVisible({ timeout: 30_000 });
await row.hover();
await page.getByTestId(`sidebar-workspace-kebab-${serverId}:${workspaceId}`).first().click();
await page.getByTestId(`sidebar-workspace-menu-labels-${serverId}:${workspaceId}`).click();
await expect(page.getByTestId("workspace-label-picker-create")).toBeVisible();
}
+5 -16
View File
@@ -190,25 +190,14 @@ export async function selectWorkspaceInSidebar(page: Page, workspaceId: string):
await row.click();
}
/**
* Opens a workspace row's kebab menu the way a pointer does: enter the row, then press the kebab
* it reveals.
*
* The kebab only mounts while the row holds hover, and hover only arrives on pointerenter. A row
* that re-renders or shifts under a parked pointer drops that hover with no new pointerenter to
* restore it, so each attempt leaves the row and enters it again instead of waiting on a kebab
* that a still pointer cannot bring back.
*/
export async function openWorkspaceSidebarKebab(page: Page, workspaceId: string) {
async function openWorkspaceSidebarKebab(page: Page, workspaceId: string) {
const serverId = getServerId();
const row = page.getByTestId(`sidebar-workspace-row-${serverId}:${workspaceId}`);
const kebab = page.getByTestId(`sidebar-workspace-kebab-${serverId}:${workspaceId}`);
await expect(row).toBeVisible({ timeout: 30_000 });
await expect(async () => {
await page.mouse.move(0, 0);
await row.hover();
await expect(kebab).toBeVisible({ timeout: 2_000 });
}).toPass({ timeout: 15_000 });
await row.hover();
const kebab = page.getByTestId(`sidebar-workspace-kebab-${serverId}:${workspaceId}`);
await expect(kebab).toBeVisible({ timeout: 10_000 });
await kebab.click();
return serverId;
@@ -175,19 +175,13 @@ export interface SidebarListLayout {
rowHeight: number;
}
const SIDEBAR_LIST = "sidebar-project-workspace-list-scroll";
/** Scrolls the sidebar's workspace list to its end and reads where its rows sit. */
export async function scrollSidebarListToEnd(page: Page): Promise<SidebarListLayout> {
await page.getByTestId(SIDEBAR_LIST).evaluate((element) => {
const list = page.getByTestId("sidebar-project-workspace-list-scroll");
await list.evaluate((element) => {
element.scrollTop = element.scrollHeight;
});
return readSidebarListLayout(page);
}
/** Reads where the sidebar list's rows sit, without scrolling it. */
export async function readSidebarListLayout(page: Page): Promise<SidebarListLayout> {
return page.getByTestId(SIDEBAR_LIST).evaluate((element) => {
return list.evaluate((element) => {
const visible = element.getBoundingClientRect();
const rows = Array.from(
element.querySelectorAll<HTMLElement>(
@@ -203,26 +197,3 @@ export async function readSidebarListLayout(page: Page): Promise<SidebarListLayo
};
});
}
/**
* Starts recording the bottom edge of the sidebar list's last row once per painted frame.
* Resolves with one value per frame after `frameCount` frames.
*/
export function recordLastRowBottomPerFrame(page: Page, frameCount: number): Promise<number[]> {
return page.getByTestId(SIDEBAR_LIST).evaluate(
(element, count) =>
new Promise<number[]>((resolve) => {
const bottoms: number[] = [];
const sample = () => {
const rows = element.querySelectorAll<HTMLElement>(
'[data-testid^="sidebar-workspace-row-"],[data-testid^="sidebar-project-row-"]',
);
bottoms.push(Math.max(...Array.from(rows, (row) => row.getBoundingClientRect().bottom)));
if (bottoms.length >= count) resolve(bottoms);
else requestAnimationFrame(sample);
};
requestAnimationFrame(sample);
}),
frameCount,
);
}
@@ -851,94 +851,6 @@ it("copies a selection inside semantic inline code without Markdown escaping", (
);
});
it("keeps intraword underscores in prose unescaped", () => {
const message = mountFixture();
message.innerHTML = "<p>Set max_retries and snake_case before the call.</p>";
const paragraph = fixtureElement(message, "p");
expect(createAssistantSelectionClipboardContent(selectNodeContents(paragraph))?.plainText).toBe(
"Set max_retries and snake_case before the call.",
);
});
it("copies literal paired underscores raw in text/plain and escaped in text/html", () => {
const message = mountFixture();
message.innerHTML = "<p>literal _word_ stays literal</p>";
const paragraph = fixtureElement(message, "p");
const content = createAssistantSelectionClipboardContent(selectNodeContents(paragraph));
expect(content?.plainText).toBe("literal _word_ stays literal");
expect(content?.html).toContain("literal _word_ stays literal");
});
it("copies a path the renderer recognized as text, and an authored link as a link", () => {
const message = mountFixture();
message.innerHTML =
'<p>See <a href="src/index.ts" data-paseo-markdown-recognized-link="true">src/index.ts</a> and <a href="https://example.test/doc">the doc</a>.</p>';
const content = createAssistantSelectionClipboardContent(selectNodeContents(message));
expect(content?.plainText).toBe("See src/index.ts and [the doc](https://example.test/doc).");
expect(content?.html).not.toContain('href="src/index.ts"');
});
it("copies a recognized inline-code path without its link", () => {
const message = mountFixture();
message.innerHTML =
'<p>Edited <a href="src/app.tsx" data-paseo-markdown-recognized-link="true"><code>src/app.tsx</code></a> today.</p>';
const content = createAssistantSelectionClipboardContent(selectNodeContents(message));
expect(content?.plainText).toBe("Edited `src/app.tsx` today.");
expect(content?.html).not.toContain('href="src/app.tsx"');
});
it("copies a recognized web link as its text in text/plain and as a link in text/html", () => {
const message = mountFixture();
message.innerHTML =
'<p>Fixed in <a href="https://github.com/o/r/issues/12" data-paseo-markdown-recognized-link="true">#12</a> today.</p>';
const content = createAssistantSelectionClipboardContent(selectNodeContents(message));
expect(content?.plainText).toBe("Fixed in #12 today.");
expect(content?.html).toContain('<a href="https://github.com/o/r/issues/12">#12</a>');
});
it("copies a recognized Windows drive path as text in both clipboard flavors", () => {
const message = mountFixture();
message.innerHTML =
'<p>Open <a href="C:%5Crepo%5Csrc%5Cx.ts" data-paseo-markdown-recognized-link="true">C:\\repo\\src\\x.ts</a> now.</p>';
const content = createAssistantSelectionClipboardContent(selectNodeContents(message));
expect(content?.plainText).toBe("Open C:\\repo\\src\\x.ts now.");
expect(content?.html).not.toContain("<a ");
});
it("keeps literal angle brackets around a URL in text/html", () => {
const message = mountFixture();
message.innerHTML = "<p>Open &lt;http://localhost:3000&gt; before the call.</p>";
const content = createAssistantSelectionClipboardContent(selectNodeContents(message));
expect(content?.plainText).toBe("Open <http://localhost:3000> before the call.");
expect(content?.html).toContain("<p>Open &lt;http://localhost:3000&gt; before the call.</p>");
});
it("keeps a heading marker split across inline elements literal in text/html", () => {
const message = mountFixture();
message.innerHTML = "<p>Use <strong>C#</strong> for the service layer.</p>";
const paragraph = fixtureElement(message, "p");
const range = document.createRange();
range.setStart(textNode(fixtureElement(message, "strong")), 1);
range.setEnd(paragraph.lastChild!, paragraph.lastChild!.textContent!.length);
const selection = window.getSelection()!;
selection.removeAllRanges();
selection.addRange(range);
const content = createAssistantSelectionClipboardContent(selection);
expect(content?.plainText).toBe("# for the service layer.");
expect(content?.html).toContain("<p># for the service layer.</p>");
});
it("keeps table cell pipes escaped in text/plain table syntax and literal in text/html", () => {
const message = mountFixture();
message.innerHTML =
"<table><thead><tr><th>Header | label</th></tr></thead><tbody><tr><td>Value | detail</td></tr></tbody></table>";
const content = createAssistantSelectionClipboardContent(selectNodeContents(message));
expect(content?.plainText).toContain("Header \\| label");
expect(content?.plainText).toContain("Value \\| detail");
expect(content?.html).toContain("<th>Header | label</th>");
expect(content?.html).toContain("<td>Value | detail</td>");
});
it("copies a workspace image path instead of its temporary display URL", () => {
const message = mountFixture();
const sources = JSON.stringify({ "blob:preview": "assets/chart.png" });
@@ -2,7 +2,7 @@ import TurndownService from "turndown";
import { gfm } from "turndown-plugin-gfm";
import {
createCodeClipboardContent,
createSelectionClipboardContent,
createMarkdownClipboardContent,
type MarkdownClipboardContent,
} from "@/utils/rich-clipboard";
import {
@@ -15,7 +15,6 @@ import {
MARKDOWN_COPY_LIST_START_ATTRIBUTE,
MARKDOWN_COPY_SRC_ATTRIBUTE,
MARKDOWN_COPY_TAG_ATTRIBUTE,
MARKDOWN_COPY_RECOGNIZED_LINK_ATTRIBUTE,
MARKDOWN_COPY_UNWRAP_ATTRIBUTE,
TRAILING_CODE_LINE_BREAKS,
} from "./markup";
@@ -57,68 +56,40 @@ function copySemanticAttributes(original: Element, copy: Element): void {
}
}
function createTurndown(flavor: "markdown" | "plain"): TurndownService {
const turndown = new TurndownService({
bulletListMarker: "-",
codeBlockStyle: "fenced",
emDelimiter: "_",
strongDelimiter: "**",
});
turndown.use(gfm);
// text/plain still carries tables as GFM syntax, so a cell's pipe stays escaped there.
turndown.addRule("escapedGfmTableCell", {
filter: ["th", "td"],
replacement: (content, node) => {
const index = node.parentNode ? Array.from(node.parentNode.childNodes).indexOf(node) : 0;
const prefix = index === 0 ? "| " : " ";
return `${prefix}${content.replace(/\|/g, "\\|")} |`;
},
});
// A link Paseo recognized pastes as the text the reply showed. Rich paste keeps it as a
// link when it points to a web page, such as a forge reference.
turndown.addRule("recognizedLink", {
filter: (node) =>
node.nodeName === "A" &&
node.hasAttribute(MARKDOWN_COPY_RECOGNIZED_LINK_ATTRIBUTE) &&
(flavor === "plain" || !isWebUrl(node.getAttribute("href") ?? "")),
replacement: (content) => content,
});
if (flavor === "markdown") {
// Turndown leaves `<` unescaped, so displayed text such as `<http://localhost>`
// would render back into text/html as an autolink.
const escapeMarkdown = turndown.escape.bind(turndown);
turndown.escape = (text) => escapeMarkdown(text).replace(/</g, "\\<");
} else {
turndown.escape = (text) => text;
}
turndown.addRule("gfmStrikethrough", {
filter: ["del", "s"],
replacement: (content) => `~~${content}~~`,
});
turndown.addRule("compactListItem", {
filter: "li",
replacement: (content, node, options) => {
const item = content
.replace(/^\n+/, "")
.replace(/\n+$/, "\n")
// Every non-empty line, so indented code lines stay inside the item.
.replace(/\n(?=[^\n])/g, "\n ");
const parent = node.parentElement;
if (parent?.nodeName !== "OL") {
return `${options.bulletListMarker} ${item}\n`;
}
return `${node.getAttribute("value")}. ${item}\n`;
},
});
return turndown;
}
function isWebUrl(href: string): boolean {
return /^https?:\/\//i.test(href);
}
const markdownTurndown = createTurndown("markdown");
const plainTurndown = createTurndown("plain");
const turndown = new TurndownService({
bulletListMarker: "-",
codeBlockStyle: "fenced",
emDelimiter: "_",
strongDelimiter: "**",
});
turndown.use(gfm);
turndown.addRule("escapedGfmTableCell", {
filter: ["th", "td"],
replacement: (content, node) => {
const index = node.parentNode ? Array.from(node.parentNode.childNodes).indexOf(node) : 0;
const prefix = index === 0 ? "| " : " ";
return `${prefix}${content.replace(/\|/g, "\\|")} |`;
},
});
turndown.addRule("gfmStrikethrough", {
filter: ["del", "s"],
replacement: (content) => `~~${content}~~`,
});
turndown.addRule("compactListItem", {
filter: "li",
replacement: (content, node, options) => {
const item = content
.replace(/^\n+/, "")
.replace(/\n+$/, "\n")
// Every non-empty line, so indented code lines stay inside the item.
.replace(/\n(?=[^\n])/g, "\n ");
const parent = node.parentElement;
if (parent?.nodeName !== "OL") {
return `${options.bulletListMarker} ${item}\n`;
}
return `${node.getAttribute("value")}. ${item}\n`;
},
});
export function createAssistantSelectionClipboardContent(
selection: Selection | null,
@@ -146,15 +117,11 @@ export function createAssistantSelectionClipboardContent(
}
restoreMarkdownElements(container);
const markdown = markdownTurndown.turndown(container).trim();
const markdown = turndown.turndown(container.innerHTML).trim();
if (!markdown) {
return null;
}
// text/plain carries unescaped Markdown: a plain target shows backslashes literally.
// text/html is rendered from escaped Markdown, so literal Markdown characters stay
// literal in a rich target.
const plainText = plainTurndown.turndown(container).trim();
const content = createSelectionClipboardContent(markdown, plainText);
const content = createMarkdownClipboardContent(markdown);
return { ...content, html: flattenClipboardListMarkup(content.html) };
}
@@ -684,15 +651,13 @@ function restoreMarkdownElements(container: HTMLElement): void {
for (const element of presentational.toReversed()) {
element.replaceWith(...element.childNodes);
}
// Turndown escapes line-start Markdown per text node, so text split by an unwrapped
// element, such as `#` and ` for`, has to be one node to keep `# for` literal.
container.normalize();
}
/**
* Assign item numbers before passing the DOM to Turndown. A partly selected item
* still takes its original list position when copied as a paragraph, so the following
* items keep their numbers.
* Each item carries its number before Turndown re-parses the HTML. Until then every
* child of the list is one item, including a partly selected item demoted to a `p`.
* The parser splits a `p` that holds a code block into several siblings, so counting
* siblings afterwards numbers the next item too high.
*/
function numberOrderedListItems(list: Element, start: number): void {
Array.from(list.children).forEach((child, index) => {
@@ -2,8 +2,6 @@ export const MARKDOWN_COPY_TAG_ATTRIBUTE = "data-paseo-markdown-tag";
export const MARKDOWN_COPY_IGNORE_ATTRIBUTE = "data-paseo-markdown-ignore";
export const MARKDOWN_COPY_LIST_MARKER_ATTRIBUTE = "data-paseo-markdown-list-marker";
export const MARKDOWN_COPY_UNWRAP_ATTRIBUTE = "data-paseo-markdown-unwrap";
/** A link Paseo recognized in the reply text, as opposed to one the Markdown wrote. */
export const MARKDOWN_COPY_RECOGNIZED_LINK_ATTRIBUTE = "data-paseo-markdown-recognized-link";
export const MARKDOWN_COPY_LIST_START_ATTRIBUTE = "data-paseo-markdown-list-start";
export const MARKDOWN_COPY_LANGUAGE_ATTRIBUTE = "data-paseo-markdown-language";
export const MARKDOWN_COPY_ALIGN_ATTRIBUTE = "data-paseo-markdown-align";
@@ -13,7 +13,7 @@ import { decodeMarkdownImage, getMarkdownImageStatus } from "./image-decoding";
import { describe, expect, it } from "vitest";
import { darkTheme, lightTheme } from "@/styles/theme";
import { createMarkdownStyles } from "./styles";
import { isRecognizedLink, prepareMarkdownSource, PENDING_MARKDOWN_IMAGE } from "./source";
import { prepareMarkdownSource, PENDING_MARKDOWN_IMAGE } from "./source";
import { normalizeMarkdownHtml } from "./html";
it("recognizes complete known commands in inline code", () => {
@@ -38,13 +38,6 @@ it("resolves authored root-relative links only when the target is a known comman
expect(matchCommandLink("https://example.com/code-review", "markdown", names)).toBeNull();
});
it("treats only a parsed path or code span as a link the author did not write", () => {
expect(isRecognizedLink({ sourceType: "text" })).toBe(true);
expect(isRecognizedLink({ sourceType: "inline-code" })).toBe(true);
expect(isRecognizedLink({ sourceType: "markdown" })).toBe(false);
expect(isRecognizedLink({})).toBe(false);
});
describe("shared Markdown source adaptation", () => {
it("keeps paragraphs, fences and quotes together for the library", () => {
const source = "First paragraph.\n\nSecond paragraph.\n\n```ts\nconst n = 1;\n```\n\n> Quote";
@@ -1,61 +0,0 @@
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { act } from "react";
import { createRoot, type Root } from "react-dom/client";
import { afterEach, beforeEach, expect, it } from "vitest";
import { i18n } from "@/i18n/i18next";
import { WEB_RENDERERS } from "./renderers.web";
const Link = WEB_RENDERERS.link;
const LINK_TEXT = "src/index.ts";
let root: Root;
let container: HTMLDivElement;
beforeEach(async () => {
await i18n.changeLanguage("en");
container = document.createElement("div");
document.body.append(container);
root = createRoot(container);
});
afterEach(() => {
act(() => root.unmount());
container.remove();
});
function anchorPropsFor(url: string) {
return { href: url };
}
function renderAnchor(link: { url: string; sourceType?: "markdown" | "text" | "inline-code" }) {
if (!Link) {
throw new Error("Expected a web link renderer");
}
const anchorProps = anchorPropsFor(link.url);
const client = new QueryClient();
act(() =>
root.render(
<QueryClientProvider client={client}>
<Link link={link} anchorProps={anchorProps}>
{LINK_TEXT}
</Link>
</QueryClientProvider>,
),
);
const anchor = container.querySelector("a");
if (!anchor) {
throw new Error("Expected a rendered link");
}
return anchor;
}
it("marks a link it recognized from a path for selection copy", () => {
const anchor = renderAnchor({ url: LINK_TEXT, sourceType: "text" });
expect(anchor.getAttribute("href")).toBe(LINK_TEXT);
expect(anchor.getAttribute("data-paseo-markdown-recognized-link")).toBe("true");
});
it("leaves an authored link wrapped", () => {
const anchor = renderAnchor({ url: "https://example.test/doc", sourceType: "markdown" });
expect(anchor.hasAttribute("data-paseo-markdown-recognized-link")).toBe(false);
});
@@ -7,13 +7,12 @@ import type {
} from "react-native-enriched-markdown";
import { StyleSheet, withUnistyles } from "react-native-unistyles";
import { useFileLink } from "@/assistant-file-links";
import { MARKDOWN_COPY_RECOGNIZED_LINK_ATTRIBUTE } from "@/assistant-selection-copy/markup";
import { useForgeShorthand } from "@/git/forge-shorthand";
import { Tooltip, TooltipTrigger, TooltipContent } from "@/components/ui/tooltip";
import { HighlightedCodeBlock } from "@/components/highlighted-code-block";
import type { Theme } from "@/styles/theme";
import { MermaidFence } from "./fence/mermaid";
import { isRecognizedLink, markdownLinkSource } from "./source";
import { markdownLinkSource } from "./source";
const ThemedCodeBlock = withUnistyles(HighlightedCodeBlock);
const codeStyle = (theme: Theme) => ({
@@ -51,18 +50,9 @@ function WebLink({ link, anchorProps, children }: LinkRendererProps) {
}),
[anchorProps.style, hovered],
);
// Selection copy pastes a link Paseo recognized as the text the reply showed.
const recognized = isRecognizedLink(link);
const copyAnchorProps = useMemo(
() =>
recognized
? { ...anchorProps, [MARKDOWN_COPY_RECOGNIZED_LINK_ATTRIBUTE]: "true" }
: anchorProps,
[anchorProps, recognized],
);
const anchor = (
<a
{...copyAnchorProps}
{...anchorProps}
href={forgeUrl ?? anchorProps.href}
style={anchorStyle}
onMouseEnter={handleMouseEnter}
+1 -11
View File
@@ -111,25 +111,15 @@ function collectInlineCodePaths(
return paths;
}
type LinkSourceType = "markdown" | "text" | "inline-code";
export function markdownLinkSource(
url: string,
sourceType?: LinkSourceType,
sourceType?: "markdown" | "text" | "inline-code",
): AssistantFileLinkSource {
if (sourceType === "inline-code") return { href: url, text: url, sourceType };
if (sourceType === "text") return { href: url, text: url, markup: "linkify" };
return { href: url, text: url };
}
/**
* Link recognition classifies matches as `text` or `inline-code`. The renderer
* classifies parser autolinks such as `www.example.com` as `markdown`.
*/
export function isRecognizedLink(link: { sourceType?: LinkSourceType }): boolean {
return link.sourceType === "text" || link.sourceType === "inline-code";
}
// Generated by scripts/generate-markdown-image-placeholder.mjs; reserves the image box.
export const PENDING_MARKDOWN_IMAGE =
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAKACAYAAAAMzckjAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKBklEQVR42u3dXWscVRgH8ElFLK032tiCN1nSEiiowdKAn8DY2rR+AG965Qt4Y24Sm91kd5tN1ogQaGzzFfIl43Nki+s4u+m+ZWfC7weH0M6Z2QPn5s8zc87JMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgKvm/Px8YXd3d7Hdbi/Ns6UxxHAWzAgAwIxE4LrebDafxd/f9/b2TkvSujGep2lsZggAYIr29/c/iZDVKlHwy7dmryIIAEA2hcpfo9Folzj89YdAlUAAgEml174VCH//tBjrhhkDAMgmXvDxn2/+4t+von0dbXmOC0CW6/X6ehpL/9iiUtnNLAwBAMgmef27mK+ypfCXlac6uZ4fX6fTuWXmAADGD4C1fMCKCtzdsowvjaUgoNbMHADA+AFwuSBgLRsfAIAAmL/vRrSVVqu1mipy0a4JgAAAVzAAbm9v34nrP0a/17l7/oz25PT09H0BEADgigTAnZ2d+3H9eNg2LXHvb9E+FAABACoeAFPl76Lw13f/r9mUtmoRAAEA5hQAe69933nD5uj/UAAEAKhoAOwt+Pgr1+cwFoB8Hn9vx159j+Lvm9xzfhEAAQCqGwBXCvp80d8n/u957vofAiAAQEUDYCz+WC3oczv3nMe5I9tOBEAAgOpWAP93Wkh67fv2+tnZ2Xtp9W+uz74ACABQ3QB4Le3zl+uTvvl73qv8vSh4xvcCIABAhVcB1+v1jRFWAb+OZ3x60RnE0b6Lvj+kFhXFZ3Hu75IACABQkgCYTvgoeM07aAuYx4N+7+jo6GZc/3nI/T9tbm7eFAABAEpwEkg64SOubw6r/EUl79tswCbQW1tbH8XikPZFATL1SX0FQACAEpwFnMJd2uQ57fMX7SjaSVrwkb75G/baNwW6uP5yhI2kX/buEQABAOYcAEd2Qfh7Edd2BoXA2Gx6VQAEAKhQABwU/tLJIrGwZC37d5HJWv60kd7r4K4ACABQkQCYwl88rz3gW8G1fP+o9n1ZFAIFQACACgTAUcPfKCFQAAQAKFkAHDf8vWsIFAABAEoUAId98xftwQjjejAoBHY6nXtmDgCgBAFwWuGvPwSmqmHB874ycwAAcw6A0w5/b8Ur40f5Z8Yr4vtmDgBgjgFwVuHPSSAAACUMgJMu+BAAAQAqFABnHf4EQACAEgXAywh/AiAAQEkC4GWFPwEQAKAEAfAyw58ACAAw5wB42eFPAAQAmE3AquUDVrvdvluG8Ncb372CAFgzcwAA4wesxXzAqtfr62UIf73xfVNwFNwtMwcAML6FCFXdXIXtVQS79fSqNdpn0Q4LqnBv0ikdUS1cmkVLv52e32g0TnK/e5jGbNoAALKJqmxPC6p7pWwx1idmDABg8gB4PcJVswLhb+/4+PgDMwYAMKVvAaO1yhz+0hjNFADAFKXqWnx3txHf3XVLFPwO02tflT8AgNlaSCtt02KMg4ODWlrpGyFsZVYLPoYsBPnYgg8AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOBK+hsMQ7RDjzvGwwAAAABJRU5ErkJggg==";
@@ -86,7 +86,6 @@ import {
} from "@/components/ui/dropdown-menu";
import { ProjectLeadingVisual } from "@/components/sidebar/project-leading-visual";
import { useToast } from "@/contexts/toast-context";
import { SidebarToastClearance } from "@/components/sidebar/sidebar-toast-region";
import { getForgePresentation, normalizeForge } from "@/git/forge";
import { hasVisibleOrderChanged, mergeWithRemainder } from "@/utils/sidebar-reorder";
import { confirmDialog } from "@/utils/confirm-dialog";
@@ -2552,7 +2551,6 @@ function ProjectModeList({
: null}
{sidebarFilterEmpty ? <SidebarFilterEmptyState /> : projectBody}
{listFooterComponent}
<SidebarToastClearance />
</>
);
@@ -2594,7 +2592,8 @@ const styles = StyleSheet.create((theme) => ({
// Optical inset: aligns the visible Pinned/Workspaces glyph edge with the
// Schedules icon across the divider; their layout boxes have different insets.
paddingTop: 2,
// Room for the sidebar toast comes from SidebarToastClearance at the end of the content.
// The sidebar toast floats over the list's end. Keep this padding the same whether or not
// a toast shows: changing it moves the rows when the toast leaves.
paddingBottom: theme.spacing[4],
},
projectListContainer: {
@@ -34,7 +34,6 @@ import {
CircleX,
} from "lucide-react-native";
import { useToast } from "@/contexts/toast-context";
import { SidebarToastClearance } from "@/components/sidebar/sidebar-toast-region";
import { useSidebarWorkspaceRename } from "@/workspace-rename";
import { useWorkspaceClipboardActions } from "@/hooks/use-workspace-clipboard-actions";
import { redirectIfArchivingActiveWorkspace } from "@/utils/sidebar-workspace-archive-redirect";
@@ -271,7 +270,6 @@ export function SidebarStatusWorkspaceList({
onToggleWorkspacePin={onToggleWorkspacePin}
/>
)}
<SidebarToastClearance />
</>
);
@@ -1091,7 +1089,8 @@ const styles = StyleSheet.create((theme) => ({
paddingHorizontal: theme.spacing[2],
// Keep status mode's Pinned/Workspaces boundary identical to project mode.
paddingTop: 2,
// Room for the sidebar toast comes from SidebarToastClearance at the end of the content.
// The sidebar toast floats over the list's end. Keep this padding the same whether or not
// a toast shows: changing it moves the rows when the toast leaves.
paddingBottom: theme.spacing[4],
},
pinnedSection: {
@@ -1,31 +1,9 @@
import {
createContext,
useCallback,
useContext,
useEffect,
useMemo,
useRef,
type ReactNode,
} from "react";
import { useEffect, useMemo, useRef, type ReactNode } from "react";
import { View } from "react-native";
import Animated, {
useAnimatedStyle,
useSharedValue,
withTiming,
type SharedValue,
} from "react-native-reanimated";
import { StyleSheet } from "react-native-unistyles";
import { TOAST_FADE_MS, ToastViewport, useToastHost, type ToastApi } from "@/components/toast-host";
import { ToastViewport, useToastHost, type ToastApi } from "@/components/toast-host";
import { ToastApiProvider, useToast } from "@/contexts/toast-context";
interface SidebarToastCoverage {
toastVisible: boolean;
/** Distance from the region's bottom edge to the toast's top edge, as last laid out. */
height: SharedValue<number>;
}
const SidebarToastCoverageContext = createContext<SidebarToastCoverage | null>(null);
/**
* Shows toasts raised by the sidebar's list over its bottom edge, just above the footer.
*
@@ -37,8 +15,6 @@ export function SidebarToastRegion({ active, children }: { active: boolean; chil
const appToast = useToast();
const { api: sidebarToast, toast, dismiss } = useToastHost();
const activeRef = useRef(active);
const coverageHeight = useSharedValue(0);
const toastVisible = toast !== null;
useEffect(() => {
activeRef.current = active;
@@ -59,58 +35,14 @@ export function SidebarToastRegion({ active, children }: { active: boolean; chil
};
}, [appToast, sidebarToast]);
const coverage = useMemo<SidebarToastCoverage>(
() => ({ toastVisible, height: coverageHeight }),
[toastVisible, coverageHeight],
);
const handleCoverageChange = useCallback(
(height: number) => {
coverageHeight.value = height;
},
[coverageHeight],
);
return (
<View style={styles.region}>
<SidebarToastCoverageContext.Provider value={coverage}>
<ToastApiProvider api={api}>{children}</ToastApiProvider>
</SidebarToastCoverageContext.Provider>
<ToastViewport
toast={toast}
onDismiss={dismiss}
placement="sidebar"
onBottomCoverageChange={handleCoverageChange}
/>
<ToastApiProvider api={api}>{children}</ToastApiProvider>
<ToastViewport toast={toast} onDismiss={dismiss} placement="sidebar" />
</View>
);
}
/**
* Space at the end of a sidebar list that matches the toast covering it, so the last row can
* scroll clear of the toast. It sits below every row, so growing it moves nothing. It shrinks
* with the toast's fade, so a list scrolled to its end settles back with the toast instead of
* jumping.
*/
export function SidebarToastClearance() {
const coverage = useContext(SidebarToastCoverageContext);
return coverage ? <AnimatedClearance coverage={coverage} /> : null;
}
function AnimatedClearance({ coverage }: { coverage: SidebarToastCoverage }) {
const { toastVisible, height } = coverage;
const style = useAnimatedStyle(() => ({
height: withTiming(toastVisible ? height.value : 0, { duration: TOAST_FADE_MS }),
}));
return (
<Animated.View
style={style}
pointerEvents="none"
testID="sidebar-toast-clearance"
aria-hidden
/>
);
}
const styles = StyleSheet.create({
region: {
position: "relative",
+6 -27
View File
@@ -4,14 +4,7 @@ import {
} from "@/components/floating-header";
import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from "react";
import { createPortal } from "react-dom";
import {
Platform,
StyleSheet as NativeStyleSheet,
Text,
ToastAndroid,
View,
type LayoutChangeEvent,
} from "react-native";
import { Platform, StyleSheet as NativeStyleSheet, Text, ToastAndroid, View } from "react-native";
import Animated, { FadeIn, FadeOut } from "react-native-reanimated";
import { useSafeAreaInsets } from "react-native-safe-area-context";
import { StyleSheet, withUnistyles } from "react-native-unistyles";
@@ -64,11 +57,8 @@ type ToastViewportPlacement = "app-shell" | "panel" | "sidebar";
const DEFAULT_DURATION_MS = 2200;
const noopDismiss: DismissToast = () => {};
const TOAST_MAX_WIDTH = 480;
/** How long a toast takes to fade in or out. */
export const TOAST_FADE_MS = 140;
const SIDEBAR_TOAST_INSET = SPACING[2];
const toastEntering = FadeIn.duration(TOAST_FADE_MS);
const toastExiting = FadeOut.duration(TOAST_FADE_MS);
const toastEntering = FadeIn.duration(140);
const toastExiting = FadeOut.duration(140);
const ThemedCheckCircle = withUnistyles(CheckCircle2);
const ThemedInfo = withUnistyles(Info);
const ThemedWarning = withUnistyles(AlertTriangle);
@@ -158,13 +148,10 @@ export function ToastViewport({
toast,
onDismiss,
placement = "app-shell",
onBottomCoverageChange,
}: {
toast: ToastState | null;
onDismiss: () => void;
placement?: ToastViewportPlacement;
/** Sidebar placement: reports the distance from the region's bottom edge to the toast's top. */
onBottomCoverageChange?: (coverage: number) => void;
}) {
const insets = useSafeAreaInsets();
const isMobile = useIsCompactFormFactor();
@@ -219,13 +206,6 @@ export function ToastViewport({
return clearTimer;
}, [clearTimer, durationMs, scheduleDismiss, toastId]);
const handleSidebarLayout = useCallback(
(event: LayoutChangeEvent) => {
onBottomCoverageChange?.(event.nativeEvent.layout.height + SIDEBAR_TOAST_INSET);
},
[onBottomCoverageChange],
);
const panelClearance = useFloatingHeaderOverlayClearance();
const headerHeight = isMobile ? HEADER_INNER_HEIGHT_MOBILE : HEADER_INNER_HEIGHT;
const headerTopPadding = isMobile ? HEADER_TOP_PADDING_MOBILE : 0;
@@ -247,7 +227,6 @@ export function ToastViewport({
}
pointerEvents="box-none"
collapsable={false}
onLayout={placement === "sidebar" ? handleSidebarLayout : undefined}
>
<View
style={placement === "sidebar" ? styles.sidebarWidthBoundary : styles.widthBoundary}
@@ -328,9 +307,9 @@ const animatedStyles = NativeStyleSheet.create({
},
sidebarContainer: {
position: "absolute",
left: SIDEBAR_TOAST_INSET,
right: SIDEBAR_TOAST_INSET,
bottom: SIDEBAR_TOAST_INSET,
left: SPACING[2],
right: SPACING[2],
bottom: SPACING[2],
zIndex: OVERLAY_Z.toast,
alignItems: "center",
},
@@ -2,7 +2,6 @@ import { describe, expect, it } from "vitest";
import {
createCodeClipboardContent,
createMarkdownClipboardContent,
createSelectionClipboardContent,
type MarkdownClipboardEnvironment,
type RichClipboardWriter,
writeMarkdownToRichClipboard,
@@ -41,41 +40,7 @@ function createRecordingClipboard(
return { environment, richWrites, plainTexts };
}
describe("createSelectionClipboardContent", () => {
it.each(["README.md", "main.py", "https://example.com", "www.example.com", "user@example.com"])(
"keeps bare text unlinked in clipboard HTML: %s",
(text) => {
expect(createSelectionClipboardContent(text, text)).toEqual({
plainText: text,
html: `<meta charset="utf-8"><p>${text}</p>\n`,
});
},
);
it("writes the given plain flavor", () => {
expect(createSelectionClipboardContent("a \\| b", "a | b")).toEqual({
plainText: "a | b",
html: '<meta charset="utf-8"><p>a | b</p>\n',
});
});
});
describe("createMarkdownClipboardContent", () => {
it("links a bare URL in clipboard HTML", () => {
expect(createMarkdownClipboardContent("https://example.com").html).toBe(
'<meta charset="utf-8"><p><a href="https://example.com">https://example.com</a></p>\n',
);
});
it("preserves explicit filename and web links in clipboard HTML", () => {
const markdown = "[README.md](README.md) and [website](https://example.com)";
expect(createMarkdownClipboardContent(markdown)).toEqual({
plainText: markdown,
html: '<meta charset="utf-8"><p><a href="README.md">README.md</a> and <a href="https://example.com">website</a></p>\n',
});
});
it("renders markdown structures to clipboard html", () => {
const markdown = [
"# Heading",
-17
View File
@@ -1,8 +1,6 @@
import { createAssistantMarkdownParser } from "./assistant-markdown-parser";
const markdownRenderer = createAssistantMarkdownParser();
// Disable linkify for selection HTML so text from unwrapped links stays unlinked.
const unlinkedMarkdownRenderer = createAssistantMarkdownParser().set({ linkify: false });
type ClipboardMimeType = "text/plain" | "text/html";
@@ -28,21 +26,6 @@ export function createMarkdownClipboardContent(markdown: string): MarkdownClipbo
};
}
/**
* Clipboard payload for Markdown text. `markdown` is escaped and feeds `text/html`, which
* renders it; `plainText` goes to `text/plain` unchanged, so callers that escape for the
* rich flavor can hand over the same text the user saw.
*/
export function createSelectionClipboardContent(
markdown: string,
plainText: string,
): MarkdownClipboardContent {
return {
plainText,
html: `<meta charset="utf-8">${unlinkedMarkdownRenderer.render(markdown)}`,
};
}
export interface CodeClipboardOptions {
language?: string | null;
/** Wrap in `pre`/`code` so the line structure survives. */
@@ -1347,6 +1347,51 @@ describe("OMP agent client and session", () => {
expect(omp.timeline().filter((item) => item.type === "assistant_message")).toEqual([]);
});
test("gives each idle extension notice its own turn without starting an execution", async () => {
const runtime = new FakeOmp();
const client = new OmpAgentClient({ logger: createTestLogger(), runtime });
const session = await client.createSession({ provider: "omp", cwd: process.cwd() });
onTestFinished(() => session.close());
const events: AgentStreamEvent[] = [];
session.subscribe((event) => events.push(event));
const turnCompleted = (event: AgentStreamEvent) => event.type === "turn_completed";
const provider = runtime.latestSession();
const notify = (id: string) => {
provider.emit({ type: "extension_ui_request", id, method: "notify", message: id });
};
const { turnId: foregroundTurnId } = await session.startTurn("start background work");
provider.beginTurn();
notify("while working");
provider.streamAssistantText("first reply");
provider.finishTurn();
await expect.poll(() => events.some(turnCompleted)).toBe(true);
const settledEvents = events.length;
notify("idle notice");
notify("another idle notice");
const idleNotices = events.slice(settledEvents);
expect(idleNotices.map(({ type }) => type)).toEqual(["timeline", "timeline"]);
provider.emit({ type: "agent_start" });
provider.beginTurn();
notify("during the autonomous run");
provider.streamAssistantText("second reply");
provider.finishTurn();
const noticeTurnIds = events.flatMap((event) =>
event.type === "timeline" && event.item.type === "notification" ? [event.turnId] : [],
);
expect(noticeTurnIds).toEqual([
foregroundTurnId,
expect.any(String),
expect.any(String),
undefined, // The manager assigns the active autonomous turn ID.
]);
expect(new Set(noticeTurnIds).size).toBe(noticeTurnIds.length);
});
test("maps legacy select options without descriptions and preserves ordinary responses", async () => {
const omp = new OmpHarness();
await omp.start();
@@ -1580,10 +1580,13 @@ export class OmpAgentSession implements AgentSession {
): void {
const message = optionalString(event.message);
if (event.method === "notify" && message) {
// An idle UI notice has no model response. It is a turn of its own.
const turnId =
this.currentTurnIdForEvent() ?? (this.activeTurnStarted ? undefined : randomUUID());
this.emit({
type: "timeline",
provider: this.provider,
turnId: this.currentTurnIdForEvent(),
turnId,
item: {
type: "notification",
level:
@@ -153,40 +153,6 @@ describe("Hub relationship", () => {
});
});
test.each([false, true])(
"reconnect advertises the current execution grant (initially %s)",
async (initiallyGranted) => {
relationship = await HubRelationshipHarness.start();
await relationship.beginConnect("token", "https://hub.example", initiallyGranted).result;
relationship.connectLatestSocket();
if (initiallyGranted) await relationship.revokePermission("hub.execute");
else await relationship.grantPermission("hub.execute");
relationship.closeLatestSocket(1006);
await relationship.retry();
relationship.connectLatestSocket();
expect(relationship.serverInfoPermissions().at(-1)).toEqual(
initiallyGranted ? [] : ["hub.execute"],
);
},
);
test("a permission mismatch retries the handshake with the same enrollment", async () => {
relationship = await HubRelationshipHarness.start();
await relationship.beginConnect().result;
relationship.connectLatestSocket();
const reason = "daemon session permissions do not match enrollment";
relationship.closeLatestSocket(4403, reason);
expect(await relationship.status()).toMatchObject({
state: "reconnecting",
lastError: expect.stringContaining("paseo hub permissions"),
});
await relationship.retry();
await relationship.revokePermission("hub.execute");
relationship.connectLatestSocket();
expect(relationship.serverInfoPermissions().at(-1)).toEqual([]);
});
test("Hub enrollment cannot widen the daemon's locally granted permissions", async () => {
relationship = await HubRelationshipHarness.start();
relationship.returnEnrollmentPermissions(["hub.execute", "daemon.manage"]);
@@ -246,7 +246,7 @@ export class HubRelationshipController implements HubRelationshipManagement {
}
async start(): Promise<void> {
if (this.record?.state === "active") this.openSocket(false);
if (this.record?.state === "active") this.openSocket(this.record, false);
if (this.record?.state === "pending") {
const enrollmentGeneration = this.beginEnrollmentAttempt();
try {
@@ -441,7 +441,7 @@ export class HubRelationshipController implements HubRelationshipManagement {
this.record = active;
this.retry = null;
this.retryAttempt = 0;
this.openSocket(false);
this.openSocket(active, false);
} catch (error) {
if (enrollmentGeneration !== this.enrollmentGeneration) return;
if (error instanceof HubEnrollmentRejectedError) {
@@ -455,17 +455,15 @@ export class HubRelationshipController implements HubRelationshipManagement {
}
}
private openSocket(reconnecting: boolean): void {
const record = this.record;
if (record?.state !== "active") return;
private openSocket(record: ActiveRecord, reconnecting: boolean): void {
const generation = ++this.generation;
this.state = reconnecting ? "reconnecting" : "connecting";
const events: HubSocketEvents = {
connected: (socket, sessionProtocol) =>
this.socketConnected(generation, socket, sessionProtocol),
this.socketConnected(generation, record, socket, sessionProtocol),
rejected: (statusCode) => this.socketRejected(generation, statusCode),
closed: (code, reason) => this.socketClosed(generation, code, reason),
failed: (error) => this.socketFailed(generation, error),
closed: (code) => this.socketClosed(generation, record, code),
failed: (error) => this.socketFailed(generation, record, error),
};
this.socket = this.options.remote.openSocket(
{
@@ -479,14 +477,15 @@ export class HubRelationshipController implements HubRelationshipManagement {
private socketConnected(
generation: number,
record: ActiveRecord,
socket: WebSocketLike,
sessionProtocol: "legacy" | "session-v1",
): void {
const record = this.record;
if (generation !== this.generation || record?.state !== "active") {
if (generation !== this.generation) {
socket.close();
return;
}
this.retryAttempt = 0;
this.state = "connected";
this.connectedAt = this.clock.now().toISOString();
this.lastError = null;
@@ -517,31 +516,24 @@ export class HubRelationshipController implements HubRelationshipManagement {
this.revoke(`Hub rejected socket authentication (${statusCode})`);
}
private socketClosed(generation: number, code: number, reason?: string): void {
private socketClosed(generation: number, record: ActiveRecord, code: number): void {
if (generation !== this.generation) return;
if (code === 4403 && reason === "daemon session permissions do not match enrollment") {
this.lastError =
"Hub and daemon permissions differ. Run `paseo hub permissions grant <permission>` or `paseo hub permissions revoke <permission>` on this daemon to reapply your intended permissions.";
this.scheduleSocket(true);
return;
}
if (code === 4403) {
this.revoke("Hub revoked this relationship");
return;
}
if (this.record?.state === "active") this.scheduleSocket();
if (this.record?.state === "active") this.scheduleSocket(record);
}
private socketFailed(generation: number, error: Error): void {
private socketFailed(generation: number, record: ActiveRecord, error: Error): void {
if (generation !== this.generation) return;
this.lastError = error.message;
if (this.record?.state === "active") this.scheduleSocket();
if (this.record?.state === "active") this.scheduleSocket(record);
}
private scheduleSocket(permissionMismatch = false): void {
if (this.state === "connected" && !permissionMismatch) this.retryAttempt = 0;
private scheduleSocket(record: ActiveRecord): void {
this.state = "reconnecting";
this.schedule(() => this.openSocket(true));
this.schedule(() => this.openSocket(record, true));
}
private scheduleEnrollment(record: PendingRecord, enrollmentGeneration: number): void {
@@ -330,27 +330,6 @@ test.each([401, 403] as const)(
},
);
test("repeated permission mismatch closes back off until the Hub accepts the permissions", async () => {
const mismatch = {
closeCode: 4403,
reason: "daemon session permissions do not match enrollment",
};
const hub = await UpgradeRejectingHub.start([
mismatch,
mismatch,
{ closeCode: 1001, reason: "shutdown" },
]);
const clock = new ManualRelationshipClock();
const controller = await connectController(hub, clock);
await expect.poll(() => clock.scheduledAttempts()).toEqual([0]);
clock.runNext();
await expect.poll(() => clock.scheduledAttempts()).toEqual([0, 1]);
expect(controller.status().state).toBe("reconnecting");
clock.runNext();
await expect.poll(() => clock.scheduledAttempts()).toEqual([0, 1, 0]);
await controller.stop();
});
test("controller redials after a transient socket response and releases both failed upgrades", async () => {
const hub = await UpgradeRejectingHub.start([503, 401]);
const clock = new ManualRelationshipClock();
@@ -496,8 +475,6 @@ class SocketOutcomes {
}
}
type UpgradeOutcome = number | "stall" | { closeCode: number; reason: string };
class UpgradeRejectingHub {
private readonly server = createServer(async (request, response) => {
let body = "";
@@ -516,8 +493,8 @@ class UpgradeRejectingHub {
private attemptObserved = deferred<void>();
private attempts = 0;
private constructor(private readonly statuses: UpgradeOutcome[]) {
this.server.on("upgrade", (request, socket, head) => {
private constructor(private readonly statuses: Array<number | "stall">) {
this.server.on("upgrade", (_request, socket) => {
const attempt = ++this.attempts;
this.attemptObserved.resolve();
this.attemptObserved = deferred<void>();
@@ -529,14 +506,6 @@ class UpgradeRejectingHub {
released.resolve();
});
const status = this.statuses[attempt - 1] ?? this.statuses.at(-1) ?? 503;
if (typeof status === "object") {
const ws = new WebSocketServer({ noServer: true });
ws.handleUpgrade(request, socket, head, (peer) =>
peer.close(status.closeCode, status.reason),
);
ws.close();
return;
}
if (status === "stall") {
socket.resume();
return;
@@ -551,7 +520,7 @@ class UpgradeRejectingHub {
});
}
static async start(statuses: UpgradeOutcome[]): Promise<UpgradeRejectingHub> {
static async start(statuses: Array<number | "stall">): Promise<UpgradeRejectingHub> {
const hub = new UpgradeRejectingHub(statuses);
openUpgradeHubs.push(hub);
openServers.push(hub.server);
@@ -46,7 +46,7 @@ export interface HubSocketCredentials {
export interface HubSocketEvents {
connected(socket: WebSocketLike, sessionProtocol: "legacy" | "session-v1"): void;
rejected(statusCode: 401 | 403): void;
closed(code: number, reason?: string): void;
closed(code: number): void;
failed(error: Error): void;
}
@@ -227,11 +227,11 @@ export class DirectHubRelationshipRemote implements HubRelationshipRemote {
}
events.closed(1006);
});
socket.once("close", (code, reason) => {
socket.once("close", (code) => {
stopHeartbeat();
if (settled) return;
settled = true;
events.closed(code, reason.toString());
events.closed(code);
});
socket.once("error", fail);
return socket;
@@ -720,9 +720,9 @@ export class HubRelationshipHarness {
this.rejectLatestSocket(code);
}
closeLatestSocket(code: number, reason?: string): void {
closeLatestSocket(code: number): void {
const socket = this.latestSocket();
socket.events.closed(code, reason);
socket.events.closed(code);
socket.socket.close(code);
}
@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="166.241 0 155.861 155.75" fill="currentColor"><path d="M237.892 0C243.178 8.73262e-05 249.383 1.41857 253.025 3.07422L255.093 4.01367L250.076 18.6299L247.677 17.7461C244.901 16.7234 241.938 15.7998 238.491 15.7998C234.984 15.7998 232.787 16.5601 231.08 18.3213C229.231 20.2297 227.629 23.6395 226.229 29.7578L226.227 29.7617L226.228 29.7627L225.136 34.8506H241.669L260.432 34.9502L260.694 34.9512L260.842 35.1689L278.854 61.6328L296.736 34.9502H320.866L291.676 76.7402L322.102 119.75H299.331L299.182 119.546L241.144 40.4775L239.35 49.4004H222.069L205.688 127.208C203.927 135.709 201.185 142.838 196.777 147.866C192.27 153.008 186.201 155.75 178.342 155.75C174.181 155.75 170.746 155.109 167.909 154.107L166.241 153.519V137.182L166.899 137.4L169.531 138.278C172.182 139.162 174.414 139.8 177.142 139.8C178.528 139.8 179.703 139.526 180.732 138.98C181.764 138.434 182.677 137.6 183.52 136.442C185.304 133.989 186.716 130.135 187.897 124.672L203.76 49.4004H189.874L191.759 39.4375L192.039 39.3457L206.818 34.4668L208.154 28.6416C210.516 18.2065 213.772 10.9381 218.708 6.31836C223.737 1.61217 230.127 3.08752e-05 237.892 0ZM273.987 99.084L260.073 120.25H234.541L261.003 82.0215L273.987 99.084Z"/></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="1.394 1.679 8.494 7.828" fill="currentColor"><path d="M8.237 7.813C8.276 7.789 8.327 7.796 8.358 7.83L9.741 9.346C9.797 9.407 9.754 9.506 9.671 9.507H8.977C8.924 9.507 8.881 9.463 8.881 9.41V9.125C8.881 9.089 8.861 9.057 8.83 9.04L7.589 8.379C7.524 8.344 7.521 8.251 7.584 8.212L8.237 7.813ZM3.944 1.679C4.502 1.679 5.052 1.82 5.54 2.09L5.962 2.323C6.024 2.358 6.029 2.446 5.97 2.486L5.091 3.09C5.065 3.108 5.05 3.137 5.05 3.169V3.495C5.05 3.529 5.032 3.561 5.003 3.578L4.68 3.769C4.594 3.82 4.498 3.722 4.549 3.637L4.592 3.566C4.63 3.502 4.584 3.421 4.51 3.421H4.028C3.925 3.421 3.894 3.562 3.989 3.604L4.377 3.775C4.448 3.806 4.455 3.904 4.389 3.944L3.77 4.323C3.755 4.332 3.737 4.337 3.72 4.337H3.361C3.309 4.337 3.268 4.379 3.268 4.431C3.268 4.484 3.309 4.526 3.361 4.526H3.779C3.797 4.526 3.814 4.521 3.829 4.513L7.599 2.272C8.135 1.954 8.815 2.008 9.294 2.407C9.307 2.418 9.314 2.434 9.314 2.451V2.729C9.315 2.812 9.413 2.856 9.475 2.8L9.728 2.57C9.789 2.514 9.888 2.558 9.888 2.641V5.812C9.888 5.865 9.845 5.908 9.792 5.908H9.359C9.331 5.908 9.303 5.895 9.285 5.873L8.374 4.773C8.337 4.728 8.268 4.728 8.229 4.771L7.468 5.625C7.429 5.669 7.438 5.737 7.487 5.769L9.038 6.776C9.098 6.815 9.096 6.903 9.035 6.939L6.618 8.363C6.556 8.4 6.478 8.358 6.474 8.286L6.439 7.633C6.437 7.578 6.48 7.532 6.535 7.532H6.925C6.948 7.532 6.971 7.523 6.988 7.508L7.211 7.31C7.276 7.252 7.236 7.144 7.148 7.142L5.991 7.118H1.49C1.437 7.118 1.394 7.075 1.394 7.022V3.308C1.394 3.255 1.437 3.212 1.49 3.212H2.544C2.597 3.212 2.64 3.169 2.64 3.116V2.969C2.64 2.916 2.597 2.873 2.544 2.873H1.461C1.366 2.873 1.329 2.75 1.408 2.697L2.134 2.221C2.672 1.867 3.301 1.679 3.944 1.679Z"/></svg>

Before

Width:  |  Height:  |  Size: 1.7 KiB

@@ -1370,7 +1370,7 @@ const FAQ_ENTRIES = [
const FAQ_LINKS = {
relay: "/docs/security",
agents: "/agents",
muse: "/docs/supported-providers/muse-code",
muse: "/docs/muse-code",
voice: "/docs/voice",
configuration: "/docs/configuration",
worktrees: "/docs/worktrees",
-2
View File
@@ -25,8 +25,6 @@ export const AGENT_PAGES = [
{ slug: "cursor", name: "Cursor" },
{ slug: "muse-code", name: "Muse Code" },
{ slug: "antigravity", name: "Antigravity" },
{ slug: "fx", name: "fx" },
{ slug: "hoplite", name: "Hoplite" },
{ slug: "copilot", name: "GitHub Copilot" },
{ slug: "gemini", name: "Gemini CLI" },
{ slug: "hermes", name: "Hermes Agent" },
-19
View File
@@ -162,10 +162,6 @@ export function getDoc(slug: string, locale: Locale): Doc | undefined {
}
export function getLegacyDocsRedirect(pathname: string): string | undefined {
// These provider pages sat at the top level before they moved under Supported providers.
const provider = /^\/docs\/(claude-code|codex|muse-code)(\.md)?\/?$/.exec(pathname);
if (provider) return `/docs/supported-providers/${provider[1]}${provider[2] ?? ""}`;
const match =
/^\/docs\/plugins\/v0\.[78](?:(\.md)|\/(index|reference|providers|migration)(\.md)?)?\/?$/.exec(
pathname,
@@ -298,21 +294,6 @@ export function buildDocsNavTree(docs: Doc[]): DocsNavNode[] {
return root;
}
function navHrefs(nodes: DocsNavNode[]): string[] {
return nodes.flatMap((node) => {
if (node.type === "page") return [node.href];
const own = node.type === "group" && node.href !== undefined ? [node.href] : [];
return [...own, ...navHrefs(node.children)];
});
}
/** Every doc in a language, in the order the sidebar lists them. */
export function getDocsInSidebarOrder(locale: Locale): Doc[] {
const docs = getDocs(locale);
const byHref = new Map(docs.map((doc) => [doc.href, doc]));
return navHrefs(buildDocsNavTree(docs)).flatMap((href) => byHref.get(href) ?? []);
}
function findNodePath(
nodes: DocsNavNode[],
href: string,
+1 -13
View File
@@ -124,18 +124,6 @@
"metaTitle": "Antigravity Mobile and Desktop App, Open Source",
"metaDescription": "Run your installed Antigravity CLI through Paseo. Watch agents work and review changes from your phone or desktop. Self-hosted, your code stays on your machine."
},
"fx": {
"title": "Open source app for fx",
"subtitle": "Run Vercel Labs' fx on your machine and drive it from your phone or desktop.",
"metaTitle": "fx Mobile and Desktop App, Open Source",
"metaDescription": "Open source mobile and desktop app for fx, the coding agent from Vercel Labs. Run your installed fx CLI, watch agents work, and review changes from anywhere. Self-hosted."
},
"hoplite": {
"title": "Open source app for Hoplite",
"subtitle": "Drive Hoplite's cloud coding agent from your phone or desktop, next to your other agents.",
"metaTitle": "Hoplite Mobile and Desktop App, Open Source",
"metaDescription": "Open source mobile and desktop app for Hoplite. Start Hoplite's cloud coding agent through your installed Hoplite CLI, watch it work, and review changes from anywhere."
},
"copilot": {
"title": "Open source app for GitHub Copilot",
"subtitle": "Drive GitHub Copilot from your phone or desktop. Same account, same machine, ship without sitting down at your desk.",
@@ -345,7 +333,7 @@
"metaTitle": "Supported agents – Every coding agent Paseo runs",
"metaDescription": "Run Claude Code, Codex, OpenCode, Pi, OMP, Cursor, Muse Code, Antigravity, and dozens more coding agents from your phone. Self-hosted, your code stays on your machine.",
"title": "Supported agents",
"intro": "Paseo supports many agents natively. It also runs any <acp>ACP agent</acp>, and you can add new providers with <plugins>plugins</plugins>."
"intro": "Paseo supports many agents natively, it can run any <acp>ACP agent</acp> and you can implement new providers via <plugins>plugins</plugins>."
},
"landing": {
"socialProof": {
+1 -13
View File
@@ -124,18 +124,6 @@
"metaTitle": "Antigravity 开源移动端与桌面端应用",
"metaDescription": "通过 Paseo 运行你已安装的 Antigravity CLI。在手机或桌面端观察 Agent 工作并审查改动。自托管,代码留在你的机器上。"
},
"fx": {
"title": "fx 的开源应用",
"subtitle": "在你的机器上运行 Vercel Labs 的 fx,从手机或桌面端操控。",
"metaTitle": "fx 开源移动端与桌面端应用",
"metaDescription": "Vercel Labs 编程 Agent fx 的开源移动端与桌面端应用。运行你已安装的 fx CLI,随时随地观察 Agent 工作并审查改动。自托管。"
},
"hoplite": {
"title": "Hoplite 的开源应用",
"subtitle": "从手机或桌面端操控 Hoplite 的云端编程 Agent,与你的其他 Agent 并列使用。",
"metaTitle": "Hoplite 开源移动端与桌面端应用",
"metaDescription": "Hoplite 的开源移动端与桌面端应用。通过你已安装的 Hoplite CLI 启动 Hoplite 的云端编程 Agent,随时随地观察它工作并审查改动。"
},
"copilot": {
"title": "GitHub Copilot 的开源应用",
"subtitle": "从手机或桌面端操控 GitHub Copilot。同一个账号,同一台机器,不必坐在桌前也能交付。",
@@ -345,7 +333,7 @@
"metaTitle": "支持的 Agent – Paseo 可运行的所有编程 Agent",
"metaDescription": "在手机上运行 Claude Code、Codex、OpenCode、Pi、OMP、Cursor、Muse Code、Antigravity 以及数十个其他编程 Agent。自托管,代码留在你的机器上。",
"title": "支持的 Agent",
"intro": "Paseo 原生支持许多 Agent,还可以运行任何 <acp>ACP Agent</acp>,你也可以通过<plugins>插件</plugins>添加新的 Provider。"
"intro": "Paseo 原生支持许多 Agent,可以运行任何 <acp>ACP Agent</acp>,你还可以通过<plugins>插件</plugins>实现新的 Provider。"
},
"landing": {
"socialProof": {
+6 -2
View File
@@ -1,6 +1,6 @@
import { getAlternativePages } from "~/data/alternative-pages";
import { AGENT_PAGES, getAgentPage } from "~/data/agent-pages";
import { type Doc, getDocsInSidebarOrder } from "~/docs";
import { type Doc, getDocs } from "~/docs";
import { getTranslator, type Locale, localizePath, withLocalePrefix } from "~/i18n";
const SITE_URL = "https://paseo.sh";
@@ -144,10 +144,14 @@ function alternativeLine(
return `- [${page.title}](${absoluteUrl(page.href, locale)})${suffix}`;
}
function topLevelDocs(locale: Locale): Doc[] {
return getDocs(locale).filter((d) => !d.slug.includes("/"));
}
/** The site index for language models, in a language: `/llms.txt` or `/zh-CN/llms.txt`. */
export function buildLlmsTxt(locale: Locale): string {
const copy = COPY[locale];
const docs = getDocsInSidebarOrder(locale)
const docs = topLevelDocs(locale)
.map((doc) => docLine(doc, locale))
.join("\n");
const alternatives = getAlternativePages(locale)
@@ -1,88 +1,5 @@
import { describe, expect, it } from "vitest";
import { buildDocsNavTree, getDoc, getDocs, getLegacyDocsRedirect, parseHeadings } from "./docs";
import { buildLlmsTxt } from "./llms";
describe("docs frontmatter", () => {
it.each(["en", "zh-CN"] as const)("gives every %s page a title and a description", (locale) => {
const incomplete = getDocs(locale)
.filter((doc) => !doc.frontmatter.title || !doc.frontmatter.description)
.map((doc) => doc.sourcePath);
expect(incomplete).toEqual([]);
});
it("puts every page in a sidebar category", () => {
const uncategorized = getDocs("en")
.filter((doc) => !doc.frontmatter.category)
.map((doc) => doc.sourcePath);
expect(uncategorized).toEqual([]);
});
});
describe("provider documentation", () => {
it.each(["en", "zh-CN"] as const)(
"nests each provider page under Supported providers in %s",
(locale) => {
const providers = buildDocsNavTree(getDocs(locale)).find(
(node) => node.type === "category" && node.label === "Providers",
);
expect(providers).toMatchObject({
children: [
{ type: "page", href: "/docs/providers" },
{
type: "group",
href: "/docs/supported-providers",
children: [
{ href: "/docs/supported-providers/antigravity" },
{ href: "/docs/supported-providers/claude-code" },
{ href: "/docs/supported-providers/codex" },
{ href: "/docs/supported-providers/fx" },
{ href: "/docs/supported-providers/github-copilot" },
{ href: "/docs/supported-providers/hoplite" },
{ href: "/docs/supported-providers/muse-code" },
{ href: "/docs/supported-providers/omp" },
{ href: "/docs/supported-providers/opencode" },
{ href: "/docs/supported-providers/pi" },
],
},
{ type: "page", href: "/docs/custom-providers" },
],
});
},
);
it.each([
["en", "https://paseo.sh/docs"],
["zh-CN", "https://paseo.sh/zh-CN/docs"],
] as const)(
"lists each provider page in the %s llms.txt, in sidebar order",
(locale, docsUrl) => {
const llms = buildLlmsTxt(locale);
const positions = [
"supported-providers.md",
"supported-providers/antigravity.md",
"supported-providers/codex.md",
"supported-providers/pi.md",
"custom-providers.md",
].map((page) => llms.indexOf(`(${docsUrl}/${page})`));
expect(positions).not.toContain(-1);
expect(positions).toEqual([...positions].sort((a, b) => a - b));
},
);
it.each(["claude-code", "codex", "muse-code"])(
"redirects the old top-level %s link to the page under Supported providers",
(slug) => {
const target = `/docs/supported-providers/${slug}`;
expect(getDoc(target.slice("/docs/".length), "en")).toBeDefined();
for (const extension of ["", ".md"]) {
expect(getLegacyDocsRedirect(`/docs/${slug}${extension}`)).toBe(`${target}${extension}`);
expect(getLegacyDocsRedirect(`/docs/${slug}${extension}/`)).toBe(`${target}${extension}`);
expect(getLegacyDocsRedirect(`${target}${extension}`)).toBeUndefined();
}
},
);
});
describe("plugin documentation", () => {
it.each(["en", "zh-CN"] as const)(
@@ -115,7 +32,6 @@ describe("plugin documentation", () => {
{ type: "page", label: "Quickstart", href: "/docs/plugins" },
{ type: "page", label: "Publishing", href: "/docs/plugins/publishing" },
{ type: "page", label: "Provider plugins", href: "/docs/plugins/providers" },
{ type: "page", label: "Sidebar views", href: "/docs/plugins/sidebar-views" },
{ type: "page", label: "Migration", href: "/docs/plugins/migration" },
{ type: "page", label: "Hooks", href: "/docs/plugins/hooks" },
{ type: "page", label: "Reference", href: "/docs/plugins/reference" },
-43
View File
@@ -31,13 +31,11 @@ import { Route as Char123LocaleChar125KimiRouteImport } from "./routes/{-$locale
import { Route as Char123LocaleChar125KiloRouteImport } from "./routes/{-$locale}/kilo";
import { Route as Char123LocaleChar125JunieRouteImport } from "./routes/{-$locale}/junie";
import { Route as Char123LocaleChar125HubRouteImport } from "./routes/{-$locale}/hub";
import { Route as Char123LocaleChar125HopliteRouteImport } from "./routes/{-$locale}/hoplite";
import { Route as Char123LocaleChar125HermesRouteImport } from "./routes/{-$locale}/hermes";
import { Route as Char123LocaleChar125GrokRouteImport } from "./routes/{-$locale}/grok";
import { Route as Char123LocaleChar125GooseRouteImport } from "./routes/{-$locale}/goose";
import { Route as Char123LocaleChar125GlmRouteImport } from "./routes/{-$locale}/glm";
import { Route as Char123LocaleChar125GeminiRouteImport } from "./routes/{-$locale}/gemini";
import { Route as Char123LocaleChar125FxRouteImport } from "./routes/{-$locale}/fx";
import { Route as Char123LocaleChar125FastAgentRouteImport } from "./routes/{-$locale}/fast-agent";
import { Route as Char123LocaleChar125FactoryDroidRouteImport } from "./routes/{-$locale}/factory-droid";
import { Route as Char123LocaleChar125DownloadRouteImport } from "./routes/{-$locale}/download";
@@ -211,12 +209,6 @@ const Char123LocaleChar125HubRoute = Char123LocaleChar125HubRouteImport.update({
path: "/hub",
getParentRoute: () => Char123LocaleChar125RouteRoute,
} as any);
const Char123LocaleChar125HopliteRoute =
Char123LocaleChar125HopliteRouteImport.update({
id: "/hoplite",
path: "/hoplite",
getParentRoute: () => Char123LocaleChar125RouteRoute,
} as any);
const Char123LocaleChar125HermesRoute =
Char123LocaleChar125HermesRouteImport.update({
id: "/hermes",
@@ -246,11 +238,6 @@ const Char123LocaleChar125GeminiRoute =
path: "/gemini",
getParentRoute: () => Char123LocaleChar125RouteRoute,
} as any);
const Char123LocaleChar125FxRoute = Char123LocaleChar125FxRouteImport.update({
id: "/fx",
path: "/fx",
getParentRoute: () => Char123LocaleChar125RouteRoute,
} as any);
const Char123LocaleChar125FastAgentRoute =
Char123LocaleChar125FastAgentRouteImport.update({
id: "/fast-agent",
@@ -536,13 +523,11 @@ export interface FileRoutesByFullPath {
"/{-$locale}/download": typeof Char123LocaleChar125DownloadRoute;
"/{-$locale}/factory-droid": typeof Char123LocaleChar125FactoryDroidRoute;
"/{-$locale}/fast-agent": typeof Char123LocaleChar125FastAgentRoute;
"/{-$locale}/fx": typeof Char123LocaleChar125FxRoute;
"/{-$locale}/gemini": typeof Char123LocaleChar125GeminiRoute;
"/{-$locale}/glm": typeof Char123LocaleChar125GlmRoute;
"/{-$locale}/goose": typeof Char123LocaleChar125GooseRoute;
"/{-$locale}/grok": typeof Char123LocaleChar125GrokRoute;
"/{-$locale}/hermes": typeof Char123LocaleChar125HermesRoute;
"/{-$locale}/hoplite": typeof Char123LocaleChar125HopliteRoute;
"/{-$locale}/hub": typeof Char123LocaleChar125HubRoute;
"/{-$locale}/junie": typeof Char123LocaleChar125JunieRoute;
"/{-$locale}/kilo": typeof Char123LocaleChar125KiloRoute;
@@ -607,13 +592,11 @@ export interface FileRoutesByTo {
"/{-$locale}/download": typeof Char123LocaleChar125DownloadRoute;
"/{-$locale}/factory-droid": typeof Char123LocaleChar125FactoryDroidRoute;
"/{-$locale}/fast-agent": typeof Char123LocaleChar125FastAgentRoute;
"/{-$locale}/fx": typeof Char123LocaleChar125FxRoute;
"/{-$locale}/gemini": typeof Char123LocaleChar125GeminiRoute;
"/{-$locale}/glm": typeof Char123LocaleChar125GlmRoute;
"/{-$locale}/goose": typeof Char123LocaleChar125GooseRoute;
"/{-$locale}/grok": typeof Char123LocaleChar125GrokRoute;
"/{-$locale}/hermes": typeof Char123LocaleChar125HermesRoute;
"/{-$locale}/hoplite": typeof Char123LocaleChar125HopliteRoute;
"/{-$locale}/hub": typeof Char123LocaleChar125HubRoute;
"/{-$locale}/junie": typeof Char123LocaleChar125JunieRoute;
"/{-$locale}/kilo": typeof Char123LocaleChar125KiloRoute;
@@ -682,13 +665,11 @@ export interface FileRoutesById {
"/{-$locale}/download": typeof Char123LocaleChar125DownloadRoute;
"/{-$locale}/factory-droid": typeof Char123LocaleChar125FactoryDroidRoute;
"/{-$locale}/fast-agent": typeof Char123LocaleChar125FastAgentRoute;
"/{-$locale}/fx": typeof Char123LocaleChar125FxRoute;
"/{-$locale}/gemini": typeof Char123LocaleChar125GeminiRoute;
"/{-$locale}/glm": typeof Char123LocaleChar125GlmRoute;
"/{-$locale}/goose": typeof Char123LocaleChar125GooseRoute;
"/{-$locale}/grok": typeof Char123LocaleChar125GrokRoute;
"/{-$locale}/hermes": typeof Char123LocaleChar125HermesRoute;
"/{-$locale}/hoplite": typeof Char123LocaleChar125HopliteRoute;
"/{-$locale}/hub": typeof Char123LocaleChar125HubRoute;
"/{-$locale}/junie": typeof Char123LocaleChar125JunieRoute;
"/{-$locale}/kilo": typeof Char123LocaleChar125KiloRoute;
@@ -758,13 +739,11 @@ export interface FileRouteTypes {
| "/{-$locale}/download"
| "/{-$locale}/factory-droid"
| "/{-$locale}/fast-agent"
| "/{-$locale}/fx"
| "/{-$locale}/gemini"
| "/{-$locale}/glm"
| "/{-$locale}/goose"
| "/{-$locale}/grok"
| "/{-$locale}/hermes"
| "/{-$locale}/hoplite"
| "/{-$locale}/hub"
| "/{-$locale}/junie"
| "/{-$locale}/kilo"
@@ -829,13 +808,11 @@ export interface FileRouteTypes {
| "/{-$locale}/download"
| "/{-$locale}/factory-droid"
| "/{-$locale}/fast-agent"
| "/{-$locale}/fx"
| "/{-$locale}/gemini"
| "/{-$locale}/glm"
| "/{-$locale}/goose"
| "/{-$locale}/grok"
| "/{-$locale}/hermes"
| "/{-$locale}/hoplite"
| "/{-$locale}/hub"
| "/{-$locale}/junie"
| "/{-$locale}/kilo"
@@ -903,13 +880,11 @@ export interface FileRouteTypes {
| "/{-$locale}/download"
| "/{-$locale}/factory-droid"
| "/{-$locale}/fast-agent"
| "/{-$locale}/fx"
| "/{-$locale}/gemini"
| "/{-$locale}/glm"
| "/{-$locale}/goose"
| "/{-$locale}/grok"
| "/{-$locale}/hermes"
| "/{-$locale}/hoplite"
| "/{-$locale}/hub"
| "/{-$locale}/junie"
| "/{-$locale}/kilo"
@@ -1111,13 +1086,6 @@ declare module "@tanstack/react-router" {
preLoaderRoute: typeof Char123LocaleChar125HubRouteImport;
parentRoute: typeof Char123LocaleChar125RouteRoute;
};
"/{-$locale}/hoplite": {
id: "/{-$locale}/hoplite";
path: "/hoplite";
fullPath: "/{-$locale}/hoplite";
preLoaderRoute: typeof Char123LocaleChar125HopliteRouteImport;
parentRoute: typeof Char123LocaleChar125RouteRoute;
};
"/{-$locale}/hermes": {
id: "/{-$locale}/hermes";
path: "/hermes";
@@ -1153,13 +1121,6 @@ declare module "@tanstack/react-router" {
preLoaderRoute: typeof Char123LocaleChar125GeminiRouteImport;
parentRoute: typeof Char123LocaleChar125RouteRoute;
};
"/{-$locale}/fx": {
id: "/{-$locale}/fx";
path: "/fx";
fullPath: "/{-$locale}/fx";
preLoaderRoute: typeof Char123LocaleChar125FxRouteImport;
parentRoute: typeof Char123LocaleChar125RouteRoute;
};
"/{-$locale}/fast-agent": {
id: "/{-$locale}/fast-agent";
path: "/fast-agent";
@@ -1522,13 +1483,11 @@ interface Char123LocaleChar125RouteRouteChildren {
Char123LocaleChar125DownloadRoute: typeof Char123LocaleChar125DownloadRoute;
Char123LocaleChar125FactoryDroidRoute: typeof Char123LocaleChar125FactoryDroidRoute;
Char123LocaleChar125FastAgentRoute: typeof Char123LocaleChar125FastAgentRoute;
Char123LocaleChar125FxRoute: typeof Char123LocaleChar125FxRoute;
Char123LocaleChar125GeminiRoute: typeof Char123LocaleChar125GeminiRoute;
Char123LocaleChar125GlmRoute: typeof Char123LocaleChar125GlmRoute;
Char123LocaleChar125GooseRoute: typeof Char123LocaleChar125GooseRoute;
Char123LocaleChar125GrokRoute: typeof Char123LocaleChar125GrokRoute;
Char123LocaleChar125HermesRoute: typeof Char123LocaleChar125HermesRoute;
Char123LocaleChar125HopliteRoute: typeof Char123LocaleChar125HopliteRoute;
Char123LocaleChar125HubRoute: typeof Char123LocaleChar125HubRoute;
Char123LocaleChar125JunieRoute: typeof Char123LocaleChar125JunieRoute;
Char123LocaleChar125KiloRoute: typeof Char123LocaleChar125KiloRoute;
@@ -1594,13 +1553,11 @@ const Char123LocaleChar125RouteRouteChildren: Char123LocaleChar125RouteRouteChil
Char123LocaleChar125FactoryDroidRoute:
Char123LocaleChar125FactoryDroidRoute,
Char123LocaleChar125FastAgentRoute: Char123LocaleChar125FastAgentRoute,
Char123LocaleChar125FxRoute: Char123LocaleChar125FxRoute,
Char123LocaleChar125GeminiRoute: Char123LocaleChar125GeminiRoute,
Char123LocaleChar125GlmRoute: Char123LocaleChar125GlmRoute,
Char123LocaleChar125GooseRoute: Char123LocaleChar125GooseRoute,
Char123LocaleChar125GrokRoute: Char123LocaleChar125GrokRoute,
Char123LocaleChar125HermesRoute: Char123LocaleChar125HermesRoute,
Char123LocaleChar125HopliteRoute: Char123LocaleChar125HopliteRoute,
Char123LocaleChar125HubRoute: Char123LocaleChar125HubRoute,
Char123LocaleChar125JunieRoute: Char123LocaleChar125JunieRoute,
Char123LocaleChar125KiloRoute: Char123LocaleChar125KiloRoute,
@@ -1,4 +0,0 @@
import { createFileRoute } from "@tanstack/react-router";
import { agentRouteOptions } from "~/components/agent-route";
export const Route = createFileRoute("/{-$locale}/fx")(agentRouteOptions("fx"));
@@ -1,4 +0,0 @@
import { createFileRoute } from "@tanstack/react-router";
import { agentRouteOptions } from "~/components/agent-route";
export const Route = createFileRoute("/{-$locale}/hoplite")(agentRouteOptions("hoplite"));
@@ -2,7 +2,7 @@
title: Claude Code
description: Run Claude Code in Paseo using your existing Claude plan.
nav: Claude Code
order: 24
order: 23
category: Providers
---
@@ -2,7 +2,7 @@
title: Codex
description: Run Codex in Paseo using the official Codex CLI and your existing OpenAI account.
nav: Codex
order: 25
order: 24
category: Providers
---
+1 -1
View File
@@ -20,7 +20,7 @@ Run `paseo reload` after editing the file. Provider changes apply to future laun
Provider IDs must be lowercase alphanumeric with hyphens (`/^[a-z][a-z0-9-]*$/`). A new custom provider needs `extends` (a first-class provider ID or `"acp"`) and a `label`.
To override a bundled provider plugin, use its provider ID and omit `extends`. For
[Muse Code](/docs/supported-providers/muse-code), set command or environment overrides under `agents.providers.muse`.
[Muse Code](/docs/muse-code), set command or environment overrides under `agents.providers.muse`.
The examples below are a quick tour. The full, up-to-date reference is on GitHub: [docs/custom-providers.md](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md).
+1 -1
View File
@@ -16,7 +16,7 @@ nav: 自定义 Provider
编辑文件后运行 `paseo reload`。Provider 的修改会应用到之后的启动,无需重启 daemon。
Provider ID 必须是小写字母、数字和连字符(`/^[a-z][a-z0-9-]*$/`)。新的自定义 Provider 需要 `extends`(一个一等 Provider ID 或 `"acp"`)和 `label`。要覆盖内置的 Provider 插件,请使用它的 Provider ID 并省略 `extends`。对于 [Muse Code](/docs/supported-providers/muse-code),在 `agents.providers.muse` 下设置命令或环境变量覆盖。
Provider ID 必须是小写字母、数字和连字符(`/^[a-z][a-z0-9-]*$/`)。新的自定义 Provider 需要 `extends`(一个一等 Provider ID 或 `"acp"`)和 `label`。要覆盖内置的 Provider 插件,请使用它的 Provider ID 并省略 `extends`。对于 [Muse Code](/docs/muse-code),在 `agents.providers.muse` 下设置命令或环境变量覆盖。
下面的示例只是快速浏览。完整、最新的参考在 GitHub 上:[docs/custom-providers.md](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md)。
@@ -2,7 +2,7 @@
title: Muse Code
description: Install and configure Muse Code for Paseo.
nav: Muse Code
order: 29
order: 25
category: Providers
---
+1 -1
View File
@@ -2,7 +2,7 @@
title: Plugin hooks
description: Register hooks to change requests or observe agent and workspace operations.
nav: Hooks
order: 49
order: 48
category: Plugins
---
+1 -1
View File
@@ -2,7 +2,7 @@
title: Migrate a plugin to runtime entries
description: Mechanical migration from a mixed plugin entry to explicit client and server entries.
nav: Migration
order: 48
order: 47
category: Plugins
---
+1 -1
View File
@@ -2,7 +2,7 @@
title: Plugin reference
description: Local plugin files, client and server runtimes, platform limits, contributions, RPCs, lifecycle, hosts, and CLI commands.
nav: Reference
order: 50
order: 49
category: Plugins
---
-8
View File
@@ -1,11 +1,3 @@
---
title: Build a sidebar view
description: Replace the content of Paseo's sidebar with your own React Native view.
nav: Sidebar views
order: 47
category: Plugins
---
# Build a sidebar view
A sidebar view replaces the content between Paseo's header and footer. You receive theme tokens,
@@ -1,9 +1,3 @@
---
title: 构建侧边栏视图
description: 用你自己的 React Native 视图替换 Paseo 侧边栏的内容。
nav: 侧边栏视图
---
# 构建侧边栏视图 {#build-a-sidebar-view}
侧边栏视图替换 Paseo 页眉与页脚之间的内容。插件接收主题令牌、当前实体引用和导航方法,使用 React Native 绘制自己的界面。安装[侧边栏视图示例](https://github.com/getpaseo/paseo/tree/main/plugin-examples/sidebar-views),体验项目列表、按任务分组的 Agent、嵌套 Agent 和标签文件夹。
+4 -4
View File
@@ -1,6 +1,6 @@
---
title: Providers
description: How Paseo thinks about coding agents, wrapping existing CLIs, native support and ACP agents, and where to go next.
description: How Paseo thinks about coding agents, wrapping existing CLIs, native vs ACP support, and where to go next.
nav: Providers
order: 20
category: Providers
@@ -16,10 +16,10 @@ To try the workflow, [run parallel tasks in separate worktrees](/docs/parallel-d
A provider is the contract between Paseo and one external agent CLI: how to launch it, how to stream its output, how to send input back, what modes it supports. The actual binary lives on your machine and runs as a normal subprocess.
## Native support and ACP agents
## Two tiers
- **Native support.** Paseo ships an integration for each of these agents: [Antigravity](/docs/supported-providers/antigravity), [Claude Code](/docs/supported-providers/claude-code), [Codex](/docs/supported-providers/codex), [fx](/docs/supported-providers/fx), [GitHub Copilot](/docs/supported-providers/github-copilot), [Hoplite](/docs/supported-providers/hoplite), [Muse Code](/docs/supported-providers/muse-code), [Oh My Pi](/docs/supported-providers/omp), [OpenCode](/docs/supported-providers/opencode), and [Pi](/docs/supported-providers/pi). Most of them appear in Paseo when the CLI is installed, with mode metadata and voice support where applicable.
- **ACP agents.** Paseo runs any agent that speaks the [Agent Client Protocol](https://agentclientprotocol.com) through a generic adapter. The in-app catalog lists Cursor, Gemini CLI, Hermes, Kimi, Qwen Code, and 30+ more, and you can add any other ACP agent yourself.
- **Native support**, Paseo ships a bundled adapter for the major agents (Claude Code, Codex, OpenCode, Pi, [Antigravity](/docs/supported-providers#antigravity), [Muse Code](/docs/muse-code)). Auto-discovered when the underlying CLI is installed, with mode metadata and voice support where applicable.
- **ACP catalog**, any agent speaking the [Agent Client Protocol](https://agentclientprotocol.com) is supported through a generic adapter. Paseo ships a curated catalog of one-click installs (Cursor, Gemini, GitHub Copilot, Hermes, Kimi, Qwen Code, and 25+ more), and you can add any other ACP agent yourself.
Either way, **you install the underlying CLI**. Paseo runs it.
+4 -4
View File
@@ -1,6 +1,6 @@
---
title: Provider
description: Paseo 如何看待编程 Agent:封装现有 CLI、原生支持与 ACP Agent,以及接下来去哪里。
description: Paseo 如何看待编程 Agent:封装现有 CLI、原生支持与 ACP 支持,以及接下来去哪里。
nav: Provider
---
@@ -14,10 +14,10 @@ Paseo 在带有编辑器、终端、diff(桌面端还有浏览器)的工作
Provider 是 Paseo 与某个外部 Agent CLI 之间的约定:如何启动它、如何流式读取输出、如何回传输入、支持哪些模式。实际的二进制文件位于你的机器上,作为普通子进程运行。
## 原生支持与 ACP Agent {#native-support-and-acp-agents}
## 两个层级 {#two-tiers}
- **原生支持**:Paseo 为以下每个 Agent 都提供了集成:[Antigravity](/docs/supported-providers/antigravity)、[Claude Code](/docs/supported-providers/claude-code)、[Codex](/docs/supported-providers/codex)、[fx](/docs/supported-providers/fx)、[GitHub Copilot](/docs/supported-providers/github-copilot)、[Hoplite](/docs/supported-providers/hoplite)、[Muse Code](/docs/supported-providers/muse-code)、[Oh My Pi](/docs/supported-providers/omp)、[OpenCode](/docs/supported-providers/opencode) 和 [Pi](/docs/supported-providers/pi)。其中大多数在安装 CLI 后就会出现在 Paseo 中,并在适用时提供模式元数据和语音支持。
- **ACP Agent**:任何使用 [Agent Client Protocol](https://agentclientprotocol.com) 的 Agent 都可以通过通用适配器运行。应用内目录列出了 Cursor、Gemini CLI、Hermes、Kimi、Qwen Code 等 30 多个 Agent,你也可以自行添加任何其他 ACP Agent。
- **原生支持**:Paseo 为主流 Agent(Claude Code、Codex、OpenCode、Pi、[Antigravity](/docs/supported-providers#antigravity)、[Muse Code](/docs/muse-code))内置了适配器。安装底层 CLI 后会被自动发现,并在适用时提供模式元数据和语音支持。
- **ACP 目录**:任何使用 [Agent Client Protocol](https://agentclientprotocol.com) 的 Agent 都可以通过通用适配器获得支持。Paseo 提供一个精选目录,支持一键安装(Cursor、Gemini、GitHub Copilot、Hermes、Kimi、Qwen Code 等 25 个以上),你也可以自行添加任何其他 ACP Agent。
无论哪种方式,**底层 CLI 都由你安装**,Paseo 负责运行它。
+133
View File
@@ -0,0 +1,133 @@
---
title: Supported providers
description: Every coding agent Paseo can launch, natively supported providers and the ACP catalog.
nav: Supported providers
order: 21
category: Providers
---
# Supported providers
For the concept and how Paseo manages providers, see [Providers](/docs/providers). To add or configure your own, see [Custom providers](/docs/custom-providers).
## Native support
Work out of the box once the underlying CLI is installed and authenticated.
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code). Anthropic's coding agent with MCP support, streaming, and deep reasoning.
- [Codex](/docs/codex). OpenAI's workspace agent with sandbox controls and optional network access.
- [OpenCode](https://opencode.ai/). Open-source coding assistant with multi-provider model support.
- [Pi](https://pi.dev). Minimal terminal-based coding agent with multi-provider LLM support.
- [Antigravity](#antigravity). Uses your installed `agy` CLI through a built-in provider plugin.
- [Muse Code](/docs/muse-code). Meta's terminal coding agent, bundled as a provider plugin.
### Antigravity
Install the Antigravity CLI (`agy`) on your daemon host, then run `agy` once to sign in. Pick
**Antigravity** in Paseo. The provider ships with Paseo; no separate plugin install is required.
**Full access** is the only permission mode. Antigravity cannot ask for permission when another
app drives it, so Paseo starts `agy` with `--dangerously-skip-permissions`. Every tool call,
including shell commands, runs without asking. Each session starts with a warning explaining
this, including when you reopen a chat. Antigravity's own policy can still deny
an action.
After a daemon restart, Antigravity remembers the conversation, but Paseo's transcript starts
fresh because `agy` does not replay its history.
This integration uses your installed CLI and sign-in. It is not endorsed by Google.
Paseo MCP tools and steering are unavailable. Your own `agy` MCP servers still work. Attached
images are passed as file references for the agent to read.
If `agy` is outside your daemon's PATH, override its command in `~/.paseo/config.json`. Use `env`
for provider-specific environment variables:
```json
{
"agents": {
"providers": {
"antigravity": {
"command": ["/absolute/path/to/agy"],
"env": { "EXAMPLE_VARIABLE": "value" }
}
}
}
}
```
See [Custom providers](/docs/custom-providers) for command and environment overrides.
## ACP catalog
Pick any of these from the in-app provider catalog. Each entry is a one-click install of the underlying CLI.
- [Agoragentic](https://agoragentic.com), agent marketplace with 174+ AI capabilities.
- [Amp](https://github.com/tao12345666333/amp-acp), frontier coding agent.
- [Auggie CLI](https://www.augmentcode.com/), Augment Code's agent backed by their context engine.
- [Autohand Code](https://www.autohand.ai/cli/), Autohand AI's coding agent.
- [Cline](https://cline.bot/cli), autonomous coding agent.
- [Codebuddy Code](https://www.codebuddy.cn/cli/), Tencent Cloud's coding tool.
- [CodeWhale](https://codewhale.net/), terminal coding agent for DeepSeek V4 and open models.
- [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code-cli), Snowflake's coding agent.
- [Corust Agent](https://github.com/Corust-ai/corust-agent-release/releases), Rust-focused coding partner.
- [crow-cli](https://crow-ai.dev/), minimal ACP-native coding agent.
- [Cursor](https://cursor.com/docs/cli/overview), Cursor's coding agent.
- [DeepAgents](https://docs.langchain.com/oss/javascript/deepagents/overview), LangChain-powered coding agent.
- [DimCode](https://dimcode.dev/docs/acp.html), multi-model coding agent.
- [Dirac](https://dirac.run), open-source agent with hash-anchored parallel edits.
- [Factory Droid](https://factory.ai/product/cli), Factory AI's coding agent.
- [fast-agent](https://fast-agent.ai/acp/), multi-provider coding agent.
- [fx](#fx), Vercel Labs' native coding agent.
- [Gajae Code](https://gajae-code.com), subscription-based coding agent with plan-before-mutation workflows.
- [Gemini CLI](https://geminicli.com), Google's official Gemini CLI.
- [GitHub Copilot](https://github.com/features/copilot/cli/), GitHub's AI pair programmer via ACP.
- [GLM Agent](https://github.com/stefandevo/glm-acp-agent), Zhipu AI's GLM coding agent.
- [goose](https://block.github.io/goose/), Block's local open-source AI agent.
- [Grok](https://docs.x.ai/build/overview), xAI's Grok Build agentic coding CLI.
- [Hermes Agent](https://hermes-agent.nousresearch.com/docs/user-guide/features/acp), Nous Research's self-improving agent.
- [Hoplite](#hoplite), cloud coding agent through its local ACP bridge.
- [Junie](https://junie.jetbrains.com/docs/junie-cli-acp.html), JetBrains' coding agent.
- [Kilo Code](https://kilo.ai/docs/code-with-ai/platforms/cli), open-source coding agent.
- [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code), Moonshot AI's coding assistant.
- [Minion Code](https://github.com/femto/minion-code), Minion-framework coding agent.
- [Mistral Vibe](https://github.com/mistralai/mistral-vibe), Mistral's open-source CLI assistant.
- [Nova](https://www.compassap.ai/portfolio/nova.html), Compass AI's software engineer.
- [Poolside](https://docs.poolside.ai/cli/pool), Poolside's coding agent.
- [Qoder](https://qoder.com), agentic coding assistant.
- [Qwen Code](https://qwenlm.github.io/qwen-code-docs/en/users/overview), Alibaba's Qwen coding assistant.
- [siGit Code](https://github.com/getsigit/sigit), local-first coding agent with optional on-device LLM.
- [Stakpak](https://stakpak.dev/), Rust-based DevOps agent.
- [TRAE CLI](https://docs.trae.cn/cli_get-started-with-trae-cli), ByteDance's official TRAE coding agent.
- [VT Code](https://github.com/vinhnx/VTCode/blob/main/docs/guides/zed-acp.md), open-source multi-provider coding agent.
The in-app catalog is the canonical, version-pinned source. Anything not listed here can still be added manually, see [Custom providers](/docs/custom-providers).
### fx
[Install fx](https://fx.sh/docs/getting-started/installation) on your daemon host and
[connect a provider](https://fx.sh/docs/getting-started/authentication), for example with
`fx login`. In **Settings → Hosts → your host → Providers**, find **fx** in the catalog and
choose **Add**. Paseo launches `fx acp` and uses your fx credentials and settings. Until fx has
credentials, the provider reports the sign-in message from fx.
The model list comes from your active fx provider, so run `fx provider` to change the list a new
agent starts from. Changing an agent's permission mode also changes fx's saved permission mode.
See [fx's ACP guide](https://fx.sh/docs/using-fx/acp) for what fx supports. Use a
[command override](/docs/custom-providers) if `fx` is outside your daemon's PATH; keep `acp` in
the arguments.
### Hoplite
Install the [Hoplite CLI](https://hoplite.sh/docs/cli) on your daemon host and run
`hoplite login`. In **Settings → Hosts → your host → Providers**, find **Hoplite**
in the catalog and choose **Add**. Paseo launches `hoplite acp` through the generic ACP adapter.
Hoplite runs the agent in a cloud workspace. Open a repository linked to a Hoplite project,
or set `agents.providers.hoplite.env.HOPLITE_PROJECT_ID` to use one project everywhere.
Without a linked repository or pinned project, discovery reports `No Hoplite project`.
Your local files and Paseo's loopback MCP tools are not available in that cloud workspace.
See [Hoplite's ACP guide](https://hoplite.sh/docs/cli/acp) for authentication and project setup.
Use a [command override](/docs/custom-providers) if `hoplite` is outside your daemon's PATH;
keep `acp` in the arguments.
+108
View File
@@ -0,0 +1,108 @@
---
title: 支持的 Provider
description: Paseo 可以启动的所有编程 Agent,包括原生支持的 Provider 和 ACP 目录。
nav: 支持的 Provider
---
# 支持的 Provider {#supported-providers}
关于 Provider 的概念以及 Paseo 如何管理 Provider,请参见 [Provider](/docs/providers)。要添加或配置你自己的 Provider,请参见[自定义 Provider](/docs/custom-providers)。
## 原生支持 {#native-support}
安装底层 CLI 并完成认证后即可开箱使用。
- [Claude Code](https://docs.anthropic.com/en/docs/claude-code)。Anthropic 的编程 Agent,支持 MCP、流式输出和深度推理。
- [Codex](/docs/codex)。OpenAI 的工作区 Agent,带有沙箱控制和可选的网络访问。
- [OpenCode](https://opencode.ai/)。开源编程助手,支持多家 Provider 的模型。
- [Pi](https://pi.dev)。极简的终端编程 Agent,支持多家 Provider 的 LLM。
- [Antigravity](#antigravity)。通过内置的 Provider 插件使用你已安装的 `agy` CLI。
- [Muse Code](/docs/muse-code)。Meta 的终端编程 Agent,以 Provider 插件的形式内置。
### Antigravity {#antigravity}
在 daemon 主机上安装 Antigravity CLI(`agy`),然后运行一次 `agy` 登录。在 Paseo 中选择 **Antigravity**。该 Provider 随 Paseo 一起提供,无需另外安装插件。
**Full access** 是唯一的权限模式。当由其他应用驱动时,Antigravity 无法请求权限,因此 Paseo 会以 `--dangerously-skip-permissions` 启动 `agy`。每次工具调用(包括 shell 命令)都不会询问就直接运行。每个会话开始时都会显示一条说明此事的警告,重新打开聊天时也会显示。Antigravity 自己的策略仍然可以拒绝某个操作。
daemon 重启后,Antigravity 会记得对话,但 Paseo 的对话记录会重新开始,因为 `agy` 不会重放它的历史。
此集成使用你已安装的 CLI 和登录状态,未经 Google 认可。
Paseo MCP 工具和引导功能不可用。你自己为 `agy` 配置的 MCP 服务器仍然可用。附加的图片会以文件引用的形式传给 Agent 读取。
如果 `agy` 不在 daemon 的 PATH 中,请在 `~/.paseo/config.json` 中覆盖它的命令。使用 `env` 设置 Provider 专用的环境变量:
```json
{
"agents": {
"providers": {
"antigravity": {
"command": ["/absolute/path/to/agy"],
"env": { "EXAMPLE_VARIABLE": "value" }
}
}
}
}
```
命令和环境变量覆盖见[自定义 Provider](/docs/custom-providers)。
## ACP 目录 {#acp-catalog}
在应用内的 Provider 目录中选择以下任意一个。每个条目都可以一键安装底层 CLI。
- [Agoragentic](https://agoragentic.com):拥有 174 种以上 AI 能力的 Agent 市场。
- [Amp](https://github.com/tao12345666333/amp-acp):前沿的编程 Agent。
- [Auggie CLI](https://www.augmentcode.com/):Augment Code 的 Agent,由其上下文引擎支撑。
- [Autohand Code](https://www.autohand.ai/cli/):Autohand AI 的编程 Agent。
- [Cline](https://cline.bot/cli):自主编程 Agent。
- [Codebuddy Code](https://www.codebuddy.cn/cli/):腾讯云的编程工具。
- [CodeWhale](https://codewhale.net/):面向 DeepSeek V4 和开放模型的终端编程 Agent。
- [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code-cli):Snowflake 的编程 Agent。
- [Corust Agent](https://github.com/Corust-ai/corust-agent-release/releases):专注于 Rust 的编程伙伴。
- [crow-cli](https://crow-ai.dev/):极简的原生 ACP 编程 Agent。
- [Cursor](https://cursor.com/docs/cli/overview):Cursor 的编程 Agent。
- [DeepAgents](https://docs.langchain.com/oss/javascript/deepagents/overview):基于 LangChain 的编程 Agent。
- [DimCode](https://dimcode.dev/docs/acp.html):多模型编程 Agent。
- [Dirac](https://dirac.run):开源 Agent,支持基于哈希锚点的并行编辑。
- [Factory Droid](https://factory.ai/product/cli):Factory AI 的编程 Agent。
- [fast-agent](https://fast-agent.ai/acp/):支持多家 Provider 的编程 Agent。
- [fx](#fx):Vercel Labs 的原生编程 Agent。
- [Gajae Code](https://gajae-code.com):订阅制编程 Agent,采用先规划再修改的工作流。
- [Gemini CLI](https://geminicli.com):Google 官方的 Gemini CLI。
- [GitHub Copilot](https://github.com/features/copilot/cli/):通过 ACP 接入的 GitHub AI 结对编程助手。
- [GLM Agent](https://github.com/stefandevo/glm-acp-agent):智谱 AI 的 GLM 编程 Agent。
- [goose](https://block.github.io/goose/):Block 的本地开源 AI Agent。
- [Grok](https://docs.x.ai/build/overview):xAI 的 Grok Build Agent 编程 CLI。
- [Hermes Agent](https://hermes-agent.nousresearch.com/docs/user-guide/features/acp):Nous Research 的自我改进型 Agent。
- [Hoplite](#hoplite):通过本地 ACP 桥接入的云端编程 Agent。
- [Junie](https://junie.jetbrains.com/docs/junie-cli-acp.html):JetBrains 的编程 Agent。
- [Kilo Code](https://kilo.ai/docs/code-with-ai/platforms/cli):开源编程 Agent。
- [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code):月之暗面的编程助手。
- [Minion Code](https://github.com/femto/minion-code):基于 Minion 框架的编程 Agent。
- [Mistral Vibe](https://github.com/mistralai/mistral-vibe):Mistral 的开源 CLI 助手。
- [Nova](https://www.compassap.ai/portfolio/nova.html):Compass AI 的软件工程师。
- [Poolside](https://docs.poolside.ai/cli/pool):Poolside 的编程 Agent。
- [Qoder](https://qoder.com):Agent 式编程助手。
- [Qwen Code](https://qwenlm.github.io/qwen-code-docs/en/users/overview):阿里巴巴的通义千问编程助手。
- [siGit Code](https://github.com/getsigit/sigit):本地优先的编程 Agent,可选使用设备端 LLM。
- [Stakpak](https://stakpak.dev/):基于 Rust 的 DevOps Agent。
- [TRAE CLI](https://docs.trae.cn/cli_get-started-with-trae-cli):字节跳动官方的 TRAE 编程 Agent。
- [VT Code](https://github.com/vinhnx/VTCode/blob/main/docs/guides/zed-acp.md):开源的多 Provider 编程 Agent。
应用内目录是权威的、固定版本的来源。这里未列出的 Agent 仍然可以手动添加,参见[自定义 Provider](/docs/custom-providers)。
### fx {#fx}
在 daemon 主机上[安装 fx](https://fx.sh/docs/getting-started/installation),并[连接一个模型提供方](https://fx.sh/docs/getting-started/authentication),例如运行 `fx login`。在 **设置 → Hosts → 你的主机 → Providers** 中,在目录里找到 **fx** 并选择 **Add**。Paseo 会启动 `fx acp`,并使用你的 fx 凭据和设置。在 fx 拿到凭据之前,该 provider 会显示 fx 给出的登录提示。
模型列表来自当前的 fx 提供方,运行 `fx provider` 可以更改新 Agent 使用的列表。更改 Agent 的权限模式也会更改 fx 保存的权限模式。fx 支持的功能见 [fx 的 ACP 指南](https://fx.sh/docs/using-fx/acp)。如果 `fx` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers),并在参数中保留 `acp`。
### Hoplite {#hoplite}
在 daemon 主机上安装 [Hoplite CLI](https://hoplite.sh/docs/cli) 并运行 `hoplite login`。在 **设置 → Hosts → 你的主机 → Providers** 中,在目录里找到 **Hoplite** 并选择 **添加**。Paseo 会通过通用 ACP 适配器启动 `hoplite acp`。
Hoplite 在云端工作区中运行 Agent。请打开一个关联了 Hoplite 项目的仓库,或者设置 `agents.providers.hoplite.env.HOPLITE_PROJECT_ID`,在所有地方使用同一个项目。如果既没有关联的仓库也没有固定的项目,发现过程会报告 `No Hoplite project`。你的本地文件和 Paseo 的回环 MCP 工具在该云端工作区中不可用。
认证和项目设置见 [Hoplite 的 ACP 指南](https://hoplite.sh/docs/cli/acp)。如果 `hoplite` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers),并在参数中保留 `acp`。
@@ -1,42 +0,0 @@
---
title: Antigravity
description: Install and configure Antigravity for Paseo.
nav: Antigravity
order: 23
category: Providers
---
# Antigravity
Run Antigravity in Paseo with your installed `agy` CLI and sign-in. This integration is not endorsed by Google.
## Getting started
Install the Antigravity CLI (`agy`) on your daemon host, then run `agy` once to sign in. In Paseo, select **Antigravity**. The provider ships with Paseo, so you do not install a plugin.
If `agy` is outside your daemon's PATH, override its command in `~/.paseo/config.json`. Use `env` for provider-specific environment variables:
```json
{
"agents": {
"providers": {
"antigravity": {
"command": ["/absolute/path/to/agy"],
"env": { "EXAMPLE_VARIABLE": "value" }
}
}
}
}
```
See [Custom providers](/docs/custom-providers) for command and environment overrides.
## Permissions
**Full access** is the only permission mode. Antigravity cannot ask for permission when another app drives it, so Paseo starts `agy` with `--dangerously-skip-permissions`. Every tool call, including shell commands, runs without asking. Each session starts with a warning that explains this, including when you reopen a chat. Antigravity's own policy can still deny an action.
## Limitations
- Paseo MCP tools and steering are unavailable. Your own `agy` MCP servers still work.
- Attached images are passed as file references for the agent to read.
- After a daemon restart, Antigravity remembers the conversation, but Paseo's transcript starts fresh because `agy` does not replay its history.
@@ -1,40 +0,0 @@
---
title: Antigravity
description: 为 Paseo 安装和配置 Antigravity。
nav: Antigravity
---
# Antigravity {#antigravity}
使用你已安装的 `agy` CLI 和登录状态,在 Paseo 中运行 Antigravity。此集成未经 Google 认可。
## 开始使用 {#getting-started}
在 daemon 主机上安装 Antigravity CLI(`agy`),然后运行一次 `agy` 登录。在 Paseo 中选择 **Antigravity**。该 Provider 随 Paseo 一起提供,无需另外安装插件。
如果 `agy` 不在 daemon 的 PATH 中,请在 `~/.paseo/config.json` 中覆盖它的命令。使用 `env` 设置 Provider 专用的环境变量:
```json
{
"agents": {
"providers": {
"antigravity": {
"command": ["/absolute/path/to/agy"],
"env": { "EXAMPLE_VARIABLE": "value" }
}
}
}
}
```
命令和环境变量覆盖见[自定义 Provider](/docs/custom-providers)。
## 权限 {#permissions}
**Full access** 是唯一的权限模式。当由其他应用驱动时,Antigravity 无法请求权限,因此 Paseo 会以 `--dangerously-skip-permissions` 启动 `agy`。每次工具调用(包括 shell 命令)都不会询问就直接运行。每个会话开始时都会显示一条说明此事的警告,重新打开聊天时也会显示。Antigravity 自己的策略仍然可以拒绝某个操作。
## 限制 {#limitations}
- Paseo MCP 工具和引导功能不可用。你自己为 `agy` 配置的 MCP 服务器仍然可用。
- 附加的图片会以文件引用的形式传给 Agent 读取。
- daemon 重启后,Antigravity 会记得对话,但 Paseo 的对话记录会重新开始,因为 `agy` 不会重放它的历史。
-29
View File
@@ -1,29 +0,0 @@
---
title: fx
description: Install and configure fx for Paseo.
nav: fx
order: 26
category: Providers
---
# fx
Run fx, the coding agent from Vercel Labs, in Paseo with your existing fx installation and credentials.
## Getting started
1. [Install fx](https://fx.sh/docs/getting-started/installation) on your daemon host.
2. [Connect fx to a model provider](https://fx.sh/docs/getting-started/authentication), for example with `fx login`.
3. In Paseo, open **Settings → Hosts → your host → Providers**, find **fx** in the catalog, and choose **Add**.
Paseo launches `fx acp` and uses your fx credentials and settings. Until fx has credentials, the provider reports the sign-in message from fx.
If `fx` is outside your daemon's PATH, use a [command override](/docs/custom-providers) and keep `acp` in the arguments.
## Models and permissions
The model list comes from the model provider that is active in fx. Run `fx provider` to change the list that a new agent starts from.
Changing an agent's permission mode in Paseo also changes fx's saved permission mode.
See [fx's ACP guide](https://fx.sh/docs/using-fx/acp) for what fx supports.
@@ -1,27 +0,0 @@
---
title: fx
description: 为 Paseo 安装和配置 fx。
nav: fx
---
# fx {#fx}
使用你现有的 fx 安装和凭据,在 Paseo 中运行 Vercel Labs 的编程 Agent fx。
## 开始使用 {#getting-started}
1. 在 daemon 主机上[安装 fx](https://fx.sh/docs/getting-started/installation)。
2. [为 fx 连接一个模型提供方](https://fx.sh/docs/getting-started/authentication),例如运行 `fx login`。
3. 在 Paseo 中打开 **设置 → Hosts → 你的主机 → Providers**,在目录里找到 **fx** 并选择 **添加**。
Paseo 会启动 `fx acp`,并使用你的 fx 凭据和设置。在 fx 拿到凭据之前,该 Provider 会显示 fx 给出的登录提示。
如果 `fx` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers),并在参数中保留 `acp`。
## 模型和权限 {#models-and-permissions}
模型列表来自 fx 中当前启用的模型提供方。运行 `fx provider` 可以更改新 Agent 使用的列表。
在 Paseo 中更改 Agent 的权限模式,也会更改 fx 保存的权限模式。
fx 支持的功能见 [fx 的 ACP 指南](https://fx.sh/docs/using-fx/acp)。
@@ -1,29 +0,0 @@
---
title: GitHub Copilot
description: Install the GitHub Copilot CLI and run it in Paseo.
nav: GitHub Copilot
order: 27
category: Providers
---
# GitHub Copilot
Run GitHub Copilot in Paseo with your existing `copilot` CLI and GitHub account.
## Getting started
1. Install the [GitHub Copilot CLI](https://github.com/features/copilot/cli/) on your daemon host.
2. Run `copilot` in a terminal and sign in to GitHub.
3. In Paseo, choose **Copilot** when you start an agent.
Paseo launches `copilot --acp` and uses the sign-in that the CLI already has. If `copilot` is outside your daemon's PATH, use a [command override](/docs/custom-providers#custom-binary) and keep `--acp` in the arguments.
## Modes
**Agent** is the default mode.
| Mode | Effect |
| --------- | ------------------------------------------------------------- |
| Agent | The default mode for conversational work. |
| Plan | Copilot creates multi-step plans and executes them. |
| Allow All | Copilot approves every tool, path, and URL request by itself. |
@@ -1,27 +0,0 @@
---
title: GitHub Copilot
description: 安装 GitHub Copilot CLI 并在 Paseo 中运行。
nav: GitHub Copilot
---
# GitHub Copilot {#github-copilot}
使用你现有的 `copilot` CLI 和 GitHub 账号,在 Paseo 中运行 GitHub Copilot。
## 开始使用 {#getting-started}
1. 在 daemon 主机上安装 [GitHub Copilot CLI](https://github.com/features/copilot/cli/)。
2. 在终端中运行 `copilot` 并登录 GitHub。
3. 在 Paseo 中启动 Agent 时选择 **Copilot**。
Paseo 会启动 `copilot --acp`,并使用 CLI 已有的登录状态。如果 `copilot` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers#custom-binary),并在参数中保留 `--acp`。
## 模式 {#modes}
**Agent** 是默认模式。
| 模式 | 效果 |
| --------- | ------------------------------------------- |
| Agent | 用于对话式工作的默认模式。 |
| Plan | Copilot 创建多步骤计划并执行。 |
| Allow All | Copilot 自行批准所有工具、路径和 URL 请求。 |
@@ -1,27 +0,0 @@
---
title: Hoplite
description: Install and configure Hoplite for Paseo.
nav: Hoplite
order: 28
category: Providers
---
# Hoplite
Run Hoplite's cloud coding agent in Paseo through the Hoplite CLI on your daemon host.
## Getting started
1. Install the [Hoplite CLI](https://hoplite.sh/docs/cli) on your daemon host.
2. Run `hoplite login`.
3. In Paseo, open **Settings → Hosts → your host → Providers**, find **Hoplite** in the catalog, and choose **Add**.
Paseo launches `hoplite acp`. See [Hoplite's ACP guide](https://hoplite.sh/docs/cli/acp) for authentication and project setup.
If `hoplite` is outside your daemon's PATH, use a [command override](/docs/custom-providers) and keep `acp` in the arguments.
## Projects and the cloud workspace
Hoplite runs the agent in a cloud workspace. Your local files and Paseo's loopback MCP tools are not available in that cloud workspace.
Open a repository that is linked to a Hoplite project, or set `agents.providers.hoplite.env.HOPLITE_PROJECT_ID` to use one project everywhere. Without a linked repository or a pinned project, discovery reports `No Hoplite project`.
@@ -1,25 +0,0 @@
---
title: Hoplite
description: 为 Paseo 安装和配置 Hoplite。
nav: Hoplite
---
# Hoplite {#hoplite}
通过 daemon 主机上的 Hoplite CLI,在 Paseo 中运行 Hoplite 的云端编程 Agent。
## 开始使用 {#getting-started}
1. 在 daemon 主机上安装 [Hoplite CLI](https://hoplite.sh/docs/cli)。
2. 运行 `hoplite login`。
3. 在 Paseo 中打开 **设置 → Hosts → 你的主机 → Providers**,在目录里找到 **Hoplite** 并选择 **添加**。
Paseo 会启动 `hoplite acp`。认证和项目设置见 [Hoplite 的 ACP 指南](https://hoplite.sh/docs/cli/acp)。
如果 `hoplite` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers),并在参数中保留 `acp`。
## 项目和云端工作区 {#projects-and-the-cloud-workspace}
Hoplite 在云端工作区中运行 Agent。你的本地文件和 Paseo 的回环 MCP 工具在该云端工作区中不可用。
请打开一个关联了 Hoplite 项目的仓库,或者设置 `agents.providers.hoplite.env.HOPLITE_PROJECT_ID`,在所有地方使用同一个项目。如果既没有关联的仓库也没有固定的项目,发现过程会报告 `No Hoplite project`。
-73
View File
@@ -1,73 +0,0 @@
---
title: Supported providers
description: Every coding agent Paseo can launch, with native support or through ACP.
nav: Supported providers
order: 21
category: Providers
---
# Supported providers
Paseo runs coding agents that you install and sign in to on your daemon host. For how Paseo manages providers, see [Providers](/docs/providers). To add an agent that is not listed here, see [Custom providers](/docs/custom-providers).
## Native support
Paseo ships an integration for each of these agents.
- [Antigravity](/docs/supported-providers/antigravity), runs through your installed `agy` CLI.
- [Claude Code](/docs/supported-providers/claude-code), Anthropic's coding agent.
- [Codex](/docs/supported-providers/codex), OpenAI's workspace agent.
- [fx](/docs/supported-providers/fx), Vercel Labs' coding agent.
- [GitHub Copilot](/docs/supported-providers/github-copilot), GitHub's AI pair programmer.
- [Hoplite](/docs/supported-providers/hoplite), cloud coding agent.
- [Muse Code](/docs/supported-providers/muse-code), Meta's terminal coding agent.
- [Oh My Pi](/docs/supported-providers/omp), multi-provider coding agent.
- [OpenCode](/docs/supported-providers/opencode), open-source coding assistant.
- [Pi](/docs/supported-providers/pi), minimal terminal coding agent.
## More agents through ACP
Paseo runs any agent that speaks the [Agent Client Protocol](https://agentclientprotocol.com) (ACP). The in-app catalog lists the agents below.
To add one, open **Settings → Hosts → your host → Providers**, find the agent in the catalog, and choose **Add**. Entries that launch through `npx` or `uvx` need only that tool on your daemon host. For the other entries, install the CLI of the agent first. Each entry links to its install instructions.
- [Agoragentic](https://agoragentic.com), agent marketplace with 174+ AI capabilities.
- [Amp](https://github.com/tao12345666333/amp-acp), frontier coding agent.
- [Auggie CLI](https://www.augmentcode.com/), Augment Code's agent backed by their context engine.
- [Autohand Code](https://www.autohand.ai/cli/), Autohand AI's coding agent.
- [Cline](https://cline.bot/cli), autonomous coding agent.
- [Codebuddy Code](https://www.codebuddy.cn/cli/), Tencent Cloud's coding tool.
- [CodeWhale](https://codewhale.net/), terminal coding agent for DeepSeek V4 and open models.
- [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code-cli), Snowflake's coding agent.
- [Corust Agent](https://github.com/Corust-ai/corust-agent-release/releases), Rust-focused coding partner.
- [crow-cli](https://crow-ai.dev/), minimal ACP-native coding agent.
- [Cursor](https://cursor.com/docs/cli/overview), Cursor's coding agent.
- [DeepAgents](https://docs.langchain.com/oss/javascript/deepagents/overview), LangChain-powered coding agent.
- [Devin CLI](https://cli.devin.ai/docs), Cognition's Devin for the terminal.
- [DimCode](https://dimcode.dev/docs/acp.html), multi-model coding agent.
- [Dirac](https://dirac.run), open-source agent with hash-anchored parallel edits.
- [Factory Droid](https://factory.ai/product/cli), Factory AI's coding agent.
- [fast-agent](https://fast-agent.ai/acp/), multi-provider coding agent.
- [Gajae Code](https://gajae-code.com), subscription-based coding agent with plan-before-mutation workflows.
- [Gemini CLI](https://geminicli.com), Google's official Gemini CLI.
- [GLM Agent](https://github.com/stefandevo/glm-acp-agent), Zhipu AI's GLM coding agent.
- [goose](https://block.github.io/goose/), Block's local open-source AI agent.
- [Grok](https://docs.x.ai/build/overview), xAI's Grok Build agentic coding CLI.
- [Hermes Agent](https://hermes-agent.nousresearch.com/docs/user-guide/features/acp), Nous Research's self-improving agent.
- [Junie](https://junie.jetbrains.com/docs/junie-cli-acp.html), JetBrains' coding agent.
- [Kilo Code](https://kilo.ai/docs/code-with-ai/platforms/cli), open-source coding agent.
- [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code), Moonshot AI's coding assistant.
- [Kiro CLI](https://kiro.dev/docs/cli/acp/), Amazon's coding agent.
- [MiniMax Code](https://agent.minimax.io), MiniMax's terminal coding agent.
- [Minion Code](https://github.com/femto/minion-code), Minion-framework coding agent.
- [Mistral Vibe](https://github.com/mistralai/mistral-vibe), Mistral's open-source CLI assistant.
- [Nova](https://www.compassap.ai/portfolio/nova.html), Compass AI's software engineer.
- [Poolside](https://docs.poolside.ai/cli/pool), Poolside's coding agent.
- [Qoder](https://qoder.com), agentic coding assistant.
- [Qwen Code](https://qwenlm.github.io/qwen-code-docs/en/users/overview), Alibaba's Qwen coding assistant.
- [siGit Code](https://github.com/getsigit/sigit), local-first coding agent with optional on-device LLM.
- [Stakpak](https://stakpak.dev/), Rust-based DevOps agent.
- [TRAE CLI](https://docs.trae.cn/cli_get-started-with-trae-cli), ByteDance's official TRAE coding agent.
- [VT Code](https://github.com/vinhnx/VTCode/blob/main/docs/guides/zed-acp.md), open-source multi-provider coding agent.
The in-app catalog is the version-pinned source of this list. To add an agent that the catalog does not list, see [Custom providers](/docs/custom-providers#acp-providers).
@@ -1,71 +0,0 @@
---
title: 支持的 Provider
description: Paseo 可以启动的所有编程 Agent,包括原生支持的 Provider 和通过 ACP 运行的 Agent。
nav: 支持的 Provider
---
# 支持的 Provider {#supported-providers}
Paseo 运行由你在 daemon 主机上安装并登录的编程 Agent。关于 Paseo 如何管理 Provider,请参见 [Provider](/docs/providers)。要添加这里未列出的 Agent,请参见[自定义 Provider](/docs/custom-providers)。
## 原生支持 {#native-support}
Paseo 为以下每个 Agent 都提供了集成。
- [Antigravity](/docs/supported-providers/antigravity):通过你已安装的 `agy` CLI 运行。
- [Claude Code](/docs/supported-providers/claude-code):Anthropic 的编程 Agent。
- [Codex](/docs/supported-providers/codex):OpenAI 的工作区 Agent。
- [fx](/docs/supported-providers/fx):Vercel Labs 的编程 Agent。
- [GitHub Copilot](/docs/supported-providers/github-copilot):GitHub 的 AI 结对编程助手。
- [Hoplite](/docs/supported-providers/hoplite):云端编程 Agent。
- [Muse Code](/docs/supported-providers/muse-code):Meta 的终端编程 Agent。
- [Oh My Pi](/docs/supported-providers/omp):支持多家 Provider 的编程 Agent。
- [OpenCode](/docs/supported-providers/opencode):开源编程助手。
- [Pi](/docs/supported-providers/pi):极简的终端编程 Agent。
## 通过 ACP 运行的更多 Agent {#more-agents-through-acp}
Paseo 可以运行任何使用 [Agent Client Protocol](https://agentclientprotocol.com)(ACP)的 Agent。应用内目录列出了以下 Agent。
要添加其中一个,请打开 **设置 → Hosts → 你的主机 → Providers**,在目录里找到该 Agent 并选择 **添加**。通过 `npx` 或 `uvx` 启动的条目只需要 daemon 主机上有该工具。其他条目请先安装该 Agent 的 CLI。每个条目都附有安装说明的链接。
- [Agoragentic](https://agoragentic.com):拥有 174 种以上 AI 能力的 Agent 市场。
- [Amp](https://github.com/tao12345666333/amp-acp):前沿的编程 Agent。
- [Auggie CLI](https://www.augmentcode.com/):Augment Code 的 Agent,由其上下文引擎支撑。
- [Autohand Code](https://www.autohand.ai/cli/):Autohand AI 的编程 Agent。
- [Cline](https://cline.bot/cli):自主编程 Agent。
- [Codebuddy Code](https://www.codebuddy.cn/cli/):腾讯云的编程工具。
- [CodeWhale](https://codewhale.net/):面向 DeepSeek V4 和开放模型的终端编程 Agent。
- [Cortex Code](https://docs.snowflake.com/en/user-guide/cortex-code/cortex-code-cli):Snowflake 的编程 Agent。
- [Corust Agent](https://github.com/Corust-ai/corust-agent-release/releases):专注于 Rust 的编程伙伴。
- [crow-cli](https://crow-ai.dev/):极简的原生 ACP 编程 Agent。
- [Cursor](https://cursor.com/docs/cli/overview):Cursor 的编程 Agent。
- [DeepAgents](https://docs.langchain.com/oss/javascript/deepagents/overview):基于 LangChain 的编程 Agent。
- [Devin CLI](https://cli.devin.ai/docs):Cognition 面向终端的 Devin。
- [DimCode](https://dimcode.dev/docs/acp.html):多模型编程 Agent。
- [Dirac](https://dirac.run):开源 Agent,支持基于哈希锚点的并行编辑。
- [Factory Droid](https://factory.ai/product/cli):Factory AI 的编程 Agent。
- [fast-agent](https://fast-agent.ai/acp/):支持多家 Provider 的编程 Agent。
- [Gajae Code](https://gajae-code.com):订阅制编程 Agent,采用先规划再修改的工作流。
- [Gemini CLI](https://geminicli.com):Google 官方的 Gemini CLI。
- [GLM Agent](https://github.com/stefandevo/glm-acp-agent):智谱 AI 的 GLM 编程 Agent。
- [goose](https://block.github.io/goose/):Block 的本地开源 AI Agent。
- [Grok](https://docs.x.ai/build/overview):xAI 的 Grok Build Agent 编程 CLI。
- [Hermes Agent](https://hermes-agent.nousresearch.com/docs/user-guide/features/acp):Nous Research 的自我改进型 Agent。
- [Junie](https://junie.jetbrains.com/docs/junie-cli-acp.html):JetBrains 的编程 Agent。
- [Kilo Code](https://kilo.ai/docs/code-with-ai/platforms/cli):开源编程 Agent。
- [Kimi Code CLI](https://github.com/MoonshotAI/kimi-code):月之暗面的编程助手。
- [Kiro CLI](https://kiro.dev/docs/cli/acp/):Amazon 的编程 Agent。
- [MiniMax Code](https://agent.minimax.io):MiniMax 的终端编程 Agent。
- [Minion Code](https://github.com/femto/minion-code):基于 Minion 框架的编程 Agent。
- [Mistral Vibe](https://github.com/mistralai/mistral-vibe):Mistral 的开源 CLI 助手。
- [Nova](https://www.compassap.ai/portfolio/nova.html):Compass AI 的软件工程师。
- [Poolside](https://docs.poolside.ai/cli/pool):Poolside 的编程 Agent。
- [Qoder](https://qoder.com):Agent 式编程助手。
- [Qwen Code](https://qwenlm.github.io/qwen-code-docs/en/users/overview):阿里巴巴的通义千问编程助手。
- [siGit Code](https://github.com/getsigit/sigit):本地优先的编程 Agent,可选使用设备端 LLM。
- [Stakpak](https://stakpak.dev/):基于 Rust 的 DevOps Agent。
- [TRAE CLI](https://docs.trae.cn/cli_get-started-with-trae-cli):字节跳动官方的 TRAE 编程 Agent。
- [VT Code](https://github.com/vinhnx/VTCode/blob/main/docs/guides/zed-acp.md):开源的多 Provider 编程 Agent。
应用内目录是此列表的固定版本来源。要添加目录中没有的 Agent,请参见[自定义 Provider](/docs/custom-providers#acp-providers)。
-46
View File
@@ -1,46 +0,0 @@
---
title: Oh My Pi
description: Install and turn on Oh My Pi for Paseo.
nav: Oh My Pi
order: 30
category: Providers
---
# Oh My Pi
Run Oh My Pi (OMP) in Paseo with your existing `omp` installation and settings.
## Getting started
1. Install [Oh My Pi](https://github.com/can1357/oh-my-pi) on your daemon host and make sure that `omp` runs in a terminal.
2. In Paseo, open **Settings → Hosts → your host → Providers** and turn on **Oh My Pi**.
Oh My Pi is off by default. You can also turn it on in `~/.paseo/config.json`:
```json
{
"agents": {
"providers": {
"omp": { "enabled": true }
}
}
}
```
If `omp` is outside your daemon's PATH, use a [command override](/docs/custom-providers). To run a second OMP profile with its own settings, see [OMP profiles](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md#omp-profiles-and-pi-compatible-forks) on GitHub.
## Permission modes
**Full Access** is the default mode.
| Mode | Effect |
| -------------- | -------------------------------------------------------- |
| Full Access | Tools run without prompts. |
| Write Approval | Reads run without prompts. Writes require approval. |
| Always Ask | Tools that write files or run commands require approval. |
## Tools, subagents, and sessions
- Oh My Pi agents can use Paseo's tools, such as the tools that create and message other agents.
- Subagents that Oh My Pi starts appear as subagents in Paseo.
- Paseo can import sessions that you started in a terminal. It reads them from `~/.omp/agent/sessions`.
@@ -1,44 +0,0 @@
---
title: Oh My Pi
description: 为 Paseo 安装并启用 Oh My Pi。
nav: Oh My Pi
---
# Oh My Pi {#oh-my-pi}
使用你现有的 `omp` 安装和设置,在 Paseo 中运行 Oh My Pi(OMP)。
## 开始使用 {#getting-started}
1. 在 daemon 主机上安装 [Oh My Pi](https://github.com/can1357/oh-my-pi),并确认 `omp` 可以在终端中运行。
2. 在 Paseo 中打开 **设置 → Hosts → 你的主机 → Providers**,启用 **Oh My Pi**。
Oh My Pi 默认关闭。你也可以在 `~/.paseo/config.json` 中启用它:
```json
{
"agents": {
"providers": {
"omp": { "enabled": true }
}
}
}
```
如果 `omp` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers)。如需运行带有独立设置的第二个 OMP 配置,请参见 GitHub 上的 [OMP profiles](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md#omp-profiles-and-pi-compatible-forks)。
## 权限模式 {#permission-modes}
**Full Access** 是默认模式。
| 模式 | 效果 |
| -------------- | ------------------------------------ |
| Full Access | 工具不经询问直接运行。 |
| Write Approval | 读取不经询问直接运行,写入需要审批。 |
| Always Ask | 写入文件或运行命令的工具需要审批。 |
## 工具、子 Agent 和会话 {#tools-subagents-and-sessions}
- Oh My Pi 的 Agent 可以使用 Paseo 的工具,例如创建其他 Agent 并向其发送消息的工具。
- Oh My Pi 启动的子 Agent 会在 Paseo 中显示为子 Agent。
- Paseo 可以导入你在终端中启动的会话,会话从 `~/.omp/agent/sessions` 读取。
@@ -1,42 +0,0 @@
---
title: OpenCode
description: Install OpenCode and run it in Paseo.
nav: OpenCode
order: 31
category: Providers
---
# OpenCode
Run OpenCode in Paseo with your existing `opencode` installation, credentials, and configuration.
## Getting started
1. Install [OpenCode](https://opencode.ai/) on your daemon host:
```bash
npm install -g opencode-ai
```
2. Connect OpenCode to a model provider, and make sure that `opencode` runs in a terminal.
3. In Paseo, choose **OpenCode** when you start an agent.
If you use OpenCode v2, install version 2.0.10 or newer. Paseo rejects older v2 versions.
If `opencode` is outside your daemon's PATH, use a [command override](/docs/custom-providers#custom-binary).
## Modes
Paseo shows the agents of OpenCode as modes.
| Mode | Effect |
| ----- | ----------------------------------------------- |
| Build | Allows edits and tool execution. |
| Plan | Read-only planning. OpenCode avoids file edits. |
Primary agents that you define in OpenCode appear in the same list.
## See also
- [OpenCode with an existing v2 server](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md#opencode-with-an-existing-v2-server) on GitHub, to make Paseo use an OpenCode server that is already running.
- [Provider options](/docs/sdk/provider-options#opencode), to set OpenCode permission rules for agents created from the SDK.
@@ -1,40 +0,0 @@
---
title: OpenCode
description: 安装 OpenCode 并在 Paseo 中运行。
nav: OpenCode
---
# OpenCode {#opencode}
使用你现有的 `opencode` 安装、凭据和配置,在 Paseo 中运行 OpenCode。
## 开始使用 {#getting-started}
1. 在 daemon 主机上安装 [OpenCode](https://opencode.ai/):
```bash
npm install -g opencode-ai
```
2. 为 OpenCode 配置模型 Provider,并确认 `opencode` 可以在终端中运行。
3. 在 Paseo 中启动 Agent 时选择 **OpenCode**。
如果你使用 OpenCode v2,请安装 2.0.10 或更高版本。Paseo 会拒绝更早的 v2 版本。
如果 `opencode` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers#custom-binary)。
## 模式 {#modes}
Paseo 将 OpenCode 的 Agent 显示为模式。
| 模式 | 效果 |
| ----- | ----------------------------------- |
| Build | 允许编辑文件和执行工具。 |
| Plan | 只读规划。OpenCode 会避免编辑文件。 |
你在 OpenCode 中定义的主 Agent 也会出现在同一个列表中。
## 另请参阅 {#see-also}
- GitHub 上的[使用现有的 OpenCode v2 服务器](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md#opencode-with-an-existing-v2-server):让 Paseo 使用已经在运行的 OpenCode 服务器。
- [Provider 选项](/docs/sdk/provider-options#opencode):为通过 SDK 创建的 Agent 设置 OpenCode 权限规则。
-33
View File
@@ -1,33 +0,0 @@
---
title: Pi
description: Install Pi and run it in Paseo.
nav: Pi
order: 32
category: Providers
---
# Pi
Run Pi in Paseo with your existing `pi` installation, credentials, and settings.
## Getting started
1. Install [Pi](https://pi.dev) on your daemon host.
2. Connect Pi to a model provider, and make sure that `pi` runs in a terminal.
3. In Paseo, choose **Pi** when you start an agent.
Pi appears in Paseo when the daemon can launch `pi`. If `pi` is outside your daemon's PATH, use a [command override](/docs/custom-providers#custom-binary).
## Modes and sessions
- Pi has no permission modes, so Paseo shows no mode selector for a Pi agent.
- Paseo can import sessions that you started in a terminal. It reads them from `~/.pi/agent/sessions`, or from the session directory that you configured in Pi.
## Timeouts
Paseo waits 60 seconds for Pi to answer a control request, such as a request for the model list. If Pi needs longer on your host, raise `rpcTimeoutMs` in [Provider options](/docs/custom-providers#provider-options).
## See also
- [Oh My Pi](/docs/supported-providers/omp), a separate provider with its own permission modes.
- [Pi-compatible forks](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md#omp-profiles-and-pi-compatible-forks) on GitHub, for a provider that keeps Pi's RPC mode under another command.
@@ -1,31 +0,0 @@
---
title: Pi
description: 安装 Pi 并在 Paseo 中运行。
nav: Pi
---
# Pi {#pi}
使用你现有的 `pi` 安装、凭据和设置,在 Paseo 中运行 Pi。
## 开始使用 {#getting-started}
1. 在 daemon 主机上安装 [Pi](https://pi.dev)。
2. 为 Pi 配置模型 Provider,并确认 `pi` 可以在终端中运行。
3. 在 Paseo 中启动 Agent 时选择 **Pi**。
daemon 能够启动 `pi` 时,Pi 就会出现在 Paseo 中。如果 `pi` 不在 daemon 的 PATH 中,请使用[命令覆盖](/docs/custom-providers#custom-binary)。
## 模式和会话 {#modes-and-sessions}
- Pi 没有权限模式,所以 Paseo 不会为 Pi Agent 显示模式选择器。
- Paseo 可以导入你在终端中启动的会话。它从 `~/.pi/agent/sessions` 读取,或者从你在 Pi 中配置的会话目录读取。
## 超时 {#timeouts}
Paseo 等待 Pi 响应控制请求(例如获取模型列表)的时间上限为 60 秒。如果 Pi 在你的主机上需要更长时间,请在 [Provider 选项](/docs/custom-providers#provider-options)中调高 `rpcTimeoutMs`。
## 另请参阅 {#see-also}
- [Oh My Pi](/docs/supported-providers/omp):独立的 Provider,有自己的权限模式。
- GitHub 上的 [Pi 兼容分支](https://github.com/getpaseo/paseo/blob/main/docs/custom-providers.md#omp-profiles-and-pi-compatible-forks):适用于保留 Pi 的 RPC 模式但使用其他命令的 Provider。