mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-13 19:46:16 +03:00
fix(app): keep new worktree below local option
This commit is contained in:
@@ -472,7 +472,7 @@ test("the location dialog lists every ready server's projects in one list and ta
|
||||
await page.keyboard.press("ArrowRight")
|
||||
await expect(chip).toContainText("opencode")
|
||||
await expect(chip.locator('[data-component="tag"]')).toHaveText("apollo")
|
||||
await expect(options.locator(".command-palette-title")).toHaveText(["opencode", "opencode-beta", "New worktree"])
|
||||
await expect(options.locator(".command-palette-title")).toHaveText(["opencode", "New worktree", "opencode-beta"])
|
||||
await expect(options.nth(0)).toHaveAttribute("aria-selected", "true")
|
||||
await page.keyboard.press("Backspace")
|
||||
await expect(search).toHaveValue("opencode")
|
||||
|
||||
@@ -141,13 +141,13 @@ function NewSessionLocationDialog(props: {
|
||||
|
||||
return [
|
||||
{ id: "main", type: "workspace" as const, value: "main", directory: project.worktree },
|
||||
{ id: "create", type: "workspace" as const, value: "create", directory: project.worktree },
|
||||
...directories.map((directory) => ({
|
||||
id: `worktree:${directory}`,
|
||||
type: "workspace" as const,
|
||||
value: directory,
|
||||
directory,
|
||||
})),
|
||||
{ id: "create", type: "workspace" as const, value: "create", directory: project.worktree },
|
||||
].filter((entry) => matches(workspaceTitle(project, entry.value), entry.directory))
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user