diff --git a/go.mod b/go.mod index a2b9def0f..3552ddae6 100644 --- a/go.mod +++ b/go.mod @@ -42,6 +42,7 @@ require ( github.com/muesli/cancelreader v0.2.2 // indirect github.com/muesli/termenv v0.16.0 // indirect github.com/ncruces/go-strftime v1.0.0 // indirect + github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/tidwall/match v1.1.1 // indirect diff --git a/go.sum b/go.sum index 4e303e024..b45b5a3fb 100644 --- a/go.sum +++ b/go.sum @@ -64,6 +64,8 @@ github.com/muesli/termenv v0.16.0 h1:S5AlUN9dENB57rsbnkPyfdGuWIlkmzJjbFf0Tf5FWUc github.com/muesli/termenv v0.16.0/go.mod h1:ZRfOIKPFDYQoDFF4Olj7/QJbW60Ol/kL1pU3VfY/Cnk= github.com/ncruces/go-strftime v1.0.0 h1:HMFp8mLCTPp341M/ZnA4qaf7ZlsbTc+miZjCLOFAw7w= github.com/ncruces/go-strftime v1.0.0/go.mod h1:Fwc5htZGVVkseilnfgOVb9mKy6w1naJmn9CehxcKcls= +github.com/pelletier/go-toml/v2 v2.2.4 h1:mye9XuhQ6gvn5h28+VilKrrPoQVanw5PMw/TB0t5Ec4= +github.com/pelletier/go-toml/v2 v2.2.4/go.mod h1:2gIqNv+qfxSVS7cM2xJQKtLSTLUE9V8t9Stt+h56mCY= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec h1:W09IVJc94icq4NjY3clb7Lk8O1qJ8BdBEF8z0ibU0rE= diff --git a/internal/edit/toml.go b/internal/edit/toml.go index a55f517e9..73b647007 100644 --- a/internal/edit/toml.go +++ b/internal/edit/toml.go @@ -222,8 +222,14 @@ func trimBlank(lines []string) []string { return lines } +// Raw is a TOML value written as it is: an array or an inline table the +// caller has already spelled out. +type Raw string + func tomlLiteral(v any) string { switch x := v.(type) { + case Raw: + return string(x) case bool: return strconv.FormatBool(x) case int: diff --git a/internal/gui/api.go b/internal/gui/api.go index 4df372662..2a55400c2 100644 --- a/internal/gui/api.go +++ b/internal/gui/api.go @@ -188,6 +188,7 @@ func Handler(w Windows, gw *gateway.Server) http.Handler { providerRoutes(mux, w, gw) importRoutes(mux) usageRoutes(mux) + libraryRoutes(mux, w) updateRoutes(mux, w) mux.HandleFunc("GET /api/settings", func(rw http.ResponseWriter, r *http.Request) { writeJSON(rw, settingsState()) diff --git a/internal/gui/assets/app.css b/internal/gui/assets/app.css index 7dc10c56a..90bbaa213 100644 --- a/internal/gui/assets/app.css +++ b/internal/gui/assets/app.css @@ -173,7 +173,7 @@ body.window:not(.mac) .brand { display: none; } /* the title bar above already s background: var(--pill); } body.panel .seg { display: none; } -.seg button { position: relative; z-index: 1; height: 24px; padding: 0 12px; border-radius: 6px; font-size: 12.5px; color: var(--muted); transition: color .18s var(--ease), transform .14s var(--ease); } +.seg button { position: relative; z-index: 1; white-space: nowrap; height: 24px; padding: 0 12px; border-radius: 6px; font-size: 12.5px; color: var(--muted); transition: color .18s var(--ease), transform .14s var(--ease); } .seg button.on { color: var(--fg); } .seg button:hover:not(.on) { color: var(--fg-2); } .actions { margin-left: auto; display: flex; gap: 2px; } @@ -206,7 +206,7 @@ body.panel .seg { display: none; } and at the narrowest the tabs in the row rather than over it */ .top.tight .brand > span:not(.logo), .top.tight .update span { display: none; } .top.tight .update { width: 22px; padding: 0; justify-content: center; margin-right: 4px; } -.top.cramped .seg { position: static; transform: none; margin: 0 auto; } +body.window .top.cramped .seg { position: relative; left: auto; top: auto; transform: none; margin: 0 auto; } /* relative still: its thumb sits in it, not over the whole header */ .top.cramped .seg button { padding: 0 8px; } @keyframes update-in { from { opacity: 0; transform: translateY(-3px) scale(.94); } } @keyframes spin { to { transform: rotate(360deg); } } @@ -271,6 +271,15 @@ body.panel .field:hover { box-shadow: inset 0 0 0 1px var(--pill-line), var(--pi body.panel .field.open { box-shadow: inset 0 0 0 1px var(--accent), var(--pill-shadow); } /* the tray panel keeps control-sized pills: a solo control spans both columns and hugs the right — an economy the narrow panel wants */ +/* a field that follows the model unless set: a square in a third column */ +#agents.extras .fields { width: 379px; grid-template-columns: minmax(0, 1fr) 124px 24px; } +body.panel #agents.extras .fields { width: 301px; grid-template-columns: minmax(0, 1fr) 118px 24px; } +#agents.extras .field.solo { grid-column: 1 / 3; } +body.window #agents.extras .field.solo { grid-column: 1 / 3; } +.field.extra { grid-column: 3; width: 24px; padding: 0; justify-content: center; position: relative; color: var(--faint); } +.field.extra:hover, .field.extra.open { color: var(--fg-2); } +.field.extra.set { color: var(--fg); } +.field.extra.set::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); } .field.main, .field.solo { justify-self: end; } .field.solo { grid-column: 1 / -1; } /* in the window the chips fill their column, so every chip and chevron lines diff --git a/internal/gui/assets/app.js b/internal/gui/assets/app.js index 1ef9b8a19..f1c9c3d31 100644 --- a/internal/gui/assets/app.js +++ b/internal/gui/assets/app.js @@ -171,9 +171,11 @@ function renderAgents() { const shownFields = a.fields.filter((f) => !TIERS.includes(f.label)); const tiers = tierMenu(a); if (tiers) shownFields.push(tiers); - const sorted = shownFields.sort((x, y) => wide(y) - wide(x)); + const sorted = shownFields.sort((x, y) => wide(y) - wide(x) || extra(x) - extra(y)); + const plain = sorted.filter((f) => !extra(f)).length; for (const f of sorted) { - const b = el("button", "field " + (sorted.length === 1 ? "solo" : wide(f) ? "main" : "side")); + if (extra(f)) { fields.append(extraField(a, f)); continue; } + const b = el("button", "field " + (plain === 1 ? "solo" : wide(f) ? "main" : "side")); const opt = optionFor(f, f.value); b.title = t("{label}: {value}", { label: t(f.label), value: f.value || t("agent default") }) + (opt?.note ? ` · ${opt.note}` : ""); const effort = f.key === "effort" || f.label === "effort" || f.label === "thinking"; @@ -196,6 +198,9 @@ function renderAgents() { row.append(icon(a.icon), who, fields); return row; }; + // the extras column is there for every row once any agent has one, so the + // pickers keep lining up down the list + list.classList.toggle("extras", state.agents.some((a) => a.fields.some(extra) || tierMenu(a))); if (!folded.length) { for (const a of state.agents) list.append(agentRow(a)); } else { @@ -272,6 +277,28 @@ const TIERS = ["opus", "sonnet", "haiku", "fable"]; // fields that fall back to the agent's model when unset const FOLLOWS_MODEL = [...TIERS, "subagents"]; +// A field that follows the model unless set — Codex's subagents, Claude +// Code's tiers — is a small square after the pickers rather than a third +// picker, which a row has no room for: it wrapped onto a line of its own. +const extra = (f) => f.key === "tiers" || FOLLOWS_MODEL.includes(f.label); +const EXTRA_GLYPH = { + subagents: "M4.5 2.75v10.5M4.5 9.25c0-2.2 1.6-3.75 3.9-3.75h3.35M9.9 3.6l1.9 1.9-1.9 1.9", + tiers: "M8 2.6 2.75 5.4 8 8.2l5.25-2.8zM2.75 8.1 8 10.9l5.25-2.8M2.75 10.8 8 13.6l5.25-2.8", +}; +function extraField(a, f) { + const set = !!(f.value || f.custom); + const b = el("button", "field extra" + (set ? " set" : "")); + b.append(svg(EXTRA_GLYPH[f.label] || EXTRA_GLYPH.tiers, 13, 1.5)); + const opt = optionFor(f, f.value); + b.title = f.menu + ? t("{label}: {value}", { label: t(f.label), value: f.summary }) + "\n" + f.options.map((o) => `${o.label}: ${o.note}`).join("\n") + : t("{label}: {value}", { label: t(f.label), value: opt?.label || f.value || t("same as model") }); + b.setAttribute("aria-label", b.title); + b.dataset.key = f.key; + b.onclick = (ev) => openPicker(a, f, b, ev); + return b; +} + function tierMenu(a) { const tiers = a.fields.filter((f) => TIERS.includes(f.label)); if (!tiers.length || !tiers.some((f) => f.options.length)) return null; @@ -346,7 +373,8 @@ async function load() { try { state = await api("state"); load.done = true; - applyPrefs(state.settings); + // the library may have drawn itself before the saved language was known + if (applyPrefs(state.settings) && view === "library") window.loadLibrary?.(); tintPanel(); renderAgents(); // an open provider editor is someone typing: coming back to the window @@ -485,7 +513,7 @@ function openPicker(agent, field, anchor, ev, only) { } const q = $("#q"); q.value = ""; - q.placeholder = modelPicker ? t("Filter, or type any model id…") : t("Filter {field}…", { field: t(field.label) }); + q.placeholder = modelPicker && extra(field) ? t("{field} — filter, or type any model id…", { field: t(field.label) }) : modelPicker ? t("Filter, or type any model id…") : t("Filter {field}…", { field: t(field.label) }); filter(); q.focus(); } @@ -3367,7 +3395,7 @@ function show(v) { view = v; if (mode === "window") { for (const b of $("#nav").querySelectorAll("button")) b.classList.toggle("on", b.dataset.view === v); slide($("#nav"), "nav"); } $("#prefs").classList.toggle("on", v === "settings"); - for (const id of ["agents", "providers", "gateway", "routing", "usage", "settings"]) $("#view-" + id).hidden = v !== id; + for (const id of ["agents", "providers", "gateway", "routing", "usage", "library", "settings"]) $("#view-" + id).hidden = v !== id; // back to where the reader was in it, and again once it has what it loads const back = () => backToReader($("#view-" + v)); requestAnimationFrame(back); @@ -3376,6 +3404,7 @@ function show(v) { if (v === "providers" || v === "gateway" || v === "routing") loadProviders().then(back, (e) => status(e.message, "err")); if (v === "usage") loadUsage().then(back, (e) => status(e.message, "err")); if (v === "settings") loadSettings().then(back, (e) => status(e.message, "err")); + if (v === "library") window.loadLibrary?.()?.then(back); syncURL(); } @@ -3449,6 +3478,17 @@ function fitTop() { } const topFit = new ResizeObserver(fitTop); for (const e of [".top", ".brand", ".actions"]) topFit.observe($(e)); +// the nav's tabs change size after its thumb was put under one — the header +// tightening, the fonts arriving, another language — so it's put there again +if (mode === "window") new ResizeObserver(() => { + const th = $("#nav > .thumb"), on = $("#nav > .on"); + if (!th || !on) return; + th.classList.add("still"); + th.style.transform = `translateX(${on.offsetLeft}px)`; + th.style.width = on.offsetWidth + "px"; + thumbs.set("nav", { x: on.offsetLeft, w: on.offsetWidth, at: 0 }); + requestAnimationFrame(() => th.classList.remove("still")); +}).observe($("#nav")); document.fonts?.ready.then(fitTop); document.addEventListener("visibilitychange", () => { if (!document.hidden) { load(); wag(); } }); @@ -3466,6 +3506,6 @@ if (mode === "window" && params.get("import")) { }).catch(() => {}); } if (mode === "window" && params.get("view") === "providers" && params.get("edit")) editing = params.get("edit"); -if (mode === "window" && ["providers", "gateway", "routing", "usage", "settings"].includes(params.get("view"))) show(params.get("view")); +if (mode === "window" && ["providers", "gateway", "routing", "usage", "library", "settings"].includes(params.get("view"))) show(params.get("view")); else if (mode === "window") slide($("#nav"), "nav"); load(); diff --git a/internal/gui/assets/i18n.js b/internal/gui/assets/i18n.js index ce70c6381..3f6072173 100644 --- a/internal/gui/assets/i18n.js +++ b/internal/gui/assets/i18n.js @@ -9,6 +9,7 @@ const I18N = { "Providers": "供应商", "Gateway": "网关", "Usage": "用量", + "Library": "资源库", "Settings": "设置", "Refresh model lists (models.dev and every vendor)": "刷新模型列表(models.dev 与各供应商)", "Open as a window": "在窗口中打开", @@ -77,6 +78,7 @@ const I18N = { "use as typed": "按输入使用", "Filter models…": "筛选模型…", "Filter, or type any model id…": "筛选,或输入任意模型 ID…", + "{field} — filter, or type any model id…": "{field} — 筛选,或输入任意模型 ID…", "Filter {field}…": "筛选{field}…", "No matches.": "没有匹配项。", @@ -625,6 +627,179 @@ const I18N = { "{h} h {m} min": "{h} 小时 {m} 分钟", "{n} h": "{n} 小时", "{n} d": "{n} 天", + // library (#29) + "Show in {fm}": "在 {fm} 中显示", + "the file manager": "文件管理器", + "{agent} has it — click to take it away": "{agent} 已启用 — 点击移除", + "Give it to {agent}": "给 {agent} 启用", + "{agent} reads it through {other} — click to give it its own": "{agent} 通过 {other} 读取它 — 点击给它单独一份", + "{agent}: {error}": "{agent}:{error}", + "(and {n} more)": "(另有 {n} 项)", + "Written to {agent}": "已写入 {agent}", + "Written to {n} agents": "已写入 {n} 个 Agent", + "Saved — the agents already had it": "已保存 — Agent 中已是最新", + "Instructions": "指令", + "MCP servers": "MCP 服务器", + "Skills": "技能", + "Library folder": "资源库文件夹", + "No agents to write to": "没有可写入的 Agent", + "Install Claude Code, Codex, Gemini CLI, OpenCode… and the library can give them the same instructions, MCP servers and skills.": "安装 Claude Code、Codex、Gemini CLI、OpenCode 等之后,资源库就能给它们同一份指令、MCP 服务器和技能。", + "magpie keeps a copy of every file before it writes it.": "magpie 写入任何文件前都会先备份一份。", + "Backups": "备份", + "Write it once: every agent switched on below reads it before each conversation, in its own instructions file.": "写一次就够了:下面开启的每个 Agent 都会在每次对话前,从各自的指令文件里读到它。", + "What every agent should know — how you like code written, the stack you work in, the commands that run your tests…": "每个 Agent 都该知道的事 — 你喜欢的代码风格、使用的技术栈、跑测试的命令……", + "Not saved yet": "尚未保存", + "Discard": "放弃", + "Shared instructions": "共享指令", + "magpie writes its part between two marker lines — the rest of each file stays yours": "magpie 只写两行标记之间的部分 — 文件其余内容仍归你", + "None of your agents reads a user-wide instructions file magpie knows.": "你的 Agent 都没有 magpie 已知的用户级指令文件。", + "{agents} keeps no user-wide instructions file.": "{agents} 没有用户级指令文件。", + "+ its own": "+ 专属", + "{agent} gets something of its own after the shared text": "{agent} 在共享内容之后还有专属内容", + "edited in the file": "文件中已被修改", + "magpie's part of this file was changed there; magpie leaves it until the library's text changes": "文件中 magpie 的部分在别处被改过;在资源库内容变化前 magpie 不会动它", + "1 line of its own": "1 行自有内容", + "{n} lines of its own": "{n} 行自有内容", + "The file has instructions besides magpie's part — they stay, and the agent reads both": "文件里除了 magpie 的部分还有别的指令 — 它们会保留,Agent 两者都会读", + "{agent} reads the shared instructions": "{agent} 读取共享指令", + "Taken out of {agent}'s file": "已从 {agent} 的文件中移除", + "{agent} is on — save to write the new text into its file": "{agent} 已开启 — 保存后写入它的文件", + "{agent} is on — it gets the shared instructions once there are some": "{agent} 已开启 — 有共享指令后就会写入", + "{agent} reads the shared instructions now": "{agent} 现在读取共享指令", + "{agent} reads {file} instead of this file while it has anything in it.": "只要 {file} 有内容,{agent} 就会读它而不是这个文件。", + "OpenCode reads Claude Code's CLAUDE.md when it has no AGENTS.md of its own.": "OpenCode 在没有自己的 AGENTS.md 时会读取 Claude Code 的 CLAUDE.md。", + "Only for {agent}, after the shared text": "仅给 {agent},接在共享内容之后", + "Anything only {agent} should be told": "只需告诉 {agent} 的内容", + "Switch {agent} on for it to read this.": "开启 {agent} 后它才会读到这些。", + "Move its own into the shared text": "把它的内容移入共享指令", + "Moved into the shared instructions — {agent} reads the same as before": "已移入共享指令 — {agent} 读到的内容与之前相同", + "Takes the {n} lines out of the file, adds them to the shared text, and switches {agent} on — so it reads what it read before, and the other agents can too": "从文件中取出这 {n} 行加入共享指令,并开启 {agent} — 它读到的不变,其他 Agent 也能读到", + "Write the library's text again": "重新写入资源库的内容", + "{agent}'s file has the library's text again": "{agent} 的文件已恢复为资源库的内容", + "Replaces what was changed in magpie's part of the file; the file is kept aside first": "覆盖文件中 magpie 部分的改动;会先备份文件", + "{agent} can't reach a server over SSE — only a command or streamable HTTP": "{agent} 不支持 SSE 服务器 — 只支持命令或 Streamable HTTP", + "Add a server once and switch it on for the agents that should have it — magpie writes it into each one's config in the shape that agent reads.": "服务器只需添加一次,再为需要的 Agent 开启 — magpie 会按各 Agent 能读的格式写进它们的配置。", + "+ Add a server": "+ 添加服务器", + "No servers in the library yet": "资源库里还没有服务器", + "Add one, or bring in those your agents already have, below.": "添加一个,或把 Agent 里已有的导入进来(见下方)。", + "Paste a server's JSON from its README, or fill it in.": "粘贴 README 里的服务器 JSON,或手动填写。", + "+ Add server": "+ 添加服务器", + "In your agents": "Agent 中已有", + "not in the library — bring one in to manage it here": "不在资源库中 — 导入后即可在这里管理", + "{agents} has no MCP servers magpie can write.": "{agents} 没有 magpie 可写入的 MCP 配置。", + "Edit {name}": "编辑 {name}", + "differs in {agents}": "{agents} 中不同", + "{agents} has another server by this name; bringing this one in leaves that one as it is": "{agents} 有另一个同名服务器;导入这个不会改动那个", + "Bring in": "导入", + "{name} is in the library now": "{name} 已加入资源库", + "Keeps it in the library: {agents} go on having it, and you can give it to the others": "放进资源库:{agents} 继续拥有它,你也可以把它给其他 Agent", + "+ Add": "+ 添加", + "New MCP server": "新的 MCP 服务器", + "or paste its JSON anywhere here": "或直接在此粘贴它的 JSON", + "e.g. github": "例如 github", + "Letters, digits, - and _ — what the agents call it": "字母、数字、- 和 _ — Agent 用这个名字称呼它", + "Command": "命令", + "Runs as": "运行方式", + "The command and its arguments, as you'd type them": "命令及参数,就像在终端里输入的那样", + "Environment": "环境变量", + "Remove from the library": "从资源库移除", + "{name} is out of the library and the agents it was given to": "{name} 已从资源库及相关 Agent 中移除", + "Filled in from what you pasted": "已根据粘贴内容填写", + "{n} servers in what you pasted": "粘贴内容中有 {n} 个服务器", + "(no name)": "(无名称)", + "in the library": "已在资源库", + "Add 1 server": "添加 1 个服务器", + "Add {n} servers": "添加 {n} 个服务器", + "Added {n} servers": "已添加 {n} 个服务器", + "A skill is a folder with a SKILL.md an agent loads when it's needed. The library keeps each one once and links it into the agents you pick.": "技能是一个带 SKILL.md 的文件夹,Agent 在需要时加载。资源库只保存一份,再链接到你选的 Agent 中。", + "In the library": "资源库中", + "not in the library — bring one in to give it to the others": "不在资源库中 — 导入后可以给其他 Agent", + "{agents} has no skills folder.": "{agents} 没有技能文件夹。", + "owner/repo, a GitHub link, or a folder on this computer": "owner/repo、GitHub 链接,或本机上的文件夹", + "Looking…": "查找中…", + "Find skills": "查找技能", + "No SKILL.md found there": "那里没有找到 SKILL.md", + "No skills there — a skill is a folder with a SKILL.md in it.": "那里没有技能 — 技能是一个含 SKILL.md 的文件夹。", + "1 skill in {src}": "{src} 中有 1 个技能", + "{n} skills in {src}": "{src} 中有 {n} 个技能", + "Select none": "全不选", + "for": "给", + "Installing…": "安装中…", + "1 skill installed": "已安装 1 个技能", + "{n} skills installed": "已安装 {n} 个技能", + "Install 1 skill": "安装 1 个技能", + "Install {n} skills": "安装 {n} 个技能", + "Its folder is gone from the library": "它的文件夹已不在资源库中", + "linked from": "链接自", + "{name} is up to date": "{name} 已是最新", + "Update from GitHub": "从 GitHub 更新", + "Read {name}'s SKILL.md": "查看 {name} 的 SKILL.md", + "Remove {name}?": "移除 {name}?", + "It is taken out of every agent it was given to. The folder it was linked from stays where it is.": "它会从所有已启用的 Agent 中移除。它链接的原文件夹保持不动。", + "It is taken out of every agent it was given to, and its folder is moved to magpie's backups.": "它会从所有已启用的 Agent 中移除,文件夹会移到 magpie 的备份中。", + "{agents} has another skill by this name; bringing this one in leaves that one as it is": "{agents} 有另一个同名技能;导入这个不会改动那个", + "Keeps a link to where it is: {agents} go on having it, and you can give it to the others": "保留指向原位置的链接:{agents} 继续拥有它,你也可以给其他 Agent", + "Moves it into the library and links it back: {agents} go on having it, and you can give it to the others": "移入资源库并链接回去:{agents} 继续拥有它,你也可以给其他 Agent", + "Discover": "发现", + "Search MCP servers — GitHub, Postgres, Figma…": "搜索 MCP 服务器 — GitHub、Postgres、Figma…", + "Search skills on skills.sh — react, pdf, testing…": "在 skills.sh 搜索技能 — react、pdf、testing…", + "1 result": "1 个结果", + "{n} results": "{n} 个结果", + "Featured, and the official MCP Registry": "精选,以及官方 MCP Registry", + "Popular on skills.sh": "skills.sh 热门", + "Nothing matches “{q}”.": "没有与“{q}”匹配的结果。", + "Nothing to show.": "暂无内容。", + "Remote · sign-in": "远程 · 需登录", + "Remote": "远程", + "Local": "本地", + "Added": "已添加", + "In the library as {name}": "已在资源库中,名为 {name}", + "Adding…": "添加中…", + "Needs {what} to add": "添加时需要 {what}", + "Add…": "添加…", + "About {name}": "关于 {name}", + "Homepage": "主页", + "Each agent asks you to sign in, in the browser, the first time it uses it.": "每个 Agent 首次使用时会在浏览器中请你登录。", + "Set as {key}": "设为 {key}", + "Sent as the {key} header": "作为 {key} 请求头发送", + "(optional)": "(可选)", + "Add to the library": "加入资源库", + "{what} is needed": "请填写 {what}", + "Official — from the team that makes it": "官方 — 来自其开发团队", + "{n} installs": "{n} 次安装", + "Official": "官方", + "No description.": "暂无描述。", + "From": "来自", + "Up-to-date documentation and code examples for any library, straight into the prompt.": "任意库的最新文档与代码示例,直接送进提示词。", + "Drive a real browser: open pages, click, type and read them through the accessibility tree.": "驱动真实浏览器:打开页面、点击、输入,并通过无障碍树读取页面。", + "Control and inspect a live Chrome: console, network, performance traces and screenshots.": "控制并检查运行中的 Chrome:控制台、网络、性能追踪和截图。", + "Repositories, issues, pull requests, Actions and code search on GitHub.": "GitHub 上的仓库、Issue、PR、Actions 和代码搜索。", + "Ask questions about any public GitHub repository and read its generated wiki.": "就任意公开 GitHub 仓库提问,并阅读自动生成的 Wiki。", + "Web search and code search built for agents, with clean page contents.": "为 Agent 打造的网页与代码搜索,返回干净的页面内容。", + "Read, write and search files, limited to the folders you allow.": "读、写、搜索文件,仅限你允许的文件夹。", + "Fetch a web page and hand it over as Markdown.": "抓取网页并转成 Markdown。", + "A knowledge graph the agent keeps across conversations.": "Agent 跨对话保留的知识图谱。", + "Think a problem through step by step, revising and branching as it goes.": "一步步想清问题,边想边修正、分支。", + "Read, search and change Git repositories.": "读取、搜索和修改 Git 仓库。", + "The current time anywhere, and conversions between time zones.": "任意地点的当前时间,以及时区换算。", + "Issues, errors and traces from Sentry, and Seer's analysis of them.": "Sentry 中的问题、错误和追踪,以及 Seer 的分析。", + "Find, create and update Linear issues, projects and comments.": "查找、创建和更新 Linear 的 Issue、项目和评论。", + "Search, read and write pages and databases in your Notion workspace.": "搜索、读写 Notion 工作区中的页面和数据库。", + "Jira issues and Confluence pages from Atlassian Cloud.": "Atlassian Cloud 上的 Jira Issue 和 Confluence 页面。", + "Manage Supabase projects: tables, SQL, migrations, logs and edge functions.": "管理 Supabase 项目:数据表、SQL、迁移、日志和 Edge Functions。", + "Customers, payments, subscriptions and Stripe's documentation.": "客户、支付、订阅,以及 Stripe 文档。", + "Projects, deployments and logs on Vercel, and its documentation.": "Vercel 上的项目、部署和日志,以及其文档。", + "Serverless Postgres on Neon: projects, branches and SQL.": "Neon 上的 Serverless Postgres:项目、分支和 SQL。", + "Search Cloudflare's documentation.": "搜索 Cloudflare 文档。", + "Official Microsoft and Azure documentation and code samples.": "微软与 Azure 官方文档和代码示例。", + "Search models, datasets, Spaces and papers on the Hugging Face Hub.": "搜索 Hugging Face Hub 上的模型、数据集、Spaces 和论文。", + "Web, news, image and local search from Brave's independent index.": "基于 Brave 独立索引的网页、新闻、图片和本地搜索。", + "Scrape, crawl and search the web into clean Markdown.": "抓取、爬取和搜索网页,输出干净的 Markdown。", + "Search and extract from the web with Tavily.": "用 Tavily 搜索并提取网页内容。", + "Personal access token": "个人访问令牌", + "Folder": "文件夹", + "The folder it may read and write": "它可以读写的文件夹", + "Optional — raises the rate limit. From context7.com/dashboard": "可选 — 提高速率限制。在 context7.com/dashboard 获取", }, }; diff --git a/internal/gui/assets/index.html b/internal/gui/assets/index.html index b7910df8f..b9ec525a1 100644 --- a/internal/gui/assets/index.html +++ b/internal/gui/assets/index.html @@ -6,6 +6,7 @@