diff --git a/apps/desktop/CHANGELOG.md b/apps/desktop/CHANGELOG.md index 4ec55ed6..a55271af 100644 --- a/apps/desktop/CHANGELOG.md +++ b/apps/desktop/CHANGELOG.md @@ -9,6 +9,23 @@ The VS Code / Cursor extension has its own changelog at separately — desktop releases are tagged `app-v*`, extension releases `ext-v*` — but they share the same engine, so most Git behaviour lands in both at once. +## [Unreleased] + +### Added +- **Cherry-pick and revert a merge commit.** The app asks which side, as the + extension does: for a cherry-pick, the changes that were merged in or those + of the branch it was merged into; for a revert, which branch to keep. Every + parent of an octopus merge is offered. It used to refuse and name the git + command to run instead. + +### Changed +- **You choose the OpenAI model.** A new OpenAI or Azure OpenAI connection no + longer comes with models filled in; each model field lists what the + provider offers for it, and the connection is ready once you pick. A + connection keeps the model it is on — none is swapped for you when OpenAI + retires one. Adding a Custom connection no longer says "Ready to use" before + it has a model. + ## [2.9.0] - 2026-11-07 ### Added diff --git a/apps/desktop/harness/check.mjs b/apps/desktop/harness/check.mjs index 510c20d8..70191083 100755 --- a/apps/desktop/harness/check.mjs +++ b/apps/desktop/harness/check.mjs @@ -851,6 +851,10 @@ const CASES = [ ["a-revert-over-your-changes-asks-and-outlives-the-refresh", "prs~open106~text:Commits~text:issues%3A%20full-page%20detail", { extra: "intheway=1" }], ["a-revert-over-your-changes-asks-and-outlives-the-refresh", "prs~open106~text:Commits~text:issues%3A%20full-page%20detail", { extra: "intheway=1", theme: "light" }], ["cancelling-the-stash-question-runs-nothing-and-says-nothing", "prs~open106~text:Commits~text:issues%3A%20full-page%20detail", { extra: "intheway=1" }], + // A merge commit's cherry-pick or revert asks which side (?mergepick=). + ["a-merge-cherry-pick-asks-which-side-and-sends-it", "prs~open106~text:Commits~text:issues%3A%20full-page%20detail", { extra: "mergepick=1" }], + ["a-merge-cherry-pick-asks-which-side-and-sends-it", "prs~open106~text:Commits~text:issues%3A%20full-page%20detail", { extra: "mergepick=1", theme: "light" }], + ["a-merge-revert-asks-which-branch-to-keep-and-cancel-says-nothing", "prs~open106~text:Commits~text:issues%3A%20full-page%20detail", { extra: "mergepick=1" }], ["a-pull-over-your-changes-asks-and-outlives-its-own-fetch", "code", { extra: "intheway=1" }], ["a-pull-over-your-changes-asks-and-outlives-its-own-fetch", "code", { extra: "intheway=1", theme: "light" }], ["the-stash-question-does-not-follow-you-to-another-repository", "code", { extra: "intheway=1" }], diff --git a/apps/desktop/harness/checks.js b/apps/desktop/harness/checks.js index 90c6e5b8..211506f3 100644 --- a/apps/desktop/harness/checks.js +++ b/apps/desktop/harness/checks.js @@ -18098,6 +18098,77 @@ c.ok(!!t && t.classList.contains("toast-success"), "…and the revert is reported done"); c.ok(!$(".toast-error"), "nothing red at any point"); }, + // A merge commit's cherry-pick or revert: main answers its parents + // (`mergeSides`) and bridge.ts asks which side — the extension's question, + // in its words — then sends the same request again with `mainline`. It + // used to refuse and name the git command. ?mergepick= makes the commit a + // merge (see the shim). + /** The question, both sides offered in git's order; the pick goes with -m. */ + "a-merge-cherry-pick-asks-which-side-and-sends-it": async (f) => { + const c = check(f); + $$("#toast-stack .toast").forEach((t) => t.remove()); + const sent = () => + (window.__GS_INVOKED || []).filter((r) => r.channel === "commit:action" && r.payload?.action === "cherry-pick"); + const more = $$(".det-tb-actions button").find((x) => + /actions for this commit/i.test(x.getAttribute("aria-label") || ""), + ); + if (!more) return c.ok(false, "no actions menu to press"); + more.click(); + await settle(250); + const item = $$(".dropdown-item").find((i) => /^Cherry-pick onto current branch/.test(text(i) || "")); + if (!item) return c.ok(false, "no Cherry-pick to press"); + item.click(); + await settle(700); + c.match(text(".modal-title"), /^Cherry-pick the merge [0-9a-f]{7}$/, "it asks which side"); + c.match(text(".modal-message"), /two sides/, "…saying why"); + const labels = $$(".modal-choice-label").map((e) => text(e)); + c.eq(labels.slice(0, 2).join(" | "), "Apply the changes that were merged in | Apply the changes of the branch it was merged into", "both sides, parent 1 first"); + const subs = $$(".modal-choice-sub").map((e) => text(e)); + c.match(subs[1] || "", /^b2b2b2b · feat\(desktop\): the branch window$/, "each side names its parent"); + c.ok(!$(".toast-error"), "nothing is red"); + const second = $$(".modal-choice").find((r) => /branch it was merged into/.test(text(r) || "")); + if (!second) return; + second.click(); + await settle(800); + c.eq(sent().length, 2, "the cherry-pick is sent again — once"); + const [first, again] = sent().map((r) => r.payload); + c.eq(first?.mainline, undefined, "the first request carried no side"); + c.eq(again?.mainline, 2, "…the second carries the one picked"); + c.eq(again?.sha, first?.sha, "…for the same commit"); + c.ok(!$(".modal-card"), "the question is answered and gone"); + const t = $$("#toast-stack .toast").find((x) => /Cherry-picked/.test(text(x))); + c.ok(!!t && t.classList.contains("toast-success"), "…and the cherry-pick is reported done"); + }, + /** Revert asks its own question; Cancel runs nothing and says nothing. */ + "a-merge-revert-asks-which-branch-to-keep-and-cancel-says-nothing": async (f) => { + const c = check(f); + $$("#toast-stack .toast").forEach((t) => t.remove()); + const sent = () => + (window.__GS_INVOKED || []).filter((r) => r.channel === "commit:action" && r.payload?.action === "revert"); + const more = $$(".det-tb-actions button").find((x) => + /actions for this commit/i.test(x.getAttribute("aria-label") || ""), + ); + if (!more) return c.ok(false, "no actions menu to press"); + more.click(); + await settle(250); + const item = $$(".dropdown-item").find((i) => /^Revert this commit/.test(text(i) || "")); + if (!item) return c.ok(false, "no Revert to press"); + item.click(); + await settle(350); + $(".modal-ok")?.click(); // Revert confirms first, as it always has + await settle(700); + c.match(text(".modal-title"), /^Revert the merge [0-9a-f]{7}$/, "it asks which branch to keep"); + const labels = $$(".modal-choice-label").map((e) => text(e)); + c.eq(labels.slice(0, 2).join(" | "), "Keep the branch this was merged into | Keep the branch that was merged in", "the revert's own words"); + c.eq(labels.length, 2, "only the sides are choices — Cancel is the dialog's button"); + const cancel = $$(".modal-actions button").find((b) => /^Cancel$/.test(text(b) || "")); + if (!cancel) return c.ok(false, "no Cancel to press"); + cancel.click(); + await settle(700); + c.ok(!$(".modal-card"), "the question closes"); + c.eq(sent().length, 1, "nothing is sent again"); + c.eq($$("#toast-stack .toast").length, 0, `and nothing is said (${text("#toast-stack")})`); + }, /** Cancel runs nothing, says nothing, and files nothing. */ "cancelling-the-stash-question-runs-nothing-and-says-nothing": async (f) => { const c = check(f); diff --git a/apps/desktop/harness/shim.js b/apps/desktop/harness/shim.js index 2394c43f..2e5c5244 100644 --- a/apps/desktop/harness/shim.js +++ b/apps/desktop/harness/shim.js @@ -2959,6 +2959,29 @@ optionLike: { fullName: req.fullName, name, local: true }, }; } + // ?mergepick=1: the commit is a MERGE — a cherry-pick or revert sent + // without its side answers the merge's parents, as gitBridge's + // commitActionRefusal does, and the bridge asks which side. + if ( + params.get("mergepick") && + (req?.action === "cherry-pick" || req?.action === "revert") && + req.mainline === undefined && + !(Array.isArray(req.shas) && req.shas.length > 1) + ) { + const short = String(req.sha).slice(0, 7); + return { + ok: false, + changed: false, + expected: true, + message: `${short} is a merge commit, and ${req.action === "cherry-pick" ? "cherry-picking" : "reverting"} a merge needs the side.`, + mergeSides: { + parents: [ + { sha: "a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1a1", subject: "Merge pull request #142 from feat/branch-window" }, + { sha: "b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2", subject: "feat(desktop): the branch window" }, + ], + }, + }; + } const done = () => ({ ok: true, changed: true, message: `${req?.action ?? "action"} ok` }); const kind = { checkout: "checkout", "checkout-ref": "checkout", "cherry-pick": "cherry-pick", revert: "revert" }[ req?.action diff --git a/apps/desktop/l10n/bundle.l10n.json b/apps/desktop/l10n/bundle.l10n.json index 378ee27b..3407ac88 100644 --- a/apps/desktop/l10n/bundle.l10n.json +++ b/apps/desktop/l10n/bundle.l10n.json @@ -181,6 +181,8 @@ "A merge": "A merge", "A merge commit in this range isn't listed — a rebase replays the merged-in commits one by one and the merge itself disappears.": "A merge commit in this range isn't listed — a rebase replays the merged-in commits one by one and the merge itself disappears.", "A merge commit — its diff is against the first parent.": "A merge commit — its diff is against the first parent.", + "A merge has two sides, so git needs to know which one to keep.": "A merge has two sides, so git needs to know which one to keep.", + "A merge has two sides, so git needs to know which side's changes to apply.": "A merge has two sides, so git needs to know which side's changes to apply.", "A merge is in progress in it": "A merge is in progress in it", "A merge is in progress in it. Removing the worktree abandons the merge.": "A merge is in progress in it. Removing the worktree abandons the merge.", "A merge is in progress — finish or abort it first.": "A merge is in progress — finish or abort it first.", @@ -282,6 +284,7 @@ "Add to filter": "Add to filter", "Add to your review": "Add to your review", "Add variable": "Add variable", + "Add your API key and choose a model to finish.": "Add your API key and choose a model to finish.", "Add your API key to finish.": "Add your API key to finish.", "Add {0} after {1}": "Add {0} after {1}", "Add {0} to the filter": "Add {0} to the filter", @@ -294,6 +297,7 @@ "Adds everything above, plus discard, reset and force operations that can lose uncommitted work or rewrite history.": "Adds everything above, plus discard, reset and force operations that can lose uncommitted work or rewrite history.", "Adds everything in Read-only, plus stage, commit and create or switch branches. It won't be able to discard or rewrite existing work.": "Adds everything in Read-only, plus stage, commit and create or switch branches. It won't be able to discard or rewrite existing work.", "Adds inspect-only access — history, diffs, branches and file contents. A client added this way cannot change your repository.": "Adds inspect-only access — history, diffs, branches and file contents. A client added this way cannot change your repository.", + "Against parent {0}": "Against parent {0}", "Agent Access · MCP": "Agent Access · MCP", "Ahead": "Ahead", "All": "All", @@ -376,6 +380,8 @@ "Apply non-conflicting changes:": "Apply non-conflicting changes:", "Apply non-conflicting changes: all": "Apply non-conflicting changes: all", "Apply non-conflicting changes: {0}": "Apply non-conflicting changes: {0}", + "Apply the changes of the branch it was merged into": "Apply the changes of the branch it was merged into", + "Apply the changes that were merged in": "Apply the changes that were merged in", "Apply with {0} unresolved": "Apply with {0} unresolved", "Apply {0}": "Apply {0}", "Apply {0} and keep it in the stash list": "Apply {0} and keep it in the stash list", @@ -555,6 +561,7 @@ "Cherry-pick in progress": "Cherry-pick in progress", "Cherry-pick onto current branch": "Cherry-pick onto current branch", "Cherry-pick stopped": "Cherry-pick stopped", + "Cherry-pick the merge {0}": "Cherry-pick the merge {0}", "Cherry-pick {0} commits": "Cherry-pick {0} commits", "Cherry-picked": "Cherry-picked", "Cherry-picked {0} commits.": "Cherry-picked {0} commits.", @@ -565,7 +572,9 @@ "Choose a base…": "Choose a base…", "Choose a folder to clone into": "Choose a folder to clone into", "Choose a folder…": "Choose a folder…", + "Choose a model to finish.": "Choose a model to finish.", "Choose editors…": "Choose editors…", + "Choose from the list, or type a model ID": "Choose from the list, or type a model ID", "Choose how GitStudio looks. “System” follows your OS.": "Choose how GitStudio looks. “System” follows your OS.", "Choose location…": "Choose location…", "Choose the branch it comes from": "Choose the branch it comes from", @@ -1745,7 +1754,10 @@ "Keep going": "Keep going", "Keep my changes": "Keep my changes", "Keep my merge": "Keep my merge", + "Keep parent {0}": "Keep parent {0}", "Keep stale branches": "Keep stale branches", + "Keep the branch that was merged in": "Keep the branch that was merged in", + "Keep the branch this was merged into": "Keep the branch this was merged into", "Keep the commit, rewrite its message.": "Keep the commit, rewrite its message.", "Keep them": "Keep them", "Keep this commit as it is.": "Keep this commit as it is.", @@ -2838,6 +2850,7 @@ "Revert conflicts": "Revert conflicts", "Revert in progress": "Revert in progress", "Revert stopped": "Revert stopped", + "Revert the merge {0}": "Revert the merge {0}", "Revert this commit": "Revert this commit", "Revert {0} commits": "Revert {0} commits", "Revert {0} commits?": "Revert {0} commits?", @@ -3341,6 +3354,7 @@ "The file was saved but could not be staged.": "The file was saved but could not be staged.", "The files go back to how they were before the stash was applied. The stash itself stays in ": "The files go back to how they were before the stash was applied. The stash itself stays in ", "The first commit — there is nothing below it to reorder past.": "The first commit — there is nothing below it to reorder past.", + "The first parent — usually what you want.": "The first parent — usually what you want.", "The first {0} of {1} commits.": "The first {0} of {1} commits.", "The folder at {0} goes to the Trash, including anything in it that has not been committed. You can put it back straight afterwards, or from the Trash later.": "The folder at {0} goes to the Trash, including anything in it that has not been committed. You can put it back straight afterwards, or from the Trash later.", "The folder {0} is not there any more — it was moved or deleted.": "The folder {0} is not there any more — it was moved or deleted.", @@ -3490,6 +3504,8 @@ "This log is larger than 8 MB — showing the most recent output. Download for the full text.": "This log is larger than 8 MB — showing the most recent output. Download for the full text.", "This machine": "This machine", "This marks every notification in your inbox as read on GitHub.": "This marks every notification in your inbox as read on GitHub.", + "This merge has {0} parents. Which one should be kept as the mainline?": "This merge has {0} parents. Which one should be kept as the mainline?", + "This merge has {0} parents. Which one should its changes be taken against?": "This merge has {0} parents. Which one should its changes be taken against?", "This notification has no openable subject.": "This notification has no openable subject.", "This organization has no repositories you can see.": "This organization has no repositories you can see.", "This organization has no teams visible to you.": "This organization has no teams visible to you.", @@ -4477,6 +4493,7 @@ "{0} has no GitHub remote to be pushed to.": "{0} has no GitHub remote to be pushed to.", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.", "{0} has no commits that {1} doesn't.": "{0} has no commits that {1} doesn't.", + "{0} has no parent {1} to take the merge against.": "{0} has no parent {1} to take the merge against.", "{0} has no pull request #{1}.": "{0} has no pull request #{1}.", "{0} has no text to merge here.": "{0} has no text to merge here.", "{0} has no tracked files at HEAD.": "{0} has no tracked files at HEAD.", diff --git a/apps/desktop/src/main/gitBridge.ts b/apps/desktop/src/main/gitBridge.ts index fbe2257c..08f460ae 100644 --- a/apps/desktop/src/main/gitBridge.ts +++ b/apps/desktop/src/main/gitBridge.ts @@ -4398,9 +4398,12 @@ function stashRequest(req: unknown): { ref: unknown; stashFirst?: unknown } { * ("trying to write ref … with nonexistent object"); a graph row can name * such a commit while the view is out of date. `^{commit}` makes git read * it: a bare full sha "verifies" without that. - * · Cherry-pick / revert of ONE merge commit. git refuses without `-m` ("is - * a merge but no -m option was given"), and this app has no side picker - * for it yet (the extension asks); git's way is named instead. + * · Cherry-pick / revert of ONE merge commit sent without `mainline`. git + * refuses without `-m` ("is a merge but no -m option was given"), so the + * answer carries the merge's parents (`mergeSides`) and the renderer asks + * which side, as the extension does, then sends the request again with + * `mainline`. git's way is in `message` too, for a door that cannot ask. + * A `mainline` that is not one of the merge's parents is refused here. */ async function commitActionRefusal(ctx: GitContext, req: CommitActionRequest): Promise { const short = req.sha.slice(0, 7); @@ -4420,10 +4423,22 @@ async function commitActionRefusal(ctx: GitContext, req: CommitActionRequest): P if (req.action === "cherry-pick" || req.action === "revert") { const merges = await mergesAmong(ctx.process, [req.sha]); if (!merges || merges.length === 0) return undefined; // an unreadable commit: git's own words + const parents = await parentsOf(ctx, req.sha); + if (req.mainline !== undefined) { + if (Number.isInteger(req.mainline) && req.mainline >= 1 && req.mainline <= parents.length) return undefined; + // Never guessed at: taking a merge against the wrong parent applies, or + // undoes, the other side's work. The renderer only offers real parents. + return { + ok: false, + changed: false, + message: l10n.t("{0} has no parent {1} to take the merge against.", short, String(req.mainline)), + }; + } return { ok: false, changed: false, expected: true, + mergeSides: { parents }, message: req.action === "cherry-pick" ? l10n.t("{0} is a merge commit, and cherry-picking a merge needs the side to apply. From a terminal, git cherry-pick -m 1 {0} applies the changes that were merged in.", short) @@ -4433,15 +4448,41 @@ async function commitActionRefusal(ctx: GitContext, req: CommitActionRequest): P return undefined; } +/** + * A merge commit's parents in git's order (parent 1 first), each with its + * subject — what the side question shows. Unreadable parents come back + * without a subject rather than failing the question. + */ +async function parentsOf(ctx: GitContext, sha: string): Promise> { + const r = await ctx.process.run(["rev-list", "--parents", "-n", "1", sha]); + const shas = r.code === 0 ? r.stdout.trim().split(/\s+/).slice(1) : []; + if (shas.length === 0) return []; + const log = await ctx.process.run(["log", "--no-walk=unsorted", "--format=%H%x00%s", ...shas]); + const subjects = new Map(); + if (log.code === 0) { + for (const line of log.stdout.split("\n")) { + const [full, subject] = line.split("\0"); + if (full) subjects.set(full.trim(), (subject ?? "").trim()); + } + } + return shas.map((p) => ({ sha: p, subject: subjects.get(p) ?? "" })); +} + +/** `-m ` for a merge's cherry-pick or revert, once the side is known. */ +function mainlineArgs(req: CommitActionRequest): string[] { + return req.mainline !== undefined ? ["-m", String(req.mainline)] : []; +} + /** The commit-applying actions of commit:action, as the one door runs them. */ function applyOpFor(req: CommitActionRequest, args: string[]): ApplyOp | undefined { + const mainline = req.mainline !== undefined ? { mainline: req.mainline } : {}; switch (req.action) { case "checkout": return checkoutOp(args); case "cherry-pick": - return { kind: "cherry-pick", commit: req.sha, args }; + return { kind: "cherry-pick", commit: req.sha, ...mainline, args }; case "revert": - return { kind: "revert", commit: req.sha, args }; + return { kind: "revert", commit: req.sha, ...mainline, args }; default: return undefined; } @@ -4457,9 +4498,9 @@ function actionArgs(req: CommitActionRequest): string[] | undefined { case "tag": return req.name ? ["tag", req.name, req.sha] : undefined; case "cherry-pick": - return ["cherry-pick", req.sha]; + return ["cherry-pick", ...mainlineArgs(req), req.sha]; case "revert": - return ["revert", "--no-edit", req.sha]; + return ["revert", "--no-edit", ...mainlineArgs(req), req.sha]; case "reset-soft": return ["reset", "--soft", req.sha]; case "reset-mixed": diff --git a/apps/desktop/src/renderer/aiSettings.ts b/apps/desktop/src/renderer/aiSettings.ts index 877c172e..2c3d0dd7 100644 --- a/apps/desktop/src/renderer/aiSettings.ts +++ b/apps/desktop/src/renderer/aiSettings.ts @@ -174,6 +174,30 @@ function connectionRow(c: AiConnectionView, isDefault: boolean, refresh: () => P return row; } +/** + * Give `inputs` one suggestion list: the models this connection's provider + * offers (ai:models). Suggestions only — nothing is filled in for you, and an + * ID typed by hand is kept. A failed read leaves plain text fields. + */ +function offerModels(connectionId: string, inputs: HTMLInputElement[]): void { + const list = document.createElement("datalist"); + list.id = `gs-ai-models-${connectionId}`; + for (const input of inputs) input.setAttribute("list", list.id); + inputs[0]?.parentElement?.append(list); + void host + .invoke("ai:models", { connectionId }) + .then((models) => { + list.replaceChildren( + ...models.map((m) => { + const o = document.createElement("option"); + o.value = m.id; + return o; + }), + ); + }) + .catch(() => undefined); +} + function buildEditor(editor: HTMLElement, c: AiConnectionView, refresh: () => Promise): void { editor.replaceChildren(); const isCli = c.wire === "cli"; @@ -182,21 +206,26 @@ function buildEditor(editor: HTMLElement, c: AiConnectionView, refresh: () => Pr // CLI connections have no base URL or API key — they use the local binary's own // login. They just take optional model overrides (mapped to `--model`). const urlF = settingsField(l10n.t("API base URL"), c.baseUrl, "https://api.example.com/v1"); + // An HTTP connection's models are CHOSEN, never seeded for you where the + // preset has none (OpenAI, Azure, Custom): each field offers what the + // provider lists for this connection (ai:models — live, then known ids). + const choosePlaceholder = l10n.t("Choose from the list, or type a model ID"); const fastF = settingsField( isCli ? l10n.t("Quick model (optional)") : l10n.t("Fast model"), c.models.fast, - l10n.t("e.g. haiku"), + isCli ? l10n.t("e.g. haiku") : choosePlaceholder, ); const midF = settingsField( isCli ? l10n.t("Default model (optional)") : l10n.t("Standard model"), c.models.mid, - l10n.t("e.g. sonnet"), + isCli ? l10n.t("e.g. sonnet") : choosePlaceholder, ); const deepF = settingsField( isCli ? l10n.t("Deep model (optional)") : l10n.t("Deep model"), c.models.deep, - l10n.t("e.g. opus"), + isCli ? l10n.t("e.g. opus") : choosePlaceholder, ); + if (!isCli) offerModels(c.id, [fastF.input, midF.input, deepF.input]); editor.append(labelF.row); if (isCli) { const note = el("div", "settings-sub"); @@ -362,15 +391,18 @@ async function openGallery(body: HTMLElement, refresh: () => Promise): Pro // one did not, and it is the only way to connect the providers that need no // key at all. Their users could never lift the Assistant's gate. announceAiChanged(); - const ready = !p.needsKey; - toast( - l10n.t( - "Added {0}. {1}", - p.label, - ready ? l10n.t("Ready to use.") : l10n.t("Add your API key to finish."), - ), - "success", - ); + // What is left to do. A preset that seeds no model (OpenAI, Azure, + // Custom) needs one chosen — "Ready to use" was said of Custom, which + // was not. + const needsModel = p.wire !== "cli" && !p.models.fast && !p.models.mid && !p.models.deep; + const todo = p.needsKey + ? needsModel + ? l10n.t("Add your API key and choose a model to finish.") + : l10n.t("Add your API key to finish.") + : needsModel + ? l10n.t("Choose a model to finish.") + : l10n.t("Ready to use."); + toast(l10n.t("Added {0}. {1}", p.label, todo), "success"); await refresh(); // Auto-open the new connection's editor (to paste a key / pick a model). const editors = body.querySelectorAll(".ai-conn"); diff --git a/apps/desktop/src/renderer/bridge.ts b/apps/desktop/src/renderer/bridge.ts index 90e918be..4234b528 100644 --- a/apps/desktop/src/renderer/bridge.ts +++ b/apps/desktop/src/renderer/bridge.ts @@ -10,7 +10,7 @@ // bridges the two — it pages via IPC and feeds the element host messages — so // the component itself needs no desktop-specific code. -import type { GitStudioBridge, GraphRefFilter, InTheWayInfo, InvokeScope } from "../shared/ipc"; +import type { GitStudioBridge, GraphRefFilter, InTheWayInfo, InvokeScope, MergeSides } from "../shared/ipc"; import type { GraphInitMessage, GraphAppendMessage } from "@gitstudio/host-bridge/graphProtocol"; import { nextGraphMessage } from "../shared/graphAdapterCore"; import * as l10n from "@vscode/l10n"; @@ -37,6 +37,22 @@ export function answerInTheWayWith(ask: InTheWayAsker, note: (note: string) => v sayStashNote = note; } +/** + * Asks which side of a merge commit a cherry-pick or revert takes: the parent + * number (from 1), or undefined for Cancel. Installed at boot (mergeSideAsk.ts) + * for the same reason as the in-the-way question. + */ +type MergeSideAsker = ( + action: "cherry-pick" | "revert", + sha: string, + sides: MergeSides, +) => Promise; +let askMergeSide: MergeSideAsker | undefined; + +export function answerMergeSidesWith(ask: MergeSideAsker): void { + askMergeSide = ask; +} + /** An object request, again, carrying `stashFirst`. */ const withStashFirst = (payload: unknown, root: string): unknown => payload && typeof payload === "object" ? { ...(payload as object), stashFirst: root } : undefined; @@ -82,7 +98,23 @@ async function invokeAsking(channel: string, payload: unknown): Promise // modal, and no tab switch happens under a modal. const owner = activeSession; const send = (p: unknown): Promise => owned(channel, owner, sendRaw(channel, p, owner)); - const first = await send(payload); + let first = await send(payload); + // A merge commit's cherry-pick or revert: main answers with its parents, and + // the side is asked HERE, for every door at once, as the extension asks — + // then the same request goes again with `mainline`. Asked before the + // in-the-way question, which the request with its side can still meet. + const sides = channel === "commit:action" ? (first as { mergeSides?: MergeSides } | undefined)?.mergeSides : undefined; + if (sides && askMergeSide && payload && typeof payload === "object") { + const req = payload as { action?: string; sha?: string }; + if ((req.action === "cherry-pick" || req.action === "revert") && typeof req.sha === "string") { + const mainline = await askMergeSide(req.action, req.sha, sides); + if (mainline === undefined) { + return { ok: false, changed: false, expected: true, cancelled: true }; + } + payload = { ...(payload as object), mainline }; + first = await send(payload); + } + } const way = (first as { inTheWay?: InTheWayInfo } | undefined)?.inTheWay; const retry = Object.hasOwn(STASH_AND_RETRY, channel) ? STASH_AND_RETRY[channel] : undefined; if (!way || !askInTheWay || !retry) return noted(first); diff --git a/apps/desktop/src/renderer/mergeSideAsk.ts b/apps/desktop/src/renderer/mergeSideAsk.ts new file mode 100644 index 00000000..f2be3ded --- /dev/null +++ b/apps/desktop/src/renderer/mergeSideAsk.ts @@ -0,0 +1,80 @@ +// The question a cherry-pick or revert of a MERGE commit asks first: which +// side. git refuses either without `-m`, and main answers such a request with +// the merge's parents (`mergeSides`); bridge.ts asks this for every door at +// once and sends the request again with `mainline`. The same question, in the +// same words, as the extension's (apps/extension/src/graph/commitActions.ts). +// +// For a cherry-pick, `-m 1` applies what the merge brought in — its changes +// against the branch it was merged into — the usual intent, offered first. For +// a revert, `-m 1` keeps the branch the merge was made ON ("undo this merge"). +// Every parent is offered, not just two: an octopus merge has three or more. + +import type { MergeSides } from "../shared/ipc"; +import { answerMergeSidesWith } from "./bridge"; +import { promptChoice, type ChoiceOption } from "./dialogs"; +import * as l10n from "@vscode/l10n"; + +const short = (sha: string): string => sha.slice(0, 7); + +/** The parent number (from 1) to take the merge against, or undefined for Cancel. */ +export async function askMergeSide( + action: "cherry-pick" | "revert", + sha: string, + sides: MergeSides, + openRoot: () => string | undefined = () => undefined, +): Promise { + const parents = sides.parents; + if (parents.length < 2) return undefined; + const pair = parents.length === 2; + const pick = action === "cherry-pick"; + const label = (i: number): string => + pick + ? pair + ? i === 0 + ? l10n.t("Apply the changes that were merged in") + : l10n.t("Apply the changes of the branch it was merged into") + : l10n.t("Against parent {0}", i + 1) + : pair + ? i === 0 + ? l10n.t("Keep the branch this was merged into") + : l10n.t("Keep the branch that was merged in") + : l10n.t("Keep parent {0}", i + 1); + const choices: ChoiceOption[] = parents.map((p, i) => ({ + id: String(i + 1), + label: label(i), + sub: + short(p.sha) + + (p.subject + ? ` · ${p.subject}` + : i === 0 + ? ` · ${l10n.t("The first parent — usually what you want.")}` + : ""), + icon: i === 0 ? "git-branch" : "git-merge", + })); + const askedIn = openRoot(); + const chosen = await promptChoice({ + title: pick ? l10n.t("Cherry-pick the merge {0}", short(sha)) : l10n.t("Revert the merge {0}", short(sha)), + hint: pick + ? pair + ? l10n.t("A merge has two sides, so git needs to know which side's changes to apply.") + : l10n.t("This merge has {0} parents. Which one should its changes be taken against?", parents.length) + : pair + ? l10n.t("A merge has two sides, so git needs to know which one to keep.") + : l10n.t("This merge has {0} parents. Which one should be kept as the mainline?", parents.length), + choices, + // The dialog's own Cancel button (and Escape) answer this: not a choice. + cancelId: "cancel", + // Held while the repository it was asked in is still the one in front, + // as the in-the-way question is (see askStashRetry). + holdWhile: () => askedIn !== undefined && openRoot() === askedIn, + }); + const n = Number(chosen); + // An id outside the parents cannot happen — they are made just above — but + // falling back to 1 would take the merge against the WRONG side: cancel. + return Number.isInteger(n) && n >= 1 && n <= parents.length ? n : undefined; +} + +/** Install the question for every door that cherry-picks or reverts. */ +export function installMergeSideAsker(openRoot: () => string | undefined): void { + answerMergeSidesWith((action, sha, sides) => askMergeSide(action, sha, sides, openRoot)); +} diff --git a/apps/desktop/src/renderer/renderer.ts b/apps/desktop/src/renderer/renderer.ts index 4e481b61..9590b458 100644 --- a/apps/desktop/src/renderer/renderer.ts +++ b/apps/desktop/src/renderer/renderer.ts @@ -136,6 +136,7 @@ import { runManyAction } from "./multiCommit"; import { askPullMode, pullWithChoice, pullVerdict, type PullOutcome, type PullVerdict } from "./pullFlow"; import { resetItemLabel, resetToUpstream } from "./resetToUpstream"; import { installInTheWayAsker } from "./inTheWayAsk"; +import { installMergeSideAsker } from "./mergeSideAsk"; import { refCheckoutRequest, refDisplay, type RowRef } from "./refMenuItems"; import { branchName, isRemoteHead, remoteRefParts, tagName, upstreamLabel, upstreamParts } from "./branchRequests"; import { explainRefusedCheckout } from "./optionLikeRename"; @@ -11544,6 +11545,9 @@ class TabShell { // asks Stash & Retry or Cancel for all of them (bridge.ts). It holds its // question while the tab it was asked in stays in front. installInTheWayAsker(() => currentSession()?.root); + // And the side a merge commit's cherry-pick or revert takes, asked the + // same way for every door. + installMergeSideAsker(() => currentSession()?.root); // Catch-all error boundary: a rejected promise or thrown render should never // leave the app silently broken — surface it as a toast. BUT skip the benign // Monaco worker noise (it asks the base worker for TS language-service methods diff --git a/apps/desktop/src/shared/ipc.ts b/apps/desktop/src/shared/ipc.ts index 8dba87eb..6f5db1bd 100644 --- a/apps/desktop/src/shared/ipc.ts +++ b/apps/desktop/src/shared/ipc.ts @@ -392,6 +392,22 @@ export interface CommitActionRequest { * revert) and refuses a merge among them. Only for "cherry-pick" and "revert". */ shas?: string[]; + /** + * For a cherry-pick or revert of ONE merge commit: git's `-m`, the parent + * (counted from 1) the merge is taken against. Main answers a merge sent + * without it with `mergeSides`, and the renderer asks which side and sends + * the request again with this (bridge.ts) — as the extension asks. + */ + mainline?: number; +} + +/** + * A cherry-pick or revert of one merge commit, sent without `mainline`: the + * merge's parents in git's order (parent 1 first), each with its subject, so + * the renderer can ask which side to take it against. + */ +export interface MergeSides { + parents: Array<{ sha: string; subject: string }>; } /** @@ -423,6 +439,9 @@ export interface CommitActionResult { * and a Stash & Retry sends the same request again with `stashFirst: root`. */ inTheWay?: InTheWayInfo; + /** A merge commit's cherry-pick or revert needs its side first: see + * MergeSides. Always with `expected` and git's way in `message`. */ + mergeSides?: MergeSides; /** After a Stash & Retry: what became of the stashed changes, when it is * anything but "back where they were". Said in the neutral tone. Also a * stash applied without the staging git could not restore (applyForDoor). */ diff --git a/apps/desktop/test/aiBridge.settings.test.ts b/apps/desktop/test/aiBridge.settings.test.ts index f19edab3..4616c05b 100644 --- a/apps/desktop/test/aiBridge.settings.test.ts +++ b/apps/desktop/test/aiBridge.settings.test.ts @@ -117,9 +117,19 @@ test("removing the default connection promotes the next one and deletes its key" assert.equal(v.defaultId, undefined, "nothing left to default to"); }); +/** + * An OpenAI connection with its models picked. The preset seeds none — you + * choose the model — so a test that sends a request picks them first. + */ +async function openAiPicked(bridge: Awaited>["bridge"]): Promise { + const id = (await bridge.addConnection("openai")).connections[0].id; + await bridge.updateConnection({ id, models: { fast: "gpt-6-luna", mid: "gpt-6.1-terra", deep: "gpt-6.1-sol" } }); + return id; +} + test("a key makes a keyed connection usable, and is never shown or written in plain text", async () => { const { bridge } = await makeBridge(); - const id = (await bridge.addConnection("openai")).connections[0].id; + const id = await openAiPicked(bridge); const v = await bridge.setKey(id, " sk-live-1234567890 "); assert.equal(v.connections[0].hasKey, true); assert.equal(v.connections[0].usable, true); @@ -141,7 +151,7 @@ test("a key makes a keyed connection usable, and is never shown or written in pl test("Test: the provider's answer about the connection is a condition; a request it could not read still reports (#28, #29)", async () => { const { bridge } = await makeBridge(); - const id = (await bridge.addConnection("openai")).connections[0].id; + const id = await openAiPicked(bridge); await bridge.setKey(id, "sk-wrong"); // A refused key, a rate limit: the Test button's whole answer. for (const status of [401, 429]) { @@ -416,7 +426,7 @@ test("Test: a reasoning model that spent the whole cap thinking still answered test("Test explains a rejected key in the provider's words", async () => { const { bridge } = await makeBridge(); - const id = (await bridge.addConnection("openai")).connections[0].id; + const id = await openAiPicked(bridge); await bridge.setKey(id, "sk-bad"); model.replies.push(new Response("{}", { status: 401 })); const r = await bridge.test(id); @@ -438,7 +448,7 @@ test("with no connection the model picker is empty", async () => { test("the model picker offers configured models, then live ones, then known ones — once each", async () => { const { bridge } = await makeBridge(); - const id = (await bridge.addConnection("openai")).connections[0].id; + const id = await openAiPicked(bridge); await bridge.setKey(id, "sk-k"); model.models = new Response(JSON.stringify({ data: [{ id: "gpt-6-luna" }, { id: "gpt-live-1" }, { name: "named-model" }, {}] })); const ids = (await bridge.listModels(id)).map((m) => m.id); diff --git a/apps/desktop/test/gitBridge.ops.test.ts b/apps/desktop/test/gitBridge.ops.test.ts index 40b7fbe8..b0a6b36d 100644 --- a/apps/desktop/test/gitBridge.ops.test.ts +++ b/apps/desktop/test/gitBridge.ops.test.ts @@ -95,25 +95,66 @@ test("tag and branch on a commit the repository does not have are refused before assert.equal(t.git("branch", "--list", "ghost-ref").trim(), ""); }); -test("cherry-pick or revert of one merge commit is refused with git's way, expected, before git runs", async () => { - const t = repo(); +/** main with `side` merged into it (--no-ff); returns the merge and its parents. */ +function mergedSide(t: BridgeRepo): { first: string; merge: string; mainTip: string; sideTip: string } { const [first] = separateCommits(t); + const mainTip = head(t); t.git("checkout", "-q", "-b", "side", first); t.write("side.txt", "side\n"); - t.commitAll("side"); + const sideTip = t.commitAll("side work"); t.git("checkout", "-q", "main"); t.git("merge", "-q", "--no-ff", "--no-edit", "side"); - const merge = head(t); + return { first, merge: head(t), mainTip, sideTip }; +} + +test("cherry-pick or revert of one merge commit without a side answers its parents, expected, before git runs", async () => { + const t = repo(); + const { first, merge, mainTip, sideTip } = mergedSide(t); t.git("checkout", "-q", "-b", "target", first); const before = head(t); const pick = await t.bridge.commitAction({ action: "cherry-pick", sha: merge }); assert.equal(pick.ok, false); assert.equal(pick.expected, true); assert.match(pick.message ?? "", new RegExp(`git cherry-pick -m 1 ${merge.slice(0, 7)}`)); + // What the renderer asks with: git's parent order, each with its subject. + assert.deepEqual(pick.mergeSides?.parents.map((p) => p.sha), [mainTip, sideTip]); + assert.equal(pick.mergeSides?.parents[1]?.subject, "side work"); const back = await t.bridge.commitAction({ action: "revert", sha: merge }); assert.equal(back.expected, true); + assert.ok(back.mergeSides, "a revert asks the same question"); assert.match(back.message ?? "", /git revert -m 1/); assert.equal(head(t), before, "nothing ran"); + // An ordinary commit is never asked about. + const plain = await t.bridge.commitAction({ action: "cherry-pick", sha: sideTip }); + assert.equal(plain.mergeSides, undefined); +}); + +test("with its side chosen, a merge commit is cherry-picked and reverted (-m)", async () => { + const t = repo(); + const { first, merge } = mergedSide(t); + t.git("checkout", "-q", "-b", "target", first); + const pick = await t.bridge.commitAction({ action: "cherry-pick", sha: merge, mainline: 1 }); + assert.equal(pick.ok, true, pick.message); + assert.equal(t.git("show", "HEAD:side.txt"), "side\n", "parent 1: the changes that were merged in"); + + t.git("checkout", "-q", "main"); + const back = await t.bridge.commitAction({ action: "revert", sha: merge, mainline: 1 }); + assert.equal(back.ok, true, back.message); + assert.equal(t.git("ls-tree", "--name-only", "HEAD", "side.txt").trim(), "", "parent 1 kept: the merge undone"); +}); + +test("a side that is not one of the merge's parents is refused, never guessed at", async () => { + const t = repo(); + const { first, merge } = mergedSide(t); + t.git("checkout", "-q", "-b", "target", first); + const before = head(t); + for (const mainline of [0, 3, 1.5]) { + const res = await t.bridge.commitAction({ action: "cherry-pick", sha: merge, mainline }); + assert.equal(res.ok, false); + assert.equal(res.mergeSides, undefined, `mainline ${mainline}`); + assert.notEqual(res.expected, true, "our request was wrong: reported"); + } + assert.equal(head(t), before); }); test("the commit menu refuses option-shaped values and runs nothing for copy-sha", async () => { diff --git a/apps/desktop/test/mergeSideBridge.test.ts b/apps/desktop/test/mergeSideBridge.test.ts new file mode 100644 index 00000000..a317440f --- /dev/null +++ b/apps/desktop/test/mergeSideBridge.test.ts @@ -0,0 +1,88 @@ +// The renderer's half of a merge commit's cherry-pick or revert: main answers +// a request without a side with the merge's parents (`mergeSides`), and the +// bridge asks which side — once, for every door — then sends the SAME request +// again with `mainline`. Cancel runs nothing and says nothing (`cancelled`). +// +// bridge.ts reads `window.gitstudio` at import time, so the stub goes first. + +import { test, before } from "node:test"; +import assert from "node:assert/strict"; + +interface Call { + channel: string; + payload: unknown; + resolve: (v: unknown) => void; +} +const calls: Call[] = []; + +(globalThis as unknown as { window: unknown }).window = { + gitstudio: { + invoke(channel: string, payload: unknown) { + return new Promise((resolve) => calls.push({ channel, payload, resolve })); + }, + on() { + return () => {}; + }, + }, +}; + +type Bridge = typeof import("../src/renderer/bridge"); +let b!: Bridge; +before(async () => { + b = (await import("../src/renderer/bridge")) as Bridge; +}); + +const flush = (): Promise => new Promise((r) => setTimeout(r, 0)); + +const SIDES = { + parents: [ + { sha: "a".repeat(40), subject: "main work" }, + { sha: "b".repeat(40), subject: "side work" }, + ], +}; +const MERGE = "c".repeat(40); + +test("a merge's cherry-pick is asked its side, then sent again with it", async () => { + const asked: unknown[] = []; + b.answerMergeSidesWith(async (action, sha, sides) => { + asked.push({ action, sha, n: sides.parents.length }); + return 2; + }); + const done = b.host.invoke("commit:action", { action: "cherry-pick", sha: MERGE }); + await flush(); + assert.equal(calls.length, 1); + calls[0]!.resolve({ ok: false, changed: false, expected: true, mergeSides: SIDES, message: "needs a side" }); + await flush(); + assert.deepEqual(asked, [{ action: "cherry-pick", sha: MERGE, n: 2 }]); + assert.equal(calls.length, 2, "the request went again"); + assert.deepEqual(calls[1]!.payload, { action: "cherry-pick", sha: MERGE, mainline: 2 }); + calls[1]!.resolve({ ok: true, changed: true }); + assert.deepEqual(await done, { ok: true, changed: true }, "the door gets the second answer"); + calls.length = 0; +}); + +test("Cancel runs nothing and hands the door `cancelled`", async () => { + b.answerMergeSidesWith(async () => undefined); + const done = b.host.invoke("commit:action", { action: "revert", sha: MERGE }); + await flush(); + calls[0]!.resolve({ ok: false, changed: false, expected: true, mergeSides: SIDES }); + const answer = await done; + assert.equal(calls.length, 1, "nothing was sent again"); + assert.equal((answer as { cancelled?: boolean }).cancelled, true); + calls.length = 0; +}); + +test("only commit:action's answer is asked about", async () => { + let asked = 0; + b.answerMergeSidesWith(async () => { + asked++; + return 1; + }); + const done = b.host.invoke("head:get", undefined); + await flush(); + calls[0]!.resolve({ mergeSides: SIDES }); + await done; + assert.equal(asked, 0); + assert.equal(calls.length, 1); + calls.length = 0; +}); diff --git a/apps/extension/CHANGELOG.md b/apps/extension/CHANGELOG.md index 0df80824..dc4cf5af 100644 --- a/apps/extension/CHANGELOG.md +++ b/apps/extension/CHANGELOG.md @@ -4,6 +4,23 @@ All notable changes to **GitStudio** are documented here. This project adheres t [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Changed +- **You choose the OpenAI model.** The OpenAI model settings no longer + default to gpt-4o-mini / gpt-4o, and the AI panel's OpenAI card no longer + comes filled in with gpt-4o: the model field lists what your key can use, + and Connect asks for one until you pick it. A detected list is offered, + never picked from (it took the first, alphabetically, for some keys). A + setup already running on the old defaults keeps them as its own settings, + so nothing switches off on update. + +### Fixed +- **OpenAI's reasoning models work.** The o-series and gpt-5 and later + answered every request with HTTP 400, because GitStudio sent them + `max_tokens`; they now get `max_completion_tokens`, with low reasoning + effort for these short tasks. + ## [1.24.0] - 2026-11-07 ### Added diff --git a/apps/extension/l10n/bundle.l10n.cs.json b/apps/extension/l10n/bundle.l10n.cs.json index bf07e839..569a36c2 100644 --- a/apps/extension/l10n/bundle.l10n.cs.json +++ b/apps/extension/l10n/bundle.l10n.cs.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "Provádí se cherry-pick {0} commitů", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "Cherry-pick {0} commitů se zastavil na commitu, který potřebuje váš zásah — vyřešte případné konflikty a pokračujte, přeskočte tento commit, nebo zrušte, aby se větev vrátila tak, jak byla.", "Cherry-picking {0} onto {1}{2}": "Provádí se cherry-pick {0} na {1}{2}", + "Choose a model to connect — pick one from the list or type its ID.": "Pro připojení vyberte model — ze seznamu, nebo zadejte jeho ID.", "Choose the branch it comes from": "Vyberte větev, ze které to pochází", "Choose the branch it goes into": "Vyberte větev, do které to půjde", "Choose the remote branch '{0}' pulls from and pushes to.": "Vyberte vzdálenou větev, ze které '{0}' stahuje (pull) a do které odesílá (push).", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "Zpráva (co a proč)…", "Mistral & Codestral models.": "Modely Mistral a Codestral.", "Mixed": "Smíšené", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID modelu pro commit zprávy a vysvětlení — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID modelu pro commit zprávy a vysvětlení — ten, který nabízí váš poskytovatel, např. llama3.1 nebo qwen2.5-coder na lokálním serveru.", "Modified": "Upraveno", "Monaco worker URI was not provided by the host.": "Hostitel neposkytl URI pracovního procesu Monaco.", "More Actions…": "Další akce…", diff --git a/apps/extension/l10n/bundle.l10n.de.json b/apps/extension/l10n/bundle.l10n.de.json index ad71a4fa..41aaf0ed 100644 --- a/apps/extension/l10n/bundle.l10n.de.json +++ b/apps/extension/l10n/bundle.l10n.de.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "{0} Commits werden cherry-gepickt", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "Das Cherry-Picken von {0} Commits ist bei einem Commit angehalten, der Eingreifen erfordert — alle Konflikte lösen und fortsetzen, diesen Commit überspringen, oder abbrechen, um den Branch wie zuvor wiederherzustellen.", "Cherry-picking {0} onto {1}{2}": "{0} wird auf {1}{2} cherry-gepickt", + "Choose a model to connect — pick one from the list or type its ID.": "Wähle ein Modell, um zu verbinden — aus der Liste oder per ID.", "Choose the branch it comes from": "Den Branch auswählen, von dem es kommt", "Choose the branch it goes into": "Den Branch auswählen, in den es eingeht", "Choose the remote branch '{0}' pulls from and pushes to.": "Den Remote-Branch auswählen, von dem '{0}' pullt und zu dem es pusht.", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "Nachricht (was & warum)…", "Mistral & Codestral models.": "Mistral- & Codestral-Modelle.", "Mixed": "Mixed", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "Modell-ID für Commit-Nachrichten und Erklärungen — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "Modell-ID für Commit-Nachrichten und Erklärungen — die dein Anbieter auflistet, z. B. llama3.1 oder qwen2.5-coder auf einem lokalen Server.", "Modified": "Geändert", "Monaco worker URI was not provided by the host.": "Die Monaco-Worker-URI wurde vom Host nicht bereitgestellt.", "More Actions…": "Weitere Aktionen…", diff --git a/apps/extension/l10n/bundle.l10n.es.json b/apps/extension/l10n/bundle.l10n.es.json index f1fc509f..25ae660b 100644 --- a/apps/extension/l10n/bundle.l10n.es.json +++ b/apps/extension/l10n/bundle.l10n.es.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "Haciendo cherry-pick de {0} commits", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "El cherry-pick de {0} commits se detuvo en un commit que necesita tu atención — resuelve los conflictos y continúa, omite ese commit, o aborta para devolver la rama a como estaba.", "Cherry-picking {0} onto {1}{2}": "Haciendo cherry-pick de {0} sobre {1}{2}", + "Choose a model to connect — pick one from the list or type its ID.": "Elige un modelo para conectar: de la lista o escribiendo su ID.", "Choose the branch it comes from": "Elige la rama de la que viene", "Choose the branch it goes into": "Elige la rama a la que va", "Choose the remote branch '{0}' pulls from and pushes to.": "Elige la rama remota de la que '{0}' incorpora y a la que publica.", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "Mensaje (qué y por qué)…", "Mistral & Codestral models.": "Modelos Mistral y Codestral.", "Mixed": "Mixto", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID del modelo para mensajes de commit y explicaciones: gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID del modelo para mensajes de commit y explicaciones: el que muestra tu proveedor, p. ej. llama3.1 o qwen2.5-coder en un servidor local.", "Modified": "Modificado", "Monaco worker URI was not provided by the host.": "El host no proporcionó el URI del worker de Monaco.", "More Actions…": "Más acciones…", diff --git a/apps/extension/l10n/bundle.l10n.fr.json b/apps/extension/l10n/bundle.l10n.fr.json index cc9e75e9..eef78508 100644 --- a/apps/extension/l10n/bundle.l10n.fr.json +++ b/apps/extension/l10n/bundle.l10n.fr.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "Picorage de {0} commits", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "Le picorage de {0} commits s'est arrêté sur un commit qui a besoin de vous — résolvez les conflits et continuez, ignorez ce commit, ou abandonnez pour remettre la branche comme avant.", "Cherry-picking {0} onto {1}{2}": "Picorage de {0} sur {1}{2}", + "Choose a model to connect — pick one from the list or type its ID.": "Choisissez un modèle pour vous connecter — dans la liste ou en saisissant son ID.", "Choose the branch it comes from": "Choisissez la branche d'où elle vient", "Choose the branch it goes into": "Choisissez la branche dans laquelle elle va", "Choose the remote branch '{0}' pulls from and pushes to.": "Choisissez la branche distante depuis laquelle « {0} » tire et vers laquelle elle pousse.", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "Message (quoi et pourquoi)…", "Mistral & Codestral models.": "Modèles Mistral et Codestral.", "Mixed": "Mixed", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID de modèle pour les messages de commit et les explications — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID de modèle pour les messages de commit et les explications — celui que liste votre fournisseur, p. ex. llama3.1 ou qwen2.5-coder sur un serveur local.", "Modified": "Modifié", "Monaco worker URI was not provided by the host.": "L'URI du worker Monaco n'a pas été fournie par l'hôte.", "More Actions…": "Plus d'actions…", diff --git a/apps/extension/l10n/bundle.l10n.it.json b/apps/extension/l10n/bundle.l10n.it.json index 1a8a5e8d..26c7e308 100644 --- a/apps/extension/l10n/bundle.l10n.it.json +++ b/apps/extension/l10n/bundle.l10n.it.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "Cherry-pick di {0} commit in corso", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "Il cherry-pick di {0} commit si è fermato su un commit che richiede il tuo intervento — risolvi eventuali conflitti e continua, salta quel commit, oppure interrompi per riportare il ramo com'era.", "Cherry-picking {0} onto {1}{2}": "Cherry-pick di {0} su {1}{2}", + "Choose a model to connect — pick one from the list or type its ID.": "Scegli un modello per connetterti: dall'elenco o digitandone l'ID.", "Choose the branch it comes from": "Scegli il ramo da cui proviene", "Choose the branch it goes into": "Scegli il ramo in cui va a finire", "Choose the remote branch '{0}' pulls from and pushes to.": "Scegli il ramo remoto da cui '{0}' esegue il pull e verso cui esegue il push.", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "Messaggio (cosa e perché)…", "Mistral & Codestral models.": "Modelli Mistral e Codestral.", "Mixed": "Mixed", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID del modello per i messaggi di commit e la spiegazione — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID del modello per i messaggi di commit e la spiegazione — quello elencato dal tuo provider, ad es. llama3.1 o qwen2.5-coder su un server locale.", "Modified": "Modificato", "Monaco worker URI was not provided by the host.": "L'URI del worker Monaco non è stato fornito dall'host.", "More Actions…": "Altre azioni…", diff --git a/apps/extension/l10n/bundle.l10n.ja.json b/apps/extension/l10n/bundle.l10n.ja.json index 5eda6fb5..491ba0c1 100644 --- a/apps/extension/l10n/bundle.l10n.ja.json +++ b/apps/extension/l10n/bundle.l10n.ja.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "{0} 件のコミットをチェリーピック中", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "{0} 件のコミットのチェリーピックが、対応が必要なコミットで停止しました — コンフリクトを解決して続行するか、そのコミットをスキップするか、中止してブランチを元の状態に戻してください。", "Cherry-picking {0} onto {1}{2}": "{0} を {1}{2} にチェリーピック中", + "Choose a model to connect — pick one from the list or type its ID.": "接続するにはモデルを選んでください — 一覧から選ぶか ID を入力します。", "Choose the branch it comes from": "取り込み元のブランチを選択", "Choose the branch it goes into": "取り込み先のブランチを選択", "Choose the remote branch '{0}' pulls from and pushes to.": "'{0}' がプル元・プッシュ先とするリモートブランチを選択してください。", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "メッセージ(内容と理由)…", "Mistral & Codestral models.": "Mistral & Codestral モデル。", "Mixed": "混在", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "コミットメッセージと説明に使うモデル ID — gpt-4o-mini、llama3.1、qwen2.5-coder など。", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "コミットメッセージと説明に使うモデル ID — プロバイダーが一覧に出すもの。ローカルサーバーなら llama3.1、qwen2.5-coder など。", "Modified": "変更あり", "Monaco worker URI was not provided by the host.": "Monaco ワーカーの URI がホストから提供されませんでした。", "More Actions…": "その他の操作…", diff --git a/apps/extension/l10n/bundle.l10n.json b/apps/extension/l10n/bundle.l10n.json index 09726f77..c5d71d9a 100644 --- a/apps/extension/l10n/bundle.l10n.json +++ b/apps/extension/l10n/bundle.l10n.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "Cherry-picking {0} commits", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.", "Cherry-picking {0} onto {1}{2}": "Cherry-picking {0} onto {1}{2}", + "Choose a model to connect — pick one from the list or type its ID.": "Choose a model to connect — pick one from the list or type its ID.", "Choose the branch it comes from": "Choose the branch it comes from", "Choose the branch it goes into": "Choose the branch it goes into", "Choose the remote branch '{0}' pulls from and pushes to.": "Choose the remote branch '{0}' pulls from and pushes to.", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "Message (what & why)…", "Mistral & Codestral models.": "Mistral & Codestral models.", "Mixed": "Mixed", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.", "Modified": "Modified", "Monaco worker URI was not provided by the host.": "Monaco worker URI was not provided by the host.", "More Actions…": "More Actions…", diff --git a/apps/extension/l10n/bundle.l10n.ko.json b/apps/extension/l10n/bundle.l10n.ko.json index 5c42f998..c8da25cb 100644 --- a/apps/extension/l10n/bundle.l10n.ko.json +++ b/apps/extension/l10n/bundle.l10n.ko.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "커밋 {0}개 체리픽 중", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "커밋 {0}개 체리픽이 사용자 확인이 필요한 커밋에서 멈췄습니다 — 충돌을 해결하고 계속하거나, 해당 커밋을 건너뛰거나, 중단하여 브랜치를 원래대로 되돌리세요.", "Cherry-picking {0} onto {1}{2}": "{0}을 {1}{2}에 체리픽 중", + "Choose a model to connect — pick one from the list or type its ID.": "연결하려면 모델을 선택하세요 — 목록에서 고르거나 ID를 입력하세요.", "Choose the branch it comes from": "출발 브랜치 선택", "Choose the branch it goes into": "도착 브랜치 선택", "Choose the remote branch '{0}' pulls from and pushes to.": "'{0}'이 풀하고 푸시할 원격 브랜치를 선택하세요.", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "메시지(무엇과 왜)…", "Mistral & Codestral models.": "Mistral 및 Codestral 모델.", "Mixed": "혼합", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "커밋 메시지 및 설명용 모델 ID — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "커밋 메시지 및 설명용 모델 ID — 공급자가 나열하는 모델, 예: 로컬 서버의 llama3.1 또는 qwen2.5-coder.", "Modified": "수정됨", "Monaco worker URI was not provided by the host.": "호스트가 Monaco worker URI를 제공하지 않았습니다.", "More Actions…": "추가 작업…", diff --git a/apps/extension/l10n/bundle.l10n.pl.json b/apps/extension/l10n/bundle.l10n.pl.json index 15ff47b5..22f672c1 100644 --- a/apps/extension/l10n/bundle.l10n.pl.json +++ b/apps/extension/l10n/bundle.l10n.pl.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "Wykonywanie cherry-pick {0} commitów", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "Cherry-pick {0} commitów zatrzymał się na commicie, który wymaga Twojej decyzji — rozwiąż konflikty i kontynuuj, pomiń ten commit albo przerwij, aby przywrócić branch do stanu poprzedniego.", "Cherry-picking {0} onto {1}{2}": "Wykonywanie cherry-pick {0} na {1}{2}", + "Choose a model to connect — pick one from the list or type its ID.": "Wybierz model, aby się połączyć — z listy lub wpisując jego ID.", "Choose the branch it comes from": "Wybierz branch, z którego pochodzi", "Choose the branch it goes into": "Wybierz branch, do którego wchodzi", "Choose the remote branch '{0}' pulls from and pushes to.": "Wybierz zdalny branch, z którego '{0}' robi pull i do którego robi push.", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "Treść (co i dlaczego)…", "Mistral & Codestral models.": "Modele Mistral i Codestral.", "Mixed": "Mieszany", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID modelu do treści commitów i wyjaśnień — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID modelu do treści commitów i wyjaśnień — ten, który podaje Twój dostawca, np. llama3.1 lub qwen2.5-coder na lokalnym serwerze.", "Modified": "Zmodyfikowano", "Monaco worker URI was not provided by the host.": "Host nie podał URI workera Monaco.", "More Actions…": "Więcej akcji…", diff --git a/apps/extension/l10n/bundle.l10n.pt-br.json b/apps/extension/l10n/bundle.l10n.pt-br.json index 689a8957..21d16f9e 100644 --- a/apps/extension/l10n/bundle.l10n.pt-br.json +++ b/apps/extension/l10n/bundle.l10n.pt-br.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "Fazendo cherry-pick de {0} commits", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "O cherry-pick de {0} commits parou em um commit que precisa de você — resolva quaisquer conflitos e continue, pule esse commit, ou aborte para devolver o branch como estava.", "Cherry-picking {0} onto {1}{2}": "Fazendo cherry-pick de {0} em {1}{2}", + "Choose a model to connect — pick one from the list or type its ID.": "Escolha um modelo para conectar — da lista ou digitando o ID.", "Choose the branch it comes from": "Escolha o branch de onde ele vem", "Choose the branch it goes into": "Escolha o branch para onde ele vai", "Choose the remote branch '{0}' pulls from and pushes to.": "Escolha o branch remoto do qual '{0}' faz pull e para o qual faz push.", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "Mensagem (o quê & por quê)…", "Mistral & Codestral models.": "Modelos Mistral & Codestral.", "Mixed": "Misto", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID do modelo para mensagens de commit e explicação — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID do modelo para mensagens de commit e explicação — o que seu provedor lista, p. ex. llama3.1 ou qwen2.5-coder em um servidor local.", "Modified": "Modificado", "Monaco worker URI was not provided by the host.": "A URI do worker do Monaco não foi fornecida pelo host.", "More Actions…": "Mais Ações…", diff --git a/apps/extension/l10n/bundle.l10n.ru.json b/apps/extension/l10n/bundle.l10n.ru.json index 25fd4dc7..f66614c1 100644 --- a/apps/extension/l10n/bundle.l10n.ru.json +++ b/apps/extension/l10n/bundle.l10n.ru.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "Выполняется cherry-pick {0} коммитов", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "Cherry-pick {0} коммитов остановлен на коммите, который требует вашего решения — разрешите конфликты и продолжите, пропустите этот коммит или прервите, чтобы вернуть ветку как было.", "Cherry-picking {0} onto {1}{2}": "Cherry-pick {0} на {1}{2}", + "Choose a model to connect — pick one from the list or type its ID.": "Выберите модель для подключения — из списка или введите её ID.", "Choose the branch it comes from": "Выберите ветку, из которой он исходит", "Choose the branch it goes into": "Выберите ветку, в которую он входит", "Choose the remote branch '{0}' pulls from and pushes to.": "Выберите удалённую ветку, из которой '{0}' получает и в которую отправляет изменения.", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "Сообщение (что и почему)…", "Mistral & Codestral models.": "Модели Mistral и Codestral.", "Mixed": "Смешанный", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID модели для сообщений коммитов и объяснений — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID модели для сообщений коммитов и объяснений — та, что есть в списке вашего провайдера, например llama3.1 или qwen2.5-coder на локальном сервере.", "Modified": "Изменён", "Monaco worker URI was not provided by the host.": "Хост не предоставил URI воркера Monaco.", "More Actions…": "Другие действия…", diff --git a/apps/extension/l10n/bundle.l10n.tr.json b/apps/extension/l10n/bundle.l10n.tr.json index a24bfd1f..90109069 100644 --- a/apps/extension/l10n/bundle.l10n.tr.json +++ b/apps/extension/l10n/bundle.l10n.tr.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "{0} işleme seç-alınıyor", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "{0} işlemeyi seç-alma, sizi gerektiren bir işlemede durdu — çakışmaları çözüp sürdürün, bu işlemeyi atlayın veya dalı olduğu haline geri koymak için iptal edin.", "Cherry-picking {0} onto {1}{2}": "{0}, {1}{2} üzerine seç-alınıyor", + "Choose a model to connect — pick one from the list or type its ID.": "Bağlanmak için bir model seçin — listeden seçin ya da kimliğini yazın.", "Choose the branch it comes from": "Geldiği dalı seçin", "Choose the branch it goes into": "Gideceği dalı seçin", "Choose the remote branch '{0}' pulls from and pushes to.": "'{0}'ın çektiği ve gönderdiği uzak dalı seçin.", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "Mesaj (ne & neden)…", "Mistral & Codestral models.": "Mistral ve Codestral modelleri.", "Mixed": "Karışık", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "İşleme mesajları ve açıklama için Model Kimliği — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "İşleme mesajları ve açıklama için Model Kimliği — sağlayıcınızın listelediği, ör. yerel sunucuda llama3.1 veya qwen2.5-coder.", "Modified": "Değiştirildi", "Monaco worker URI was not provided by the host.": "Monaco işçi URI'si host tarafından sağlanmadı.", "More Actions…": "Daha Fazla Eylem…", diff --git a/apps/extension/l10n/bundle.l10n.zh-cn.json b/apps/extension/l10n/bundle.l10n.zh-cn.json index 91f69f5c..f8abfefa 100644 --- a/apps/extension/l10n/bundle.l10n.zh-cn.json +++ b/apps/extension/l10n/bundle.l10n.zh-cn.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "正在拣选 {0} 个提交", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "拣选 {0} 个提交时停在了一个需要你处理的提交上 — 请解决所有冲突并继续、跳过该提交,或中止以把分支恢复原样。", "Cherry-picking {0} onto {1}{2}": "正在将 {0} 拣选到 {1}{2}", + "Choose a model to connect — pick one from the list or type its ID.": "选择一个模型以连接 — 从列表中选择,或输入其 ID。", "Choose the branch it comes from": "选择它来自的分支", "Choose the branch it goes into": "选择它要进入的分支", "Choose the remote branch '{0}' pulls from and pushes to.": "选择“{0}”拉取和推送所用的远程分支。", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "提交信息(做了什么与为什么)…", "Mistral & Codestral models.": "Mistral 与 Codestral 模型。", "Mixed": "混合重置", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "用于提交信息和解释的模型 ID — gpt-4o-mini、llama3.1、qwen2.5-coder。", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "用于提交信息和解释的模型 ID — 你的提供商所列出的模型,例如本地服务器上的 llama3.1 或 qwen2.5-coder。", "Modified": "已修改", "Monaco worker URI was not provided by the host.": "宿主未提供 Monaco worker 的 URI。", "More Actions…": "更多操作…", diff --git a/apps/extension/l10n/bundle.l10n.zh-tw.json b/apps/extension/l10n/bundle.l10n.zh-tw.json index e0499b13..df055b99 100644 --- a/apps/extension/l10n/bundle.l10n.zh-tw.json +++ b/apps/extension/l10n/bundle.l10n.zh-tw.json @@ -496,6 +496,7 @@ "Cherry-picking {0} commits": "正在揀選 {0} 個提交", "Cherry-picking {0} commits stopped on a commit that needs you — resolve any conflicts and continue, skip that commit, or abort to put the branch back as it was.": "揀選 {0} 個提交時停在了一個需要你處理的提交上 — 請解決所有衝突並繼續、跳過該提交,或中止以把分支恢復原樣。", "Cherry-picking {0} onto {1}{2}": "正在將 {0} 揀選到 {1}{2}", + "Choose a model to connect — pick one from the list or type its ID.": "選擇一個模型以連線 — 從清單中選擇,或輸入其 ID。", "Choose the branch it comes from": "選擇它來自的分支", "Choose the branch it goes into": "選擇它要進入的分支", "Choose the remote branch '{0}' pulls from and pushes to.": "選擇“{0}”拉取和推送所用的遠端分支。", @@ -1329,7 +1330,7 @@ "Message (what & why)…": "提交資訊(做了什麼與為什麼)…", "Mistral & Codestral models.": "Mistral 與 Codestral 模型。", "Mixed": "混合重置", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "用於提交資訊和解釋的模型 ID — gpt-4o-mini、llama3.1、qwen2.5-coder。", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "用於提交資訊和解釋的模型 ID — 你的提供者所列出的模型,例如本機伺服器上的 llama3.1 或 qwen2.5-coder。", "Modified": "已修改", "Monaco worker URI was not provided by the host.": "宿主未提供 Monaco worker 的 URI。", "More Actions…": "更多操作…", diff --git a/apps/extension/package.json b/apps/extension/package.json index 74e30b51..794c4de9 100644 --- a/apps/extension/package.json +++ b/apps/extension/package.json @@ -1457,19 +1457,19 @@ }, "gitstudio.ai.openai.modelFast": { "type": "string", - "default": "gpt-4o-mini", + "default": "", "description": "%config.gitstudio.ai.openai.modelFast.description%", "order": 10 }, "gitstudio.ai.openai.modelMid": { "type": "string", - "default": "gpt-4o-mini", + "default": "", "description": "%config.gitstudio.ai.openai.modelMid.description%", "order": 11 }, "gitstudio.ai.openai.modelDeep": { "type": "string", - "default": "gpt-4o", + "default": "", "description": "%config.gitstudio.ai.openai.modelDeep.description%", "order": 12 } diff --git a/apps/extension/src/ai/aiCommands.ts b/apps/extension/src/ai/aiCommands.ts index 3f7e38e5..4b7c0029 100644 --- a/apps/extension/src/ai/aiCommands.ts +++ b/apps/extension/src/ai/aiCommands.ts @@ -436,7 +436,7 @@ async function configureOpenAi( const model = await promptInput({ title: l10n.t("OpenAI-compatible Model"), - hint: l10n.t("Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder."), + hint: l10n.t("Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server."), value: cfg.get("openai.modelFast", ""), confirmLabel: l10n.t("Continue"), }); diff --git a/apps/extension/src/ai/aiFeatures.ts b/apps/extension/src/ai/aiFeatures.ts index 21bfd483..20f3724c 100644 --- a/apps/extension/src/ai/aiFeatures.ts +++ b/apps/extension/src/ai/aiFeatures.ts @@ -103,6 +103,18 @@ export const ANTHROPIC_KEY_SECRET = "gitstudio.ai.anthropicApiKey"; /** Storage key for the OpenAI-compatible API key (optional). */ export const OPENAI_KEY_SECRET = "gitstudio.ai.openaiApiKey"; +/** + * What the OpenAI model settings defaulted to until they became blank (you + * choose the model now). See AiFeatures.keepFormerOpenAiDefaults. + */ +export const FORMER_OPENAI_DEFAULTS: Readonly> = { + fast: "gpt-4o-mini", + mid: "gpt-4o-mini", + deep: "gpt-4o", +}; +/** globalState key: the former OpenAI defaults were kept for this user. */ +const FORMER_OPENAI_DEFAULTS_KEPT = "gitstudio.ai.formerOpenAiDefaultsKept"; + /** globalState key remembering the user's chosen vscode.lm model id. */ export const LM_MODEL_STATE_KEY = "gitstudio.ai.lmModelId"; @@ -286,6 +298,44 @@ export class AiFeatures implements vscode.Disposable { return overrides; } + /** + * Keep an existing OpenAI setup on the models it was already using. + * + * The OpenAI model settings used to DEFAULT to gpt-4o-mini / gpt-4o, so a + * user who stored a key and never touched them was running on our pick. + * Those defaults are blank now — you choose the model — and without this + * that user's AI would switch off on update. So, once: for each tier they + * never set, the old default is written as their own value. Nothing changes + * for them, and the setting now shows the model they are on, theirs to + * change. Only for someone the defaults were serving: an OpenAI key stored, + * or the provider set to OpenAI. + */ + async keepFormerOpenAiDefaults(): Promise { + const state = this.context.globalState; + if (state.get(FORMER_OPENAI_DEFAULTS_KEPT)) { + return; + } + if (this.secrets.has(OPENAI_KEY_SECRET) || this.providerChoice() === "openai") { + const cfg = this.config(); + for (const [tier, key] of [ + ["fast", "openai.modelFast"], + ["mid", "openai.modelMid"], + ["deep", "openai.modelDeep"], + ] as const) { + const set = cfg.inspect(key); + const unset = + set !== undefined && + set.globalValue === undefined && + set.workspaceValue === undefined && + set.workspaceFolderValue === undefined; + if (unset) { + await cfg.update(key, FORMER_OPENAI_DEFAULTS[tier], vscode.ConfigurationTarget.Global); + } + } + } + await state.update(FORMER_OPENAI_DEFAULTS_KEPT, true); + } + /** Read the OpenAI-compatible base URL + per-tier model IDs from settings. */ private openAiConfig(): OpenAiConfig { const cfg = this.config(); diff --git a/apps/extension/src/ai/aiSettingsPanel.ts b/apps/extension/src/ai/aiSettingsPanel.ts index d5a2ec5e..270efe6a 100644 --- a/apps/extension/src/ai/aiSettingsPanel.ts +++ b/apps/extension/src/ai/aiSettingsPanel.ts @@ -8,6 +8,9 @@ import tokensCss from "../../../../packages/webview-ui/src/styles/tokens.css"; import * as l10n from "@vscode/l10n"; import { l10nWebviewScript } from "@gitstudio/l10n/index"; +/** The panel's providers that speak /chat/completions, and so need a model. */ +const OPENAI_COMPATIBLE_KINDS = new Set(["openai", "openrouter", "groq", "custom", "ollama", "lmstudio"]); + /** Real brand marks (from the app's Lobehub icon set, MIT) — monochrome inline * SVG using currentColor. Keyed by our provider ids; injected into the webview. * Providers without a mark fall back to a codicon. */ @@ -169,6 +172,13 @@ export class AiSettingsPanel { const model = (m.model ?? "").trim(); const key = (m.key ?? "").trim(); const baseUrl = (m.baseUrl ?? "").trim(); + // No model is chosen for you on an OpenAI-compatible connection. The panel + // asks before it sends; this is for any other sender — an empty model + // would blank every tier and leave AI off. + if (OPENAI_COMPATIBLE_KINDS.has(kind) && !model) { + await this.postResult(false, l10n.t("Choose a model to connect — pick one from the list or type its ID.")); + return; + } try { switch (kind) { case "copilot": @@ -437,7 +447,7 @@ export class AiSettingsPanel { blurb:"Local model server. Private, no API key." }, { id:"anthropic", icon:"sparkle", name:"Anthropic", group:"key", fields:["key","model"], model:"claude-sonnet-4-6", keyUrl:"https://console.anthropic.com/settings/keys", blurb:"Claude models. Bring your own API key." }, - { id:"openai", icon:"sparkle", name:"OpenAI", group:"key", fields:["key","model"], baseUrl:"https://api.openai.com/v1", model:"gpt-4o", keyUrl:"https://platform.openai.com/api-keys", + { id:"openai", icon:"sparkle", name:"OpenAI", group:"key", fields:["key","model"], baseUrl:"https://api.openai.com/v1", model:"", keyUrl:"https://platform.openai.com/api-keys", blurb:"GPT models. Bring your own API key." }, { id:"openrouter", icon:"globe", name:"OpenRouter", group:"key", fields:["key","model"], baseUrl:"https://openrouter.ai/api/v1", model:"anthropic/claude-sonnet-4-6", keyUrl:"https://openrouter.ai/keys", blurb:"One key, hundreds of models from every provider." }, @@ -504,10 +514,20 @@ export class AiSettingsPanel { if (p.fields.includes("model") && (p.id === "ollama" || p.id === "lmstudio")) requestDetect(p, inputs); if (inputs.key && p.fields.includes("model")) { inputs.key.addEventListener("blur", () => { if (inputs.key.value.trim()) requestDetect(p, inputs); }); + // A key already stored: list the models now, so there is something to + // pick from without retyping the key. + if (keyPresent(p)) requestDetect(p, inputs); } const actions = el("div", "settings-actions"); const connect = el("button", "btn-primary"); connect.append(glyph("plug"), el("span", null, "Connect")); connect.addEventListener("click", () => { + // No model is chosen FOR you: an OpenAI-compatible connection needs the + // one you pick (Anthropic's blank keeps Claude's per-task defaults). + if (needsModel(p) && inputs.model && !inputs.model.value.trim()) { + note = { ok:false, message:"Choose a model to connect — pick one from the list or type its ID." }; + renderNote(); inputs.model.focus(); + return; + } connect.disabled = true; note = { ok:true, message:"Connecting…" }; vscode.postMessage({ type:"connect", kind:p.id, baseUrl: inputs.baseUrl ? inputs.baseUrl.value.trim() : (p.baseUrl||""), @@ -529,6 +549,9 @@ export class AiSettingsPanel { conn.append(head, editor); return conn; } + /** Whether Connect needs a model typed or picked: every OpenAI-compatible + * provider. Anthropic falls back to Claude's own per-task defaults. */ + function needsModel(p) { return p.fields.includes("model") && p.id !== "anthropic"; } // Model field: an input with a datalist of DISCOVERED models. Detection is // automatic (local servers on open, cloud on key-blur); a plain text link // re-runs it. No icon button — just a suggestion list you can also type into. @@ -538,7 +561,8 @@ export class AiSettingsPanel { const input = document.createElement("input"); input.className = "settings-input"; input.value = (editing && editing.model) || p.model || ""; - input.placeholder = "model name (auto-detected below)"; input.setAttribute("list", "gs-models"); + input.placeholder = needsModel(p) ? "Choose a model — pick from the list or type its ID" : "model name (auto-detected below)"; + input.setAttribute("list", "gs-models"); const list = document.createElement("datalist"); list.id = "gs-models"; row.append(input, list); const hint = el("div", "field-hint"); hint.id = "model-hint"; @@ -709,7 +733,10 @@ export class AiSettingsPanel { if (editorInputs && editorInputs._list) { editorInputs._list.replaceChildren(); for (const id of m.list) { const o = document.createElement("option"); o.value = id; editorInputs._list.append(o); } - if (!editorInputs.model.value && m.list.length) editorInputs.model.value = m.list[0]; + // Filled in only when there is nothing to choose between — a local + // server with one model loaded. It used to take the FIRST of any + // list: alphabetically, an OpenAI key got "babbage-002". + if (!editorInputs.model.value && m.list.length === 1) editorInputs.model.value = m.list[0]; setDetectStatus(m.list.length ? (m.list.length + " model" + (m.list.length === 1 ? "" : "s") + " found — pick one or type.") : "No models found — is the server running / key valid?"); diff --git a/apps/extension/src/ai/openAiProvider.ts b/apps/extension/src/ai/openAiProvider.ts index 78f93169..950d1ff2 100644 --- a/apps/extension/src/ai/openAiProvider.ts +++ b/apps/extension/src/ai/openAiProvider.ts @@ -1,6 +1,8 @@ import { OpenAiSseParser, extractOpenAiText, + isOpenAiReasoningModel, + openAiReasoningEffort, type OpenAiChatResponse, } from "@gitstudio/engine/ai/aiCore"; import type { @@ -49,7 +51,11 @@ export interface OpenAiProviderOptions { interface OpenAiRequestBody { model: string; - max_tokens: number; + /** Every model but OpenAI's reasoning families (see buildBody). */ + max_tokens?: number; + /** OpenAI's reasoning families: they answer `max_tokens` with HTTP 400. */ + max_completion_tokens?: number; + reasoning_effort?: "low" | "high"; messages: Array<{ role: "system" | "user" | "assistant"; content: string }>; stream?: boolean; } @@ -114,11 +120,23 @@ export class OpenAiProvider implements AiProvider { messages.push({ role: "system", content: req.system }); } messages.push({ role: "user", content: req.prompt }); - const body: OpenAiRequestBody = { - model, - max_tokens: this.maxTokensFor(req), - messages, - }; + const body: OpenAiRequestBody = { model, messages }; + // OpenAI's reasoning models (o-series, gpt-5 and later) answer `max_tokens` + // with HTTP 400 and take `max_completion_tokens` — the same rule as the + // desktop's provider, from the one shared helper. Now that no OpenAI + // model is chosen for you, the one you pick is likely to be one of them. + const cap = this.maxTokensFor(req); + if (isOpenAiReasoningModel(model)) { + body.max_completion_tokens = cap; + } else { + body.max_tokens = cap; + } + // Their cap counts hidden thinking too: a short task at the default + // effort can come back empty. These features are short tasks — low. + const effort = openAiReasoningEffort(model, "off", cfg.baseUrl); + if (effort) { + body.reasoning_effort = effort; + } if (stream) { body.stream = true; } diff --git a/apps/extension/src/extension.ts b/apps/extension/src/extension.ts index d89a6e49..b64c762c 100644 --- a/apps/extension/src/extension.ts +++ b/apps/extension/src/extension.ts @@ -413,7 +413,12 @@ export function activate(context: vscode.ExtensionContext): GitStudioApi { // — and never leaves the host (the commit box only gets the result text). const brain = new AiFeatures(context); context.subscriptions.push(brain); - void brain.refreshEnabled(); + // Before the first availability probe: an OpenAI setup that ran on the + // former model defaults keeps them as its own (they are blank now). + void brain + .keepFormerOpenAiDefaults() + .catch(() => undefined) + .then(() => brain.refreshEnabled()); context.subscriptions.push( vscode.commands.registerCommand("gitstudio.ai.setApiKey", () => setApiKey(context, brain), diff --git a/apps/extension/test/aiChooseModel.test.ts b/apps/extension/test/aiChooseModel.test.ts new file mode 100644 index 00000000..870807e1 --- /dev/null +++ b/apps/extension/test/aiChooseModel.test.ts @@ -0,0 +1,195 @@ +// No OpenAI model is chosen for you. The settings defaulted to gpt-4o-mini / +// gpt-4o and the panel's OpenAI card came filled with gpt-4o, so whoever +// connected got our pick — one OpenAI retires on 2027-01-14. Now the model is +// blank until you choose it, from the list your key can use. Pinned here: +// +// · the shipped defaults are blank, and the panel seeds no OpenAI model, +// never fills one in from a list it could choose from, and will not +// Connect without one; +// · a setup that ran on the former defaults keeps them, as its own values, +// so updating does not switch its AI off; +// · the model you pick is spoken to properly: OpenAI's reasoning families +// take `max_completion_tokens` (they answer `max_tokens` with HTTP 400). + +import Module from "node:module"; +import { test, after } from "node:test"; +import assert from "node:assert/strict"; +import { readFileSync } from "node:fs"; +import { fileURLToPath } from "node:url"; +import { OpenAiProvider } from "../src/ai/openAiProvider"; +import { AiSettingsPage, aiStatus } from "./aiSettingsPage"; + +type Resolver = { _resolveFilename: (request: unknown, ...rest: unknown[]) => string }; +const resolver = Module as unknown as Resolver; +const resolve = resolver._resolveFilename; +const STUB = fileURLToPath(new URL("./vscodeStub.cjs", import.meta.url)); +resolver._resolveFilename = function (request: unknown, ...rest: unknown[]) { + return request === "vscode" ? STUB : resolve.call(this, request, ...rest); +}; +/* eslint-disable @typescript-eslint/no-require-imports -- loaded after the stand-in is in place */ +const { AiFeatures, FORMER_OPENAI_DEFAULTS } = require("../src/ai/aiFeatures") as typeof import("../src/ai/aiFeatures"); +/* eslint-enable @typescript-eslint/no-require-imports */ + +const pkg = JSON.parse(readFileSync(fileURLToPath(new URL("../package.json", import.meta.url)), "utf8")) as { + contributes: { configuration: Array<{ properties: Record }> }; +}; +const setting = (id: string) => pkg.contributes.configuration.map((c) => c.properties[id]).find(Boolean); + +test("the OpenAI model settings ship blank", () => { + for (const tier of ["Fast", "Mid", "Deep"]) { + assert.equal(setting(`gitstudio.ai.openai.model${tier}`)?.default, "", tier); + } +}); + +// ── a setup on the former defaults keeps them ────────────────────────────── + +interface Inspected { + globalValue?: string; + workspaceValue?: string; + workspaceFolderValue?: string; +} + +function fakeFeatures(opts: { key: boolean; provider: string; set?: Record }) { + const writes: Record = {}; + const state = new Map(); + const self = { + context: { + globalState: { + get: (k: string) => state.get(k), + update: async (k: string, v: unknown) => void state.set(k, v), + }, + }, + secrets: { has: () => opts.key }, + providerChoice: () => opts.provider, + config: () => ({ + inspect: (key: string) => opts.set?.[key] ?? {}, + update: async (key: string, value: string) => void (writes[key] = value), + }), + }; + const run = () => (AiFeatures.prototype.keepFormerOpenAiDefaults as (this: unknown) => Promise).call(self); + return { run, writes }; +} + +test("an OpenAI key on the former defaults keeps them as its own values, once", async () => { + const f = fakeFeatures({ key: true, provider: "auto", set: { "openai.modelDeep": { globalValue: "my-model" } } }); + await f.run(); + assert.deepEqual(f.writes, { + "openai.modelFast": FORMER_OPENAI_DEFAULTS.fast, + "openai.modelMid": FORMER_OPENAI_DEFAULTS.mid, + }, "a tier the user set is theirs already"); + assert.deepEqual(FORMER_OPENAI_DEFAULTS, { fast: "gpt-4o-mini", mid: "gpt-4o-mini", deep: "gpt-4o" }); + for (const k of Object.keys(f.writes)) delete f.writes[k]; + await f.run(); + assert.deepEqual(f.writes, {}, "only ever once"); +}); + +test("the provider set to OpenAI keeps them too; nobody else gets a model written", async () => { + const chosen = fakeFeatures({ key: false, provider: "openai" }); + await chosen.run(); + assert.equal(Object.keys(chosen.writes).length, 3); + const other = fakeFeatures({ key: false, provider: "auto" }); + await other.run(); + assert.deepEqual(other.writes, {}, "never used OpenAI: it chooses for itself"); + const workspace = fakeFeatures({ + key: true, + provider: "openai", + set: { + "openai.modelFast": { workspaceValue: "w" }, + "openai.modelMid": { workspaceFolderValue: "f" }, + "openai.modelDeep": { globalValue: "g" }, + }, + }); + await workspace.run(); + assert.deepEqual(workspace.writes, {}, "a value at any scope is the user's"); +}); + +// ── the model you pick is spoken to properly ────────────────────────────── + +function capture(model: string, baseUrl = "https://api.openai.com/v1") { + const bodies: Record[] = []; + const p = new OpenAiProvider({ + getKey: async () => "k", + config: () => ({ baseUrl, models: { fast: model, mid: "", deep: "" } }), + fetchImpl: (async (_u: unknown, init: { body: string }) => { + bodies.push(JSON.parse(init.body) as Record); + return new Response(JSON.stringify({ choices: [{ message: { content: "ok" }, finish_reason: "stop" }] })); + }) as unknown as typeof fetch, + }); + return { p, bodies }; +} + +test("a reasoning model gets max_completion_tokens and low effort; others keep max_tokens", async () => { + for (const model of ["gpt-6.1-terra", "gpt-5-mini", "o3"]) { + const { p, bodies } = capture(model); + assert.equal(await p.complete({ prompt: "hi", model: "fast" }), "ok"); + assert.equal(bodies[0]!.max_tokens, undefined, model); + assert.equal(bodies[0]!.max_completion_tokens, 512, model); + assert.equal(bodies[0]!.reasoning_effort, "low", model); + } + for (const model of ["gpt-4o", "llama3.1", "openai/gpt-5"]) { + const { p, bodies } = capture(model, model.includes("/") ? "https://openrouter.ai/api/v1" : "https://api.openai.com/v1"); + await p.complete({ prompt: "hi", model: "fast" }); + assert.equal(bodies[0]!.max_tokens, 512, model); + assert.equal(bodies[0]!.max_completion_tokens, undefined, model); + assert.equal(bodies[0]!.reasoning_effort, undefined, model); + } +}); + +// ── the panel ──────────────────────────────────────────────────────────── + +const chrome = AiSettingsPage.chrome(); +const skip = chrome ? false : "no windowless Chrome on this machine (set GS_CHROME)"; +const opened: AiSettingsPage[] = []; +after(async () => { + for (const p of opened) await p.close(); +}); + +/** Open the panel's editor for the provider card named `name`. */ +async function editorFor(name: string, status: Record = aiStatus()): Promise { + const page = await AiSettingsPage.open("dark"); + opened.push(page); + await page.send({ type: "status", status }); + const clicked = await page.eval(`(function () { + var card = Array.from(document.querySelectorAll(".ai-prov-card")).find(function (c) { + return c.querySelector(".ai-prov-name").textContent.indexOf(${JSON.stringify(name)}) === 0; + }); + if (!card) return false; + card.click(); + return true; + })()`); + assert.ok(clicked, `a ${name} card`); + return page; +} + +const modelValue = (page: AiSettingsPage) => + page.eval(`document.querySelector(".ai-conn-editor input[list=gs-models]").value`); +const connects = (page: AiSettingsPage) => + page.eval(`window.__posted.filter(function (m) { return m.type === "connect"; }).length`); + +test("the OpenAI card seeds no model, and Connect asks for one instead of sending", { skip }, async () => { + const page = await editorFor("OpenAI"); + assert.equal(await modelValue(page), "", "nothing chosen for you"); + await page.eval(`document.querySelector(".ai-conn-editor .btn-primary").click()`); + assert.equal(await connects(page), 0, "nothing was sent"); + const note = await page.eval(`document.getElementById("note").textContent`); + assert.match(note, /Choose a model/); + assert.equal(await page.eval(`document.activeElement === document.querySelector(".ai-conn-editor input[list=gs-models]")`), true); + // Picked: it goes, with the model you picked. + await page.eval(`document.querySelector(".ai-conn-editor input[list=gs-models]").value = "gpt-6.1-terra"`); + await page.eval(`document.querySelector(".ai-conn-editor .btn-primary").click()`); + const sent = await page.eval<{ model: string }>(`window.__posted.filter(function (m) { return m.type === "connect"; })[0]`); + assert.equal(sent.model, "gpt-6.1-terra"); +}); + +test("a detected list is offered, never picked from — unless there is only one", { skip }, async () => { + const page = await editorFor("OpenAI", aiStatus({ hasOpenaiKey: true })); + const asked = await page.eval(`window.__posted.filter(function (m) { return m.type === "detectModels"; }).length`); + assert.ok(asked >= 1, "a stored key lists the models straight away"); + await page.send({ type: "models", kind: "openai", list: ["babbage-002", "gpt-6-luna", "gpt-6.1-terra"] }); + assert.equal(await modelValue(page), "", "the first of a list is not a choice"); + assert.equal(await page.eval(`document.querySelectorAll("#gs-models option").length`), 3); + + const local = await editorFor("LM Studio"); + await local.send({ type: "models", kind: "lmstudio", list: ["qwen2.5-coder"] }); + assert.equal(await modelValue(local), "qwen2.5-coder", "one loaded model: nothing to choose between"); +}); diff --git a/apps/extension/test/settingsLayout.test.ts b/apps/extension/test/settingsLayout.test.ts index 97088b40..d23c64ec 100644 --- a/apps/extension/test/settingsLayout.test.ts +++ b/apps/extension/test/settingsLayout.test.ts @@ -51,9 +51,10 @@ const SHIPPED: Record = { "gitstudio.worktrees.prefixWithProjectName": false, "gitstudio.ai.provider": "auto", "gitstudio.ai.openai.baseUrl": "https://api.openai.com/v1", - "gitstudio.ai.openai.modelFast": "gpt-4o-mini", - "gitstudio.ai.openai.modelMid": "gpt-4o-mini", - "gitstudio.ai.openai.modelDeep": "gpt-4o", + // Blank: no OpenAI model is chosen for you (aiChooseModel.test.ts). + "gitstudio.ai.openai.modelFast": "", + "gitstudio.ai.openai.modelMid": "", + "gitstudio.ai.openai.modelDeep": "", "gitstudio.ai.anthropicModelFast": "claude-haiku-4-5", "gitstudio.ai.anthropicModelMid": "claude-sonnet-4-6", "gitstudio.ai.anthropicModelDeep": "claude-opus-4-8", diff --git a/l10n/cs.json b/l10n/cs.json index e56081c4..1f762d7e 100644 --- a/l10n/cs.json +++ b/l10n/cs.json @@ -433,6 +433,7 @@ "Add to filter": "Přidat do filtru", "Add to your review": "Přidat do revize", "Add variable": "Přidat proměnnou", + "Add your API key and choose a model to finish.": "Dokončete přidáním API klíče a výběrem modelu.", "Add your API key to finish.": "Dokončete přidáním API klíče.", "Add {0} after {1}": "Přidat {0} po {1}", "Add {0} to the filter": "Přidat {0} do filtru", @@ -794,7 +795,10 @@ "Choose a base…": "Vybrat základ…", "Choose a folder to clone into": "Vybrat složku pro naklonování", "Choose a folder…": "Vybrat složku…", + "Choose a model to connect — pick one from the list or type its ID.": "Pro připojení vyberte model — ze seznamu, nebo zadejte jeho ID.", + "Choose a model to finish.": "Dokončete výběrem modelu.", "Choose editors…": "Vybrat editory…", + "Choose from the list, or type a model ID": "Vyberte ze seznamu, nebo zadejte ID modelu", "Choose how GitStudio looks. “System” follows your OS.": "Vyberte, jak GitStudio vypadá. „Systém“ se řídí vaším OS.", "Choose location…": "Vybrat umístění…", "Choose the branch it comes from": "Vyberte větev, ze které to pochází", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Modely Mistral a Codestral.", "Mixed": "Smíšené", "Model": "Model", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID modelu pro commit zprávy a vysvětlení — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID modelu pro commit zprávy a vysvětlení — ten, který nabízí váš poskytovatel, např. llama3.1 nebo qwen2.5-coder na lokálním serveru.", "Model removed.": "Model odstraněn.", "Modified": "Upraveno", "Monaco worker URI was not provided by the host.": "Hostitel neposkytl URI pracovního procesu Monaco.", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "{0} nemá žádný vzdálený repozitář GitHub, kam by se mohlo odeslat.", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} nemá větev '{1}'. Pushněte větev, abyste ji tam publikovali, nebo vyberte větev, kterou {0} má.", "{0} has no commits that {1} doesn't.": "{0} nemá žádné commity, které by {1} neměl.", + "{0} has no parent {1} to take the merge against.": "{0} nemá rodiče {1}, vůči kterému by se merge vzal.", "{0} has no pull request #{1}.": "{0} nemá pull request #{1}.", "{0} has no text to merge here.": "{0} tady nemá žádný text ke sloučení.", "{0} has no tracked files at HEAD.": "{0} nemá žádné sledované soubory v HEAD.", diff --git a/l10n/de.json b/l10n/de.json index 192e68d1..0b1c0d2f 100644 --- a/l10n/de.json +++ b/l10n/de.json @@ -433,6 +433,7 @@ "Add to filter": "Zum Filter hinzufügen", "Add to your review": "Zum Review hinzufügen", "Add variable": "Variable hinzufügen", + "Add your API key and choose a model to finish.": "API-Schlüssel hinzufügen und ein Modell wählen, um abzuschließen.", "Add your API key to finish.": "API-Schlüssel hinzufügen, um abzuschließen.", "Add {0} after {1}": "{0} nach {1} hinzufügen", "Add {0} to the filter": "{0} zum Filter hinzufügen", @@ -794,7 +795,10 @@ "Choose a base…": "Eine Basis wählen…", "Choose a folder to clone into": "Einen Ordner zum Klonen wählen", "Choose a folder…": "Einen Ordner wählen…", + "Choose a model to connect — pick one from the list or type its ID.": "Wähle ein Modell, um zu verbinden — aus der Liste oder per ID.", + "Choose a model to finish.": "Wähle ein Modell, um abzuschließen.", "Choose editors…": "Editoren wählen…", + "Choose from the list, or type a model ID": "Aus der Liste wählen oder eine Modell-ID eingeben", "Choose how GitStudio looks. “System” follows your OS.": "Wählen, wie GitStudio aussieht. „System“ folgt dem Betriebssystem.", "Choose location…": "Speicherort wählen…", "Choose the branch it comes from": "Den Branch auswählen, von dem es kommt", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Mistral- & Codestral-Modelle.", "Mixed": "Mixed", "Model": "Modell", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "Modell-ID für Commit-Nachrichten und Erklärungen — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "Modell-ID für Commit-Nachrichten und Erklärungen — die dein Anbieter auflistet, z. B. llama3.1 oder qwen2.5-coder auf einem lokalen Server.", "Model removed.": "Modell entfernt.", "Modified": "Geändert", "Monaco worker URI was not provided by the host.": "Die Monaco-Worker-URI wurde vom Host nicht bereitgestellt.", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "{0} hat kein GitHub-Remote, zu dem gepusht werden könnte.", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} hat keinen Branch namens '{1}'. Den Branch pushen, um ihn dort zu veröffentlichen, oder einen Branch wählen, den {0} hat.", "{0} has no commits that {1} doesn't.": "{0} hat keine Commits, die {1} nicht hat.", + "{0} has no parent {1} to take the merge against.": "{0} hat keinen Parent-Commit {1}, gegenüber dem der Merge genommen werden kann.", "{0} has no pull request #{1}.": "{0} hat keinen Pull Request #{1}.", "{0} has no text to merge here.": "{0} hat hier keinen Text zum Mergen.", "{0} has no tracked files at HEAD.": "{0} hat keine verfolgten Dateien bei HEAD.", diff --git a/l10n/es.json b/l10n/es.json index 3aab03c6..01895bfb 100644 --- a/l10n/es.json +++ b/l10n/es.json @@ -433,6 +433,7 @@ "Add to filter": "Agregar al filtro", "Add to your review": "Añadir a tu revisión", "Add variable": "Añadir variable", + "Add your API key and choose a model to finish.": "Añade tu clave de API y elige un modelo para terminar.", "Add your API key to finish.": "Añade tu clave de API para terminar.", "Add {0} after {1}": "Agregar {0} después de {1}", "Add {0} to the filter": "Agregar {0} al filtro", @@ -794,7 +795,10 @@ "Choose a base…": "Elegir una base…", "Choose a folder to clone into": "Elige una carpeta para clonar", "Choose a folder…": "Elegir una carpeta…", + "Choose a model to connect — pick one from the list or type its ID.": "Elige un modelo para conectar: de la lista o escribiendo su ID.", + "Choose a model to finish.": "Elige un modelo para terminar.", "Choose editors…": "Elegir editores…", + "Choose from the list, or type a model ID": "Elige de la lista o escribe un ID de modelo", "Choose how GitStudio looks. “System” follows your OS.": "Elige el aspecto de GitStudio. “Sistema” sigue a tu SO.", "Choose location…": "Elegir ubicación…", "Choose the branch it comes from": "Elige la rama de la que viene", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Modelos Mistral y Codestral.", "Mixed": "Mixto", "Model": "Modelo", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID del modelo para mensajes de commit y explicaciones: gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID del modelo para mensajes de commit y explicaciones: el que muestra tu proveedor, p. ej. llama3.1 o qwen2.5-coder en un servidor local.", "Model removed.": "Modelo eliminado.", "Modified": "Modificado", "Monaco worker URI was not provided by the host.": "El host no proporcionó el URI del worker de Monaco.", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "{0} no tiene remoto de GitHub al que publicarse.", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} no tiene ninguna rama llamada '{1}'. Envía la rama para publicarla allí, o elige una rama que {0} tenga.", "{0} has no commits that {1} doesn't.": "{0} no tiene commits que {1} no tenga.", + "{0} has no parent {1} to take the merge against.": "{0} no tiene un padre {1} respecto al que tomar la fusión.", "{0} has no pull request #{1}.": "{0} no tiene el pull request #{1}.", "{0} has no text to merge here.": "{0} no tiene texto que fusionar aquí.", "{0} has no tracked files at HEAD.": "{0} no tiene archivos rastreados en HEAD.", diff --git a/l10n/fr.json b/l10n/fr.json index 22966d6c..8464f268 100644 --- a/l10n/fr.json +++ b/l10n/fr.json @@ -433,6 +433,7 @@ "Add to filter": "Ajouter au filtre", "Add to your review": "Ajouter à votre revue", "Add variable": "Ajouter une variable", + "Add your API key and choose a model to finish.": "Ajoutez votre clé API et choisissez un modèle pour terminer.", "Add your API key to finish.": "Ajoutez votre clé API pour terminer.", "Add {0} after {1}": "Ajouter {0} après {1}", "Add {0} to the filter": "Ajouter {0} au filtre", @@ -794,7 +795,10 @@ "Choose a base…": "Choisir une base…", "Choose a folder to clone into": "Choisir un dossier dans lequel cloner", "Choose a folder…": "Choisir un dossier…", + "Choose a model to connect — pick one from the list or type its ID.": "Choisissez un modèle pour vous connecter — dans la liste ou en saisissant son ID.", + "Choose a model to finish.": "Choisissez un modèle pour terminer.", "Choose editors…": "Choisir des éditeurs…", + "Choose from the list, or type a model ID": "Choisissez dans la liste ou saisissez un ID de modèle", "Choose how GitStudio looks. “System” follows your OS.": "Choisissez l'apparence de GitStudio. « Système » suit votre OS.", "Choose location…": "Choisir l'emplacement…", "Choose the branch it comes from": "Choisissez la branche d'où elle vient", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Modèles Mistral et Codestral.", "Mixed": "Mixed", "Model": "Modèle", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID de modèle pour les messages de commit et les explications — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID de modèle pour les messages de commit et les explications — celui que liste votre fournisseur, p. ex. llama3.1 ou qwen2.5-coder sur un serveur local.", "Model removed.": "Modèle retiré.", "Modified": "Modifié", "Monaco worker URI was not provided by the host.": "L'URI du worker Monaco n'a pas été fournie par l'hôte.", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "{0} n'a aucun dépôt distant GitHub vers lequel être poussé.", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} n'a pas de branche nommée '{1}'. Poussez la branche pour l'y publier, ou choisissez une branche que {0} possède.", "{0} has no commits that {1} doesn't.": "{0} n'a aucun commit que {1} n'a pas.", + "{0} has no parent {1} to take the merge against.": "{0} n'a pas de parent {1} par rapport auquel prendre la fusion.", "{0} has no pull request #{1}.": "{0} n'a aucune pull request #{1}.", "{0} has no text to merge here.": "{0} n'a aucun texte à fusionner ici.", "{0} has no tracked files at HEAD.": "{0} n'a aucun fichier suivi à HEAD.", diff --git a/l10n/it.json b/l10n/it.json index 7c1bc257..3d5eab56 100644 --- a/l10n/it.json +++ b/l10n/it.json @@ -433,6 +433,7 @@ "Add to filter": "Aggiungi al filtro", "Add to your review": "Aggiungi alla tua revisione", "Add variable": "Aggiungi variabile", + "Add your API key and choose a model to finish.": "Aggiungi la tua chiave API e scegli un modello per completare.", "Add your API key to finish.": "Aggiungi la tua chiave API per completare.", "Add {0} after {1}": "Aggiungi {0} dopo {1}", "Add {0} to the filter": "Aggiungi {0} al filtro", @@ -794,7 +795,10 @@ "Choose a base…": "Scegli una base…", "Choose a folder to clone into": "Scegli una cartella in cui clonare", "Choose a folder…": "Scegli una cartella…", + "Choose a model to connect — pick one from the list or type its ID.": "Scegli un modello per connetterti: dall'elenco o digitandone l'ID.", + "Choose a model to finish.": "Scegli un modello per completare.", "Choose editors…": "Scegli editor…", + "Choose from the list, or type a model ID": "Scegli dall'elenco o digita l'ID di un modello", "Choose how GitStudio looks. “System” follows your OS.": "Scegli l'aspetto di GitStudio. “Sistema” segue il tuo sistema operativo.", "Choose location…": "Scegli posizione…", "Choose the branch it comes from": "Scegli il ramo da cui proviene", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Modelli Mistral e Codestral.", "Mixed": "Mixed", "Model": "Modello", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID del modello per i messaggi di commit e la spiegazione — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID del modello per i messaggi di commit e la spiegazione — quello elencato dal tuo provider, ad es. llama3.1 o qwen2.5-coder su un server locale.", "Model removed.": "Modello rimosso.", "Modified": "Modificato", "Monaco worker URI was not provided by the host.": "L'URI del worker Monaco non è stato fornito dall'host.", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "{0} non ha un remoto GitHub verso cui eseguire il push.", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} non ha un ramo chiamato '{1}'. Esegui il push del ramo per pubblicarlo lì, oppure scegli un ramo che {0} ha.", "{0} has no commits that {1} doesn't.": "{0} non ha commit che {1} non ha.", + "{0} has no parent {1} to take the merge against.": "{0} non ha un genitore {1} rispetto a cui prendere il merge.", "{0} has no pull request #{1}.": "{0} non ha la pull request #{1}.", "{0} has no text to merge here.": "{0} non ha testo da unire qui.", "{0} has no tracked files at HEAD.": "{0} non ha file tracciati a HEAD.", diff --git a/l10n/ja.json b/l10n/ja.json index a66fa284..1eaf9d5f 100644 --- a/l10n/ja.json +++ b/l10n/ja.json @@ -433,6 +433,7 @@ "Add to filter": "フィルターに追加", "Add to your review": "レビューに追加", "Add variable": "変数を追加", + "Add your API key and choose a model to finish.": "完了するには API キーを追加し、モデルを選んでください。", "Add your API key to finish.": "完了するには API キーを追加してください。", "Add {0} after {1}": "{1} の後に {0} を追加", "Add {0} to the filter": "{0} をフィルターに追加", @@ -794,7 +795,10 @@ "Choose a base…": "ベースを選択…", "Choose a folder to clone into": "クローン先のフォルダーを選択", "Choose a folder…": "フォルダーを選択…", + "Choose a model to connect — pick one from the list or type its ID.": "接続するにはモデルを選んでください — 一覧から選ぶか ID を入力します。", + "Choose a model to finish.": "完了するにはモデルを選んでください。", "Choose editors…": "エディターを選択…", + "Choose from the list, or type a model ID": "一覧から選ぶか、モデル ID を入力", "Choose how GitStudio looks. “System” follows your OS.": "GitStudio の見た目を選択します。「システム」は OS の設定に従います。", "Choose location…": "保存先を選択…", "Choose the branch it comes from": "取り込み元のブランチを選択", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Mistral & Codestral モデル。", "Mixed": "混在", "Model": "モデル", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "コミットメッセージと説明に使うモデル ID — gpt-4o-mini、llama3.1、qwen2.5-coder など。", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "コミットメッセージと説明に使うモデル ID — プロバイダーが一覧に出すもの。ローカルサーバーなら llama3.1、qwen2.5-coder など。", "Model removed.": "モデルを削除しました。", "Modified": "変更あり", "Monaco worker URI was not provided by the host.": "Monaco ワーカーの URI がホストから提供されませんでした。", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "{0} にはプッシュ先のGitHubリモートがありません。", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} には '{1}' という名前のブランチがありません。ブランチをプッシュしてそこに公開するか、{0} にあるブランチを選択してください。", "{0} has no commits that {1} doesn't.": "{0} には {1} にないコミットはありません。", + "{0} has no parent {1} to take the merge against.": "{0} には、マージの基準にする親 {1} がありません。", "{0} has no pull request #{1}.": "{0} にはプルリクエスト #{1} はありません。", "{0} has no text to merge here.": "{0} にはここでマージするテキストがありません。", "{0} has no tracked files at HEAD.": "{0} には HEAD に追跡されているファイルがありません。", diff --git a/l10n/ko.json b/l10n/ko.json index 7641adb6..38b94dac 100644 --- a/l10n/ko.json +++ b/l10n/ko.json @@ -433,6 +433,7 @@ "Add to filter": "필터에 추가", "Add to your review": "리뷰에 추가", "Add variable": "변수 추가", + "Add your API key and choose a model to finish.": "완료하려면 API 키를 추가하고 모델을 선택하세요.", "Add your API key to finish.": "완료하려면 API 키를 추가하세요.", "Add {0} after {1}": "{1} 뒤에 {0} 추가", "Add {0} to the filter": "필터에 {0} 추가", @@ -794,7 +795,10 @@ "Choose a base…": "기준 선택…", "Choose a folder to clone into": "클론할 폴더 선택", "Choose a folder…": "폴더 선택…", + "Choose a model to connect — pick one from the list or type its ID.": "연결하려면 모델을 선택하세요 — 목록에서 고르거나 ID를 입력하세요.", + "Choose a model to finish.": "완료하려면 모델을 선택하세요.", "Choose editors…": "편집기 선택…", + "Choose from the list, or type a model ID": "목록에서 선택하거나 모델 ID를 입력하세요", "Choose how GitStudio looks. “System” follows your OS.": "GitStudio의 모양을 선택하세요. “시스템”은 OS를 따릅니다.", "Choose location…": "위치 선택…", "Choose the branch it comes from": "출발 브랜치 선택", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Mistral 및 Codestral 모델.", "Mixed": "혼합", "Model": "모델", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "커밋 메시지 및 설명용 모델 ID — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "커밋 메시지 및 설명용 모델 ID — 공급자가 나열하는 모델, 예: 로컬 서버의 llama3.1 또는 qwen2.5-coder.", "Model removed.": "모델을 제거했습니다.", "Modified": "수정됨", "Monaco worker URI was not provided by the host.": "호스트가 Monaco worker URI를 제공하지 않았습니다.", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "{0}에는 푸시할 GitHub 원격이 없습니다.", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0}에 '{1}'(이)라는 브랜치가 없습니다. 브랜치를 푸시해 그곳에 게시하거나, {0}에 있는 브랜치를 선택하세요.", "{0} has no commits that {1} doesn't.": "{0}에는 {1}에 없는 커밋이 없습니다.", + "{0} has no parent {1} to take the merge against.": "{0}에는 병합의 기준이 될 부모 {1}이(가) 없습니다.", "{0} has no pull request #{1}.": "{0}에 풀 리퀘스트 #{1}이 없습니다.", "{0} has no text to merge here.": "{0}에는 여기서 병합할 텍스트가 없습니다.", "{0} has no tracked files at HEAD.": "{0}에는 HEAD에서 추적되는 파일이 없습니다.", diff --git a/l10n/pl.json b/l10n/pl.json index b305bcbc..55fe0645 100644 --- a/l10n/pl.json +++ b/l10n/pl.json @@ -433,6 +433,7 @@ "Add to filter": "Dodaj do filtra", "Add to your review": "Dodaj do swojego review", "Add variable": "Dodaj zmienną", + "Add your API key and choose a model to finish.": "Dodaj swój klucz API i wybierz model, aby zakończyć.", "Add your API key to finish.": "Dodaj swój klucz API, aby zakończyć.", "Add {0} after {1}": "Dodaj {0} po {1}", "Add {0} to the filter": "Dodaj {0} do filtra", @@ -794,7 +795,10 @@ "Choose a base…": "Wybierz bazę…", "Choose a folder to clone into": "Wybierz folder do sklonowania", "Choose a folder…": "Wybierz folder…", + "Choose a model to connect — pick one from the list or type its ID.": "Wybierz model, aby się połączyć — z listy lub wpisując jego ID.", + "Choose a model to finish.": "Wybierz model, aby zakończyć.", "Choose editors…": "Wybierz edytory…", + "Choose from the list, or type a model ID": "Wybierz z listy lub wpisz ID modelu", "Choose how GitStudio looks. “System” follows your OS.": "Wybierz, jak wygląda GitStudio. „System” śledzi system operacyjny.", "Choose location…": "Wybierz lokalizację…", "Choose the branch it comes from": "Wybierz branch, z którego pochodzi", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Modele Mistral i Codestral.", "Mixed": "Mieszany", "Model": "Model", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID modelu do treści commitów i wyjaśnień — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID modelu do treści commitów i wyjaśnień — ten, który podaje Twój dostawca, np. llama3.1 lub qwen2.5-coder na lokalnym serwerze.", "Model removed.": "Model usunięty.", "Modified": "Zmodyfikowano", "Monaco worker URI was not provided by the host.": "Host nie podał URI workera Monaco.", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "{0} nie ma zdalnego repozytorium GitHub, do którego można wypchnąć.", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} nie ma brancha o nazwie '{1}'. Wypchnij branch, aby go tam opublikować, albo wybierz branch, który {0} ma.", "{0} has no commits that {1} doesn't.": "{0} nie ma commitów, których nie ma {1}.", + "{0} has no parent {1} to take the merge against.": "{0} nie ma rodzica {1}, względem którego można wziąć merge.", "{0} has no pull request #{1}.": "{0} nie ma pull requesta #{1}.", "{0} has no text to merge here.": "{0} nie ma tu tekstu do scalenia.", "{0} has no tracked files at HEAD.": "{0} nie ma śledzonych plików w HEAD.", diff --git a/l10n/pt-br.json b/l10n/pt-br.json index 7f2228b5..4f412b3c 100644 --- a/l10n/pt-br.json +++ b/l10n/pt-br.json @@ -433,6 +433,7 @@ "Add to filter": "Adicionar ao filtro", "Add to your review": "Adicionar à sua revisão", "Add variable": "Adicionar variável", + "Add your API key and choose a model to finish.": "Adicione sua chave de API e escolha um modelo para concluir.", "Add your API key to finish.": "Adicione sua chave de API para concluir.", "Add {0} after {1}": "Adicionar {0} depois de {1}", "Add {0} to the filter": "Adicionar {0} ao filtro", @@ -794,7 +795,10 @@ "Choose a base…": "Escolher uma base…", "Choose a folder to clone into": "Escolher uma pasta para clonar", "Choose a folder…": "Escolher uma pasta…", + "Choose a model to connect — pick one from the list or type its ID.": "Escolha um modelo para conectar — da lista ou digitando o ID.", + "Choose a model to finish.": "Escolha um modelo para concluir.", "Choose editors…": "Escolher editores…", + "Choose from the list, or type a model ID": "Escolha da lista ou digite o ID de um modelo", "Choose how GitStudio looks. “System” follows your OS.": "Escolha a aparência do GitStudio. “Sistema” segue o seu SO.", "Choose location…": "Escolher local…", "Choose the branch it comes from": "Escolha o branch de onde ele vem", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Modelos Mistral & Codestral.", "Mixed": "Misto", "Model": "Modelo", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID do modelo para mensagens de commit e explicação — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID do modelo para mensagens de commit e explicação — o que seu provedor lista, p. ex. llama3.1 ou qwen2.5-coder em um servidor local.", "Model removed.": "Modelo removido.", "Modified": "Modificado", "Monaco worker URI was not provided by the host.": "A URI do worker do Monaco não foi fornecida pelo host.", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "{0} não tem remoto do GitHub para onde fazer push.", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} não tem nenhum branch chamado '{1}'. Envie o branch para publicá-lo lá, ou escolha um branch que {0} tenha.", "{0} has no commits that {1} doesn't.": "{0} não tem commits que {1} não tenha.", + "{0} has no parent {1} to take the merge against.": "{0} não tem um pai {1} em relação ao qual aplicar o merge.", "{0} has no pull request #{1}.": "{0} não tem a pull request #{1}.", "{0} has no text to merge here.": "{0} não tem texto para mesclar aqui.", "{0} has no tracked files at HEAD.": "{0} não tem arquivos rastreados no HEAD.", diff --git a/l10n/ru.json b/l10n/ru.json index 097aeca6..03d6dbab 100644 --- a/l10n/ru.json +++ b/l10n/ru.json @@ -433,6 +433,7 @@ "Add to filter": "Добавить в фильтр", "Add to your review": "Добавить в своё ревью", "Add variable": "Добавить переменную", + "Add your API key and choose a model to finish.": "Добавьте свой API-ключ и выберите модель, чтобы закончить.", "Add your API key to finish.": "Добавьте свой API-ключ, чтобы закончить.", "Add {0} after {1}": "Добавить {0} после {1}", "Add {0} to the filter": "Добавить {0} в фильтр", @@ -794,7 +795,10 @@ "Choose a base…": "Выбрать базовую…", "Choose a folder to clone into": "Выбрать папку для клонирования", "Choose a folder…": "Выбрать папку…", + "Choose a model to connect — pick one from the list or type its ID.": "Выберите модель для подключения — из списка или введите её ID.", + "Choose a model to finish.": "Выберите модель, чтобы закончить.", "Choose editors…": "Выбрать редакторы…", + "Choose from the list, or type a model ID": "Выберите из списка или введите ID модели", "Choose how GitStudio looks. “System” follows your OS.": "Выберите, как будет выглядеть GitStudio. «Системная» следует за ОС.", "Choose location…": "Выбрать расположение…", "Choose the branch it comes from": "Выберите ветку, из которой он исходит", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Модели Mistral и Codestral.", "Mixed": "Смешанный", "Model": "Модель", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "ID модели для сообщений коммитов и объяснений — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "ID модели для сообщений коммитов и объяснений — та, что есть в списке вашего провайдера, например llama3.1 или qwen2.5-coder на локальном сервере.", "Model removed.": "Модель удалена.", "Modified": "Изменён", "Monaco worker URI was not provided by the host.": "Хост не предоставил URI воркера Monaco.", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "У {0} нет удалённого репозитория GitHub, в который можно отправить.", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "В {0} нет ветки '{1}'. Отправьте ветку, чтобы опубликовать её там, или выберите ветку, которая есть в {0}.", "{0} has no commits that {1} doesn't.": "В {0} нет коммитов, которых нет в {1}.", + "{0} has no parent {1} to take the merge against.": "У {0} нет родителя {1}, относительно которого можно взять слияние.", "{0} has no pull request #{1}.": "В {0} нет pull request #{1}.", "{0} has no text to merge here.": "В {0} нет текста для слияния здесь.", "{0} has no tracked files at HEAD.": "В {0} нет отслеживаемых файлов в HEAD.", diff --git a/l10n/tr.json b/l10n/tr.json index 5ffebc6f..c6746299 100644 --- a/l10n/tr.json +++ b/l10n/tr.json @@ -433,6 +433,7 @@ "Add to filter": "Filtreye ekle", "Add to your review": "İncelemenize ekle", "Add variable": "Değişken ekle", + "Add your API key and choose a model to finish.": "Bitirmek için API anahtarınızı ekleyin ve bir model seçin.", "Add your API key to finish.": "Bitirmek için API anahtarınızı ekleyin.", "Add {0} after {1}": "{1}'den sonra {0} ekle", "Add {0} to the filter": "{0}'i filtreye ekle", @@ -794,7 +795,10 @@ "Choose a base…": "Bir taban seçin…", "Choose a folder to clone into": "Kopyalanacak bir klasör seçin", "Choose a folder…": "Bir klasör seçin…", + "Choose a model to connect — pick one from the list or type its ID.": "Bağlanmak için bir model seçin — listeden seçin ya da kimliğini yazın.", + "Choose a model to finish.": "Bitirmek için bir model seçin.", "Choose editors…": "Düzenleyici seçin…", + "Choose from the list, or type a model ID": "Listeden seçin veya bir model kimliği yazın", "Choose how GitStudio looks. “System” follows your OS.": "GitStudio'nun nasıl göründüğünü seçin. “Sistem” işletim sisteminizi takip eder.", "Choose location…": "Konum seçin…", "Choose the branch it comes from": "Geldiği dalı seçin", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Mistral ve Codestral modelleri.", "Mixed": "Karışık", "Model": "Model", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "İşleme mesajları ve açıklama için Model Kimliği — gpt-4o-mini, llama3.1, qwen2.5-coder.", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "İşleme mesajları ve açıklama için Model Kimliği — sağlayıcınızın listelediği, ör. yerel sunucuda llama3.1 veya qwen2.5-coder.", "Model removed.": "Model kaldırıldı.", "Modified": "Değiştirildi", "Monaco worker URI was not provided by the host.": "Monaco işçi URI'si host tarafından sağlanmadı.", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "{0}'ın gönderilebileceği bir GitHub uzak konumu yok.", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} üzerinde '{1}' adında bir dal yok. Orada yayınlamak için dalı gönderin ya da {0} üzerinde bulunan bir dal seçin.", "{0} has no commits that {1} doesn't.": "{0}'da {1}'de olmayan işleme yok.", + "{0} has no parent {1} to take the merge against.": "{0} için birleştirmenin göre alınacağı {1} ebeveyni yok.", "{0} has no pull request #{1}.": "{0}'da #{1} çekme isteği yok.", "{0} has no text to merge here.": "{0}'da burada birleştirilecek metin yok.", "{0} has no tracked files at HEAD.": "{0}'ın HEAD'de izlenen dosyası yok.", diff --git a/l10n/zh-cn.json b/l10n/zh-cn.json index 2908e92b..195d99f3 100644 --- a/l10n/zh-cn.json +++ b/l10n/zh-cn.json @@ -433,6 +433,7 @@ "Add to filter": "添加到筛选", "Add to your review": "添加到你的审查", "Add variable": "添加变量", + "Add your API key and choose a model to finish.": "添加你的 API 密钥并选择一个模型以完成设置。", "Add your API key to finish.": "添加你的 API 密钥以完成设置。", "Add {0} after {1}": "在 {1} 之后添加 {0}", "Add {0} to the filter": "将 {0} 添加到筛选器", @@ -794,7 +795,10 @@ "Choose a base…": "选择基准…", "Choose a folder to clone into": "选择要克隆到的文件夹", "Choose a folder…": "选择文件夹…", + "Choose a model to connect — pick one from the list or type its ID.": "选择一个模型以连接 — 从列表中选择,或输入其 ID。", + "Choose a model to finish.": "选择一个模型以完成设置。", "Choose editors…": "选择编辑器…", + "Choose from the list, or type a model ID": "从列表中选择,或输入模型 ID", "Choose how GitStudio looks. “System” follows your OS.": "选择 GitStudio 的外观。“系统”会跟随你的操作系统设置。", "Choose location…": "选择位置…", "Choose the branch it comes from": "选择它来自的分支", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Mistral 与 Codestral 模型。", "Mixed": "混合重置", "Model": "模型", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "用于提交信息和解释的模型 ID — gpt-4o-mini、llama3.1、qwen2.5-coder。", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "用于提交信息和解释的模型 ID — 你的提供商所列出的模型,例如本地服务器上的 llama3.1 或 qwen2.5-coder。", "Model removed.": "模型已移除。", "Modified": "已修改", "Monaco worker URI was not provided by the host.": "宿主未提供 Monaco worker 的 URI。", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "{0} 没有可推送到的 GitHub 远程。", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} 上没有名为 '{1}' 的分支。请推送该分支以在那里发布它,或选择 {0} 上已有的分支。", "{0} has no commits that {1} doesn't.": "{0} 没有 {1} 没有的提交。", + "{0} has no parent {1} to take the merge against.": "{0} 没有可作为合并基准的父提交 {1}。", "{0} has no pull request #{1}.": "{0} 没有拉取请求 #{1}。", "{0} has no text to merge here.": "{0} 在此没有可合并的文本。", "{0} has no tracked files at HEAD.": "{0} 在 HEAD 处没有跟踪的文件。", diff --git a/l10n/zh-tw.json b/l10n/zh-tw.json index c946338a..bca10294 100644 --- a/l10n/zh-tw.json +++ b/l10n/zh-tw.json @@ -433,6 +433,7 @@ "Add to filter": "新增到篩選", "Add to your review": "新增到你的審查", "Add variable": "新增變數", + "Add your API key and choose a model to finish.": "新增你的 API 金鑰並選擇一個模型以完成設定。", "Add your API key to finish.": "新增你的 API 金鑰以完成設定。", "Add {0} after {1}": "在 {1} 之後新增 {0}", "Add {0} to the filter": "將 {0} 新增到篩選器", @@ -794,7 +795,10 @@ "Choose a base…": "選擇基準…", "Choose a folder to clone into": "選擇要複製到的資料夾", "Choose a folder…": "選擇資料夾…", + "Choose a model to connect — pick one from the list or type its ID.": "選擇一個模型以連線 — 從清單中選擇,或輸入其 ID。", + "Choose a model to finish.": "選擇一個模型以完成設定。", "Choose editors…": "選擇編輯器…", + "Choose from the list, or type a model ID": "從清單中選擇,或輸入模型 ID", "Choose how GitStudio looks. “System” follows your OS.": "選擇 GitStudio 的外觀。“系統”會跟隨你的作業系統設定。", "Choose location…": "選擇位置…", "Choose the branch it comes from": "選擇它來自的分支", @@ -2542,7 +2546,7 @@ "Mistral & Codestral models.": "Mistral 與 Codestral 模型。", "Mixed": "混合重置", "Model": "模型", - "Model ID for commit messages and explain — gpt-4o-mini, llama3.1, qwen2.5-coder.": "用於提交資訊和解釋的模型 ID — gpt-4o-mini、llama3.1、qwen2.5-coder。", + "Model ID for commit messages and explain — the one your provider lists, e.g. llama3.1 or qwen2.5-coder on a local server.": "用於提交資訊和解釋的模型 ID — 你的提供者所列出的模型,例如本機伺服器上的 llama3.1 或 qwen2.5-coder。", "Model removed.": "模型已移除。", "Modified": "已修改", "Monaco worker URI was not provided by the host.": "宿主未提供 Monaco worker 的 URI。", @@ -5787,6 +5791,7 @@ "{0} has no GitHub remote to be pushed to.": "{0} 沒有可推送到的 GitHub 遠端。", "{0} has no branch called '{1}'. Push the branch to publish it there, or pick a branch {0} has.": "{0} 上沒有名為 '{1}' 的分支。請推送該分支以在那裡發佈它,或選擇 {0} 上已有的分支。", "{0} has no commits that {1} doesn't.": "{0} 沒有 {1} 沒有的提交。", + "{0} has no parent {1} to take the merge against.": "{0} 沒有可作為合併基準的父提交 {1}。", "{0} has no pull request #{1}.": "{0} 沒有拉取請求 #{1}。", "{0} has no text to merge here.": "{0} 在此沒有可合併的文本。", "{0} has no tracked files at HEAD.": "{0} 在 HEAD 處沒有追蹤的檔案。", diff --git a/packages/ai/src/catalog.ts b/packages/ai/src/catalog.ts index eb05e06b..b21d43c9 100644 --- a/packages/ai/src/catalog.ts +++ b/packages/ai/src/catalog.ts @@ -68,7 +68,9 @@ export const PROVIDER_PRESETS: readonly ProviderPreset[] = [ blurb: l10n.t("GPT models via the OpenAI API."), wire: "openai-compat", baseUrl: "https://api.openai.com/v1", - models: { fast: "gpt-6-luna", mid: "gpt-6.1-terra", deep: "gpt-6.1-sol" }, + // No model is chosen for you: the editor lists the models your key can + // use (ai:models — live /models, then KNOWN_MODELS) and you pick one. + models: { fast: "", mid: "", deep: "" }, needsKey: true, keyUrl: "https://platform.openai.com/api-keys", icon: "sparkle", @@ -233,7 +235,8 @@ export const PROVIDER_PRESETS: readonly ProviderPreset[] = [ blurb: l10n.t("OpenAI models hosted in your Azure tenant."), wire: "openai-compat", baseUrl: "https://YOUR-RESOURCE.openai.azure.com/openai/deployments/YOUR-DEPLOYMENT", - models: { fast: "gpt-4o-mini", mid: "gpt-4o", deep: "gpt-4o" }, + // A deployment's model is whatever you deployed: yours to name. + models: { fast: "", mid: "", deep: "" }, needsKey: true, keyUrl: "https://portal.azure.com", icon: "azure", @@ -293,8 +296,9 @@ export function knownModels(preset: string): string[] { * default for that tier is moved on — an id the user chose is theirs. */ export const RETIRED_DEFAULTS: Record>> = { - // Deprecated 2026-10-14, removed 2027-01-14; replacement gpt-6-luna. - openai: [{ fast: "gpt-4o-mini", mid: "gpt-4o", deep: "gpt-4o" }], + // NOT openai: no OpenAI model is chosen for you any more (its preset seeds + // none), so none is chosen for you on a retirement either — a connection + // keeps the model it is on until you pick another. // Deprecated; no longer served to new users, shut down 2026-12-01. google: [{ fast: "gemini-2.5-flash", mid: "gemini-2.5-flash", deep: "gemini-2.5-pro" }], // Shut down 2026-08-16 for free and developer tiers. diff --git a/packages/ai/src/connections.ts b/packages/ai/src/connections.ts index 87892fcf..3345eb87 100644 --- a/packages/ai/src/connections.ts +++ b/packages/ai/src/connections.ts @@ -114,7 +114,9 @@ export function migrateRetiredModels(conn: Connection): boolean { for (const tier of ["fast", "mid", "deep"] as const) { const raw: unknown = conn.models[tier]; const id = typeof raw === "string" ? raw.trim() : ""; - if (id && retired.some((old) => old[tier] === id)) { + // Never onto a blank: a preset that seeds no model has no replacement to + // offer, and blanking a working id would switch the connection off. + if (id && preset.models[tier] && retired.some((old) => old[tier] === id)) { conn.models[tier] = preset.models[tier]; changed = true; } diff --git a/packages/ai/src/providers/openaiCompat.ts b/packages/ai/src/providers/openaiCompat.ts index fa2ee420..2213a559 100644 --- a/packages/ai/src/providers/openaiCompat.ts +++ b/packages/ai/src/providers/openaiCompat.ts @@ -9,7 +9,11 @@ // the tool-calling path is non-streaming (simpler and reliable for the agent // loop, where we need the fully-assembled tool_calls before executing them). -import { OpenAiSseParser } from "@gitstudio/engine/ai/aiCore"; +import { + OpenAiSseParser, + isOpenAiReasoningModel as isReasoningModel, + openAiReasoningEffort, +} from "@gitstudio/engine/ai/aiCore"; import { AiError, type ChatMessage, @@ -388,36 +392,18 @@ function mapFinish(reason: string | undefined, hadTools: boolean): StopReason { } } -/** - * OpenAI's reasoning families — o1/o3/o4…, gpt-5 and later — by the bare id - * OpenAI and Azure use. They refuse `max_tokens`, and the cap they take counts - * their hidden reasoning too. A router's "openai/gpt-5" is translated by the - * router, so it is deliberately not matched. - */ +/** Shared with the extension's provider: see @gitstudio/engine/ai/aiCore. */ export function isOpenAiReasoningModel(model: string): boolean { - return /^(o\d|gpt-([5-9]|\d{2,}))/i.test(model.trim()); + return isReasoningModel(model); } -/** - * The `reasoning_effort` to send, if any. A reasoning model spends its token - * cap on hidden thinking first, so a short task left at the default effort can - * come back empty with a `length` stop. Sent only where it is documented: - * OpenAI's reasoning ids and gpt-oss (Groq, Together, local servers) — not via - * OpenRouter, which takes a `reasoning` object instead. - */ +/** The `reasoning_effort` to send, if any (see openAiReasoningEffort). */ export function reasoningEffort( model: string, thinking: ChatOptions["thinking"], baseUrl: string, ): "low" | "high" | undefined { - const gptOss = /(^|\/)gpt-oss\b/i.test(model) && !/openrouter\.ai/i.test(baseUrl); - if (!gptOss && !isOpenAiReasoningModel(model)) { - return undefined; - } - if (thinking === "auto") { - return undefined; // the model's own default - } - return thinking === "extended" ? "high" : "low"; + return openAiReasoningEffort(model, thinking, baseUrl); } /** The provider's own error body: `{error}` (OpenAI) or `[{error}]` (Google). */ diff --git a/packages/ai/test/connections.test.ts b/packages/ai/test/connections.test.ts index 8dcff078..73784188 100644 --- a/packages/ai/test/connections.test.ts +++ b/packages/ai/test/connections.test.ts @@ -37,7 +37,9 @@ test("connectionFromPreset copies preset defaults and the supplied id", () => { }); test("isConnectionUsable requires base URL, a model, and (for remote) a key", () => { - const remote = connectionFromPreset("openai", "1"); + // OpenAI's preset seeds no model (you choose it): pick one first. + const remote: Connection = { ...connectionFromPreset("openai", "1"), models: { fast: "", mid: "gpt-6.1-terra", deep: "" } }; + assert.equal(isConnectionUsable(connectionFromPreset("openai", "0"), true), false, "no model chosen yet"); assert.equal(isConnectionUsable(remote, false), false, "remote needs a key"); assert.equal(isConnectionUsable(remote, true), true, "remote with key ok"); diff --git a/packages/ai/test/retiredDefaults.test.ts b/packages/ai/test/retiredDefaults.test.ts index 1757770a..6c4d5bc2 100644 --- a/packages/ai/test/retiredDefaults.test.ts +++ b/packages/ai/test/retiredDefaults.test.ts @@ -94,3 +94,13 @@ test("isUserEdited: our URL with our model is ours; a changed URL or a typed mod assert.equal(isUserEdited(stored("custom", { baseUrl: "http://my-server:8000/v1" }), "x"), true, "custom is always the user's"); assert.equal(isUserEdited(groq, undefined), false); }); + +test("no OpenAI model is chosen for you: its preset (and Azure's) seeds none, and a retirement picks none either", () => { + for (const id of ["openai", "azure"]) { + assert.deepEqual(presetById(id).models, { fast: "", mid: "", deep: "" }, id); + } + assert.equal(RETIRED_DEFAULTS.openai, undefined); + const onFormerDefaults = stored("openai", { models: { fast: "gpt-4o-mini", mid: "gpt-4o", deep: "gpt-4o" } }); + assert.equal(migrateRetiredModels(onFormerDefaults), false); + assert.deepEqual(onFormerDefaults.models, { fast: "gpt-4o-mini", mid: "gpt-4o", deep: "gpt-4o" }, "kept, never blanked"); +}); diff --git a/packages/engine/src/ai/aiCore.ts b/packages/engine/src/ai/aiCore.ts index b70faec6..86617aab 100644 --- a/packages/engine/src/ai/aiCore.ts +++ b/packages/engine/src/ai/aiCore.ts @@ -427,3 +427,37 @@ export class OpenAiSseParser { interface OpenAiStreamChunk { choices?: Array<{ delta?: { content?: string }; finish_reason?: string }>; } + +/** + * OpenAI's reasoning families — o1/o3/o4…, gpt-5 and later — by the bare id + * OpenAI and Azure use. They refuse `max_tokens` (HTTP 400) and take + * `max_completion_tokens`, a cap that counts their hidden reasoning too. A + * router's "openai/gpt-5" is translated by the router, so it is deliberately + * not matched. Shared by the desktop's provider (packages/ai) and the + * extension's, which used to send `max_tokens` to every model. + */ +export function isOpenAiReasoningModel(model: string): boolean { + return /^(o\d|gpt-([5-9]|\d{2,}))/i.test(model.trim()); +} + +/** + * The `reasoning_effort` to send, if any. A reasoning model spends its token + * cap on hidden thinking first, so a short task left at the default effort can + * come back empty with a `length` stop. Sent only where it is documented: + * OpenAI's reasoning ids and gpt-oss (Groq, Together, local servers) — not via + * OpenRouter, which takes a `reasoning` object instead. + */ +export function openAiReasoningEffort( + model: string, + thinking: "off" | "auto" | "extended" | undefined, + baseUrl: string, +): "low" | "high" | undefined { + const gptOss = /(^|\/)gpt-oss\b/i.test(model) && !/openrouter\.ai/i.test(baseUrl); + if (!gptOss && !isOpenAiReasoningModel(model)) { + return undefined; + } + if (thinking === "auto") { + return undefined; // the model's own default + } + return thinking === "extended" ? "high" : "low"; +}