diff --git a/e2e/agentCycleEffort.spec.ts b/e2e/agentCycleEffort.spec.ts index aafd5a69c..ce0f1be13 100644 --- a/e2e/agentCycleEffort.spec.ts +++ b/e2e/agentCycleEffort.spec.ts @@ -219,8 +219,11 @@ function history(page: Page) { function modelButton(page: Page) { return page.getByRole("button", { name: "Model", exact: true }).filter({ visible: true }); } +function effortButton(page: Page) { + return page.getByRole("button", { name: "Reasoning", exact: true }).filter({ visible: true }); +} async function expectEffort(page: Page, name: string) { - await expect(modelButton(page)).toHaveAttribute("title", new RegExp(`Reasoning: ${name}(?: ·|$)`)); + await expect(effortButton(page)).toHaveText(name); } async function selected(box: Locator) { return box.evaluate((element) => { @@ -255,7 +258,7 @@ async function selectDraft(page: Page) { } async function chooseModel(page: Page, name: string) { await modelButton(page).click(); - // A model row also holds its Configure button, whose label joins the option's name. + // A model row also holds its Pin button, whose label joins the option's name. await page.getByRole("option", { name: new RegExp(`^${name}\\b`) }).click(); await page.keyboard.press("Escape"); await box(page).focus(); @@ -292,7 +295,7 @@ for (const placement of ["editor", "toolWindow"] as const) { option: effortId, value, }); - await expect(page.getByRole("dialog", { name: "Model & effort settings", exact: true })).toHaveCount(0); + await expect(page.getByRole("listbox", { name: "Reasoning", exact: true })).toHaveCount(0); } await expectNoSubmission(page); await stream.click({ position: { x: 12, y: 20 } }); @@ -350,7 +353,7 @@ test("subagent conversation never changes its hidden parent's effort", async ({ await expectEffort(page, "Gentle"); }); -test("Settings and model popup exclude the agent shortcut", async ({ workbench: page }) => { +test("Settings and effort popup exclude the agent shortcut", async ({ workbench: page }) => { await seed(page, "editor"); await box(page).fill(draft); await page.keyboard.press("Meta+,"); @@ -361,14 +364,10 @@ test("Settings and model popup exclude the agent shortcut", async ({ workbench: await expect(search).toBeFocused(); await expect(search).toHaveValue("keymap"); await settings.getByRole("button", { name: "Cancel", exact: true }).click(); - await modelButton(page).click(); - const popup = page.getByRole("dialog", { name: "Model & effort settings", exact: true }); + await effortButton(page).click(); + const popup = page.getByRole("listbox", { name: "Reasoning", exact: true }); await expect(popup).toBeVisible(); - await popup.getByRole("button", { name: "Configure model", exact: true }).click(); - const gentle = popup.getByRole("radio", { name: "Gentle", exact: true }); - await gentle.focus(); await page.keyboard.press("Alt+t"); - await expect(gentle).toHaveAttribute("aria-checked", "true"); expect(await ipcCalls(page, "agent_set_config")).toEqual([]); await page.keyboard.press("Escape"); await expectEffort(page, "Gentle"); diff --git a/e2e/agentVersion.spec.ts b/e2e/agentVersion.spec.ts index efef541fa..f820b072c 100644 --- a/e2e/agentVersion.spec.ts +++ b/e2e/agentVersion.spec.ts @@ -1,3 +1,4 @@ +import type { Page } from "@playwright/test"; import { expect, test } from "./fixtures"; test.beforeEach(async ({ workbench: page }) => { @@ -52,7 +53,7 @@ test.beforeEach(async ({ workbench: page }) => { }); await page.getByRole("button", { name: "Agents", exact: true }).click(); await page.getByRole("button", { name: "New Agent Task", exact: true }).click(); - await expect(page.getByText("omp · 18.20.0 · ACP v1", { exact: true })).toBeVisible(); + await expectVersion(page, "18.20.0"); }); test("refreshes an upgraded agent's version on window focus without losing the draft", async ({ workbench: page }) => { @@ -63,7 +64,7 @@ test("refreshes an upgraded agent's version on window focus without losing the d window.dispatchEvent(new Event("test:agent-upgraded")); window.dispatchEvent(new Event("focus")); }); - await expect(page.getByText("omp · 18.20.2 · ACP v1", { exact: true })).toBeVisible(); + await expectVersion(page, "18.20.2"); await expect(message).toHaveText("Keep this unsent draft"); }); @@ -71,5 +72,10 @@ test("refreshes an upgraded agent's version when New Task is reopened", async ({ await page.getByRole("button", { name: "Close Tab", exact: true }).click(); await page.evaluate(() => window.dispatchEvent(new Event("test:agent-upgraded"))); await page.getByRole("button", { name: "New Agent Task", exact: true }).click(); - await expect(page.getByText("omp · 18.20.2 · ACP v1", { exact: true })).toBeVisible(); + await expectVersion(page, "18.20.2"); }); + +/** The agent picker shows its icon; its name and version are in its tooltip. */ +async function expectVersion(page: Page, version: string) { + await expect(page.locator(`[data-tooltip$=" ${version}"]`).filter({ visible: true })).toHaveCount(1); +} diff --git a/src/features/agents/Composer.module.css b/src/features/agents/Composer.module.css index 7cebadb02..b21251b2c 100644 --- a/src/features/agents/Composer.module.css +++ b/src/features/agents/Composer.module.css @@ -173,9 +173,6 @@ .chipDetail > span { grid-area: 1 / 1; } -.chipSizer { - visibility: hidden; -} .chipChevron { flex: none; color: var(--fg-muted); @@ -222,46 +219,38 @@ color: var(--fg-muted); cursor: default; } -.activeModelBar { +/* The model popup's top: effort (and context size) as segmented controls. */ +.quickSettings { + display: flex; + flex-direction: column; + gap: var(--space-1-5); + padding: 4px 10px 10px; + margin-bottom: 4px; + border-bottom: 1px solid var(--border); +} +.quickRow { display: flex; align-items: center; gap: var(--space-2); - width: calc(100% - 12px); - margin: 2px 6px 6px; - padding: 6px 8px; - border: 0; - border-radius: var(--radius-control); - background: var(--bg-elev); - box-shadow: inset 0 0 0 1px var(--border); - color: var(--fg-strong); - text-align: left; - cursor: pointer; - transition: background var(--dur-fast) var(--ease); } -.activeModelBar:hover, -.activeModelBar:focus-visible { - outline: none; - background: var(--bg-hover); -} -.activeModelName { - flex: 1 1 auto; +.quickRow > .segmented { + flex: 1; min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - font-weight: 600; } -.activeModelMeta { +.quickLabel { flex: none; + width: 52px; color: var(--fg-muted); font-size: var(--fs-small); } -.activeModelGear { - display: inline-flex; - align-items: center; - gap: var(--space-0-5); - flex: none; - color: var(--fg-muted); +/* A model's configure button shows on its row's hover only. */ +.modelEffortPopup [role="option"] .modelRowConfigure { + opacity: 0; +} +.modelEffortPopup [role="option"]:hover .modelRowConfigure, +.modelEffortPopup [role="option"][aria-selected="true"] .modelRowConfigure, +.modelEffortPopup .modelRowConfigure:focus-visible { + opacity: 1; } .modelRowConfigure { display: grid; @@ -299,52 +288,9 @@ color: var(--warning); } -/* Page 2: per-model configuration view. */ -.modelDetail { - display: flex; - flex-direction: column; - gap: var(--space-3); - padding: 6px 12px 8px; -} -.modelDetailHeader { - display: flex; - align-items: center; - gap: var(--space-1-5); -} -.modelDetailTitle { - flex: 1 1 auto; - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; - color: var(--fg-strong); - font-weight: 600; -} -.modelDetailActions { - display: inline-flex; - align-items: center; - gap: var(--space-0-5); - flex: none; -} .pinnedButton { color: var(--accent); } -.detailSection { - display: flex; - flex-direction: column; - gap: var(--space-1-5); -} -.detailSectionLabel { - color: var(--fg-strong); - font-weight: 600; - font-size: var(--fs-small); -} -.detailRow { - display: flex; - align-items: center; - justify-content: space-between; - gap: var(--space-3); -} .segmented { display: flex; align-items: stretch; @@ -384,84 +330,6 @@ color: var(--fg-strong); font-weight: 600; } -.costCard { - display: flex; - flex-direction: column; - gap: var(--space-1); - padding: 8px 10px; - border-radius: var(--radius-popup); - background: var(--bg-elev); - box-shadow: inset 0 0 0 1px var(--border); -} -.costCardHeader { - display: flex; - align-items: center; - justify-content: space-between; - gap: var(--space-2); -} -.costCardTitle { - color: var(--fg-strong); - font-weight: 600; - font-size: var(--fs-small); -} -.costCardRow { - display: flex; - align-items: baseline; - justify-content: space-between; - gap: var(--space-3); - color: var(--fg-secondary); - font-size: var(--fs-small); -} -.costCardValue { - color: var(--fg-strong); - font-weight: 600; - font-variant-numeric: tabular-nums; -} -.pricingCard { - display: flex; - flex-direction: column; - border-radius: var(--radius-popup); - background: var(--bg-elev); - box-shadow: inset 0 0 0 1px var(--border); -} -.pricingHeader { - display: flex; - align-items: center; - gap: var(--space-1-5); - width: 100%; - padding: 8px 10px; - border: 0; - border-radius: inherit; - background: transparent; - color: var(--fg-strong); - text-align: left; - cursor: pointer; -} -.pricingHeader:hover, -.pricingHeader:focus-visible { - outline: none; - background: var(--bg-hover); -} -.pricingChevron { - flex: none; - color: var(--fg-muted); -} -.pricingTitle { - flex: 1 1 auto; - font-weight: 600; - font-size: var(--fs-small); -} -.pricingBody { - display: flex; - flex-direction: column; - gap: var(--space-1); - padding: 2px 12px 10px; -} -.pricingSubhead { - margin-bottom: 2px; - color: var(--fg-muted); - font-size: var(--fs-small); -} .modePopup { min-width: 200px; padding: 6px 0; @@ -561,9 +429,6 @@ gap: 5px; white-space: nowrap; } -.pickerName { - color: var(--fg-subtle); -} /* Above the text: the current file to reference, attached files and images. */ .context { diff --git a/src/features/agents/Composer.tsx b/src/features/agents/Composer.tsx index a3f834727..6adb3d799 100644 --- a/src/features/agents/Composer.tsx +++ b/src/features/agents/Composer.tsx @@ -33,7 +33,9 @@ import { Icon, IconButton, List, + Menu, Popup, + type MenuItem, firstSelectable, listNavigate, fileIconName, @@ -141,6 +143,8 @@ export interface ComposerProps { toolbar?: ReactNode; /** Right of the bottom row: send / stop buttons. */ actions?: ReactNode; + /** Extra items for the Add Context menu, after the file and image items. */ + addMenu?: MenuItem[]; className?: string; } @@ -979,6 +983,18 @@ export function Composer(props: ComposerProps) { [id, projectRoot, root], ); + const [addOpen, setAddOpen] = useState(false); + const addAnchor = useRef(null); + const insertMention = () => { + const view = viewRef.current; + if (!view) return; + // At the caret while typing, else after the text. + const end = view.state.doc.length; + const { from, to } = view.hasFocus ? view.state.selection.main : { from: end, to: end }; + const before = view.state.sliceDoc(Math.max(0, from - 1), from); + replace(from, to, before && !/\s/.test(before) ? " @" : "@"); + view.focus(); + }; const showContext = images.length > 0 || attached.length > 0 || !!suggested; return ( @@ -1107,14 +1123,23 @@ export function Composer(props: ComposerProps) { {basename(suggested.rel)} {tx("Current File")} + {/* The chip is the IDE context switch: off here, back on from the dashed chip. */} + )} {suggested && !ideContext && ( setOpen(false)} + aria-label={tx("Model")} className={styles.modelEffortPopup} > - {page === "detail" && selectedModel ? ( - setPage("list")} - onTogglePin={() => togglePinnedModel(selectedModel.value)} - onChange={onChange} - /> - ) : ( - <> - {unavailable && ( -

- Choose another model before starting. -

- )} - {canConfigureActive && selectedModel && ( - + ({ + value: v.value, + label: v.name, + description: v.description ?? undefined, + }))} + value={contextValue ?? contextOption.values[0]!.value} + onChange={(v) => onChange(contextOption.id, v)} + /> + )} {otherModelConfigs.map((o) => ( -
- {tx(o.name)} +
+ + {tx(o.name)} +
))} - {model.values.length > 0 || !modelRefresh ? ( - onChange(model.id, v)} - renderAction={(opt) => { - const raw = model.values.find((v) => v.value === opt.value); - if (!raw) return null; - const showRowBadge = !!raw.costCategory && !raw.description; - return ( - <> - {showRowBadge && } - - - ); - }} - /> - ) : ( -

- {modelRefresh?.refreshing ? Loading models… : No models reported by this agent.} -

- )} - {modelRefresh && } - +
)} + {model.values.length > 0 || !modelRefresh ? ( + { + onChange(model.id, v); + setOpen(false); + }} + renderAction={(opt) => { + const raw = model.values.find((v) => v.value === opt.value); + if (!raw) return null; + const pinned = pinnedModels.includes(raw.value); + return ( + <> + + + + ); + }} + /> + ) : ( +

+ {modelRefresh?.refreshing ? Loading models… : No models reported by this agent.} +

+ )} + {modelRefresh && }
); @@ -493,258 +429,6 @@ function CostBadge({ category }: { category: string | null | undefined }) { ); } -/** Page 2: per-model configuration view (segmented Effort, optional Context Size, Reset, Pin, and cost info). */ -function ModelDetailView({ - modelEntry, - effort, - effortValue, - contextOption, - contextValue, - otherModelConfigs, - valueOf, - pinned, - onBack, - onTogglePin, - onChange, -}: { - modelEntry: AgentConfigOption["values"][number]; - effort?: AgentConfigOption; - effortValue: string | null; - contextOption?: AgentConfigOption; - contextValue: string | null; - otherModelConfigs: AgentConfigOption[]; - valueOf: (o: AgentConfigOption) => string | null; - pinned: boolean; - onBack: () => void; - onTogglePin: () => void; - onChange: (option: string, value: string) => void; -}) { - const tx = useTx(); - const [pricingOpen, setPricingOpen] = useState(true); - - const defaultEffort = effort ? (effort.defaultValue ?? effort.current) : null; - const defaultContext = contextOption ? (contextOption.defaultValue ?? contextOption.current) : null; - const effortAtDefault = !effort || !defaultEffort || effortValue === defaultEffort; - const contextAtDefault = !contextOption || !defaultContext || contextValue === defaultContext; - const othersAtDefault = otherModelConfigs.every((o) => { - const def = o.defaultValue ?? o.current; - return !def || valueOf(o) === def; - }); - const atDefaults = effortAtDefault && contextAtDefault && othersAtDefault; - - const handleReset = () => { - if (effort && defaultEffort && effortValue !== defaultEffort) { - onChange(effort.id, defaultEffort); - } - if (contextOption && defaultContext && contextValue !== defaultContext) { - onChange(contextOption.id, defaultContext); - } - for (const o of otherModelConfigs) { - const def = o.defaultValue ?? o.current; - if (def && valueOf(o) !== def) { - onChange(o.id, def); - } - } - }; - - const compactEffort = (effort?.values.length ?? 0) >= 5; - const hasCostCard = !!(modelEntry.costCategory || modelEntry.usageMultiplier); - - return ( -
-
- - - {modelEntry.name} - -
- - -
-
- - {effort && effort.values.length > 0 && ( -
-
- Effort Level -
- ({ - value: v.value, - label: compactEffort && v.value === "xhigh" ? tx("XHigh") : v.name, - description: v.description ?? undefined, - }))} - value={effortValue ?? effort.values[0]!.value} - onChange={(v) => onChange(effort.id, v)} - /> -
- )} - - {contextOption && contextOption.values.length > 0 && ( -
-
- Context Size -
- ({ - value: v.value, - label: v.name, - description: v.description ?? undefined, - }))} - value={contextValue ?? contextOption.values[0]!.value} - onChange={(v) => onChange(contextOption.id, v)} - /> -
- )} - - {otherModelConfigs.map((o) => ( -
- - {tx(o.name)} - - -
- ))} - - {modelEntry.pricing ? ( - setPricingOpen((v) => !v)} - /> - ) : ( - hasCostCard && ( -
-
- - Pricing details - - -
- {modelEntry.usageMultiplier && ( -
- - Multiplier - - {modelEntry.usageMultiplier} -
- )} -
- ) - )} -
- ); -} - -/** Collapsible per-tier token pricing breakdown card (`Credits per 1M tokens`). */ -function PricingDetailsCard({ - pricing, - activeTier, - open, - onToggle, -}: { - pricing: AgentModelPricing; - activeTier: string | null; - open: boolean; - onToggle: () => void; -}) { - const tiers = pricing.tiers ?? {}; - const tierData = - (activeTier ? tiers[activeTier] : undefined) ?? tiers["default"] ?? tiers["long_context"] ?? undefined; - const hasRates = tierData && (tierData.input != null || tierData.output != null); - if (!hasRates && pricing.multiplier == null && !pricing.costTier) return null; - - return ( -
- - {open && ( -
- {hasRates && tierData ? ( - <> -
- Credits per 1M tokens -
-
- - Input - - {formatCreditRate(tierData.input)} -
-
- - Output - - {formatCreditRate(tierData.output)} -
- {tierData.cacheRead != null && ( -
- - Cache Read - - {formatCreditRate(tierData.cacheRead)} -
- )} - {tierData.cacheWrite != null && ( -
- - Cache Write - - {formatCreditRate(tierData.cacheWrite)} -
- )} - - ) : ( - pricing.multiplier != null && ( -
- - Multiplier - - {`${formatCreditRate(pricing.multiplier)}x`} -
- ) - )} -
- )} -
- ); -} - /** Accessible segmented pill selector (`role="radiogroup"`) with Left/Right arrow navigation. */ function SegmentedControl({ ariaLabel, diff --git a/src/features/agents/Home.module.css b/src/features/agents/Home.module.css index ee85d11c4..c940896be 100644 --- a/src/features/agents/Home.module.css +++ b/src/features/agents/Home.module.css @@ -14,8 +14,8 @@ color: var(--fg); } .inner { - /* The same width as a running session's composer and conversation. */ - width: min(var(--agent-conversation-width), 100%); + /* A compact block in the middle of the page: narrower than a session's conversation. */ + width: min(680px, 100%); display: flex; flex-direction: column; gap: var(--space-2); @@ -24,31 +24,58 @@ width: 100%; } .heading { - margin: 0 0 10px; - font-size: calc(18px + var(--agent-font-zoom, 0px)); - font-weight: 600; + margin: 0 0 14px; + font-size: calc(22px + var(--agent-font-zoom, 0px)); + font-weight: 500; + letter-spacing: -0.01em; text-align: center; color: var(--fg-strong); text-wrap: balance; } -/* Under the box: the project and where the agent works. */ +/* A box to write in, not a search bar: room for a few lines before it grows. */ +.composer :global(.cm-content) { + min-height: calc(4.5em + 12px); +} + +/* Under the box: one quiet group, the project, checkout and branch side by side. */ .where { display: flex; - flex-wrap: wrap; align-items: center; - /* The chips' own padding spaces them. */ - gap: var(--space-0-5); - padding: 0 2px; + gap: var(--space-1); + min-width: 0; + padding: 0 6px; + color: var(--fg-subtle); font-size: var(--fs-small); } -/* The current branch, read-only: same height and colour as the pickers beside it. */ -.branch { +.where > button { + flex: 0 1 auto; min-width: 0; + color: inherit; + font-size: inherit; } -/* The row's own gaps space "on" and "from"; the note's padding is for the lines below. */ -.where .note { - padding: 0; +.project { + display: inline-flex; + align-items: center; + gap: var(--space-1-5); + min-width: 0; + height: var(--h-control); + padding: 0 4px; +} +.label { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.projectPicker { + max-width: 40%; +} + +/* The agent shows as its icon only. */ +.agentPicker { + display: flex; + flex: none; } .note, @@ -68,31 +95,20 @@ justify-content: flex-end; padding: 16px 12px 12px; } -.docked .inner { - gap: var(--space-2); +.dockedIntro { + flex: 1; + display: flex; + align-items: center; + justify-content: center; + width: 100%; + min-height: 0; + padding-bottom: 8vh; } -.docked .where { - flex-wrap: nowrap; - min-width: 0; -} -.docked .projectPicker, -.docked .projectChip { - flex: 0 1 auto; - min-width: 0; - max-width: 30%; -} -.docked .branch, -.docked .basePicker { - order: 1; - flex: 0 1 auto; - min-width: 0; -} -.docked .isolation { - order: 2; - flex: 0 1 auto; - min-width: 0; - max-width: 45%; - margin-left: auto; +.docked .heading { + margin: 0; + font-size: calc(15px + var(--agent-font-zoom, 0px)); + font-weight: 500; + color: var(--fg-muted); } .notes { diff --git a/src/features/agents/HomeEditor.test.tsx b/src/features/agents/HomeEditor.test.tsx index 377d8c320..940e98973 100644 --- a/src/features/agents/HomeEditor.test.tsx +++ b/src/features/agents/HomeEditor.test.tsx @@ -77,6 +77,8 @@ beforeEach(() => { updateComposer(HOME, { text: "Check the project" }); }); +const effortButton = () => screen.getByRole("button", { name: "Reasoning" }); + async function chooseModel(model: string) { fireEvent.click(screen.getByRole("button", { name: "Model" })); fireEvent.click(screen.getByRole("option", { name: model })); @@ -85,19 +87,16 @@ async function chooseModel(model: string) { it("switches model-specific levels and restores each draft effort before starting", async () => { render(); - expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("bighigh"); + expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("big"); + expect(effortButton()).toHaveTextContent("high"); await chooseModel("small"); - fireEvent.click(screen.getByRole("button", { name: "Model" })); - fireEvent.click(screen.getByRole("button", { name: "Configure model" })); - const group = screen.getByRole("radiogroup", { name: "Reasoning" }); - expect(group).toBeVisible(); - expect(screen.getByRole("radio", { name: "minimal" })).toHaveAttribute("aria-checked", "true"); - fireEvent.click(screen.getByRole("radio", { name: "medium" })); - fireEvent.keyDown(document, { key: "Escape" }); + expect(effortButton()).toHaveTextContent("minimal"); + fireEvent.click(effortButton()); + fireEvent.click(screen.getByRole("option", { name: "medium" })); await chooseModel("big"); - expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("bighigh"); + expect(effortButton()).toHaveTextContent("high"); await chooseModel("small"); - expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("smallmedium"); + expect(effortButton()).toHaveTextContent("medium"); fireEvent.click(screen.getByRole("button", { name: "Start" })); await waitFor(() => expect(backend.create).toHaveBeenCalled()); expect(backend.create.mock.calls[0]![0].config).toEqual([ @@ -125,9 +124,11 @@ it("uses GitHub Copilot's own defaults and preserves per-model context tier and }; useAgents.setState({ providers: [copilot], draft: savedDraft({ provider: "copilot", config: {} }) }); render(); - expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("gemini-4-carbonmedium · default"); + expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("gemini-4-carbondefault"); + expect(effortButton()).toHaveTextContent("medium"); await chooseModel("gpt-5.6-sol"); - expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("gpt-5.6-solmedium · default"); + expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("gpt-5.6-soldefault"); + expect(effortButton()).toHaveTextContent("medium"); fireEvent.click(screen.getByRole("button", { name: "Start" })); await waitFor(() => expect(backend.create).toHaveBeenCalled()); expect(backend.create.mock.calls[0]![0].config).toEqual([ @@ -161,7 +162,7 @@ it("ignores old provider-wide effort choices and refreshes unsupported per-model draft: savedDraft({ provider: "fake", config: { effort: "low" }, thoughtLevels: { big: { effort: "removed" } } }), }); render(); - expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("bighigh"); + expect(effortButton()).toHaveTextContent("high"); fireEvent.click(screen.getByRole("button", { name: "Start" })); await waitFor(() => expect(backend.create).toHaveBeenCalled()); expect(backend.create.mock.calls[0]![0].config).toContainEqual({ id: "effort", value: "high" }); @@ -208,10 +209,10 @@ it("refreshes the displayed agent version after a CLI upgrade when the window re return ok({ provider, name: "omp", version: cached, protocol: "ACP v1", error: null }); }); render(); - await screen.findByText("omp · 18.20.0 · ACP v1"); + await waitFor(() => expect(agentTooltip()).toMatch(/ 18\.20\.0$/)); installed = "18.20.2"; fireEvent(window, new Event("focus")); - await screen.findByText("omp · 18.20.2 · ACP v1"); + await waitFor(() => expect(agentTooltip()).toMatch(/ 18\.20\.2$/)); }); it("does not reuse a previous page's cached agent version when opened again", async () => { @@ -219,5 +220,10 @@ it("does not reuse a previous page's cached agent version when opened again", as ok({ provider, name: "omp", version: refresh ? "18.20.2" : "18.20.0", protocol: "ACP v1", error: null }), ); render(); - await screen.findByText("omp · 18.20.2 · ACP v1"); + await waitFor(() => expect(agentTooltip()).toMatch(/ 18\.20\.2$/)); }); + +/** The agent picker shows its icon; the name and version are in its tooltip. */ +function agentTooltip() { + return screen.getByRole("button", { name: "Agent" }).parentElement?.getAttribute("data-tooltip"); +} diff --git a/src/features/agents/HomeEditor.tsx b/src/features/agents/HomeEditor.tsx index 49f0724e8..203abe6b6 100644 --- a/src/features/agents/HomeEditor.tsx +++ b/src/features/agents/HomeEditor.tsx @@ -1,4 +1,4 @@ -/** New Task page: one prompt box with the agent and its settings; where it works under it. */ +/** New Task page: one prompt box with the agent and its settings; where it works in a quiet line under it. */ import clsx from "clsx"; import { useEffect, useRef, useState } from "react"; import type { AgentProbe, Branch } from "@/bindings"; @@ -6,7 +6,7 @@ import { executeAction } from "@/platform/actions"; import { call, commands } from "@/platform/ipc"; import { useTx, useTxTemplate } from "@/platform/i18n"; import { basename, useProject } from "@/platform/project"; -import { Chip, Select, T, type SelectOption } from "@/ui"; +import { Icon, Select, T, tooltipAttrs, type SelectOption } from "@/ui"; import { defaultTaskProject } from "./project"; import { maybeEditorService, useEditorShown, type EditorInput } from "@/workbench/contributions"; import { Composer } from "./Composer"; @@ -122,6 +122,10 @@ export function HomeEditor({ docked = false, input }: { docked?: boolean; input? !starting && (!project?.workspace || repoState?.root === root); + const openMcp = () => setMcpOpenRequest((n) => n + 1); + // The agent shows as its icon; its name and version are in the tooltip. + const agentTitle = [provider?.name ?? tx("Agent"), probe?.version].filter(Boolean).join(" "); + const start = () => { if (!canStart) return; setStarting(true); @@ -137,93 +141,25 @@ export function HomeEditor({ docked = false, input }: { docked?: boolean; input? className={clsx(styles.home, docked && styles.docked, fitWindowWidth && styles.fitWidth)} style={zoomStyle} > + {/* In the tool window the box sits at the bottom, under the question centred in the space above. */} + {docked && ( +
+

+ What should the agent do? +

+
+ )}
{!docked && (

What should the agent do?

)} - {/* Above the box, like the running session's state line. */} -
- {members.length > 1 ? ( - updateDraft({ isolation, isolationChosen: true })} - /> - )} - {/* A folder that isn't a repository has no branch: the one Git found below it isn't where the agent runs. */} - {isolation === "local" && isGit && current && ( - <> - {!docked && ( - - on - - )} - - {current} - - - )} - {isolation === "worktree" && branches.length > 0 && ( - <> - {!docked && ( - - from - - )} - - id === ADD_AGENT ? void executeAction("agents.addAgent") : updateDraft({ provider: id, config: {} }) - } - /> + + ({ + value: path, + label: basename(path), + detail: path, + icon: "folder", + }))} + onChange={(path) => { + setSelected(path); + updateDraft({ base: null }); + }} + /> + ) : projectLabel ? ( + + + {projectLabel} + + ) : null} + {isGit && ( + ({ value: b.name, label: b.name, icon: "branch" }))} + onChange={(b) => updateDraft({ base: b === current ? null : b })} + /> + )} +
{/* Notes under the box don't take part in centring, so the box stays put as they come and go. */}
{effortAnnouncement && ( @@ -290,11 +296,9 @@ export function HomeEditor({ docked = false, input }: { docked?: boolean; input? Choose another model before starting.

)} - {probe && (!docked || probe.error) && ( -

- {probe.error - ? txTemplate(`${provider?.name ?? probe.provider} didn't start: ${probe.error}`) - : [probe.name, probe.version, probe.protocol].filter(Boolean).join(" · ")} + {probe?.error && ( +

+ {txTemplate(`${provider?.name ?? probe.provider} didn't start: ${probe.error}`)}

)} {(error || (provider && !provider.installed)) && ( diff --git a/src/features/agents/McpPicker.module.css b/src/features/agents/McpPicker.module.css index 5c4699cf5..a845d6f6f 100644 --- a/src/features/agents/McpPicker.module.css +++ b/src/features/agents/McpPicker.module.css @@ -211,3 +211,12 @@ color: var(--fg-muted); font-size: var(--fs-tiny); } + +/* The composer is the nearest positioned box: its bottom-right corner. */ +.hiddenAnchor { + position: absolute; + right: 0; + bottom: 0; + width: 0; + height: 0; +} diff --git a/src/features/agents/McpPicker.tsx b/src/features/agents/McpPicker.tsx index b19a2cd31..28b00372d 100644 --- a/src/features/agents/McpPicker.tsx +++ b/src/features/agents/McpPicker.tsx @@ -34,6 +34,8 @@ export interface McpPickerProps { busy?: boolean; /** Bumped when `/mcp` is invoked from the composer to open this popover. */ openRequest?: number; + /** No button of its own: opened only through `openRequest`, above the composer. */ + hideTrigger?: boolean; /** Optional overrides for unit tests. */ backend?: McpBackend; testData?: { @@ -50,6 +52,7 @@ export function McpPicker({ disabled = false, busy = false, openRequest = 0, + hideTrigger = false, backend = defaultMcpBackend, testData, }: McpPickerProps) { @@ -67,7 +70,10 @@ export function McpPicker({ const [seenOpenRequest, setSeenOpenRequest] = useState(openRequest); const [query, setQuery] = useState(""); const [importingKey, setImportingKey] = useState(null); - const anchor = useRef(null); + const anchor = useRef(null); + const setAnchor = (el: HTMLElement | null) => { + anchor.current = el; + }; if (openRequest !== seenOpenRequest) { setSeenOpenRequest(openRequest); @@ -134,38 +140,43 @@ export function McpPicker({ return ( <> - + {hideTrigger ? ( + // Pinned to the composer's bottom-right corner: the popover opens under the box, like its other pickers. + + ) : ( + + )} { setOpen(false); diff --git a/src/features/agents/Session.module.css b/src/features/agents/Session.module.css index f0043b560..a1d921d9c 100644 --- a/src/features/agents/Session.module.css +++ b/src/features/agents/Session.module.css @@ -83,55 +83,38 @@ max-width: none; } -.providerIcon { - color: var(--fg-muted); -} - -/* The task's state and its terminal and changes, just above the composer. */ +/* Under the composer: where the task works on the left; changes, meters and terminal on the right. */ .statusBar { display: flex; - /* What doesn't fit moves to the next line whole, instead of every fact shrinking to a letter. */ - flex-wrap: wrap; - /* The changes chip sits above the line; the facts stay on that line's baseline. */ - align-items: flex-end; - gap: var(--space-0-5) var(--space-1-5); + align-items: center; + gap: var(--space-2); min-width: 0; - padding: 0 2px; + height: 24px; + padding: 0 6px; overflow: hidden; color: var(--fg-subtle); font-size: var(--fs-small); } -/* The facts on the bar's line are as tall as its chips, so their text shares one centre line. */ -.agent { - display: inline-flex; - flex: 0 1 auto; - max-width: 100%; - align-items: center; - gap: var(--space-1); - height: 22px; - min-width: 0; - color: var(--fg-secondary); -} -.agentName { - min-width: 0; - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} -/* Where the task works, as the new-task composer shows it. */ .where { display: inline-flex; flex: 0 1 auto; - max-width: 100%; align-items: center; - /* The chips' own padding spaces them. */ - gap: var(--space-0-5); + gap: var(--space-2); min-width: 0; overflow: hidden; } -.note { - flex: none; - color: var(--fg-subtle); +.fact { + display: inline-flex; + flex: 0 1 auto; + align-items: center; + gap: var(--space-1); + min-width: 0; + white-space: nowrap; +} +.factText { + min-width: 0; + overflow: hidden; + text-overflow: ellipsis; } .state { display: inline-flex; @@ -145,16 +128,15 @@ .statusEnd { display: inline-flex; flex: 1 1 auto; - flex-wrap: wrap; + justify-content: flex-end; align-items: center; - gap: var(--space-0-5) var(--space-2); + gap: var(--space-2); min-width: 0; } /* Shrinks before the terminal buttons do: in a narrow docked session the meters clip, not the controls. */ .statusMeters { display: inline-flex; flex: 0 1 auto; - margin-left: auto; align-items: center; height: 22px; gap: var(--space-2); @@ -177,16 +159,18 @@ min-width: 0; } .statusChip { - composes: surface from "../../ui/Chip.module.css"; display: inline-flex; align-items: center; gap: var(--space-1-5); + height: 22px; max-width: 100%; min-width: 0; - padding: 0 8px; + padding: 0 6px; overflow: hidden; border: none; - color: var(--fg-secondary); + border-radius: var(--radius-control); + background: transparent; + color: inherit; font: inherit; font-size: var(--fs-small); font-variant-numeric: tabular-nums; @@ -397,12 +381,10 @@ --session-card-width: 96%; } } -/* A narrow docked session: rather than cut every fact to a letter or two, the bar keeps the - agent's icon and its state; where it works is in the task's tooltip and Changes. */ +/* A narrow docked session: where it works gives way first, the changes and meters stay readable. */ @container (max-width: 420px) { - .where, - .agentName { - display: none; + .where { + flex-shrink: 2; } .processBody, .turnBody { diff --git a/src/features/agents/SessionEditor.tsx b/src/features/agents/SessionEditor.tsx index 775bf6f65..22d61c75d 100644 --- a/src/features/agents/SessionEditor.tsx +++ b/src/features/agents/SessionEditor.tsx @@ -38,7 +38,6 @@ import { confirm } from "@/workbench/messages"; import { Button, Checkbox, - Chip, EmptyState, Icon, IconButton, @@ -417,41 +416,34 @@ function SessionStatus({ showContextMenu(e, taskMenu([task])); }} > - - - - {providerName(task.provider)} - {/* The composer's model picker shows the model when the agent offers one. */} - {task.model && !pickedModel ? ` · ${task.model}` : ""} - - - {/* The same three facts as the new-task composer: project, checkout, branch. */} - - {projectName && ( - - {projectName} - + {/* Where the task works, in one quiet line like the new-task page: project (in a workspace), branch, worktree. */} + + {project?.workspace && projectName && ( + + + {projectName} + )} - - {local ? "Local checkout" : "New worktree"} - {branch && ( - <> - {local && ( - - on - - )} - - {branch} - - + + + {branch} + )} + {!local && ( + + Worktree + + )} + {task.model && !pickedModel && {task.model}} - - {statusLabel(task.status)} - {task.status === "limited" && task.resetsMs != null && ` · ${tx`resets ${formatSentAt(task.resetsMs)}`}`} - + {/* Ready is the usual state: only the others are worth a word. */} + {task.status !== "ready" && ( + + {statusLabel(task.status)} + {task.status === "limited" && task.resetsMs != null && ` · ${tx`resets ${formatSentAt(task.resetsMs)}`}`} + + )} {effortAnnouncement ? tx("Effort: {level}").replace("{level}", effortAnnouncement) : ""} @@ -539,7 +531,7 @@ function Usage({ usage }: { usage: AgentUsage }) { - {label.short} + {`${label.percent}%`} ); } @@ -2906,20 +2898,11 @@ function SessionComposer({ body: String(e), }), ); + const openMcp = () => setMcpOpenRequest((n) => n + 1); const shown = useEditorShown(); const effortAnnouncement = useEffortFocus(focusRoot, shown && task.status !== "archived", task.config, setOption); return (
- {task.status === "archived" && (
@@ -2958,8 +2941,11 @@ function SessionComposer({ config={task.config} onConfig={setOption} onSubmit={send} - onOpenMcp={() => setMcpOpenRequest((n) => n + 1)} + onOpenMcp={openMcp} disabled={task.status === "archived"} + addMenu={[ + { id: "mcp", label: "MCP Servers…", icon: "plugin", disabled: task.status === "archived", run: openMcp }, + ]} toolbar={ <> @@ -2969,6 +2955,7 @@ function SessionComposer({ disabled={task.status === "archived"} busy={busy} openRequest={mcpOpenRequest} + hideTrigger onChange={(next) => void setTaskMcpOverrides(task.id, next).catch((e: unknown) => notifications().notify({ @@ -2994,6 +2981,16 @@ function SessionComposer({ } /> +
); } diff --git a/src/features/agents/composerFolders.test.tsx b/src/features/agents/composerFolders.test.tsx index 364d30074..416c04d1d 100644 --- a/src/features/agents/composerFolders.test.tsx +++ b/src/features/agents/composerFolders.test.tsx @@ -318,7 +318,7 @@ describe("Composer editing", () => { }); describe("Composer current file", () => { - it("offers the focused editor's file until the draft references it", () => { + it("offers the focused editor's file, and adds it with the selection to requests when chosen", () => { const view = {} as TextEditorHandle["view"]; act(() => setIdeContext(false)); act(() => @@ -329,10 +329,10 @@ describe("Composer current file", () => { const offer = screen.getByRole("button", { name: /main\.ts/ }); expect(offer).toHaveTextContent("Current File"); fireEvent.click(offer); - expect(composerDraft(ID).text).toBe("@src/main.ts "); - expect(toPrompt(composerDraft(ID)).files).toEqual(["/p/src/main.ts"]); + expect(useAgents.getState().ideContext).toBe(true); + expect(composerDraft(ID).text).toBe(""); expect(screen.queryByRole("button", { name: /main\.ts/ })).toBeNull(); - expect(document.querySelector("[data-ref-path]")).toHaveAttribute("data-ref-path", "/p/src/main.ts"); + expect(screen.getByTitle("src/main.ts is added to your request")).toHaveTextContent("Current File"); } finally { act(() => useEditorRegistry.setState({ active: null })); } @@ -348,8 +348,6 @@ describe("Composer IDE context", () => { ); try { renderComposer(); - const toggle = screen.getByRole("button", { name: /IDE Context Enabled/ }); - expect(toggle).toHaveAttribute("aria-pressed", "true"); expect(screen.queryByRole("button", { name: /main\.ts/ })).toBeNull(); expect(screen.getByTitle("src/main.ts is added to your request")).toHaveTextContent("Current File"); @@ -369,9 +367,9 @@ describe("Composer IDE context", () => { // A draft that already references the file is sent as written. expect(await send("see @src/main.ts:1")).toEqual({ text: "see @src/main.ts:1", files: [], images: [] }); - fireEvent.click(toggle); + fireEvent.click(screen.getByRole("button", { name: "Don't Add the Current File" })); expect(useAgents.getState().ideContext).toBe(false); - expect(screen.getByRole("button", { name: /IDE Context Disabled/ })).toHaveAttribute("aria-pressed", "false"); + expect(screen.getByRole("button", { name: /main\.ts/ })).toHaveTextContent("Current File"); expect(await send("explain")).toEqual({ text: "explain", files: [], images: [] }); } finally { act(() => useEditorRegistry.setState({ active: null })); diff --git a/src/features/agents/composerModel.ts b/src/features/agents/composerModel.ts index 3797a03e2..22e666079 100644 --- a/src/features/agents/composerModel.ts +++ b/src/features/agents/composerModel.ts @@ -385,14 +385,6 @@ export const isContextOption = (id: string) => /^(context_tier|contextTier)$/.te export const isPerModelOption = (o: AgentConfigOption) => o.category === "thought_level" || o.category === "context_tier" || isContextOption(o.id); -/** Formats a per-1M-token credit rate cleanly (`200`, `1000`, `0`, `12.5`). */ -export function formatCreditRate(rate: number | null | undefined): string { - if (rate == null || !Number.isFinite(rate)) return "0"; - if (rate === 0) return "0"; - if (rate < 0.01) return rate.toExponential(2); - return Number(rate.toFixed(4)).toString(); -} - const matchesCategory = (o: AgentConfigOption, category: string) => o.category === category || (category === "model_config" && diff --git a/src/features/agents/modelRefresh.test.tsx b/src/features/agents/modelRefresh.test.tsx index 6a29d2e15..5a81de972 100644 --- a/src/features/agents/modelRefresh.test.tsx +++ b/src/features/agents/modelRefresh.test.tsx @@ -152,6 +152,7 @@ it("keeps cached choices usable while refreshing and shares the completion/coold expect(screen.getByRole("button", { name: "Start" })).toBeEnabled(); await waitFor(() => expect(useAgents.getState().modelRequests.size).toBe(0)); emit(catalog("first", { retryAtMs: Date.now() + 30_000 })); + fireEvent.click(screen.getByRole("button", { name: "Model" })); expect(screen.getByRole("button", { name: /Refresh in \d+s/ })).toBeDisabled(); expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("small"); fireEvent.click(screen.getByRole("button", { name: "Start" })); @@ -213,11 +214,12 @@ it("retains cached model and effort choices after a command failure and retries draft: savedDraft({ provider: "first", config: { model: "big" }, thoughtLevels: { big: { effort: "low" } } }), }); render(); + expect(screen.getByRole("button", { name: "Reasoning" })).toHaveTextContent("low"); fireEvent.click(screen.getByRole("button", { name: "Model" })); expect(await screen.findByRole("alert")).toHaveTextContent("connection lost"); - expect(screen.getByRole("button", { name: "Configure model" })).toHaveTextContent("biglow"); fireEvent.click(screen.getByRole("option", { name: "small" })); expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("small"); + fireEvent.click(screen.getByRole("button", { name: "Model" })); fireEvent.click(screen.getByRole("button", { name: "Refresh models" })); await waitFor(() => expect(screen.queryByRole("alert")).not.toBeInTheDocument()); expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("small"); @@ -238,11 +240,11 @@ it("preserves a valid remembered model and effort when discovery changes the def ); render(); await waitFor(() => expect(useAgents.getState().modelRequests.size).toBe(0)); - expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("biglow"); + expect(screen.getByRole("button", { name: "Model" })).toHaveTextContent("big"); + expect(screen.getByRole("button", { name: "Reasoning" })).toHaveTextContent("low"); fireEvent.click(screen.getByRole("button", { name: "Model" })); expect(screen.getByRole("option", { name: "new" })).toBeVisible(); - fireEvent.click(screen.getByRole("button", { name: "Configure model" })); - expect(screen.getByRole("radio", { name: "low" })).toHaveAttribute("aria-checked", "true"); + fireEvent.keyDown(document, { key: "Escape" }); fireEvent.click(screen.getByRole("button", { name: "Start" })); await waitFor(() => expect(backend.create).toHaveBeenCalled()); expect(backend.create.mock.calls[0]![0].config).toEqual([ diff --git a/src/features/agents/sessionState.test.tsx b/src/features/agents/sessionState.test.tsx index f8d98a836..b039dde8d 100644 --- a/src/features/agents/sessionState.test.tsx +++ b/src/features/agents/sessionState.test.tsx @@ -2016,7 +2016,9 @@ describe("meters in the task header", () => { render(); await screen.findByText("Answer A"); const usage = screen.getByLabelText(/^Context /); - expect(usage).toHaveTextContent("24k/200k (12%)"); + // The bar and percent show; the counts are in its label and tooltip. + expect(usage).toHaveTextContent("12%"); + expect(usage).toHaveAccessibleName(/24k\/200k \(12%\)/); expect(usage.querySelector(`.${styles.usageBar} span`)).toHaveStyle({ width: "12%", }); diff --git a/src/platform/locales/text/en.json b/src/platform/locales/text/en.json index f3969ce08..4f1af619d 100644 --- a/src/platform/locales/text/en.json +++ b/src/platform/locales/text/en.json @@ -58,29 +58,18 @@ "Unpin Agent Tasks": "Unpin Agent Tasks", "New Agent Task Group": "New Agent Task Group", "Refresh models": "Refresh models", - "Configure model": "Configure model", - "Configure {name}": "Configure {name}", - "Back to models": "Back to models", - "Reset to defaults": "Reset to defaults", "Pin model": "Pin model", "Unpin model": "Unpin model", "Pinned": "Pinned", "Models": "Models", "Effort Level": "Effort Level", "Context Size": "Context Size", - "Pricing details": "Pricing details", "Free": "Free", "Low cost": "Low cost", "Medium cost": "Medium cost", "High cost": "High cost", "Very high cost": "Very high cost", - "Credits per 1M tokens": "Credits per 1M tokens", - "Input": "Input", "Output": "Output", - "Cache Read": "Cache Read", - "Cache Write": "Cache Write", - "Multiplier": "Multiplier", - "XHigh": "XHigh", "model": "model", "Refreshing…": "Refreshing…", "Refresh in {seconds}s": "Refresh in {seconds}s", @@ -1629,7 +1618,6 @@ "Archived ({count})": "Archived ({count})", "Insert": "Insert", "Drop to reference": "Drop to reference", - "Reference {rel}": "Reference {rel}", "Folder reference {name}": "Folder reference {name}", "File reference {name}": "File reference {name}", "File reference {name}, lines {lines}": "File reference {name}, lines {lines}", @@ -2018,8 +2006,6 @@ "Add SDK": "Add SDK", "Remove SDK": "Remove SDK", "{rel} is added to your request": "{rel} is added to your request", - "IDE Context Enabled: the current file and selection are added to your request": "IDE Context Enabled: the current file and selection are added to your request", - "IDE Context Disabled: the current file and selection are not added to your request": "IDE Context Disabled: the current file and selection are not added to your request", "Thymeleaf": "Thymeleaf", "sbt": "sbt", "sbt actions": "sbt actions", diff --git a/src/platform/locales/text/es.json b/src/platform/locales/text/es.json index 5f27c914d..663f288d5 100644 --- a/src/platform/locales/text/es.json +++ b/src/platform/locales/text/es.json @@ -3496,7 +3496,6 @@ "Not installed": "No instalado", "{command} was not found on PATH": "No se encontró {command} en PATH", "Agent tasks": "Tareas de agente", - "Describe a task for the agent. @ references a file or folder, / runs a command": "Describe una tarea para el agente. @ referencia un archivo o carpeta, / ejecuta un comando", "away from your changes": "separado de tus cambios", "edits your files directly": "edita tus archivos directamente", "from": "desde", diff --git a/src/platform/locales/text/fr.json b/src/platform/locales/text/fr.json index 0392ec8fc..7e1e2cb38 100644 --- a/src/platform/locales/text/fr.json +++ b/src/platform/locales/text/fr.json @@ -3369,7 +3369,6 @@ "Not installed": "Non installé", "{command} was not found on PATH": "{command} est introuvable dans le PATH", "Agent tasks": "Tâches d'agent", - "Describe a task for the agent. @ references a file or folder, / runs a command": "Décrivez une tâche pour l'agent. @ référence un fichier ou un dossier, / lance une commande", "away from your changes": "à l'écart de vos modifications", "edits your files directly": "modifie directement vos fichiers", "from": "depuis", diff --git a/src/platform/locales/text/ko.json b/src/platform/locales/text/ko.json index 140d071e9..50bdbed99 100644 --- a/src/platform/locales/text/ko.json +++ b/src/platform/locales/text/ko.json @@ -3546,7 +3546,6 @@ "Not installed": "설치되지 않음", "{command} was not found on PATH": "PATH에서 {command}을(를) 찾을 수 없습니다", "Agent tasks": "에이전트 작업", - "Describe a task for the agent. @ references a file or folder, / runs a command": "에이전트에게 맡길 작업을 설명하세요. @는 파일·폴더 참조, /는 명령 실행", "away from your changes": "변경 사항과 분리됨", "edits your files directly": "파일을 직접 편집함", "from": "기준", @@ -6224,7 +6223,6 @@ "Count rows": "행 개수 세기", "Last Page": "마지막 페이지", "{first}-{last} of {total}": "{total}개 중 {first}-{last}", - "Model & effort settings": "모델 및 추론 강도 설정", "Device": "기기", "No devices": "기기 없음", "Minimum level": "최소 수준", diff --git a/src/platform/locales/text/zh.json b/src/platform/locales/text/zh.json index 52dd7ac9c..66e1cab39 100644 --- a/src/platform/locales/text/zh.json +++ b/src/platform/locales/text/zh.json @@ -51,27 +51,16 @@ "Unpin Agent Tasks": "取消固定 Agent 任务", "New Agent Task Group": "新建 Agent 任务组", "Refresh models": "刷新模型", - "Configure model": "配置模型", - "Configure {name}": "配置 {name}", - "Back to models": "返回模型列表", - "Reset to defaults": "重置为默认值", "Pin model": "置顶模型", "Unpin model": "取消置顶模型", "Models": "模型", "Effort Level": "思考强度", "Context Size": "上下文大小", - "Pricing details": "价格详情", "Free": "免费", "Low cost": "低开销", "Medium cost": "中等开销", "High cost": "高开销", "Very high cost": "极高开销", - "Credits per 1M tokens": "每百万 Token 点数", - "Input": "输入", - "Cache Read": "缓存读取", - "Cache Write": "缓存写入", - "Multiplier": "倍率", - "XHigh": "超高", "model": "模型", "Refreshing…": "正在刷新…", "Refresh in {seconds}s": "{seconds} 秒后可刷新", @@ -4222,7 +4211,6 @@ "Not installed": "未安装", "{command} was not found on PATH": "在 PATH 中找不到 {command}", "Agent tasks": "Agent 任务", - "Describe a task for the agent. @ references a file or folder, / runs a command": "描述要交给 agent 的任务。@ 引用文件或文件夹,/ 运行命令", "away from your changes": "不影响你的改动", "edits your files directly": "直接修改你的文件", "from": "基于", @@ -6958,7 +6946,6 @@ "Count rows": "统计行数", "Last Page": "最后一页", "{first}-{last} of {total}": "{first}-{last},共 {total}", - "Model & effort settings": "模型与推理强度", "Logcat": "Logcat 日志", "Device": "设备", "No devices": "没有设备", @@ -8024,7 +8011,6 @@ "Archived ({count})": "归档({count})", "Insert": "插入", "Drop to reference": "松开以引用", - "Reference {rel}": "引用 {rel}", "Folder reference {name}": "文件夹引用 {name}", "File reference {name}": "文件引用 {name}", "File reference {name}, lines {lines}": "文件引用 {name},第 {lines} 行", @@ -8405,8 +8391,6 @@ "Add SDK": "添加 SDK", "Remove SDK": "移除 SDK", "{rel} is added to your request": "{rel} 会添加到你的请求中", - "IDE Context Enabled: the current file and selection are added to your request": "IDE 上下文已启用:当前文件和所选内容会添加到你的请求中", - "IDE Context Disabled: the current file and selection are not added to your request": "IDE 上下文已禁用:当前文件和所选内容不会添加到你的请求中", "Thymeleaf": "Thymeleaf", "sbt": "sbt", "sbt actions": "sbt 操作", @@ -8544,5 +8528,12 @@ "Untitled files were not saved": "未命名文件未保存", "Missing blank line between subject and body": "主题和正文之间缺少空行", "Body line {0} is longer than {1} characters": "正文第 {0} 行超过 {1} 个字符", - "Add blank line": "添加空行" + "Add blank line": "添加空行", + "Worktree": "worktree", + "Add Context": "添加上下文", + "MCP Servers…": "MCP 服务器…", + "Describe a task. @ for files, / for commands": "描述一个任务。@ 引用文件,/ 运行命令", + "Effort": "推理", + "Don't Add the Current File": "不附带当前文件", + "Add {rel} and the selection to your requests": "在请求中附带 {rel} 和选区" }