mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 03:24:54 +00:00
Merge branch 'dev' into opencodejr/ci-fix-44584428418
This commit is contained in:
commit
82e2eaa854
201 changed files with 4265 additions and 637 deletions
|
|
@ -1130,8 +1130,19 @@ story("resizes a device with the RTL side grip by pointer and keyboard", async (
|
|||
await expect(root.getByTestId("native-Alpha")).toHaveAttribute("data-visible", "true")
|
||||
await expect(root.locator('img[elementtiming="embed-snapshot"]')).toHaveCount(0)
|
||||
await page.mouse.up()
|
||||
|
||||
const bottomGrip = root.getByRole("separator", { name: "Resize viewport height", exact: true })
|
||||
|
||||
await expect(grip).toHaveCSS("outline-style", "none")
|
||||
await bottomGrip.press("Shift+Tab")
|
||||
await expect(grip).toBeFocused()
|
||||
await expect(grip).toHaveCSS("outline-offset", "-2px")
|
||||
await grip.press("Shift+ArrowRight")
|
||||
await expect(width).toHaveValue("398")
|
||||
|
||||
await page.keyboard.press("Tab")
|
||||
await expect(bottomGrip).toBeFocused()
|
||||
await expect(bottomGrip).toHaveCSS("outline-offset", "-2px")
|
||||
})
|
||||
|
||||
story("pins the responsive dimensions when a manual preview scale is selected", async ({ page }) => {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,22 @@
|
|||
import { expect, story } from "../../stories/playwright/story"
|
||||
|
||||
story("outsets the Send ring without changing the scrolling toolbar rings", async ({ mount, page }) => {
|
||||
const component = await mount("opencode-composer-flow--toolbar-overflow", { args: { alternate: "none" } })
|
||||
|
||||
const send = component.locator('[data-action="composer-submit"]')
|
||||
|
||||
const variant = component.getByRole("button", { name: "Choose model variant" })
|
||||
|
||||
await expect(send).toBeEnabled()
|
||||
await send.press("Shift+Tab")
|
||||
await expect(variant).toBeFocused()
|
||||
await expect(variant).toHaveCSS("outline-offset", "-2px")
|
||||
await page.keyboard.press("Tab")
|
||||
await expect(send).toBeFocused()
|
||||
await expect(send).toHaveCSS("outline-style", "solid")
|
||||
await expect(send).toHaveCSS("outline-offset", "2px")
|
||||
})
|
||||
|
||||
story("cycles full prompts with plain arrows without opening the picker", async ({ mount, page }) => {
|
||||
const component = await mount("opencode-composer-flow--prompt-history")
|
||||
const input = component.getByRole("textbox", { name: "Prompt", exact: true })
|
||||
|
|
|
|||
30
packages/app/component-tests/focus-rescue.fixture.tsx
Normal file
30
packages/app/component-tests/focus-rescue.fixture.tsx
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import { installFocusRescue } from "@opencode/ui/context/focus-rescue"
|
||||
|
||||
/** Scopes whose buttons remove themselves when pressed, all but the opener. */
|
||||
export function mountFocusRescue() {
|
||||
const host = document.createElement("div")
|
||||
host.dataset.testid = "focus-rescue-fixture"
|
||||
host.innerHTML = `
|
||||
<div data-testid="list" data-focus-scope>
|
||||
<button type="button">One</button>
|
||||
<button type="button">Two</button>
|
||||
<button type="button">Three</button>
|
||||
</div>
|
||||
<button type="button" data-testid="opener">Opener</button>
|
||||
<div data-testid="toasts" data-focus-scope>
|
||||
<button type="button">Toast</button>
|
||||
</div>
|
||||
<div data-testid="strip" data-focus-scope>
|
||||
<div role="tablist">
|
||||
<button type="button" role="tab">Tab A</button>
|
||||
<button type="button" role="tab">Tab B</button>
|
||||
<button type="button">Add tab</button>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
host.addEventListener("click", (event) => {
|
||||
if (event.target instanceof HTMLButtonElement && event.target.dataset.testid !== "opener") event.target.remove()
|
||||
})
|
||||
document.body.appendChild(host)
|
||||
installFocusRescue()
|
||||
}
|
||||
44
packages/app/component-tests/focus-rescue.spec.ts
Normal file
44
packages/app/component-tests/focus-rescue.spec.ts
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
import type { Locator } from "@playwright/test"
|
||||
import { expect, sourceURL, story } from "../../stories/playwright/story"
|
||||
|
||||
const fixture = sourceURL(new URL("./focus-rescue.fixture.tsx", import.meta.url))
|
||||
|
||||
story.beforeEach(async ({ mount, page }) => {
|
||||
// Any story loads the app's styles; the fixture mounts its scopes beside it.
|
||||
await mount("ui-line-comment--editor")
|
||||
await page.evaluate(async (fixture) => {
|
||||
const { mountFocusRescue } = await import(fixture)
|
||||
mountFocusRescue()
|
||||
}, fixture)
|
||||
})
|
||||
|
||||
const ringed = (locator: Locator) => locator.evaluate((element) => element.matches(":focus-visible"))
|
||||
|
||||
story("moves focus to the next item, or to the previous one after the last", async ({ page }) => {
|
||||
const list = page.getByTestId("list")
|
||||
|
||||
await list.getByRole("button", { name: "Two" }).focus()
|
||||
await page.keyboard.press("Enter")
|
||||
await expect(list.getByRole("button", { name: "Three" })).toBeFocused()
|
||||
expect(await ringed(list.getByRole("button", { name: "Three" }))).toBe(true)
|
||||
|
||||
await page.keyboard.press("Enter")
|
||||
await expect(list.getByRole("button", { name: "One" })).toBeFocused()
|
||||
})
|
||||
|
||||
story("returns focus to what had it before when a scope is left empty", async ({ page }) => {
|
||||
await page.getByTestId("opener").focus()
|
||||
await page.getByTestId("toasts").getByRole("button", { name: "Toast" }).focus()
|
||||
await page.keyboard.press("Enter")
|
||||
|
||||
await expect(page.getByTestId("opener")).toBeFocused()
|
||||
})
|
||||
|
||||
story("never moves focus into a tab list", async ({ page }) => {
|
||||
await page.getByTestId("opener").focus()
|
||||
await page.getByTestId("strip").getByRole("tab", { name: "Tab B" }).focus()
|
||||
await page.keyboard.press("Enter")
|
||||
|
||||
// Tab A and Add tab are still there, but a tab list's tabs select themselves on focus.
|
||||
await expect(page.getByTestId("opener")).toBeFocused()
|
||||
})
|
||||
|
|
@ -1,5 +1,93 @@
|
|||
import { expect, story } from "../../stories/playwright/story"
|
||||
|
||||
story("active search options keep their system highlight in forced colours", async ({ mount, page }) => {
|
||||
await page.emulateMedia({ forcedColors: "active" })
|
||||
|
||||
const root = await mount("review-focus-visibility--all-surfaces", { args: { forced: false } })
|
||||
|
||||
const highlight = await page.evaluate(() => {
|
||||
const probe = document.createElement("span")
|
||||
|
||||
probe.style.backgroundColor = "Highlight"
|
||||
probe.style.color = "HighlightText"
|
||||
document.body.append(probe)
|
||||
const style = getComputedStyle(probe)
|
||||
|
||||
const result = { background: style.backgroundColor, color: style.color }
|
||||
|
||||
probe.remove()
|
||||
|
||||
return result
|
||||
})
|
||||
|
||||
for (const name of [
|
||||
"Palette: active option loses contrast",
|
||||
"Search list: active option loses contrast",
|
||||
"Home search results: Shift+Tab reaches",
|
||||
]) {
|
||||
const card = root.locator("figure").filter({ hasText: name })
|
||||
|
||||
const active = card.locator("[data-active]")
|
||||
|
||||
const input = card.getByRole("combobox")
|
||||
|
||||
await expect(active).toHaveCSS("background-color", highlight.background)
|
||||
await expect(active.getByText("Active option")).toHaveCSS("color", highlight.color)
|
||||
await input.press("ArrowDown")
|
||||
await expect(input).toBeFocused()
|
||||
await expect(active).toHaveText("Next option")
|
||||
await expect(active).toHaveCSS("background-color", highlight.background)
|
||||
}
|
||||
})
|
||||
|
||||
story("focus-only outlines stay off at rest in forced colours", async ({ mount, page }) => {
|
||||
await page.emulateMedia({ forcedColors: "active" })
|
||||
|
||||
const root = await mount("review-focus-visibility--all-surfaces", { args: { forced: false, locator: false } })
|
||||
|
||||
const controls = [
|
||||
{
|
||||
card: "Switch: a black ring flashes",
|
||||
target: '[data-slot="switch-input"]',
|
||||
ring: '[data-slot="switch-control"]',
|
||||
hasBorder: true,
|
||||
},
|
||||
{
|
||||
card: "Radio: forced colours show a ring",
|
||||
target: '[data-slot="radio-v2-item-input"][value="text"]',
|
||||
ring: '[data-slot="radio-v2-item"][data-checked] [data-slot="radio-v2-item-control"]',
|
||||
hasBorder: true,
|
||||
},
|
||||
{
|
||||
card: "Language: inline select",
|
||||
target: '[data-component="select-v2"]',
|
||||
ring: '[data-component="select-v2"]',
|
||||
hasBorder: false,
|
||||
},
|
||||
]
|
||||
|
||||
for (const control of controls) {
|
||||
const card = root.locator("figure").filter({ hasText: control.card })
|
||||
|
||||
const target = card.locator(control.target)
|
||||
|
||||
const ring = card.locator(control.ring)
|
||||
|
||||
await expect(ring).toHaveCSS("outline-style", "none")
|
||||
|
||||
if (control.hasBorder) await expect(ring).toHaveCSS("border-top-width", "1px")
|
||||
|
||||
await target.press("Shift+Tab")
|
||||
await page.keyboard.press("Tab")
|
||||
await expect(target).toBeFocused()
|
||||
await expect(ring).toHaveCSS("outline-style", "solid")
|
||||
await expect(ring).toHaveCSS("outline-width", "2px")
|
||||
await expect(ring).not.toHaveCSS("transition-property", /outline|all/)
|
||||
await page.keyboard.press("Shift+Tab")
|
||||
await expect(ring).toHaveCSS("outline-style", "none")
|
||||
}
|
||||
})
|
||||
|
||||
for (const control of ["text-input", "textarea"]) {
|
||||
story(`${control} supports its surfaces with inset feedback and stable geometry`, async ({ mount, page }) => {
|
||||
const root = await mount(`ui-${control}--surfaces`)
|
||||
|
|
|
|||
|
|
@ -5,6 +5,43 @@ import { mockPluginsActivating, type MockServerConfig } from "../utils/mock-serv
|
|||
|
||||
test.use({ permissions: ["clipboard-read", "clipboard-write"] })
|
||||
|
||||
test("the composer preserves its ring on dialog return and leaves autofocus and clicks quiet", async ({ page }) => {
|
||||
const view = await openSession(page, { name: "ComposerKeyboardFocus" })
|
||||
|
||||
const frame = page.locator('[data-component="composer"]').filter({ has: view.editor })
|
||||
|
||||
await expect(view.editor).toBeFocused()
|
||||
await expect(frame).toHaveCSS("outline-style", "none")
|
||||
|
||||
await page.keyboard.press("Shift+Tab")
|
||||
await expect(view.editor).not.toBeFocused()
|
||||
await page.keyboard.press("Tab")
|
||||
await expect(view.editor).toBeFocused()
|
||||
await expect(frame).toHaveCSS("outline-style", "solid")
|
||||
|
||||
const modifier = await page.evaluate(() => (/Mac/i.test(navigator.platform) ? "Meta" : "Control"))
|
||||
|
||||
const dialog = page.getByRole("dialog")
|
||||
|
||||
await page.keyboard.press(`${modifier}+Shift+p`)
|
||||
await expect(dialog.getByRole("combobox")).toBeFocused()
|
||||
await page.keyboard.press("Escape")
|
||||
await expect(view.editor).toBeFocused()
|
||||
await expect(frame).toHaveCSS("outline-style", "solid")
|
||||
|
||||
await view.editor.click()
|
||||
await expect(view.editor).toBeFocused()
|
||||
await expect(frame).toHaveCSS("outline-style", "none")
|
||||
await page.keyboard.type("Still quiet")
|
||||
await expect(frame).toHaveCSS("outline-style", "none")
|
||||
await page.keyboard.press(`${modifier}+Shift+p`)
|
||||
await expect(dialog.getByRole("combobox")).toBeFocused()
|
||||
await page.mouse.click(20, 200)
|
||||
await expect(dialog).toBeHidden()
|
||||
await expect(view.editor).toBeFocused()
|
||||
await expect(frame).toHaveCSS("outline-style", "none")
|
||||
})
|
||||
|
||||
test("mention a session by title, send its stable token, and open its own tab", async ({ page }) => {
|
||||
const target = "ses_0123456789abcdefghijklmnop"
|
||||
const prompts: Parameters<NonNullable<MockServerConfig["onPrompt"]>>[0]["body"][] = []
|
||||
|
|
|
|||
|
|
@ -28,6 +28,76 @@ async function openHome(page: Page, input: Parameters<typeof mockStressTimeline>
|
|||
await page.goto("/")
|
||||
}
|
||||
|
||||
test("Home projects, utility rows, search and recent sessions show keyboard focus", async ({ page }) => {
|
||||
const workspace = await mockWorkspace(page, { name: "HomeFocus" })
|
||||
|
||||
await seed(page, { usedProjects: { local: [workspace.projectID] } })
|
||||
await page.goto("/")
|
||||
|
||||
const projects = page.getByRole("complementary", { name: "Projects" })
|
||||
|
||||
const viewport = page.getByRole("main").getByRole("region", { name: "scrollable content", exact: true })
|
||||
|
||||
const projectButton = projects.getByRole("button", { name: /HomeFocus/ })
|
||||
|
||||
const settings = projects.getByRole("button", { name: "Settings", exact: true })
|
||||
|
||||
const help = projects.getByRole("button", { name: "Help", exact: true })
|
||||
|
||||
await expect(projectButton).toBeVisible()
|
||||
await expect(viewport).toHaveAttribute("tabindex", "-1")
|
||||
await projects.getByRole("button", { name: "Add project", exact: true }).press("Tab")
|
||||
await expect(projectButton).toBeFocused()
|
||||
await expect
|
||||
.poll(() =>
|
||||
projectButton.evaluate((button) => {
|
||||
const row = button.closest("[data-home-row]")
|
||||
|
||||
return row && getComputedStyle(row, "::after").outlineStyle
|
||||
}),
|
||||
)
|
||||
.toBe("solid")
|
||||
|
||||
// The two project row actions come before the utility buttons.
|
||||
await page.keyboard.press("Tab")
|
||||
await page.keyboard.press("Tab")
|
||||
await page.keyboard.press("Tab")
|
||||
await expect(settings).toBeFocused()
|
||||
await expect(settings).toHaveCSS("outline-style", "solid")
|
||||
await page.keyboard.press("Tab")
|
||||
await expect(help).toBeFocused()
|
||||
await expect(help).toHaveCSS("outline-style", "solid")
|
||||
|
||||
const search = page.getByRole("textbox", { name: "Search sessions", exact: true })
|
||||
|
||||
const field = page.locator('[data-slot="home-session-search-field"]')
|
||||
|
||||
await page.keyboard.press("Tab")
|
||||
await expect(search).toBeFocused()
|
||||
await expect(field).toHaveCSS("outline-style", "solid")
|
||||
await search.click()
|
||||
await expect(search).toBeFocused()
|
||||
await expect(field).toHaveCSS("outline-style", "none")
|
||||
|
||||
const recent = page.getByRole("region", { name: "Recent sessions" })
|
||||
|
||||
const sessionRow = row(page, "HomeFocus")
|
||||
|
||||
await sessionRow.hover()
|
||||
await expect(sessionRow).toHaveCSS("outline-style", "none")
|
||||
await recent.getByRole("button", { name: "New session", exact: true }).press("Tab")
|
||||
await expect(sessionRow).toBeFocused()
|
||||
await expect(sessionRow).toHaveCSS("outline-style", "solid")
|
||||
await expect(sessionRow).toHaveCSS("outline-offset", "-2px")
|
||||
|
||||
await page.setViewportSize({ width: 1280, height: 200 })
|
||||
await expect(viewport).toHaveAttribute("tabindex", "0")
|
||||
await viewport.press("Shift+Tab")
|
||||
await page.keyboard.press("Tab")
|
||||
await expect(viewport).toBeFocused()
|
||||
await expect(viewport).toHaveCSS("outline-offset", "-2px")
|
||||
})
|
||||
|
||||
test("Home keeps the session list in every interface mode", async ({ page }) => {
|
||||
const earlier = { id: "ses_home_earlier", title: "Finished earlier" }
|
||||
await mockWorkspace(page, { name: "Home", sessions: [earlier] })
|
||||
|
|
@ -230,6 +300,17 @@ test("tabbing out of session search closes its results, and tabbing back reopens
|
|||
await page.keyboard.press("Shift+Tab")
|
||||
await expect(search).toBeFocused()
|
||||
await expect(panel.getByRole("option")).toContainText(earlier.title)
|
||||
|
||||
// The results are active descendants, not independent Tab stops before the search input.
|
||||
await search.press("Shift+Tab")
|
||||
await expect(panel).toHaveCount(0)
|
||||
|
||||
const modifier = await page.evaluate(() => (/Mac/i.test(navigator.platform) ? "Meta" : "Control"))
|
||||
|
||||
await page.keyboard.press(`${modifier}+f`)
|
||||
await expect(search).toBeFocused()
|
||||
await expect(page.locator('[data-slot="home-session-search-field"]')).toHaveCSS("outline-style", "solid")
|
||||
await expect(panel.getByRole("option")).toContainText(earlier.title)
|
||||
})
|
||||
|
||||
test("Escape cancels an inline rename whose save does not answer", async ({ page }) => {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,30 @@ const editor = (page: Page) => page.locator('[data-component="composer-editor"]'
|
|||
|
||||
const submit = (page: Page) => page.locator('[data-action="composer-submit"]')
|
||||
|
||||
test("new-session project picker and provider tip show keyboard focus", async ({ page }) => {
|
||||
await openDraft(page, { name: "DraftFocus", provider: NO_PROVIDER })
|
||||
|
||||
const projectPicker = newSessionLocation(page)
|
||||
|
||||
const tip = page.locator('[data-component="new-session-tip"]')
|
||||
|
||||
const connect = tip.getByRole("button", { name: /Connect to 75\+ providers/ })
|
||||
|
||||
const dismiss = tip.getByRole("button", { name: "Dismiss", exact: true })
|
||||
|
||||
await newSessionWorktree(page).press("Shift+Tab")
|
||||
await expect(projectPicker).toBeFocused()
|
||||
await expect(projectPicker).toHaveCSS("outline-style", "solid")
|
||||
|
||||
await expect(connect).toBeVisible()
|
||||
await dismiss.press("Shift+Tab")
|
||||
await expect(connect).toBeFocused()
|
||||
await expect(connect).toHaveCSS("outline-style", "solid")
|
||||
await page.keyboard.press("Tab")
|
||||
await expect(dismiss).toBeFocused()
|
||||
await expect(dismiss).toHaveCSS("outline-style", "solid")
|
||||
})
|
||||
|
||||
const tabLink = (page: Page, sessionID: string) =>
|
||||
page.locator(`[data-titlebar-tab-link][href="${sessionHref(sessionID)}"]`)
|
||||
|
||||
|
|
|
|||
|
|
@ -37,6 +37,48 @@ test("review toggle shows its tooltip with the side panel open or closed", async
|
|||
await expect(tooltip).toBeVisible()
|
||||
})
|
||||
|
||||
test("review rings stay visible on the mode trigger, file tree, and diff", async ({ page }) => {
|
||||
await openSession(page, {
|
||||
name: "ReviewModeFocus",
|
||||
vcsDiff: [fileDiff("alpha.ts"), fileDiff("beta.ts")],
|
||||
})
|
||||
await page.getByRole("button", { name: "Toggle review", exact: true }).click()
|
||||
|
||||
const panel = page.getByRole("complementary", { name: "Review and files" })
|
||||
|
||||
await openReviewLauncher(panel)
|
||||
|
||||
const tree = panel.getByRole("button", { name: "Toggle file tree", exact: true })
|
||||
|
||||
const mode = panel.getByRole("button", { name: "Git changes", exact: true })
|
||||
|
||||
await expect(mode).toBeVisible()
|
||||
await tree.press("Tab")
|
||||
await expect(mode).toBeFocused()
|
||||
await expect(mode).toHaveCSS("outline-offset", "-2px")
|
||||
|
||||
const alpha = panel.getByRole("treeitem", { name: "alpha.ts", exact: true })
|
||||
|
||||
const beta = panel.getByRole("treeitem", { name: "beta.ts", exact: true })
|
||||
|
||||
await alpha.press("ArrowDown")
|
||||
await expect(beta).toHaveCSS("outline-style", "solid")
|
||||
await expect(beta).toHaveCSS("outline-offset", "-2px")
|
||||
|
||||
await tree.click()
|
||||
await expect(tree).toHaveAttribute("aria-expanded", "false")
|
||||
await tree.press("Tab")
|
||||
await expect(mode).toBeFocused()
|
||||
await expect(mode).toHaveCSS("outline-offset", "-2px")
|
||||
|
||||
const diff = panel.locator('[data-component="file"][data-mode="diff"]')
|
||||
|
||||
await diff.press("Shift+Tab")
|
||||
await page.keyboard.press("Tab")
|
||||
await expect(diff).toBeFocused()
|
||||
await expect.poll(() => diff.evaluate((element) => getComputedStyle(element, "::after").outlineOffset)).toBe("-2px")
|
||||
})
|
||||
|
||||
for (const view of ["desktop", "mobile"] as const) {
|
||||
test(`offers Git initialization for a project without VCS (${view})`, async ({ page }) => {
|
||||
if (view === "mobile") await page.setViewportSize({ width: 390, height: 844 })
|
||||
|
|
|
|||
|
|
@ -43,9 +43,13 @@ for (const direction of ["ltr", "rtl"] as const) {
|
|||
|
||||
expect(heights).toEqual([28, 28, 28, 28, 28, 28])
|
||||
|
||||
const rename = header.getByRole("heading").getByRole("button", { name: fixture.expected.targetTitle, exact: true })
|
||||
|
||||
for (const editing of [false, true]) {
|
||||
if (editing) {
|
||||
await header.getByRole("heading").click()
|
||||
await project.press("Tab")
|
||||
await expect(rename).toBeFocused()
|
||||
await page.keyboard.press("Enter")
|
||||
await expect(header.getByRole("textbox")).toHaveValue(fixture.expected.targetTitle)
|
||||
await expect(header.getByRole("textbox")).toBeFocused()
|
||||
}
|
||||
|
|
@ -77,6 +81,13 @@ for (const direction of ["ltr", "rtl"] as const) {
|
|||
|
||||
await header.getByRole("textbox").press("Escape")
|
||||
await expect(header.getByRole("heading")).toHaveText(fixture.expected.targetTitle)
|
||||
await expect(rename).toBeFocused()
|
||||
await page.keyboard.press("Shift+Tab")
|
||||
await expect(project).toBeFocused()
|
||||
await details.press("Tab")
|
||||
await expect(review).toBeFocused()
|
||||
await page.keyboard.press("Shift+Tab")
|
||||
await expect(details).toBeFocused()
|
||||
|
||||
// The header stays one row at every width.
|
||||
for (const width of [900, 1440]) {
|
||||
|
|
@ -254,7 +265,12 @@ test.describe("location", () => {
|
|||
await expect(usageMenu).toBeVisible({ visible: !state.usage })
|
||||
await expect(header.locator(".session-location-worktree-icon")).toBeVisible()
|
||||
await expect
|
||||
.poll(() => header.getByRole("heading").evaluate((element) => element.scrollWidth > element.clientWidth))
|
||||
.poll(() =>
|
||||
header
|
||||
.getByRole("heading")
|
||||
.getByRole("button")
|
||||
.evaluate((element) => element.scrollWidth > element.clientWidth),
|
||||
)
|
||||
.toBe(state.truncated)
|
||||
await expect(header.getByRole("button", { name: "More options", exact: true })).toBeInViewport()
|
||||
await header.getByRole("heading").hover()
|
||||
|
|
|
|||
|
|
@ -68,6 +68,14 @@ test("jump to latest is reachable only while it is shown", async ({ page }) => {
|
|||
await expect(latest).toBeInViewport()
|
||||
// The click focused the button; hiding it must not leave focus on an invisible control.
|
||||
await expect(jump).not.toBeFocused()
|
||||
|
||||
// From the keyboard, focus continues in the prompt instead of falling to the page.
|
||||
await page.mouse.wheel(0, -3000)
|
||||
await expect(latest).not.toBeInViewport()
|
||||
await jump.focus()
|
||||
await page.keyboard.press("Enter")
|
||||
await expect(latest).toBeInViewport()
|
||||
await expect(page.getByRole("textbox", { name: "Prompt", exact: true })).toBeFocused()
|
||||
})
|
||||
|
||||
function lines(count: number) {
|
||||
|
|
|
|||
|
|
@ -1168,6 +1168,22 @@ test.describe("pages open before slow data", () => {
|
|||
refresh.release()
|
||||
})
|
||||
|
||||
test("extensions keeps the empty MCP panel's keyboard ring inside the tabs", async ({ page }) => {
|
||||
const { settings } = await open(page)
|
||||
|
||||
await settings.getByRole("tab", { name: "Extensions", exact: true }).click()
|
||||
|
||||
const tab = settings.getByRole("tab", { name: "MCPs", exact: true })
|
||||
|
||||
const panel = settings.getByRole("tabpanel", { name: "Extensions", exact: true }).getByRole("tabpanel")
|
||||
|
||||
await expect(panel.getByText("Available to all projects")).toBeVisible()
|
||||
await tab.press("Tab")
|
||||
await expect(panel).toBeFocused()
|
||||
await expect(panel).toHaveCSS("outline-style", "solid")
|
||||
await expect(panel).toHaveCSS("outline-offset", "-2px")
|
||||
})
|
||||
|
||||
test("extensions", async ({ page }) => {
|
||||
const { settings } = await open(page, {
|
||||
mcp: [{ name: "demo-mcp", status: { status: "connected" } }],
|
||||
|
|
@ -1853,6 +1869,12 @@ test("providers: OpenCode Go connects with its own methods, not the Console sign
|
|||
.click()
|
||||
const dialog = page.getByRole("dialog", { name: "Connect OpenCode Go", exact: true })
|
||||
await expect(dialog.getByPlaceholder("API key")).toBeVisible()
|
||||
|
||||
const connect = dialog.getByRole("navigation").getByRole("button", { name: "Connect", exact: true })
|
||||
|
||||
await dialog.getByRole("button", { name: "Close", exact: true }).press("Shift+Tab")
|
||||
await expect(connect).toBeFocused()
|
||||
await expect(connect).toHaveCSS("outline-style", "solid")
|
||||
expect(attempts).toEqual([])
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -340,7 +340,7 @@ for (const outline of [
|
|||
},
|
||||
)
|
||||
|
||||
// A second turn adds the fixed turn gap, which must not get the paint-rounding margin.
|
||||
// A second turn adds the fixed turn gap, which must not get the paint margin the other rows keep.
|
||||
await setupTimeline(page, {
|
||||
messages: [
|
||||
userMessage(undefined, {
|
||||
|
|
@ -376,7 +376,7 @@ for (const outline of [
|
|||
})),
|
||||
)
|
||||
|
||||
expect(rows.filter((row) => row.tag !== "TurnGap").every((row) => row.clipMargin === "0.5px")).toBe(true)
|
||||
expect(rows.filter((row) => row.tag !== "TurnGap").every((row) => row.clipMargin === "5px")).toBe(true)
|
||||
expect(rows.filter((row) => row.tag === "TurnGap")).toEqual([{ tag: "TurnGap", clipMargin: "0px" }])
|
||||
|
||||
const part = page.locator(`[data-timeline-part-id="${partID}"]`)
|
||||
|
|
|
|||
|
|
@ -235,6 +235,7 @@ const Group = HttpApiGroup.make("mock")
|
|||
)
|
||||
.add(HttpApiEndpoint.get("websearchProviders", "/api/websearch/provider", { success: Json }))
|
||||
.add(HttpApiEndpoint.get("usageLimits", "/api/experimental/usage/limits", { success: Json }))
|
||||
.add(HttpApiEndpoint.get("jobList", "/api/experimental/job", { success: Json }))
|
||||
.add(
|
||||
HttpApiEndpoint.get("worktreeList", "/api/worktree", {
|
||||
query: Schema.Struct({ projectID: Schema.String }),
|
||||
|
|
|
|||
|
|
@ -947,6 +947,8 @@ function mockHandlers(
|
|||
Effect.sync(() => ({ location: location(config), data: resolve(config.websearchProviders ?? []) })),
|
||||
// No scenario signs in to an OpenCode Console workspace, so none has usage limits.
|
||||
usageLimits: () => Effect.succeed({ location: location(config), data: null }),
|
||||
// No scenario runs background jobs (Code Mode scripts or subagent work), so none is running.
|
||||
jobList: () => Effect.succeed({ data: [] }),
|
||||
worktreeList: () =>
|
||||
Effect.sync(() => {
|
||||
if (config.worktrees) return resolve(config.worktrees)
|
||||
|
|
|
|||
|
|
@ -3,12 +3,21 @@ import { VoiceProvider } from "@/voice/context"
|
|||
import { VoiceOverlay } from "@/voice/composer"
|
||||
import { DialogProvider } from "@opencode/ui/context/dialog"
|
||||
import { FileComponentProvider } from "@opencode/ui/context/file"
|
||||
import { installFocusRescue } from "@opencode/ui/context/focus-rescue"
|
||||
import { Font } from "@opencode/ui/font"
|
||||
import { ThemeProvider } from "@opencode/ui/theme/context"
|
||||
import { MetaProvider, Title } from "@solidjs/meta"
|
||||
import { type BaseRouterProps, Router } from "@solidjs/router"
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/solid-query"
|
||||
import { type Component, createRenderEffect, ErrorBoundary, type JSX, type ParentProps } from "solid-js"
|
||||
import {
|
||||
type Component,
|
||||
createRenderEffect,
|
||||
ErrorBoundary,
|
||||
type JSX,
|
||||
onCleanup,
|
||||
onMount,
|
||||
type ParentProps,
|
||||
} from "solid-js"
|
||||
import { Dynamic } from "solid-js/web"
|
||||
import { CommandProvider } from "@/shell/commands/command"
|
||||
import { DesktopCommands } from "@/shell/commands/desktop"
|
||||
|
|
@ -55,6 +64,8 @@ export function AppBaseProviders(
|
|||
onThemeApplied?: (mode: "light" | "dark", scheme: "system" | "light" | "dark") => void
|
||||
}>,
|
||||
) {
|
||||
onMount(() => onCleanup(installFocusRescue()))
|
||||
|
||||
return (
|
||||
<MetaProvider>
|
||||
<Title>OpenCode</Title>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ import { Icon } from "@opencode/ui/icon"
|
|||
import { IconButton } from "@opencode/ui/icon-button"
|
||||
import { InlineInput } from "@opencode/ui/inline-input"
|
||||
import { LineComment, LineCommentOverflowIcon } from "@opencode/ui/line-comment"
|
||||
import { ProjectAvatar } from "@opencode/ui/project-avatar"
|
||||
import { RadioGroup, RadioItem } from "@opencode/ui/radio"
|
||||
import { SegmentedControl, SegmentedControlItem } from "@opencode/ui/segmented-control"
|
||||
import { Select } from "@opencode/ui/select"
|
||||
|
|
@ -27,7 +28,7 @@ import { Switch } from "@opencode/ui/switch"
|
|||
import { Tabs } from "@opencode/ui/tabs"
|
||||
import { TextInput } from "@opencode/ui/text-input"
|
||||
import { Textarea } from "@opencode/ui/textarea"
|
||||
import { createEffect, For, onCleanup, type JSX } from "solid-js"
|
||||
import { createEffect, For, onCleanup, Show, type JSX } from "solid-js"
|
||||
import { focusTarget, forceFocusStyles } from "./force-focus"
|
||||
|
||||
type Specimen = {
|
||||
|
|
@ -36,9 +37,11 @@ type Specimen = {
|
|||
render: () => JSX.Element
|
||||
// The element that would hold focus. Defaults to the first focusable element in the specimen.
|
||||
target?: string
|
||||
// What changed to bring it in line with the focus decisions (design review, 18 Nov).
|
||||
note?: string
|
||||
}
|
||||
|
||||
type Group = { name: string; css: string; specimens: Specimen[] }
|
||||
type Group = { name: string; css: string; note?: string; specimens: Specimen[] }
|
||||
|
||||
const schemes = ["lab", "light", "dark"] as const
|
||||
|
||||
|
|
@ -61,8 +64,9 @@ const iconButtonVariants = ["neutral", "contrast", "submit", "ghost", "ghost-mut
|
|||
|
||||
const groups: Group[] = [
|
||||
{
|
||||
name: "Outline 2px, offset 2.5px",
|
||||
css: "outline: 2px solid var(--v2-border-border-focus); outline-offset: 2.5px",
|
||||
name: "Outline 2px, offset 2px (default)",
|
||||
css: "outline: 2px solid var(--v2-border-border-focus); outline-offset: 2px",
|
||||
note: "The default for every control with room around it. Keyboard and screen reader focus only (:focus-visible), never a mouse click. Offsets were 2.5px, 2px and 1px; 2.5px became 2px, which also stays crisp at 1x.",
|
||||
specimens: [
|
||||
...buttonVariants.map((variant) => ({
|
||||
name: `Button ${variant}`,
|
||||
|
|
@ -74,6 +78,61 @@ const groups: Group[] = [
|
|||
source: "ui/src/actions/icon-button/icon-button.css",
|
||||
render: () => <IconButton variant={variant} icon={<Icon name="plus" />} aria-label="Add" />,
|
||||
})),
|
||||
{
|
||||
name: "Timeline jump to latest",
|
||||
source: "app/src/session/timeline/virtualizer.tsx",
|
||||
note: "A Tab stop while it shows, the only quick way back down a long timeline from the keyboard. Its container is inert while it's hidden.",
|
||||
render: () => (
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Jump to latest"
|
||||
class="flex items-center justify-center w-8 h-7 px-2 py-1.5 rounded-lg border-none cursor-pointer text-v2-text-text-base backdrop-blur-[2px] hover:bg-[linear-gradient(var(--v2-overlay-simple-overlay-hover),var(--v2-overlay-simple-overlay-hover))]"
|
||||
>
|
||||
<Icon name="chevron-down" />
|
||||
</button>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Button loading",
|
||||
source: "ui/src/actions/button/button.css",
|
||||
note: "Keeps the ring while it keeps focus. aria-busy and its loading text say it is working.",
|
||||
render: () => <Button variant="loading">Loading</Button>,
|
||||
},
|
||||
{
|
||||
name: "New session project selector",
|
||||
source: "app/src/new-session/view.tsx",
|
||||
render: () => (
|
||||
<button
|
||||
type="button"
|
||||
class="flex h-7 items-center gap-1.5 rounded-[4px] ps-1.5 pe-2 text-13-regular text-v2-text-text-muted hover:bg-v2-overlay-simple-overlay-hover"
|
||||
>
|
||||
Project
|
||||
<Icon name="chevron-down" />
|
||||
</button>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Session header project",
|
||||
source: "app/src/session/session-identity-header.tsx",
|
||||
note: "Was background only. Keyboard focus now uses the default ring; the background still indicates hover and an open menu.",
|
||||
render: () => (
|
||||
<button type="button" class="h-7 rounded-[6px] px-1.5 text-13-regular">
|
||||
opencode
|
||||
</button>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Editable session title",
|
||||
source: "app/src/session/timeline/message-timeline.tsx",
|
||||
note: "Was a clickable heading outside the tab order. The heading now contains a native button with the default ring.",
|
||||
render: () => (
|
||||
<h1 class="text-13-medium">
|
||||
<button type="button" class="h-7 rounded-[6px] px-1">
|
||||
Test message
|
||||
</button>
|
||||
</h1>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Composer lane pill",
|
||||
source: "app/src/session/composer/composer-lane.css",
|
||||
|
|
@ -83,12 +142,115 @@ const groups: Group[] = [
|
|||
</button>
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Outline 2px, offset 2px",
|
||||
css: "outline: 2px solid var(--v2-border-border-focus); outline-offset: 2px",
|
||||
specimens: [
|
||||
{
|
||||
name: "Checkbox standard (legacy)",
|
||||
source: "ui/src/forms/checkbox/checkbox.css",
|
||||
note: "Was a box-shadow ring (--shadow-xs-border-focus) with a blue border. Now the default outline.",
|
||||
render: () => <Checkbox defaultChecked>Standard checkbox</Checkbox>,
|
||||
},
|
||||
{
|
||||
name: "Switch standard (legacy)",
|
||||
source: "ui/src/forms/switch/switch.css",
|
||||
note: "Was a box-shadow ring (--shadow-xs-border-focus) with a blue border. Now the default outline.",
|
||||
render: () => (
|
||||
<Switch appearance="standard" defaultChecked>
|
||||
Standard switch
|
||||
</Switch>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Project colour swatch",
|
||||
source: "app/src/settings/workspaces/project.css",
|
||||
note: "Was a blue box-shadow ring shared with selection. Focus is now the default outline and selection a neutral ring.",
|
||||
render: () => (
|
||||
<button
|
||||
type="button"
|
||||
class="project-settings-color"
|
||||
aria-label="Blue"
|
||||
style={{ width: "24px", height: "24px", background: "var(--v2-blue-500)" }}
|
||||
/>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Sources chip",
|
||||
source: "session-ui/src/sources/sources.css",
|
||||
note: "Was 1px at a 1px offset.",
|
||||
render: () => (
|
||||
<button type="button" data-component="sources-chip">
|
||||
3 sources
|
||||
</button>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Session compaction toggle",
|
||||
source: "session-ui/src/components/session-compaction.css",
|
||||
note: "Was 1px in --v2-text-text-accent at a 2px offset.",
|
||||
render: () => (
|
||||
<div data-component="session-compaction-message" data-quiet>
|
||||
<button type="button" data-slot="session-compaction-divider">
|
||||
Compacted
|
||||
</button>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Markdown session link",
|
||||
source: "session-ui/src/components/markdown.css",
|
||||
note: "Was 2px currentColor at a 2px offset.",
|
||||
render: () => (
|
||||
<a href="#focus-rings" class="markdown-session-link">
|
||||
Session link
|
||||
</a>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Prompt link",
|
||||
source: "session-ui/src/components/message-part.css",
|
||||
note: "Had no authored rule, so it showed the browser default ring.",
|
||||
render: () => (
|
||||
<div data-component="user-message">
|
||||
<div data-slot="user-message-text">
|
||||
<a data-slot="user-message-link" href="#focus-rings">
|
||||
https://example.com/start
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "External link, and anything else without its own rule",
|
||||
source: "ui/src/styles/base.css",
|
||||
note: "Showed the browser's ring, in the system accent colour (orange with an orange macOS accent). base.css now makes the shared ring the default for every :focus-visible element, and gives links the 4px radius the other rings have.",
|
||||
render: () => (
|
||||
<a
|
||||
href="#focus-rings"
|
||||
class="inline-flex items-center gap-1.5 text-13-regular text-v2-text-text-muted underline"
|
||||
>
|
||||
Help & feedback
|
||||
<Icon name="arrow-up-right" size="small" />
|
||||
</a>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Collapsible trigger",
|
||||
source: "ui/src/components/collapsible.css",
|
||||
note: "Was background only, like a list row, though it is a standalone disclosure (Settings › Timeline › Advanced). Now the default ring, with a 4px radius. The new timeline's tool rows ring their line of text instead (timeline-next.css).",
|
||||
render: () => (
|
||||
<Collapsible variant="ghost">
|
||||
<Collapsible.Trigger>
|
||||
<span>Advanced</span>
|
||||
<Collapsible.Arrow />
|
||||
</Collapsible.Trigger>
|
||||
<Collapsible.Content>Content</Collapsible.Content>
|
||||
</Collapsible>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Select inline",
|
||||
source: "ui/src/forms/select/select.css",
|
||||
note: "Had no ring: inline appearance removes the outline that focus recolours. Now the default outline.",
|
||||
render: () => <Select options={["English", "Deutsch"]} current="English" onSelect={() => undefined} />,
|
||||
},
|
||||
{
|
||||
name: "Checkbox compact",
|
||||
source: "ui/src/forms/checkbox/checkbox-compact.css",
|
||||
|
|
@ -141,20 +303,16 @@ const groups: Group[] = [
|
|||
</a>
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Outline 2px, offset 1px",
|
||||
css: "outline: 2px solid var(--v2-border-border-focus); outline-offset: 1px",
|
||||
specimens: [
|
||||
{
|
||||
name: "Switch compact",
|
||||
source: "ui/src/forms/switch/switch.css",
|
||||
note: "Was a 1px offset. It has room around it, so it takes the default.",
|
||||
render: () => <Switch defaultChecked>Compact switch</Switch>,
|
||||
},
|
||||
{
|
||||
name: "Radio",
|
||||
source: "ui/src/forms/radio/radio.css",
|
||||
note: "Was a 1px offset. It has room around it, so it takes the default.",
|
||||
render: () => (
|
||||
<RadioGroup label="Radio" defaultValue="one" name="focus-ring-radio">
|
||||
<RadioItem value="one" label="Selected" />
|
||||
|
|
@ -162,34 +320,10 @@ const groups: Group[] = [
|
|||
</RadioGroup>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "SegmentedControl item",
|
||||
source: "ui/src/navigation/segmented-control/segmented-control.css",
|
||||
render: () => (
|
||||
<SegmentedControl defaultValue="one" aria-label="Segmented">
|
||||
<SegmentedControlItem value="one">One</SegmentedControlItem>
|
||||
<SegmentedControlItem value="two">Two</SegmentedControlItem>
|
||||
</SegmentedControl>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "TextInput clear button",
|
||||
source: "ui/src/forms/text-input/text-input.css",
|
||||
target: '[data-slot="text-input-v2-icon-button"]',
|
||||
render: () => <TextInput value="Clearable" showClearButton clearLabel="Clear" />,
|
||||
},
|
||||
{
|
||||
name: "Question progress segment",
|
||||
source: "session-ui/src/components/question-prompt.css",
|
||||
render: () => (
|
||||
<div data-component="dock-prompt" data-kind="question">
|
||||
<button type="button" data-slot="question-progress-segment" aria-label="Question 1" />
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Field label info",
|
||||
source: "ui/src/forms/field/field.css",
|
||||
note: "Was a 1px offset. It has room around it, so it takes the default.",
|
||||
target: '[data-slot="field-v2-label-info"]',
|
||||
render: () => (
|
||||
<Field>
|
||||
|
|
@ -203,7 +337,144 @@ const groups: Group[] = [
|
|||
{
|
||||
name: "Outline 2px, inset (offset -2px)",
|
||||
css: "outline: 2px solid var(--v2-border-border-focus); outline-offset: -2px",
|
||||
note: "The same ring drawn inside, for controls that fill a row, strip or list, or sit flush with a container that clips or scrolls.",
|
||||
specimens: [
|
||||
{
|
||||
name: "Titlebar ghost-muted IconButton",
|
||||
source: "app/src/shell/titlebar/titlebar.css",
|
||||
note: "Was background only. The titlebar draws the ring inset because its row clips the buttons.",
|
||||
render: () => (
|
||||
<div data-slot="titlebar-v2">
|
||||
<IconButton variant="ghost-muted" icon={<Icon name="plus" />} aria-label="New tab" />
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Titlebar session tab",
|
||||
source: "app/src/shell/titlebar/titlebar.css",
|
||||
note: "The rounded tab wrapper rings when its link has keyboard focus.",
|
||||
render: () => (
|
||||
<div data-slot="titlebar-tab-item" class="overflow-hidden rounded-[6px] bg-v2-background-bg-layer-02">
|
||||
<a data-titlebar-tab-link href="#focus-rings" class="block px-2 py-1.5 text-13-medium">
|
||||
Test message
|
||||
</a>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "SegmentedControl item",
|
||||
source: "ui/src/navigation/segmented-control/segmented-control.css",
|
||||
note: "Was a 1px offset, which ran into the neighbouring item and the track. Now inset.",
|
||||
render: () => (
|
||||
<SegmentedControl defaultValue="one" aria-label="Segmented">
|
||||
<SegmentedControlItem value="one">One</SegmentedControlItem>
|
||||
<SegmentedControlItem value="two">Two</SegmentedControlItem>
|
||||
</SegmentedControl>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "TextInput clear button",
|
||||
source: "ui/src/forms/text-input/text-input.css",
|
||||
target: '[data-slot="text-input-v2-icon-button"]',
|
||||
note: "Was a 1px offset, which ran into the input's edge. Now inset.",
|
||||
render: () => <TextInput value="Clearable" showClearButton clearLabel="Clear" />,
|
||||
},
|
||||
{
|
||||
name: "Question progress segment",
|
||||
source: "session-ui/src/components/question-prompt.css, question-prompt-experimental.css",
|
||||
note: "Was a 1px offset; segments sit 2px apart, so an outset ring overlapped the next one. Now inset.",
|
||||
render: () => (
|
||||
<div data-component="dock-prompt" data-kind="question">
|
||||
<button type="button" data-slot="question-progress-segment" aria-label="Question 1" />
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Tabs line (v2)",
|
||||
source: "ui/src/navigation/tabs/tabs-current.css",
|
||||
note: "Had no ring: :focus and :focus-visible both removed it. The ring goes on the whole tab, so it follows the tab's radius. Also covers the Settings navigation tabs.",
|
||||
render: () => (
|
||||
<Tabs variant="line" defaultValue="one">
|
||||
<Tabs.List>
|
||||
<Tabs.Trigger value="one">One</Tabs.Trigger>
|
||||
<Tabs.Trigger value="two">Two</Tabs.Trigger>
|
||||
</Tabs.List>
|
||||
</Tabs>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Tabs pill (v2)",
|
||||
source: "ui/src/navigation/tabs/tabs-current.css",
|
||||
note: "Had no ring, same rule as the line tabs.",
|
||||
render: () => (
|
||||
<Tabs variant="pill" defaultValue="one">
|
||||
<Tabs.List>
|
||||
<Tabs.Trigger value="one">One</Tabs.Trigger>
|
||||
<Tabs.Trigger value="two">Two</Tabs.Trigger>
|
||||
</Tabs.List>
|
||||
</Tabs>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Tabs panel (legacy)",
|
||||
source: "ui/src/navigation/tabs/tabs.css",
|
||||
note: "Had no ring. The ring goes on the whole tab, close button included. Used by the side panel's tab strip.",
|
||||
render: () => (
|
||||
<Tabs variant="panel" defaultValue="one">
|
||||
<Tabs.List>
|
||||
<Tabs.Trigger value="one">One</Tabs.Trigger>
|
||||
<Tabs.Trigger value="two">Two</Tabs.Trigger>
|
||||
</Tabs.List>
|
||||
</Tabs>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Accordion trigger",
|
||||
source: "ui/src/data-display/accordion/accordion.css",
|
||||
note: "Had no ring: outline: none with nothing in its place. Fixes the changed file rows.",
|
||||
render: () => (
|
||||
<div style={{ width: "220px" }}>
|
||||
<Accordion collapsible>
|
||||
<Accordion.Item value="one">
|
||||
<Accordion.Header>
|
||||
<Accordion.Trigger>Accordion trigger</Accordion.Trigger>
|
||||
</Accordion.Header>
|
||||
<Accordion.Content>Content</Accordion.Content>
|
||||
</Accordion.Item>
|
||||
</Accordion>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Settings project row",
|
||||
source: "app/src/settings/settings.css, settings/workspaces/project-row.tsx",
|
||||
note: "Was a 1px inset box-shadow on the row's inner button, inside the row's highlight. Now the ring is on the whole row, with its radius.",
|
||||
render: () => (
|
||||
<div style={{ width: "260px" }}>
|
||||
<div role="listitem" data-component="settings-project-card" class="settings-project-card">
|
||||
<button
|
||||
type="button"
|
||||
class="flex h-full min-w-0 flex-1 items-center gap-2 rounded-[4px] bg-transparent text-start focus-visible:outline-none"
|
||||
>
|
||||
<ProjectAvatar fallback="O" variant="blue" class="!size-5" />
|
||||
<span class="text-[13px] font-[530]">opencode</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Question option",
|
||||
source: "session-ui/src/components/question-prompt.css",
|
||||
note: "Was 1px at a -1px offset.",
|
||||
render: () => (
|
||||
<div data-component="dock-prompt" data-kind="question" style={{ width: "220px" }}>
|
||||
<button type="button" data-slot="question-option">
|
||||
Option
|
||||
</button>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "SplitButton action",
|
||||
source: "ui/src/actions/split-button/split-button.css",
|
||||
|
|
@ -283,93 +554,10 @@ const groups: Group[] = [
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Outline 1px, thin",
|
||||
css: "outline: 1px solid var(--v2-border-border-focus | --v2-text-text-accent); outline-offset: 1px | 2px",
|
||||
specimens: [
|
||||
{
|
||||
name: "Sources chip",
|
||||
source: "session-ui/src/sources/sources.css (border-focus, offset 1px)",
|
||||
render: () => (
|
||||
<button type="button" data-component="sources-chip">
|
||||
3 sources
|
||||
</button>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Question option",
|
||||
source: "session-ui/src/components/question-prompt.css (border-focus, offset -1px)",
|
||||
render: () => (
|
||||
<div data-component="dock-prompt" data-kind="question" style={{ width: "220px" }}>
|
||||
<button type="button" data-slot="question-option">
|
||||
Option
|
||||
</button>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Session compaction toggle",
|
||||
source: "session-ui/src/components/session-compaction.css (text-accent, offset 2px)",
|
||||
render: () => (
|
||||
<div data-component="session-compaction-message" data-quiet>
|
||||
<button type="button" data-slot="session-compaction-divider">
|
||||
Compacted
|
||||
</button>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Outline 2px currentColor",
|
||||
css: "outline: 2px solid currentColor; outline-offset: 2px",
|
||||
specimens: [
|
||||
{
|
||||
name: "Markdown session link",
|
||||
source: "session-ui/src/components/markdown.css",
|
||||
render: () => (
|
||||
<a href="#focus-rings" class="markdown-session-link">
|
||||
Session link
|
||||
</a>
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Box-shadow ring",
|
||||
css: "box-shadow: var(--shadow-xs-border-focus) | 0 0 0 2px bg, 0 0 0 4px var(--v2-border-border-focus)",
|
||||
specimens: [
|
||||
{
|
||||
name: "Checkbox standard (legacy)",
|
||||
source: "ui/src/forms/checkbox/checkbox.css",
|
||||
render: () => <Checkbox defaultChecked>Standard checkbox</Checkbox>,
|
||||
},
|
||||
{
|
||||
name: "Switch standard (legacy)",
|
||||
source: "ui/src/forms/switch/switch.css",
|
||||
render: () => (
|
||||
<Switch appearance="standard" defaultChecked>
|
||||
Standard switch
|
||||
</Switch>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Project colour swatch",
|
||||
source: "app/src/settings/workspaces/project.css",
|
||||
render: () => (
|
||||
<button
|
||||
type="button"
|
||||
class="project-settings-color"
|
||||
aria-label="Blue"
|
||||
style={{ width: "24px", height: "24px", background: "var(--v2-blue-500)" }}
|
||||
/>
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "Background only (no ring)",
|
||||
css: "outline: none; background: var(--v2-overlay-simple-overlay-hover) or similar",
|
||||
note: "By decision: rows in a list that moves the highlight with the arrow keys show the highlight, not a ring.",
|
||||
specimens: [
|
||||
{
|
||||
name: "Palette menu row",
|
||||
|
|
@ -389,116 +577,17 @@ const groups: Group[] = [
|
|||
</button>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Collapsible trigger",
|
||||
source: "ui/src/components/collapsible.css",
|
||||
render: () => (
|
||||
<Collapsible>
|
||||
<Collapsible.Trigger>Collapsible trigger</Collapsible.Trigger>
|
||||
<Collapsible.Content>Content</Collapsible.Content>
|
||||
</Collapsible>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Titlebar ghost-muted IconButton",
|
||||
source: "app/src/shell/titlebar/titlebar.css",
|
||||
render: () => (
|
||||
<div data-slot="titlebar-v2">
|
||||
<IconButton variant="ghost-muted" icon={<Icon name="plus" />} aria-label="New tab" />
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Session identity / new session selectors",
|
||||
source: "app/src/session/session-identity-header.tsx (Tailwind)",
|
||||
render: () => (
|
||||
<button
|
||||
type="button"
|
||||
class="relative flex h-7 items-center gap-2 rounded-[6px] px-1.5 text-[13px] text-v2-text-text-muted hover:bg-v2-overlay-simple-overlay-hover focus-visible:bg-v2-overlay-simple-overlay-hover focus-visible:text-v2-text-text-base focus-visible:outline-none"
|
||||
>
|
||||
Session title
|
||||
</button>
|
||||
),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
name: "No focus ring",
|
||||
css: "outline: none with no replacement, or no :focus-visible rule",
|
||||
name: "No focus ring, by decision",
|
||||
css: "outline: none, and nothing in its place",
|
||||
note: "Controls the review agreed take no ring.",
|
||||
specimens: [
|
||||
{
|
||||
name: "Tabs line (v2)",
|
||||
source: "ui/src/navigation/tabs/tabs-current.css",
|
||||
render: () => (
|
||||
<Tabs variant="line" defaultValue="one">
|
||||
<Tabs.List>
|
||||
<Tabs.Trigger value="one">One</Tabs.Trigger>
|
||||
<Tabs.Trigger value="two">Two</Tabs.Trigger>
|
||||
</Tabs.List>
|
||||
</Tabs>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Tabs pill (v2)",
|
||||
source: "ui/src/navigation/tabs/tabs-current.css",
|
||||
render: () => (
|
||||
<Tabs variant="pill" defaultValue="one">
|
||||
<Tabs.List>
|
||||
<Tabs.Trigger value="one">One</Tabs.Trigger>
|
||||
<Tabs.Trigger value="two">Two</Tabs.Trigger>
|
||||
</Tabs.List>
|
||||
</Tabs>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Tabs panel (legacy)",
|
||||
source: "ui/src/navigation/tabs/tabs.css",
|
||||
render: () => (
|
||||
<Tabs variant="panel" defaultValue="one">
|
||||
<Tabs.List>
|
||||
<Tabs.Trigger value="one">One</Tabs.Trigger>
|
||||
<Tabs.Trigger value="two">Two</Tabs.Trigger>
|
||||
</Tabs.List>
|
||||
</Tabs>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Accordion trigger",
|
||||
source: "ui/src/data-display/accordion/accordion.css",
|
||||
render: () => (
|
||||
<div style={{ width: "220px" }}>
|
||||
<Accordion collapsible>
|
||||
<Accordion.Item value="one">
|
||||
<Accordion.Header>
|
||||
<Accordion.Trigger>Accordion trigger</Accordion.Trigger>
|
||||
</Accordion.Header>
|
||||
<Accordion.Content>Content</Accordion.Content>
|
||||
</Accordion.Item>
|
||||
</Accordion>
|
||||
</div>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Timeline scroll to bottom",
|
||||
source: "app/src/session/timeline/virtualizer.tsx (focus-visible:outline-2 loses to outline-none)",
|
||||
render: () => (
|
||||
<button
|
||||
type="button"
|
||||
aria-label="Scroll to bottom"
|
||||
class="pointer-events-auto flex items-center justify-center w-8 h-7 px-2 py-1.5 rounded-lg border-none cursor-pointer text-v2-text-text-base backdrop-blur-[2px] outline-none hover:bg-[linear-gradient(var(--v2-overlay-simple-overlay-hover),var(--v2-overlay-simple-overlay-hover))] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-v2-border-border-focus"
|
||||
>
|
||||
<Icon name="chevron-down" />
|
||||
</button>
|
||||
),
|
||||
},
|
||||
{
|
||||
name: "Button loading",
|
||||
source: "ui/src/actions/button/button.css",
|
||||
render: () => <Button variant="loading">Loading</Button>,
|
||||
},
|
||||
{
|
||||
name: "InlineInput",
|
||||
source: "ui/src/forms/inline-input/inline-input.css",
|
||||
note: "Borderless while editing: the caret and the text field show the edit.",
|
||||
render: () => <InlineInput value="Inline input" />,
|
||||
},
|
||||
],
|
||||
|
|
@ -546,6 +635,8 @@ function FocusRings(props: FocusArgs) {
|
|||
<h1 style={{ ...heading, "font-size": "18px" }}>Focus rings</h1>
|
||||
<p style={{ ...label, margin: "0" }}>
|
||||
Every focus treatment in the desktop and web UI, grouped by how it looks, each shown with focus forced on.
|
||||
Notes say what changed to follow the design review of 18 November. The default ring is Blue 500 in light mode
|
||||
and Blue 400 in dark mode.
|
||||
</p>
|
||||
</header>
|
||||
<For each={groups}>
|
||||
|
|
@ -554,6 +645,7 @@ function FocusRings(props: FocusArgs) {
|
|||
<div style={{ display: "grid", gap: "4px" }}>
|
||||
<h2 style={heading}>{group.name}</h2>
|
||||
<code style={{ ...label, "font-family": "var(--font-family-mono)" }}>{group.css}</code>
|
||||
<Show when={group.note}>{(note) => <p style={{ ...label, margin: "0" }}>{note()}</p>}</Show>
|
||||
</div>
|
||||
<div
|
||||
style={{ display: "grid", "grid-template-columns": "repeat(auto-fill, minmax(320px, 1fr))", gap: "12px" }}
|
||||
|
|
@ -583,6 +675,9 @@ function FocusRings(props: FocusArgs) {
|
|||
<span style={{ ...label, "font-family": "var(--font-family-mono)", "font-size": "11px" }}>
|
||||
{specimen.source}
|
||||
</span>
|
||||
<Show when={specimen.note}>
|
||||
{(note) => <span style={{ ...label, color: "var(--v2-state-fg-success)" }}>{note()}</span>}
|
||||
</Show>
|
||||
</figcaption>
|
||||
</figure>
|
||||
)}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -2,6 +2,12 @@
|
|||
content: "\200B";
|
||||
}
|
||||
|
||||
/* Outline the frame, not the editor inside the masked scroll viewport. */
|
||||
[data-component="composer"]:has([data-component="composer-editor"][data-keyboard-focus]:focus) {
|
||||
outline: 2px solid var(--v2-border-border-focus);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
/* Transcript session references match this (packages/session-ui/src/components/markdown.css). */
|
||||
[data-component="composer-editor"] [data-mention="session"] {
|
||||
color: var(--v2-text-text-muted);
|
||||
|
|
@ -68,9 +74,12 @@
|
|||
);
|
||||
}
|
||||
|
||||
/* The controls viewport scrolls and clips, so toolbar rings sit inside each control where no edge can cut them. */
|
||||
/* Toolbar controls keep their ring inside. Send sits outside the scroller with room for the default outset ring. */
|
||||
[data-component="composer"]
|
||||
:is([data-component="button-v2"], [data-component="icon-button-v2"]):is(:focus-visible, [data-state="focus"]) {
|
||||
:is([data-component="button-v2"], [data-component="icon-button-v2"]):not([data-action="composer-submit"]):is(
|
||||
:focus-visible,
|
||||
[data-state="focus"]
|
||||
) {
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ import type {
|
|||
import type { ComposerEditorModel, ComposerSelectControl } from "./interaction"
|
||||
import { isAttachment, promptLength } from "../prompt-parts"
|
||||
import { editorMatchesPrompt, getCursorPosition, isEditorDomBlank, isPromptInlineBlank } from "./dom"
|
||||
import { createFieldFocus } from "@opencode/ui/context/field-focus"
|
||||
import {
|
||||
INITIAL_EDITOR_SYNC_STATE,
|
||||
INPUT_PARSED,
|
||||
|
|
@ -102,6 +103,8 @@ export type ComposerEditorProps = {
|
|||
}
|
||||
|
||||
export function ComposerEditor(props: ComposerEditorProps) {
|
||||
const keyboardFocus = createFieldFocus()
|
||||
|
||||
const i18n = useI18n()
|
||||
const markdown = useMarkdown()
|
||||
const state = props.controller.state
|
||||
|
|
@ -425,7 +428,17 @@ export function ComposerEditor(props: ComposerEditorProps) {
|
|||
if (caret.top < bounds.top + 16) viewport.scrollTop += caret.top - bounds.top - 16
|
||||
})
|
||||
}}
|
||||
onFocus={() => props.controller.dispatch({ type: "focus.editor" })}
|
||||
data-field-focus
|
||||
data-keyboard-focus={keyboardFocus.visible() || undefined}
|
||||
onPointerDown={keyboardFocus.pointer}
|
||||
onClick={(event) => {
|
||||
if (event.detail > 0) keyboardFocus.pointer()
|
||||
}}
|
||||
onBlur={keyboardFocus.leave}
|
||||
onFocus={(event) => {
|
||||
keyboardFocus.enter(event.currentTarget)
|
||||
props.controller.dispatch({ type: "focus.editor" })
|
||||
}}
|
||||
/>
|
||||
<Show when={!props.controller.value()}>
|
||||
<div
|
||||
|
|
@ -779,7 +792,7 @@ function ComposerAttachments(props: {
|
|||
(props.files?.length ?? 0) > 0
|
||||
}
|
||||
>
|
||||
<div data-component="composer-attachments" data-slot="composer-attachments" class="relative">
|
||||
<div data-component="composer-attachments" data-slot="composer-attachments" data-focus-scope class="relative">
|
||||
<div
|
||||
data-slot="composer-attachments-scroll"
|
||||
class="flex flex-nowrap gap-2 overflow-x-auto no-scrollbar px-2 pt-2 pb-1"
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { Predicate } from "effect"
|
|||
import { createEffect, createMemo, createSignal, on, onCleanup, untrack, type Accessor } from "solid-js"
|
||||
import { unwrap } from "solid-js/store"
|
||||
import { useFilteredList } from "@opencode/ui/hooks"
|
||||
import { focusField } from "@opencode/ui/context/field-focus"
|
||||
import { abort } from "@opencode/util/abort"
|
||||
import { createComposerAttachments, type ComposerAttachmentConfig } from "../attachments/attachments"
|
||||
import type { Upload } from "../attachments/uploads"
|
||||
|
|
@ -115,24 +116,26 @@ export function createComposerEditor(input: {
|
|||
let editor: HTMLElement | undefined
|
||||
let fileInput: HTMLInputElement | undefined
|
||||
let focusFrame: number | undefined
|
||||
let focusCursor: number | undefined
|
||||
let focusRequest: { cursor: number; visible: boolean | undefined } | undefined
|
||||
|
||||
const cancelFocus = () => {
|
||||
if (focusFrame === undefined) return
|
||||
cancelAnimationFrame(focusFrame)
|
||||
focusFrame = undefined
|
||||
focusCursor = undefined
|
||||
focusRequest = undefined
|
||||
}
|
||||
|
||||
const flushFocus = () => {
|
||||
const cursor = focusCursor
|
||||
const request = focusRequest
|
||||
|
||||
if (cursor === undefined) return
|
||||
if (!request) return
|
||||
cancelFocus()
|
||||
|
||||
if (!editor) return
|
||||
editor.focus()
|
||||
setCursorPosition(editor, cursor)
|
||||
|
||||
if (request.visible === undefined) editor.focus()
|
||||
else focusField(editor, request.visible)
|
||||
setCursorPosition(editor, request.cursor)
|
||||
}
|
||||
|
||||
onCleanup(cancelFocus)
|
||||
|
|
@ -558,9 +561,9 @@ export function createComposerEditor(input: {
|
|||
if (contextList.grouped.state === "ready" && contextList.flat().length === 0) dispatch({ type: "popover.close" })
|
||||
})
|
||||
|
||||
const restoreFocus = (cursor = draft.state.cursor ?? promptLength(draft.state.prompt)) => {
|
||||
const restoreFocus = (cursor = draft.state.cursor ?? promptLength(draft.state.prompt), visible?: boolean) => {
|
||||
cancelFocus()
|
||||
focusCursor = cursor
|
||||
focusRequest = { cursor, visible }
|
||||
focusFrame = requestAnimationFrame(flushFocus)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,23 @@
|
|||
[data-slot="home-project-nav-button"]:focus-visible {
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
/* Paint the project's ring above the hover actions without covering their hit targets. */
|
||||
[data-home-row] > [data-slot="home-project-nav-button"]:focus-visible {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
[data-home-row]:has(> [data-slot="home-project-nav-button"]:focus-visible)::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
z-index: 1;
|
||||
border-radius: inherit;
|
||||
outline: 2px solid var(--v2-border-border-focus);
|
||||
outline-offset: -2px;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* Home server/project rows keep the label underneath the hover actions.
|
||||
The actions carry a tab-style background with a fade on the left, and the
|
||||
label fades out where it slides underneath. Mirrors tab-nav.css. */
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ import { createMemo, For, type JSX, onCleanup, Show, splitProps } from "solid-js
|
|||
import { createStore } from "solid-js/store"
|
||||
import { createResizeObserver } from "@solid-primitives/resize-observer"
|
||||
import { Popover } from "@kobalte/core/popover"
|
||||
import { createOverlayFocus } from "@opencode/ui/context/overlay-focus"
|
||||
import {
|
||||
displayName,
|
||||
getProjectAvatarGenerated,
|
||||
|
|
@ -86,6 +87,11 @@ export type HomeProjectsViewProps = {
|
|||
|
||||
export function HomeProjectsView(props: HomeProjectsViewProps) {
|
||||
const [state, setState] = createStore({ open: false })
|
||||
|
||||
const overlayFocus = createOverlayFocus()
|
||||
|
||||
let trigger: HTMLButtonElement | undefined
|
||||
|
||||
const selected = createMemo(() => props.projects.find((project) => project.worktree === props.selection.directory))
|
||||
|
||||
const server = createMemo(() =>
|
||||
|
|
@ -96,7 +102,10 @@ export function HomeProjectsView(props: HomeProjectsViewProps) {
|
|||
<Show when={props.dropdown} fallback={<HomeProjectsPanel {...props} />}>
|
||||
<Popover
|
||||
open={state.open}
|
||||
onOpenChange={(open) => setState("open", open)}
|
||||
onOpenChange={(open) => {
|
||||
overlayFocus.openChanged(open)
|
||||
setState("open", open)
|
||||
}}
|
||||
placement={props.scope ? "bottom-end" : "bottom-start"}
|
||||
sameWidth={!props.scope}
|
||||
gutter={props.scope ? 8 : 6}
|
||||
|
|
@ -105,9 +114,10 @@ export function HomeProjectsView(props: HomeProjectsViewProps) {
|
|||
when={props.scope}
|
||||
fallback={
|
||||
<Popover.Trigger
|
||||
ref={trigger}
|
||||
data-component="home-projects-dropdown"
|
||||
aria-label={props.language.t("home.projects")}
|
||||
class="flex h-10 w-full min-w-0 items-center gap-2 rounded-[6px] bg-v2-background-bg-base px-1.5 text-start text-v2-text-text-base outline-none hover:bg-v2-background-bg-layer-01"
|
||||
class="flex h-10 w-full min-w-0 items-center gap-2 rounded-[6px] bg-v2-background-bg-base px-1.5 text-start text-v2-text-text-base hover:bg-v2-background-bg-layer-01 focus-visible:-outline-offset-2"
|
||||
>
|
||||
<Show when={selected()} fallback={<Icon name="folder" />}>
|
||||
{(project) => <HomeProjectAvatar project={project()} />}
|
||||
|
|
@ -131,9 +141,10 @@ export function HomeProjectsView(props: HomeProjectsViewProps) {
|
|||
}
|
||||
>
|
||||
<Popover.Trigger
|
||||
ref={trigger}
|
||||
data-action="home-project-scope"
|
||||
aria-label={props.language.t("home.projects")}
|
||||
class="relative z-20 -me-1 flex h-7 min-w-0 max-w-[220px] shrink-0 items-center gap-1.5 rounded-[4px] ps-2 pe-1.5 text-[13px] leading-[var(--line-height-compact)] [font-weight:440] text-v2-text-text-muted outline-none hover:bg-v2-overlay-simple-overlay-hover hover:text-v2-text-text-base focus-visible:bg-v2-overlay-simple-overlay-hover data-[expanded]:bg-v2-overlay-simple-overlay-pressed data-[expanded]:text-v2-text-text-base"
|
||||
class="relative z-20 -me-1 flex h-7 min-w-0 max-w-[220px] shrink-0 items-center gap-1.5 rounded-[4px] ps-2 pe-1.5 text-[13px] leading-[var(--line-height-compact)] [font-weight:440] text-v2-text-text-muted hover:bg-v2-overlay-simple-overlay-hover hover:text-v2-text-text-base data-[expanded]:bg-v2-overlay-simple-overlay-pressed data-[expanded]:text-v2-text-text-base"
|
||||
onMouseDown={(event: MouseEvent) => event.preventDefault()}
|
||||
>
|
||||
<Show when={selected()}>{(project) => <HomeProjectAvatar project={project()} />}</Show>
|
||||
|
|
@ -148,6 +159,7 @@ export function HomeProjectsView(props: HomeProjectsViewProps) {
|
|||
<Popover.Portal>
|
||||
<Popover.Content
|
||||
aria-label={props.language.t("home.projects")}
|
||||
onCloseAutoFocus={(event) => overlayFocus.restore(event, trigger)}
|
||||
dir={props.language.direction()}
|
||||
style={props.scope ? { width: "280px" } : undefined}
|
||||
class="z-50 max-h-[min(70dvh,var(--kb-popper-content-available-height))] overflow-hidden rounded-[10px] bg-v2-background-bg-base p-1.5 shadow-[var(--v2-elevation-floating)] outline-none data-[expanded]:animate-in data-[expanded]:fade-in data-[expanded]:slide-in-from-top-2 duration-150 ease-out motion-reduce:animate-none"
|
||||
|
|
@ -246,6 +258,7 @@ function HomeProjectsPanel(props: HomeProjectsViewProps) {
|
|||
<div data-slot="home-projects-scroll" class="flex min-h-0 min-w-0 shrink flex-col">
|
||||
<div
|
||||
data-slot="home-projects-viewport"
|
||||
data-focus-scope
|
||||
data-scrollable
|
||||
class="min-h-0 flex-1 overflow-y-auto"
|
||||
ref={(element) => {
|
||||
|
|
@ -706,14 +719,13 @@ function HomeProjectNavButton(props: JSX.ButtonHTMLAttributes<HTMLButtonElement>
|
|||
return (
|
||||
<button
|
||||
{...rest}
|
||||
data-slot="home-project-nav-button"
|
||||
class={`
|
||||
flex h-7 min-w-0 w-full shrink-0 cursor-default items-center gap-2 rounded-[6px] bg-transparent px-1.5 text-left
|
||||
text-v2-text-text-muted [font-weight:440] transition-[background-color,color,box-shadow] duration-[120ms] ease-in-out
|
||||
text-v2-text-text-muted [font-weight:440] transition-colors duration-[120ms] ease-in-out
|
||||
hover:bg-v2-background-bg-layer-01 hover:text-v2-text-text-base
|
||||
data-[selected]:bg-v2-background-bg-layer-03 data-[selected]:text-v2-text-text-base
|
||||
data-[selected]:hover:bg-v2-background-bg-layer-03
|
||||
focus-visible:bg-v2-background-bg-layer-01 focus-visible:text-v2-text-text-base focus-visible:outline-none
|
||||
focus-visible:[box-shadow:inset_0_0_0_0.5px_var(--v2-border-border-muted)]
|
||||
${local.class ?? ""}
|
||||
`}
|
||||
classList={local.classList}
|
||||
|
|
|
|||
|
|
@ -75,3 +75,35 @@
|
|||
transition: none;
|
||||
}
|
||||
}
|
||||
[data-slot="home-session-search-field"]:has(> input[data-keyboard-focus]:focus) {
|
||||
outline: 2px solid var(--v2-border-border-focus);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
@media (forced-colors: active) {
|
||||
[data-component="home-session-search-row"][aria-selected="true"] {
|
||||
background-color: Highlight;
|
||||
color: HighlightText;
|
||||
}
|
||||
|
||||
[data-component="home-session-search-row"][aria-selected="true"] * {
|
||||
color: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
[data-component="home-session-row"]:focus-visible {
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
/* Keyboard focus scrolls a row clear of the sticky search and date header above it (68/84/108px plus 28px). */
|
||||
[data-component="home-session-row"] {
|
||||
scroll-margin-top: 100px;
|
||||
|
||||
@media (width >= 48rem) {
|
||||
scroll-margin-top: 116px;
|
||||
}
|
||||
|
||||
@media (width >= 64rem) {
|
||||
scroll-margin-top: 140px;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import { Menu } from "@opencode/ui/menu"
|
|||
import { MenuScroll } from "@opencode/ui/menu-scroll"
|
||||
import { Tooltip } from "@opencode/ui/tooltip"
|
||||
import { useLanguage } from "@/runtime/i18n/language"
|
||||
import { createFieldFocus } from "@opencode/ui/context/field-focus"
|
||||
import { ServerConnection } from "@/runtime/server/registry"
|
||||
import { SessionTabAvatarView } from "@/shell/layout/session-tab-avatar"
|
||||
import { showToast } from "@/shell/notifications/toast"
|
||||
|
|
@ -270,6 +271,7 @@ export function HomeSessionsView(props: HomeSessionsViewProps) {
|
|||
</div>
|
||||
<div
|
||||
data-slot="home-sessions-list"
|
||||
data-focus-scope
|
||||
data-reveal={skeleton() || undefined}
|
||||
class="relative -mr-3 min-h-[calc(100cqh-64px)] md:min-h-[calc(100cqh-72px)] lg:min-h-[calc(100cqh-96px)]"
|
||||
aria-busy={props.listView.status === "loading"}
|
||||
|
|
@ -434,6 +436,8 @@ function HomeSessionSearch(
|
|||
) {
|
||||
const scope = children(() => props.searchScope)
|
||||
|
||||
const keyboardFocus = createFieldFocus()
|
||||
|
||||
return (
|
||||
<div class="w-full">
|
||||
<div
|
||||
|
|
@ -510,6 +514,11 @@ function HomeSessionSearch(
|
|||
</div>
|
||||
</Show>
|
||||
<label
|
||||
data-slot="home-session-search-field"
|
||||
onPointerDown={keyboardFocus.pointer}
|
||||
onClick={(event) => {
|
||||
if (event.detail > 0) keyboardFocus.pointer()
|
||||
}}
|
||||
class={`
|
||||
relative z-20 flex h-9 w-full items-center gap-2 rounded-[6px] py-1 ps-3 pe-2
|
||||
bg-v2-background-bg-layer-02/60 text-v2-icon-icon-muted transition-[background-color,box-shadow]
|
||||
|
|
@ -532,7 +541,13 @@ function HomeSessionSearch(
|
|||
aria-activedescendant={
|
||||
props.searchActive && props.searchOpen ? `home-session-search-option-${props.searchActive}` : undefined
|
||||
}
|
||||
onFocus={props.onSearchFocus}
|
||||
data-field-focus
|
||||
data-keyboard-focus={keyboardFocus.visible() || undefined}
|
||||
onBlur={keyboardFocus.leave}
|
||||
onFocus={(event) => {
|
||||
keyboardFocus.enter(event.currentTarget)
|
||||
props.onSearchFocus()
|
||||
}}
|
||||
onInput={(event) => props.onSearchInput(event.currentTarget.value)}
|
||||
onKeyDown={(event) => {
|
||||
if (event.key === "Escape") {
|
||||
|
|
@ -622,6 +637,7 @@ function HomeSessionSearchResultRow(
|
|||
data-component="home-session-search-row"
|
||||
data-project-name={!!showProjectName()}
|
||||
role="option"
|
||||
tabIndex={-1}
|
||||
aria-selected={props.selected}
|
||||
class={`
|
||||
flex h-10 w-full shrink-0 cursor-default items-center border-0 py-3 pl-[18px] pr-6 text-left text-v2-text-text-muted
|
||||
|
|
@ -804,7 +820,7 @@ function HomeSessionRow(
|
|||
flex h-10 min-w-0 w-full flex-1 shrink-0 cursor-default items-center rounded-[6px] border-0
|
||||
bg-transparent py-3 ps-1.5 pe-3 md:ps-3 text-start text-v2-text-text-muted [font-weight:530]
|
||||
transition-[background-color,color,box-shadow] duration-[120ms] ease-in-out
|
||||
hover:bg-v2-overlay-simple-overlay-hover focus-visible:bg-v2-overlay-simple-overlay-hover focus-visible:outline-none
|
||||
hover:bg-v2-overlay-simple-overlay-hover
|
||||
`}
|
||||
classList={{ "gap-1.5": props.desktop, "gap-2": !props.desktop, "md:pe-10": SHOW_HOME_SESSION_ARCHIVE }}
|
||||
onMouseDown={(event) => {
|
||||
|
|
|
|||
|
|
@ -106,6 +106,10 @@
|
|||
);
|
||||
}
|
||||
|
||||
[data-slot="session-timeline-scroll"] > .scroll-view__viewport:has(> [data-slot="session-header-inset"]) {
|
||||
scroll-padding-block-start: calc(var(--sticky-accordion-top, 0px) + 16px);
|
||||
}
|
||||
|
||||
/* The review panel's visible width, which the header fade below tracks while the panel animates. Its fixed-width
|
||||
content holds nothing else that reads it. */
|
||||
#review-panel,
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ export function PromptProjectAddButton(props: { controller: PromptProjectControl
|
|||
<button
|
||||
data-action="prompt-project"
|
||||
type="button"
|
||||
class="flex h-7 min-w-0 max-w-[160px] items-center gap-1.5 rounded-sm px-2 text-[13px] font-[440] leading-5 tracking-[-0.04px] text-v2-text-text-faint transition-colors hover:bg-v2-overlay-simple-overlay-hover focus-visible:bg-v2-overlay-simple-overlay-hover focus-visible:outline-none"
|
||||
class="flex h-7 min-w-0 max-w-[160px] items-center gap-1.5 rounded-[4px] px-2 text-[13px] font-[440] leading-5 tracking-[-0.04px] text-v2-text-text-faint transition-colors hover:bg-v2-overlay-simple-overlay-hover"
|
||||
onClick={() => props.controller.add()}
|
||||
>
|
||||
<Icon name="folder-add-left" class="shrink-0 text-v2-icon-icon-muted" />
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ export default function NewSessionPage(props: { draftId: string }) {
|
|||
|
||||
// Search projects opened this draft; the picker returns focus to the composer when it closes.
|
||||
if (layout.draft.projectSearch.take(props.draftId)) location()
|
||||
else model.restoreFocus()
|
||||
else model.restoreFocus(undefined, false)
|
||||
}),
|
||||
)
|
||||
createEffect(() => {
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ export function NewSessionView(props: {
|
|||
<div
|
||||
ref={panel}
|
||||
data-component="new-session"
|
||||
data-focus-scope
|
||||
class="relative isolate flex-1 min-h-0 overflow-hidden rounded-[10px] bg-v2-background-bg-base shadow-[var(--v2-elevation-raised)]"
|
||||
>
|
||||
<ComposerDropzone
|
||||
|
|
@ -191,7 +192,7 @@ function fitPath(value: string, width: number, font: string) {
|
|||
}
|
||||
|
||||
const TRIGGER =
|
||||
"flex h-7 items-center gap-1.5 rounded-sm text-start ps-1.5 pe-2 text-v2-text-text-muted transition-colors hover:bg-v2-overlay-simple-overlay-hover hover:text-v2-text-text-base focus-visible:bg-v2-overlay-simple-overlay-hover focus-visible:text-v2-text-text-base focus-visible:outline-none"
|
||||
"flex h-7 items-center gap-1.5 rounded-[4px] text-start ps-1.5 pe-2 text-v2-text-text-muted transition-colors hover:bg-v2-overlay-simple-overlay-hover hover:text-v2-text-text-base"
|
||||
|
||||
function NewSessionLocation(props: {
|
||||
project: PromptProject
|
||||
|
|
|
|||
|
|
@ -190,7 +190,7 @@ export const DialogConnectProvider: Component<{
|
|||
{(value) => (
|
||||
<button
|
||||
type="button"
|
||||
class="flex min-w-0 items-center gap-1.5 rounded-sm font-[530] text-v2-text-text-base hover:text-v2-text-text-muted focus-visible:text-v2-text-text-muted focus-visible:outline-none"
|
||||
class="flex min-w-0 items-center gap-1.5 rounded-[4px] font-[530] text-v2-text-text-base hover:text-v2-text-text-muted"
|
||||
onClick={() => controller.navigate(value())}
|
||||
>
|
||||
{content()}
|
||||
|
|
@ -202,7 +202,7 @@ export const DialogConnectProvider: Component<{
|
|||
{(value) => (
|
||||
<button
|
||||
type="button"
|
||||
class="flex min-w-0 shrink items-center gap-1.5 rounded-sm font-[440] text-v2-text-text-faint hover:text-v2-text-text-base focus-visible:text-v2-text-text-base focus-visible:outline-none"
|
||||
class="flex min-w-0 shrink items-center gap-1.5 rounded-[4px] font-[440] text-v2-text-text-faint hover:text-v2-text-text-base"
|
||||
onClick={() => controller.navigate(value())}
|
||||
>
|
||||
{content()}
|
||||
|
|
@ -241,7 +241,7 @@ export const DialogConnectProvider: Component<{
|
|||
placement="bottom"
|
||||
contentClass="!max-w-64 !whitespace-normal"
|
||||
triggerTabIndex={0}
|
||||
class="me-3 flex min-w-0 shrink-0 !cursor-default items-center gap-1.5 rounded-sm text-[13px] font-[440] leading-5 tracking-[-0.04px] text-v2-text-text-muted focus-visible:outline-none focus-visible:text-v2-text-text-base"
|
||||
class="me-3 flex min-w-0 shrink-0 !cursor-default items-center gap-1.5 rounded-sm text-[13px] font-[440] leading-5 tracking-[-0.04px] text-v2-text-text-muted"
|
||||
>
|
||||
<Icon name="server" class="shrink-0 text-v2-icon-icon-muted" />
|
||||
<span class="max-w-40 truncate">{language.t("provider.connect.remote.label", { server: server() })}</span>
|
||||
|
|
@ -426,7 +426,7 @@ function ProviderPicker(props: { directory?: string; onSelect: (provider: string
|
|||
<button
|
||||
type="button"
|
||||
data-provider-id={provider.id}
|
||||
class="flex min-h-8 w-full items-center gap-2 rounded-md py-1.5 ps-2 pe-2 text-left text-[13px] leading-5 tracking-[-0.04px] hover:bg-v2-overlay-simple-overlay-hover focus:bg-v2-overlay-simple-overlay-hover focus:outline-none disabled:pointer-events-none"
|
||||
class="flex min-h-8 w-full items-center gap-2 rounded-md py-1.5 ps-2 pe-2 text-left text-[13px] leading-5 tracking-[-0.04px] hover:bg-v2-overlay-simple-overlay-hover focus-visible:-outline-offset-2 disabled:pointer-events-none"
|
||||
classList={{ "bg-v2-overlay-simple-overlay-hover": store.active === provider.id }}
|
||||
onMouseEnter={() => setStore("active", provider.id)}
|
||||
disabled={disabled(provider)}
|
||||
|
|
@ -844,7 +844,7 @@ function ProviderSteps(props: { provider: string; controller: ProviderDialogCont
|
|||
<button
|
||||
type="button"
|
||||
data-action="provider-connect-method"
|
||||
class="group flex h-8 w-full items-center gap-2 rounded-md px-2 text-left text-[13px] leading-5 tracking-[-0.04px] hover:bg-v2-overlay-simple-overlay-hover focus-visible:bg-v2-overlay-simple-overlay-hover focus-visible:outline-none"
|
||||
class="group flex h-8 w-full items-center gap-2 rounded-md px-2 text-left text-[13px] leading-5 tracking-[-0.04px] hover:bg-v2-overlay-simple-overlay-hover focus-visible:-outline-offset-2"
|
||||
onClick={() => props.controller.input({ type: "method.selected", index: index() })}
|
||||
>
|
||||
<Icon name={METHOD_ICON[item.type]} class="shrink-0 text-v2-icon-icon-muted" />
|
||||
|
|
@ -1069,7 +1069,7 @@ function ProviderSteps(props: { provider: string; controller: ProviderDialogCont
|
|||
<button
|
||||
type="button"
|
||||
aria-expanded={pasteOpen()}
|
||||
class="flex h-12 items-center gap-1.5 text-start font-[440] text-v2-text-text-base focus-visible:outline-none focus-visible:underline"
|
||||
class="flex h-12 items-center gap-1.5 rounded-md text-start font-[440] text-v2-text-text-base focus-visible:-outline-offset-2"
|
||||
onClick={() => props.controller.input({ type: "paste.toggled", open: !pasteOpen() })}
|
||||
>
|
||||
<Icon
|
||||
|
|
@ -1179,7 +1179,7 @@ function ProviderSteps(props: { provider: string; controller: ProviderDialogCont
|
|||
type="button"
|
||||
role="radio"
|
||||
aria-checked={input.body.activeID === account.id}
|
||||
class="flex min-h-8 min-w-0 flex-1 items-center gap-1.5 ps-2 pe-2 text-start text-[13px] leading-5 tracking-[-0.04px] focus-visible:outline-none"
|
||||
class="flex min-h-8 min-w-0 flex-1 items-center gap-1.5 rounded-md ps-2 pe-2 text-start text-[13px] leading-5 tracking-[-0.04px] focus-visible:-outline-offset-2"
|
||||
disabled={input.body.busy}
|
||||
onClick={() => props.controller.chooseAccount(account)}
|
||||
>
|
||||
|
|
@ -1248,7 +1248,7 @@ function ProviderSteps(props: { provider: string; controller: ProviderDialogCont
|
|||
<button
|
||||
type="button"
|
||||
data-action="provider-account-add"
|
||||
class="flex h-8 w-full items-center gap-1.5 rounded-md ps-2 pe-2 text-start text-[13px] font-[440] leading-5 tracking-[-0.04px] text-v2-text-text-muted hover:bg-v2-overlay-simple-overlay-hover hover:text-v2-text-text-base focus-visible:bg-v2-overlay-simple-overlay-hover focus-visible:text-v2-text-text-base focus-visible:outline-none disabled:pointer-events-none"
|
||||
class="flex h-8 w-full items-center gap-1.5 rounded-md ps-2 pe-2 text-start text-[13px] font-[440] leading-5 tracking-[-0.04px] text-v2-text-text-muted hover:bg-v2-overlay-simple-overlay-hover hover:text-v2-text-text-base focus-visible:-outline-offset-2 disabled:pointer-events-none"
|
||||
disabled={!input.body.canAdd}
|
||||
onClick={() => props.controller.dispatch({ type: "account.add" })}
|
||||
>
|
||||
|
|
@ -1381,7 +1381,7 @@ function ProviderSteps(props: { provider: string; controller: ProviderDialogCont
|
|||
data-first-provider-model=""
|
||||
data-selected={checked() ? "" : undefined}
|
||||
aria-checked={checked()}
|
||||
class="connected-model-row text-start focus-visible:outline-none"
|
||||
class="connected-model-row text-start"
|
||||
onClick={() => props.controller.dispatch({ type: "model.selected", modelKey: modelKey(model) })}
|
||||
>
|
||||
<div data-slot="settings-row-copy">
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ export function McpDialog(props: {
|
|||
ref={backRef}
|
||||
type="button"
|
||||
autofocus
|
||||
class="flex size-5 shrink-0 items-center justify-center rounded-sm text-v2-icon-icon-muted hover:bg-v2-overlay-simple-overlay-hover focus-visible:bg-v2-overlay-simple-overlay-hover focus-visible:outline-none"
|
||||
class="flex size-5 shrink-0 items-center justify-center rounded-sm text-v2-icon-icon-muted hover:bg-v2-overlay-simple-overlay-hover"
|
||||
onClick={back}
|
||||
aria-label={language.t("common.goBack")}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -30,8 +30,9 @@
|
|||
}
|
||||
}
|
||||
|
||||
/* The list clips its rows, so the ring sits inside the row. */
|
||||
.connected-model-row:focus-visible {
|
||||
background-color: var(--v2-background-bg-layer-03);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
[data-component="first-provider-models"] [data-component="settings-list"] {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export function StepActions(props: { children: JSX.Element }) {
|
|||
// The main action while the sign-in finishes elsewhere: the browser, a command, or the Claude Code check.
|
||||
export function WaitingButton(props: { children: JSX.Element }) {
|
||||
return (
|
||||
<Button variant="loading" class="!ps-1.5" aria-busy="true" aria-live="polite">
|
||||
<Button variant="loading" class="!ps-1.5" aria-live="polite">
|
||||
<Spinner width={16} class="text-v2-icon-icon-muted" />
|
||||
{props.children}
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ export function ProviderTip(props: {
|
|||
>
|
||||
<button
|
||||
type="button"
|
||||
class="flex h-6 min-w-0 items-center rounded-[4px] pl-1.5 text-[13px] leading-text-compact tracking-[-0.04px] text-v2-text-text-faint transition-[background-color,color] duration-150 ease-in-out hover:bg-v2-overlay-simple-overlay-hover hover:text-v2-text-text-muted focus-visible:bg-v2-overlay-simple-overlay-hover focus-visible:text-v2-text-text-muted focus-visible:outline-none"
|
||||
class="flex h-6 min-w-0 items-center rounded-[4px] pl-1.5 text-[13px] leading-text-compact tracking-[-0.04px] text-v2-text-text-faint transition-[background-color,color] duration-150 ease-in-out hover:bg-v2-overlay-simple-overlay-hover hover:text-v2-text-text-muted"
|
||||
onClick={open}
|
||||
>
|
||||
<span class="truncate">{language.t("home.providerTip")}</span>
|
||||
|
|
@ -96,7 +96,7 @@ export function ProviderTip(props: {
|
|||
>
|
||||
<button
|
||||
type="button"
|
||||
class="flex size-6 items-center justify-center rounded-[4px] text-v2-icon-icon-muted transition-[background-color,color] duration-150 ease-in-out hover:bg-v2-overlay-simple-overlay-hover hover:text-v2-icon-icon-base focus-visible:bg-v2-overlay-simple-overlay-hover focus-visible:text-v2-icon-icon-base focus-visible:outline-none"
|
||||
class="flex size-6 items-center justify-center rounded-[4px] text-v2-icon-icon-muted transition-[background-color,color] duration-150 ease-in-out hover:bg-v2-overlay-simple-overlay-hover hover:text-v2-icon-icon-base"
|
||||
aria-label={language.t("common.dismiss")}
|
||||
onClick={dismiss}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ const ModelList: Component<{
|
|||
data-component="settings-row"
|
||||
data-option-key={modelKey(item)}
|
||||
aria-pressed={controller.current() === modelKey(item)}
|
||||
class="-mx-4 w-[calc(100%+32px)] px-4 text-start first:rounded-t-lg last:rounded-b-lg hover:bg-v2-overlay-simple-overlay-hover focus-visible:bg-v2-overlay-simple-overlay-hover focus-visible:outline-none"
|
||||
class="-mx-4 w-[calc(100%+32px)] px-4 text-start first:rounded-t-lg last:rounded-b-lg hover:bg-v2-overlay-simple-overlay-hover focus-visible:-outline-offset-2"
|
||||
classList={{ "bg-v2-overlay-simple-overlay-hover": store.active === modelKey(item) }}
|
||||
onMouseEnter={() => setStore("active", modelKey(item))}
|
||||
onMouseLeave={() => setStore("active", "")}
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ export const DialogSelectModelUnpaid: Component<{ model?: ModelState }> = (props
|
|||
>
|
||||
<button
|
||||
type="button"
|
||||
class="flex w-full scroll-my-3.5 flex-row items-center gap-1.5 rounded-md px-3 py-2 text-left text-[13px] font-[530] leading-5 tracking-[-0.04px] text-v2-text-text-base [font-family:var(--v2-font-family-sans)] [font-variation-settings:'slnt'_0] hover:bg-v2-overlay-simple-overlay-hover focus:bg-v2-overlay-simple-overlay-hover focus:outline-none"
|
||||
class="flex w-full scroll-my-3.5 flex-row items-center gap-1.5 rounded-md px-3 py-2 text-left text-[13px] font-[530] leading-5 tracking-[-0.04px] text-v2-text-text-base [font-family:var(--v2-font-family-sans)] [font-variation-settings:'slnt'_0] hover:bg-v2-overlay-simple-overlay-hover focus-visible:-outline-offset-2"
|
||||
onClick={() => selectModel(item)}
|
||||
>
|
||||
<span class="min-w-0 truncate">{displayModelName(item.name)}</span>
|
||||
|
|
@ -158,7 +158,7 @@ export const DialogSelectModelUnpaid: Component<{ model?: ModelState }> = (props
|
|||
<button
|
||||
type="button"
|
||||
data-provider-id={provider.id}
|
||||
class="flex min-h-11 w-full scroll-my-3.5 flex-row items-start gap-2 rounded-md bg-v2-background-bg-base px-3 py-2.5 text-left text-[13px] font-[530] leading-5 tracking-[-0.04px] text-v2-text-text-base [font-family:var(--v2-font-family-sans)] [font-variation-settings:'slnt'_0] hover:bg-v2-background-bg-layer-01 focus:bg-v2-background-bg-layer-01 focus:outline-none"
|
||||
class="flex min-h-11 w-full scroll-my-3.5 flex-row items-start gap-2 rounded-md bg-v2-background-bg-base px-3 py-2.5 text-left text-[13px] font-[530] leading-5 tracking-[-0.04px] text-v2-text-text-base [font-family:var(--v2-font-family-sans)] [font-variation-settings:'slnt'_0] hover:bg-v2-background-bg-layer-01"
|
||||
classList={{
|
||||
"border-[0.5px] border-transparent shadow-[var(--v2-elevation-raised)]":
|
||||
theme.mode() !== "dark",
|
||||
|
|
@ -187,7 +187,7 @@ export const DialogSelectModelUnpaid: Component<{ model?: ModelState }> = (props
|
|||
</For>
|
||||
<button
|
||||
type="button"
|
||||
class="col-span-full flex h-8 w-full scroll-my-3.5 items-center justify-start rounded-md px-3 text-left text-[13px] font-[440] leading-5 tracking-[-0.04px] text-v2-text-text-muted [font-family:var(--v2-font-family-sans)] [font-variation-settings:'slnt'_0] hover:bg-v2-overlay-simple-overlay-hover focus:bg-v2-overlay-simple-overlay-hover focus:outline-none"
|
||||
class="col-span-full flex h-8 w-full scroll-my-3.5 items-center justify-start rounded-md px-3 text-left text-[13px] font-[440] leading-5 tracking-[-0.04px] text-v2-text-text-muted [font-family:var(--v2-font-family-sans)] [font-variation-settings:'slnt'_0] hover:bg-v2-overlay-simple-overlay-hover focus-visible:-outline-offset-2"
|
||||
onClick={() => openProviders()}
|
||||
>
|
||||
{language.t("dialog.model.unpaid.viewMoreProviders")}
|
||||
|
|
|
|||
|
|
@ -1094,7 +1094,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} ሼሎች",
|
||||
"session.activity.scripts.one": "{{count}} ስክሪፕት",
|
||||
"session.activity.scripts.other": "{{count}} ስክሪፕቶች",
|
||||
"session.activity.background": "የዳራ ሥራ",
|
||||
"session.activity.shell.back": "ወደ ዳራ ሥራ ተመለስ",
|
||||
"session.activity.shell.stop": "አቁም",
|
||||
"session.activity.shell.stopping": "በማቆም ላይ…",
|
||||
|
|
|
|||
|
|
@ -1206,7 +1206,6 @@ export const dict = {
|
|||
"session.activity.scripts.few": "{{count}} نصوص برمجية",
|
||||
"session.activity.scripts.many": "{{count}} نصًا برمجيًا",
|
||||
"session.activity.scripts.other": "{{count}} نص برمجي",
|
||||
"session.activity.background": "العمل في الخلفية",
|
||||
"session.activity.shell.back": "العودة إلى العمل في الخلفية",
|
||||
"session.activity.shell.stop": "إيقاف",
|
||||
"session.activity.shell.stopping": "جارٍ الإيقاف…",
|
||||
|
|
|
|||
|
|
@ -1153,7 +1153,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} skript",
|
||||
"session.activity.scripts.other": "{{count}} skript",
|
||||
"session.activity.background": "Arxa plan işi",
|
||||
"session.activity.shell.back": "Fon işlərinə qayıt",
|
||||
"session.activity.shell.stop": "Dayandır",
|
||||
"session.activity.shell.stopping": "Dayandırılır…",
|
||||
|
|
|
|||
|
|
@ -1160,7 +1160,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell процеса",
|
||||
"session.activity.scripts.one": "{{count}} скрипт",
|
||||
"session.activity.scripts.other": "{{count}} скрипта",
|
||||
"session.activity.background": "Работа във фонов режим",
|
||||
"session.activity.shell.back": "Назад към фоновата работа",
|
||||
"session.activity.shell.stop": "Спиране",
|
||||
"session.activity.shell.stopping": "Спиране…",
|
||||
|
|
|
|||
|
|
@ -1150,7 +1150,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}}টি শেল",
|
||||
"session.activity.scripts.one": "{{count}}টি স্ক্রিপ্ট",
|
||||
"session.activity.scripts.other": "{{count}}টি স্ক্রিপ্ট",
|
||||
"session.activity.background": "পটভূমির কাজ",
|
||||
"session.activity.shell.back": "ব্যাকগ্রাউন্ড কাজে ফিরে যান",
|
||||
"session.activity.shell.stop": "থামান",
|
||||
"session.activity.shell.stopping": "থামানো হচ্ছে…",
|
||||
|
|
|
|||
|
|
@ -1189,7 +1189,6 @@ export const dict = {
|
|||
"session.activity.scripts.one": "{{count}} script",
|
||||
"session.activity.scripts.many": "{{count}} scripts",
|
||||
"session.activity.scripts.other": "{{count}} scripts",
|
||||
"session.activity.background": "Trabalho em segundo plano",
|
||||
"session.activity.shell.back": "Voltar ao trabalho em segundo plano",
|
||||
"session.activity.shell.stop": "Parar",
|
||||
"session.activity.shell.stopping": "Parando…",
|
||||
|
|
|
|||
|
|
@ -1227,7 +1227,6 @@ export const dict = {
|
|||
"session.activity.scripts.one": "{{count}} skripta",
|
||||
"session.activity.scripts.few": "{{count}} skripte",
|
||||
"session.activity.scripts.other": "{{count}} skripti",
|
||||
"session.activity.background": "Rad u pozadini",
|
||||
"session.activity.shell.back": "Nazad na rad u pozadini",
|
||||
"session.activity.shell.stop": "Zaustavi",
|
||||
"session.activity.shell.stopping": "Zaustavljanje…",
|
||||
|
|
|
|||
|
|
@ -1179,7 +1179,6 @@ export const dict = {
|
|||
"session.activity.subagents.other": "{{count}} subagents",
|
||||
"session.activity.shells.one": "{{count}} shell",
|
||||
"session.activity.shells.other": "{{count}} shells",
|
||||
"session.activity.background": "Feina en segon pla",
|
||||
"session.activity.shell.back": "Torna a la feina en segon pla",
|
||||
"session.activity.shell.stop": "Atura",
|
||||
"session.activity.shell.stopping": "S'està aturant…",
|
||||
|
|
|
|||
|
|
@ -1180,7 +1180,6 @@ export const dict = {
|
|||
"session.activity.scripts.few": "{{count}} skripty",
|
||||
"session.activity.scripts.many": "{{count}} skriptu",
|
||||
"session.activity.scripts.other": "{{count}} skriptů",
|
||||
"session.activity.background": "Práce na pozadí",
|
||||
"session.activity.shell.back": "Zpět na práci na pozadí",
|
||||
"session.activity.shell.stop": "Zastavit",
|
||||
"session.activity.shell.stopping": "Zastavování…",
|
||||
|
|
|
|||
|
|
@ -1202,7 +1202,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shells",
|
||||
"session.activity.scripts.one": "{{count}} script",
|
||||
"session.activity.scripts.other": "{{count}} scripts",
|
||||
"session.activity.background": "Baggrundsarbejde",
|
||||
"session.activity.shell.back": "Tilbage til baggrundsarbejde",
|
||||
"session.activity.shell.stop": "Stop",
|
||||
"session.activity.shell.stopping": "Stopper…",
|
||||
|
|
|
|||
|
|
@ -1184,7 +1184,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} Shells",
|
||||
"session.activity.scripts.one": "{{count}} Skript",
|
||||
"session.activity.scripts.other": "{{count}} Skripte",
|
||||
"session.activity.background": "Hintergrundarbeit",
|
||||
"session.activity.shell.back": "Zurück zur Hintergrundarbeit",
|
||||
"session.activity.shell.stop": "Stoppen",
|
||||
"session.activity.shell.stopping": "Wird gestoppt…",
|
||||
|
|
|
|||
|
|
@ -1188,7 +1188,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} ޝެލްތައް",
|
||||
"session.activity.scripts.one": "{{count}} ސްކްރިޕްޓް",
|
||||
"session.activity.scripts.other": "{{count}} ސްކްރިޕްޓްތައް",
|
||||
"session.activity.background": "ފަސްބިމުގެ މަސައްކަތް",
|
||||
"session.activity.shell.back": "ބެކްގްރައުންޑް މަސައްކަތަށް އެނބުރި",
|
||||
"session.activity.shell.stop": "ހުއްޓާލާ",
|
||||
"session.activity.shell.stopping": "ހުއްޓާލަމުން…",
|
||||
|
|
|
|||
|
|
@ -1173,7 +1173,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "Shell {{count}}",
|
||||
"session.activity.scripts.one": "Script {{count}}",
|
||||
"session.activity.scripts.other": "Script {{count}}",
|
||||
"session.activity.background": "རྒྱབ་ལྗོངས་ལཱ་",
|
||||
"session.activity.shell.back": "རྒྱབ་གཞིའི་ལཱ་ལུ་ལོག",
|
||||
"session.activity.shell.stop": "བཀག",
|
||||
"session.activity.shell.stopping": "བཀག་དོ…",
|
||||
|
|
|
|||
|
|
@ -1177,7 +1177,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} κελύφη",
|
||||
"session.activity.scripts.one": "{{count}} σενάριο",
|
||||
"session.activity.scripts.other": "{{count}} σενάρια",
|
||||
"session.activity.background": "Εργασία στο παρασκήνιο",
|
||||
"session.activity.shell.back": "Πίσω στην εργασία παρασκηνίου",
|
||||
"session.activity.shell.stop": "Διακοπή",
|
||||
"session.activity.shell.stopping": "Διακοπή…",
|
||||
|
|
|
|||
|
|
@ -623,7 +623,8 @@ export const dict = {
|
|||
"tips.browse.description": "Let OpenCode work in your browser with your tabs, logins, and extensions.",
|
||||
"tips.browse.install": "Install",
|
||||
"tips.hex.title": "Use your voice",
|
||||
"tips.hex.description": "Hex lets you hold a key and speak your prompts. It runs on your computer and works in any app.",
|
||||
"tips.hex.description":
|
||||
"Hex lets you hold a key and speak your prompts. It runs on your computer and works in any app.",
|
||||
"tips.hex.install": "Install Hex",
|
||||
"home.workspaceTip": "Start next session in a new workspace to keep changes isolated",
|
||||
|
||||
|
|
@ -702,7 +703,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shells",
|
||||
"session.activity.scripts.one": "{{count}} script",
|
||||
"session.activity.scripts.other": "{{count}} scripts",
|
||||
"session.activity.background": "Background work",
|
||||
"session.activity.shell.back": "Back to background work",
|
||||
"session.activity.shell.stop": "Stop",
|
||||
"session.activity.shell.stopping": "Stopping…",
|
||||
|
|
@ -897,8 +897,7 @@ export const dict = {
|
|||
"settings.experimental.row.newQuestionUI.title": "New question UI",
|
||||
"settings.experimental.row.newQuestionUI.description": "Preview the keyboard-first question dock",
|
||||
"settings.experimental.row.tabGroups.title": "Tab groups",
|
||||
"settings.experimental.row.tabGroups.description":
|
||||
"Group session tabs in side tabs with inline session search",
|
||||
"settings.experimental.row.tabGroups.description": "Group session tabs in side tabs with inline session search",
|
||||
"settings.experimental.row.sidebarOrganize.title": "Organize vertical sidebar",
|
||||
"settings.experimental.row.sidebarOrganize.description":
|
||||
"Choose how to organize sessions in side tabs. On desktop, Customize replaces Home with Settings in the sidebar.",
|
||||
|
|
@ -1220,6 +1219,8 @@ export const dict = {
|
|||
"settings.general.row.showCustomAgents.title": "Show agent",
|
||||
"settings.general.row.showCustomAgents.description":
|
||||
"Switch between agents in the composer. When hidden, defaults to Build agent.",
|
||||
"settings.general.row.sharedSidePanel.title": "Keep side panel open across sessions",
|
||||
"settings.general.row.sharedSidePanel.description": "Opening or closing it in one session applies to all",
|
||||
"settings.general.row.followUpBehavior.title": "Follow-up behavior",
|
||||
"settings.general.row.followUpBehavior.description":
|
||||
"Choose whether to queue follow-ups or steer the current turn. Use {{keybind}} to switch.",
|
||||
|
|
|
|||
|
|
@ -1238,7 +1238,6 @@ export const dict = {
|
|||
"session.activity.subagents.other": "{{count}} subagentes",
|
||||
"session.activity.shells.one": "{{count}} shell",
|
||||
"session.activity.shells.other": "{{count}} shells",
|
||||
"session.activity.background": "Trabajo en segundo plano",
|
||||
"session.activity.shell.back": "Volver al trabajo en segundo plano",
|
||||
"session.activity.shell.stop": "Detener",
|
||||
"session.activity.shell.stopping": "Deteniendo…",
|
||||
|
|
|
|||
|
|
@ -1135,7 +1135,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shelli",
|
||||
"session.activity.scripts.one": "{{count}} skript",
|
||||
"session.activity.scripts.other": "{{count}} skripti",
|
||||
"session.activity.background": "Taustatöö",
|
||||
"session.activity.shell.back": "Tagasi taustatöö juurde",
|
||||
"session.activity.shell.stop": "Peata",
|
||||
"session.activity.shell.stopping": "Peatamine…",
|
||||
|
|
|
|||
|
|
@ -1142,7 +1142,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} پوسته",
|
||||
"session.activity.scripts.one": "{{count}} اسکریپت",
|
||||
"session.activity.scripts.other": "{{count}} اسکریپت",
|
||||
"session.activity.background": "کار پسزمینه",
|
||||
"session.activity.shell.back": "بازگشت به کارهای پسزمینه",
|
||||
"session.activity.shell.stop": "توقف",
|
||||
"session.activity.shell.stopping": "در حال توقف…",
|
||||
|
|
|
|||
|
|
@ -1147,7 +1147,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shelliä",
|
||||
"session.activity.scripts.one": "{{count}} skripti",
|
||||
"session.activity.scripts.other": "{{count}} skriptiä",
|
||||
"session.activity.background": "Taustatyö",
|
||||
"session.activity.shell.back": "Takaisin taustatyöhön",
|
||||
"session.activity.shell.stop": "Pysäytä",
|
||||
"session.activity.shell.stopping": "Pysäytetään…",
|
||||
|
|
|
|||
|
|
@ -1142,7 +1142,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shells",
|
||||
"session.activity.scripts.one": "{{count}} skript",
|
||||
"session.activity.scripts.other": "{{count}} skript",
|
||||
"session.activity.background": "Bakgrundsarbeiði",
|
||||
"session.activity.shell.back": "Aftur til bakgrundsarbeiði",
|
||||
"session.activity.shell.stop": "Steðga",
|
||||
"session.activity.shell.stopping": "Steðgar…",
|
||||
|
|
|
|||
|
|
@ -1202,7 +1202,6 @@ export const dict = {
|
|||
"session.activity.scripts.one": "{{count}} script",
|
||||
"session.activity.scripts.many": "{{count}} scripts",
|
||||
"session.activity.scripts.other": "{{count}} scripts",
|
||||
"session.activity.background": "Travail en arrière-plan",
|
||||
"session.activity.shell.back": "Retour aux tâches en arrière-plan",
|
||||
"session.activity.shell.stop": "Arrêter",
|
||||
"session.activity.shell.stopping": "Arrêt…",
|
||||
|
|
|
|||
|
|
@ -1129,7 +1129,6 @@ export const dict = {
|
|||
"session.activity.scripts.one": "{{count}} סקריפט",
|
||||
"session.activity.scripts.two": "{{count}} סקריפטים",
|
||||
"session.activity.scripts.other": "{{count}} סקריפטים",
|
||||
"session.activity.background": "עבודה ברקע",
|
||||
"session.activity.shell.back": "חזרה לעבודה ברקע",
|
||||
"session.activity.shell.stop": "עצור",
|
||||
"session.activity.shell.stopping": "עוצר…",
|
||||
|
|
|
|||
|
|
@ -1151,7 +1151,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} शेल",
|
||||
"session.activity.scripts.one": "{{count}} स्क्रिप्ट",
|
||||
"session.activity.scripts.other": "{{count}} स्क्रिप्ट",
|
||||
"session.activity.background": "पृष्ठभूमि कार्य",
|
||||
"session.activity.shell.back": "बैकग्राउंड कार्य पर वापस जाएँ",
|
||||
"session.activity.shell.stop": "रोकें",
|
||||
"session.activity.shell.stopping": "रोका जा रहा है…",
|
||||
|
|
|
|||
|
|
@ -1171,7 +1171,6 @@ export const dict = {
|
|||
"session.activity.scripts.one": "{{count}} skripta",
|
||||
"session.activity.scripts.few": "{{count}} skripte",
|
||||
"session.activity.scripts.other": "{{count}} skripti",
|
||||
"session.activity.background": "Rad u pozadini",
|
||||
"session.activity.shell.back": "Natrag na pozadinski rad",
|
||||
"session.activity.shell.stop": "Zaustavi",
|
||||
"session.activity.shell.stopping": "Zaustavljanje…",
|
||||
|
|
|
|||
|
|
@ -1161,7 +1161,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} szkript",
|
||||
"session.activity.scripts.other": "{{count}} szkript",
|
||||
"session.activity.background": "Háttérmunka",
|
||||
"session.activity.shell.back": "Vissza a háttérfolyamatokhoz",
|
||||
"session.activity.shell.stop": "Leállítás",
|
||||
"session.activity.shell.stopping": "Leállítás…",
|
||||
|
|
|
|||
|
|
@ -1146,7 +1146,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} սկրիպտ",
|
||||
"session.activity.scripts.other": "{{count}} սկրիպտ",
|
||||
"session.activity.background": "Ֆոնային աշխատանք",
|
||||
"session.activity.shell.back": "Վերադառնալ ֆոնային աշխատանքին",
|
||||
"session.activity.shell.stop": "Կանգնեցնել",
|
||||
"session.activity.shell.stopping": "Կանգնեցվում է…",
|
||||
|
|
|
|||
|
|
@ -1213,7 +1213,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} skrip",
|
||||
"session.activity.scripts.other": "{{count}} skrip",
|
||||
"session.activity.background": "Pekerjaan latar belakang",
|
||||
"session.activity.shell.back": "Kembali ke pekerjaan latar belakang",
|
||||
"session.activity.shell.stop": "Hentikan",
|
||||
"session.activity.shell.stopping": "Menghentikan…",
|
||||
|
|
|
|||
|
|
@ -1142,7 +1142,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} skeljar",
|
||||
"session.activity.scripts.one": "{{count}} skrifta",
|
||||
"session.activity.scripts.other": "{{count}} skriftur",
|
||||
"session.activity.background": "Bakgrunnsvinna",
|
||||
"session.activity.shell.back": "Til baka í bakgrunnsvinnu",
|
||||
"session.activity.shell.stop": "Stöðva",
|
||||
"session.activity.shell.stopping": "Stöðvar…",
|
||||
|
|
|
|||
|
|
@ -1173,7 +1173,6 @@ export const dict = {
|
|||
"session.activity.subagents.other": "{{count}} subagenti",
|
||||
"session.activity.shells.one": "{{count}} shell",
|
||||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.background": "Lavoro in background",
|
||||
"session.activity.shell.back": "Torna alle attività in background",
|
||||
"session.activity.shell.stop": "Interrompi",
|
||||
"session.activity.shell.stopping": "Interruzione…",
|
||||
|
|
|
|||
|
|
@ -1159,7 +1159,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "シェル{{count}}件",
|
||||
"session.activity.scripts.one": "スクリプト{{count}}件",
|
||||
"session.activity.scripts.other": "スクリプト{{count}}件",
|
||||
"session.activity.background": "バックグラウンド作業",
|
||||
"session.activity.shell.back": "バックグラウンド作業に戻る",
|
||||
"session.activity.shell.stop": "停止",
|
||||
"session.activity.shell.stopping": "停止中…",
|
||||
|
|
|
|||
|
|
@ -1149,7 +1149,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} სკრიპტი",
|
||||
"session.activity.scripts.other": "{{count}} სკრიპტი",
|
||||
"session.activity.background": "ფონური სამუშაო",
|
||||
"session.activity.shell.back": "ფონურ სამუშაოზე დაბრუნება",
|
||||
"session.activity.shell.stop": "შეჩერება",
|
||||
"session.activity.shell.stopping": "ჩერდება…",
|
||||
|
|
|
|||
|
|
@ -1137,7 +1137,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "សែល {{count}}",
|
||||
"session.activity.scripts.one": "ស្គ្រីប {{count}}",
|
||||
"session.activity.scripts.other": "ស្គ្រីប {{count}}",
|
||||
"session.activity.background": "ការងារផ្ទៃខាងក្រោយ",
|
||||
"session.activity.shell.back": "ត្រឡប់ទៅការងារផ្ទៃខាងក្រោយ",
|
||||
"session.activity.shell.stop": "ឈប់",
|
||||
"session.activity.shell.stopping": "កំពុងឈប់…",
|
||||
|
|
|
|||
|
|
@ -1146,7 +1146,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "셸 {{count}}개",
|
||||
"session.activity.scripts.one": "스크립트 {{count}}개",
|
||||
"session.activity.scripts.other": "스크립트 {{count}}개",
|
||||
"session.activity.background": "백그라운드 작업",
|
||||
"session.activity.shell.back": "백그라운드 작업으로 돌아가기",
|
||||
"session.activity.shell.stop": "중지",
|
||||
"session.activity.shell.stopping": "중지 중…",
|
||||
|
|
|
|||
|
|
@ -361,14 +361,6 @@ export const { use: useLanguage, provider: LanguageProvider } = createSimpleCont
|
|||
"",
|
||||
)
|
||||
|
||||
// "Background work · 1 shell": an idle subagent whose tree still runs work.
|
||||
const activityBackground = (counts: { subagents: number; scripts: number; shells: number }) => {
|
||||
const work = activitySummary(counts)
|
||||
const label = t("session.activity.background")
|
||||
|
||||
return work ? t("session.activity.summary", { subagents: label, shells: work }) : label
|
||||
}
|
||||
|
||||
const tDynamic = <Key extends Extract<keyof Dictionary, string>>(
|
||||
key: TranslationKey<Key>,
|
||||
source: string,
|
||||
|
|
@ -443,7 +435,6 @@ export const { use: useLanguage, provider: LanguageProvider } = createSimpleCont
|
|||
pluralForm,
|
||||
activitySummary,
|
||||
activitySummaryRich,
|
||||
activityBackground,
|
||||
rich,
|
||||
list,
|
||||
setLocale(next: Locale) {
|
||||
|
|
|
|||
|
|
@ -1130,7 +1130,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} script",
|
||||
"session.activity.scripts.other": "{{count}} script",
|
||||
"session.activity.background": "ວຽກໃນພື້ນຫຼັງ",
|
||||
"session.activity.shell.back": "ກັບໄປທີ່ວຽກເບື້ອງຫຼັງ",
|
||||
"session.activity.shell.stop": "ຢຸດ",
|
||||
"session.activity.shell.stopping": "ກຳລັງຢຸດ…",
|
||||
|
|
|
|||
|
|
@ -1188,7 +1188,6 @@ export const dict = {
|
|||
"session.activity.scripts.few": "{{count}} scenarijai",
|
||||
"session.activity.scripts.many": "{{count}} scenarijaus",
|
||||
"session.activity.scripts.other": "{{count}} scenarijų",
|
||||
"session.activity.background": "Foninis darbas",
|
||||
"session.activity.shell.back": "Atgal į foninį darbą",
|
||||
"session.activity.shell.stop": "Stabdyti",
|
||||
"session.activity.shell.stopping": "Stabdoma…",
|
||||
|
|
|
|||
|
|
@ -1175,7 +1175,6 @@ export const dict = {
|
|||
"session.activity.scripts.zero": "{{count}} skriptu",
|
||||
"session.activity.scripts.one": "{{count}} skripts",
|
||||
"session.activity.scripts.other": "{{count}} skripti",
|
||||
"session.activity.background": "Fona darbs",
|
||||
"session.activity.shell.back": "Atpakaļ uz fona darbiem",
|
||||
"session.activity.shell.stop": "Apturēt",
|
||||
"session.activity.shell.stopping": "Aptur…",
|
||||
|
|
|
|||
|
|
@ -1157,7 +1157,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} школки",
|
||||
"session.activity.scripts.one": "{{count}} скрипта",
|
||||
"session.activity.scripts.other": "{{count}} скрипти",
|
||||
"session.activity.background": "Работа во позадина",
|
||||
"session.activity.shell.back": "Назад кон позадинската работа",
|
||||
"session.activity.shell.stop": "Запри",
|
||||
"session.activity.shell.stopping": "Се запира…",
|
||||
|
|
|
|||
|
|
@ -1157,7 +1157,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} скрипт",
|
||||
"session.activity.scripts.other": "{{count}} скрипт",
|
||||
"session.activity.background": "Арын ажил",
|
||||
"session.activity.shell.back": "Арын ажил руу буцах",
|
||||
"session.activity.shell.stop": "Зогсоох",
|
||||
"session.activity.shell.stopping": "Зогсоож байна…",
|
||||
|
|
|
|||
|
|
@ -1150,7 +1150,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} skrip",
|
||||
"session.activity.scripts.other": "{{count}} skrip",
|
||||
"session.activity.background": "Kerja latar belakang",
|
||||
"session.activity.shell.back": "Kembali ke kerja latar belakang",
|
||||
"session.activity.shell.stop": "Henti",
|
||||
"session.activity.shell.stopping": "Menghentikan…",
|
||||
|
|
|
|||
|
|
@ -1158,7 +1158,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "Shell {{count}} ခု",
|
||||
"session.activity.scripts.one": "Script {{count}} ခု",
|
||||
"session.activity.scripts.other": "Script {{count}} ခု",
|
||||
"session.activity.background": "နောက်ခံအလုပ်",
|
||||
"session.activity.shell.back": "နောက်ခံအလုပ်များသို့ ပြန်သွားရန်",
|
||||
"session.activity.shell.stop": "ရပ်ရန်",
|
||||
"session.activity.shell.stopping": "ရပ်နေသည်…",
|
||||
|
|
|
|||
|
|
@ -1149,7 +1149,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} शेलहरू",
|
||||
"session.activity.scripts.one": "{{count}} स्क्रिप्ट",
|
||||
"session.activity.scripts.other": "{{count}} स्क्रिप्टहरू",
|
||||
"session.activity.background": "पृष्ठभूमि कार्य",
|
||||
"session.activity.shell.back": "पृष्ठभूमि काममा फर्कनुहोस्",
|
||||
"session.activity.shell.stop": "रोक्नुहोस्",
|
||||
"session.activity.shell.stopping": "रोक्दै…",
|
||||
|
|
|
|||
|
|
@ -1163,7 +1163,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shells",
|
||||
"session.activity.scripts.one": "{{count}} script",
|
||||
"session.activity.scripts.other": "{{count}} scripts",
|
||||
"session.activity.background": "Achtergrondwerk",
|
||||
"session.activity.shell.back": "Terug naar achtergrondwerk",
|
||||
"session.activity.shell.stop": "Stoppen",
|
||||
"session.activity.shell.stopping": "Stoppen…",
|
||||
|
|
|
|||
|
|
@ -1211,7 +1211,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} skript",
|
||||
"session.activity.scripts.other": "{{count}} skript",
|
||||
"session.activity.background": "Bakgrunnsarbeid",
|
||||
"session.activity.shell.back": "Tilbake til bakgrunnsarbeid",
|
||||
"session.activity.shell.stop": "Stopp",
|
||||
"session.activity.shell.stopping": "Stopper …",
|
||||
|
|
|
|||
|
|
@ -1155,7 +1155,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} شیل",
|
||||
"session.activity.scripts.one": "{{count}} سکرپٹ",
|
||||
"session.activity.scripts.other": "{{count}} سکرپٹ",
|
||||
"session.activity.background": "پس منظر دا کم",
|
||||
"session.activity.shell.back": "پس منظر دے کم تے واپس جاؤ",
|
||||
"session.activity.shell.stop": "روکو",
|
||||
"session.activity.shell.stopping": "رُک رہیا اے…",
|
||||
|
|
|
|||
|
|
@ -1198,7 +1198,6 @@ export const dict = {
|
|||
"session.activity.scripts.few": "{{count}} skrypty",
|
||||
"session.activity.scripts.many": "{{count}} skryptów",
|
||||
"session.activity.scripts.other": "{{count}} skryptu",
|
||||
"session.activity.background": "Praca w tle",
|
||||
"session.activity.shell.back": "Wróć do pracy w tle",
|
||||
"session.activity.shell.stop": "Zatrzymaj",
|
||||
"session.activity.shell.stopping": "Zatrzymywanie…",
|
||||
|
|
|
|||
|
|
@ -1174,7 +1174,6 @@ export const dict = {
|
|||
"session.activity.scripts.one": "{{count}} script",
|
||||
"session.activity.scripts.few": "{{count}} scripturi",
|
||||
"session.activity.scripts.other": "{{count}} de scripturi",
|
||||
"session.activity.background": "Lucru în fundal",
|
||||
"session.activity.shell.back": "Înapoi la activitatea din fundal",
|
||||
"session.activity.shell.stop": "Oprește",
|
||||
"session.activity.shell.stopping": "Se oprește…",
|
||||
|
|
|
|||
|
|
@ -1252,7 +1252,6 @@ export const dict = {
|
|||
"session.activity.scripts.few": "{{count}} скрипта",
|
||||
"session.activity.scripts.many": "{{count}} скриптов",
|
||||
"session.activity.scripts.other": "{{count}} скрипта",
|
||||
"session.activity.background": "Фоновая работа",
|
||||
"session.activity.shell.back": "Назад к фоновым задачам",
|
||||
"session.activity.shell.stop": "Остановить",
|
||||
"session.activity.shell.stopping": "Остановка…",
|
||||
|
|
|
|||
|
|
@ -1150,7 +1150,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "ෂෙල් {{count}}",
|
||||
"session.activity.scripts.one": "ස්ක්රිප්ට් {{count}}",
|
||||
"session.activity.scripts.other": "ස්ක්රිප්ට් {{count}}",
|
||||
"session.activity.background": "පසුබිම් වැඩ",
|
||||
"session.activity.shell.back": "පසුබිම් වැඩ වෙත ආපසු",
|
||||
"session.activity.shell.stop": "නවත්වන්න",
|
||||
"session.activity.shell.stopping": "නවත්වමින්…",
|
||||
|
|
|
|||
|
|
@ -1186,7 +1186,6 @@ export const dict = {
|
|||
"session.activity.scripts.few": "{{count}} skripty",
|
||||
"session.activity.scripts.many": "{{count}} skriptu",
|
||||
"session.activity.scripts.other": "{{count}} skriptov",
|
||||
"session.activity.background": "Práca na pozadí",
|
||||
"session.activity.shell.back": "Späť na prácu na pozadí",
|
||||
"session.activity.shell.stop": "Zastaviť",
|
||||
"session.activity.shell.stopping": "Zastavuje sa…",
|
||||
|
|
|
|||
|
|
@ -1184,7 +1184,6 @@ export const dict = {
|
|||
"session.activity.scripts.two": "{{count}} skripti",
|
||||
"session.activity.scripts.few": "{{count}} skripte",
|
||||
"session.activity.scripts.other": "{{count}} skript",
|
||||
"session.activity.background": "Delo v ozadju",
|
||||
"session.activity.shell.back": "Nazaj na delo v ozadju",
|
||||
"session.activity.shell.stop": "Ustavi",
|
||||
"session.activity.shell.stopping": "Ustavljanje …",
|
||||
|
|
|
|||
|
|
@ -1152,7 +1152,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} skript",
|
||||
"session.activity.scripts.other": "{{count}} skripte",
|
||||
"session.activity.background": "Punë në sfond",
|
||||
"session.activity.shell.back": "Kthehu te puna në sfond",
|
||||
"session.activity.shell.stop": "Ndalo",
|
||||
"session.activity.shell.stopping": "Po ndalet…",
|
||||
|
|
|
|||
|
|
@ -1168,7 +1168,6 @@ export const dict = {
|
|||
"session.activity.scripts.one": "{{count}} скрипта",
|
||||
"session.activity.scripts.few": "{{count}} скрипте",
|
||||
"session.activity.scripts.other": "{{count}} скрипти",
|
||||
"session.activity.background": "Рад у позадини",
|
||||
"session.activity.shell.back": "Назад на рад у позадини",
|
||||
"session.activity.shell.stop": "Заустави",
|
||||
"session.activity.shell.stopping": "Заустављање…",
|
||||
|
|
|
|||
|
|
@ -1151,7 +1151,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shells",
|
||||
"session.activity.scripts.one": "{{count}} skript",
|
||||
"session.activity.scripts.other": "{{count}} skript",
|
||||
"session.activity.background": "Bakgrundsarbete",
|
||||
"session.activity.shell.back": "Tillbaka till bakgrundsarbete",
|
||||
"session.activity.shell.stop": "Stoppa",
|
||||
"session.activity.shell.stopping": "Stoppar…",
|
||||
|
|
|
|||
|
|
@ -1164,7 +1164,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} скрипт",
|
||||
"session.activity.scripts.other": "{{count}} скрипт",
|
||||
"session.activity.background": "Кори пасзамина",
|
||||
"session.activity.shell.back": "Бозгашт ба корҳои заминавӣ",
|
||||
"session.activity.shell.stop": "Қатъ кардан",
|
||||
"session.activity.shell.stopping": "Қатъ карда мешавад…",
|
||||
|
|
|
|||
|
|
@ -1182,7 +1182,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "เชลล์ {{count}} ตัว",
|
||||
"session.activity.scripts.one": "สคริปต์ {{count}} ตัว",
|
||||
"session.activity.scripts.other": "สคริปต์ {{count}} ตัว",
|
||||
"session.activity.background": "งานเบื้องหลัง",
|
||||
"session.activity.shell.back": "กลับไปยังงานเบื้องหลัง",
|
||||
"session.activity.shell.stop": "หยุด",
|
||||
"session.activity.shell.stopping": "กำลังหยุด…",
|
||||
|
|
|
|||
|
|
@ -1143,7 +1143,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} skript",
|
||||
"session.activity.scripts.other": "{{count}} skript",
|
||||
"session.activity.background": "Fon işi",
|
||||
"session.activity.shell.back": "Fon işlerine dolan",
|
||||
"session.activity.shell.stop": "Duruz",
|
||||
"session.activity.shell.stopping": "Duruzylýar…",
|
||||
|
|
|
|||
|
|
@ -1223,7 +1223,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} kabuk",
|
||||
"session.activity.scripts.one": "{{count}} betik",
|
||||
"session.activity.scripts.other": "{{count}} betik",
|
||||
"session.activity.background": "Arka plan işi",
|
||||
"session.activity.shell.back": "Arka plan işlerine dön",
|
||||
"session.activity.shell.stop": "Durdur",
|
||||
"session.activity.shell.stopping": "Durduruluyor…",
|
||||
|
|
|
|||
|
|
@ -1252,7 +1252,6 @@ export const dict = {
|
|||
"session.activity.scripts.few": "{{count}} скрипти",
|
||||
"session.activity.scripts.many": "{{count}} скриптів",
|
||||
"session.activity.scripts.other": "{{count}} скрипта",
|
||||
"session.activity.background": "Фонова робота",
|
||||
"session.activity.shell.back": "Назад до фонової роботи",
|
||||
"session.activity.shell.stop": "Зупинити",
|
||||
"session.activity.shell.stopping": "Зупинення…",
|
||||
|
|
|
|||
|
|
@ -1161,7 +1161,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} شیلز",
|
||||
"session.activity.scripts.one": "{{count}} اسکرپٹ",
|
||||
"session.activity.scripts.other": "{{count}} اسکرپٹس",
|
||||
"session.activity.background": "پس منظر کا کام",
|
||||
"session.activity.shell.back": "پس منظر کے کام پر واپس جائیں",
|
||||
"session.activity.shell.stop": "روکیں",
|
||||
"session.activity.shell.stopping": "روکا جا رہا ہے…",
|
||||
|
|
|
|||
|
|
@ -1161,7 +1161,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} ta shell",
|
||||
"session.activity.scripts.one": "{{count}} ta skript",
|
||||
"session.activity.scripts.other": "{{count}} ta skript",
|
||||
"session.activity.background": "Fon ishi",
|
||||
"session.activity.shell.back": "Fon ishlariga qaytish",
|
||||
"session.activity.shell.stop": "To‘xtatish",
|
||||
"session.activity.shell.stopping": "To‘xtatilmoqda…",
|
||||
|
|
|
|||
|
|
@ -1147,7 +1147,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} shell",
|
||||
"session.activity.scripts.one": "{{count}} script",
|
||||
"session.activity.scripts.other": "{{count}} script",
|
||||
"session.activity.background": "Công việc nền",
|
||||
"session.activity.shell.back": "Quay lại tác vụ nền",
|
||||
"session.activity.shell.stop": "Dừng",
|
||||
"session.activity.shell.stopping": "Đang dừng…",
|
||||
|
|
|
|||
|
|
@ -1158,7 +1158,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} 个 Shell",
|
||||
"session.activity.scripts.one": "{{count}} 个脚本",
|
||||
"session.activity.scripts.other": "{{count}} 个脚本",
|
||||
"session.activity.background": "后台工作",
|
||||
"session.activity.shell.back": "返回后台任务",
|
||||
"session.activity.shell.stop": "停止",
|
||||
"session.activity.shell.stopping": "正在停止…",
|
||||
|
|
|
|||
|
|
@ -1154,7 +1154,6 @@ export const dict = {
|
|||
"session.activity.shells.other": "{{count}} 個 Shell",
|
||||
"session.activity.scripts.one": "{{count}} 個腳本",
|
||||
"session.activity.scripts.other": "{{count}} 個腳本",
|
||||
"session.activity.background": "背景工作",
|
||||
"session.activity.shell.back": "返回背景工作",
|
||||
"session.activity.shell.stop": "停止",
|
||||
"session.activity.shell.stopping": "正在停止…",
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue