gui: Sessions is a plugin's page, its script, styles and words under assets/plugins/sessions (P2)

The first page of P2 to leave app.js's core. sessions.js and sessions.css
move to assets/plugins/sessions/ (client.js, sessions.css). The page
registers through the kernel as magpie.plugin("sessions"): mount takes its
<main>, which the kernel now makes, open and relang read it again, and
reveal is the Usage page's way in. window.loadSessionsPage and
window.openSessionOnPage are gone. app.js reaches the page only through
magpie.call, and show() takes a page's title from its part. The plugin's
manifest lists i18n.js, sessions.css and client.js.

Words: the kernel's magpie.strings(dict) adds a plugin's words to I18N.
A key that is already there is logged and not taken, since the later one
would silently win. The 65 keys only the Sessions page says (own-keys over
every asset, Go and index.html) move, as written, from i18n.js to
plugins/sessions/i18n.js. tests/strings.cjs reads i18n.js and every
plugin's i18n.js as the page has them. gui-de/ja/zh-tw use it, and
i18n-keys now checks that no key is said twice across files and that a
plugin's words are in every language. TestBuiltinClientsLoaded takes a
.css entry as a <link> in <head>, and a script between kernel.js and
app.js.

Docs: plugin-runtime.md (Words, Pages moved out: Sessions), gui-shell.md,
gateway-sessions.md.

Run:
- go test ./internal/gui/ ./internal/pluginrt/ ./internal/gateway/: ok.
- gofmt clean. go vet darwin, GOOS=linux -tags nogui and GOOS=windows on
  gui, pluginrt and plugins: clean.
- GUI, in both chromium and webkit, 40 files, all green:
  - the sessions-* and sess-* tests, session-identity, routing-sessions,
    account-mask-sessions, usage-session*, gateway-conversations;
  - plugin-kernel, the plugin-move* tests, font-cascade, win-fonts;
  - i18n-keys, gui-de, gui-ja, gui-zh-tw.
- session-terminal's red under parallel load is the same on origin/main
  591ed58b5. It is fixed at its cause in the commit before this one.
This commit is contained in:
yetone
2026-10-14 08:33:24 +08:00
parent efbacd4e54
commit 1eaf1e890a
26 changed files with 457 additions and 330 deletions
+1 -1
View File
@@ -206,7 +206,7 @@ model match at once, adds the sessions the search found with their snippet
searching, cut short or limited to recorded text.
Implementation: [`internal/sessions/search.go`](../../internal/sessions/search.go),
`searchSessions` in [`internal/gui/sessions_manage.go`](../../internal/gui/sessions_manage.go),
[`internal/gui/assets/sessions.js`](../../internal/gui/assets/sessions.js).
[`internal/gui/assets/plugins/sessions/client.js`](../../internal/gui/assets/plugins/sessions/client.js).
Verification: `TestSearchSession*` (`TestSearchSessionReadsOnlyLinesWithTheWords`
for the line filter), `TestContainsFold`, `TestMayHoldSkipsAFileWithoutTheWords`,
`TestGatewayTitleAndSearch`, `TestSessionsSearch*`; browser
+1 -1
View File
@@ -15,7 +15,7 @@ three.
| Backend | `startBackend` starts the gateway this process serves, unless another magpie already serves it. In that case this process only shows the other one's status (`gw` is nil). `stopServing` drains requests in flight. | [`backend.go`](../../internal/gui/backend.go) |
| API and assets | `Handler` serves `assets/` (embedded with `//go:embed assets`) and the `/api/*` routes, such as `/api/state`, `/api/set` and `/api/agents/{action}/{id}`. `held` lets one API request's reads share one catalog build (`provider.Hold`), and drops it after any write. `revalidated` and `versionedPage` name each script by its content hash, so a cache never serves an old `app.js` under a new page; a file asked for under its current hash (`?v=`) is cached for good (`immutable`), anything else is revalidated by its ETag. | [`api.go`](../../internal/gui/api.go) |
| Browser mode | `StartWeb` serves the page and the gateway for `magpie web`. The browser signs in with a run key in a link. Gateway mode shows Providers, Gateway, Routing, Usage, Sessions, Plugins and Settings on a machine that is only a gateway. `webHandler` gzips the page's text files and the API's JSON for a browser that takes gzip (`webCompressed`, with a `-gzip` ETag that still answers 304); the app's own windows read the page in-process and get it uncompressed. | [`web.go`](../../internal/gui/web.go), [`gatewaymode.go`](../../internal/gui/gatewaymode.go) |
| The page | `app.js` keeps one state object per view and renders it into a list, with no framework. The views have their own files: `routing.js`, `library.js`, `plugins.js`, `sessions.js` and `context.js` (Usage's Context tab, and the context window card the Routing page draws under a request's story, fed by `/api/context` in `context.go`, which scores and tags each agent; clicking a part, a cell or an item opens its text from `/api/context/text`, the last 10 requests' masked bodies in memory (`openCtxText`), rendered 100 items and 20000 characters at a time; its "Tuned for you" cards are fed by `/api/tune` in `tune.go`, see [agent wiring](agent-wiring.md)). Strings go through `t()` with translations in `i18n.js` (zh, zh-TW, ja and de; the English text is the key and the fallback). zh-TW is Traditional Chinese with Taiwan's words; a system language of zh-TW, zh-HK, zh-MO or any zh-Hant picks it, and the tray menu and notifications follow (`trayLang`). Dropdowns use `openProtoMenu`. Every app menu (`openProtoMenu`, `openRowMenu`, `openSessCombo`) is placed by `placeMenu`: under its anchor, or over it when the window runs out below; one that fits neither way takes the larger room, its height held to it, and scrolls inside itself, and a scroll inside a menu doesn't close it (#1437, `removed-groups-menu-scroll.test.cjs`). The highest any popover goes is `popTop`: 8px under `header.top` on a Mac window, where the traffic lights are drawn over the page, and 8px from the top elsewhere; `placeMenu`, the field picker's `placePop` (which also holds `#pop`'s height to that room) and an agent's model list (`openAgentModels`) all use it (#1573, `popover-mac-chrome.test.cjs`). Scrolling is done only by `scrollOnPurpose(e)` with the reader's event. | [`assets/app.js`](../../internal/gui/assets/app.js), [`assets/i18n.js`](../../internal/gui/assets/i18n.js) |
| The page | `app.js` keeps one state object per view and renders it into a list, with no framework. The views have their own files: `routing.js`, `library.js`, `plugins.js` and `context.js`, and those a plugin adds under `assets/plugins/<id>/` (the Gateway and Sessions pages, see [plugin runtime](plugin-runtime.md)) (Usage's Context tab, and the context window card the Routing page draws under a request's story, fed by `/api/context` in `context.go`, which scores and tags each agent; clicking a part, a cell or an item opens its text from `/api/context/text`, the last 10 requests' masked bodies in memory (`openCtxText`), rendered 100 items and 20000 characters at a time; its "Tuned for you" cards are fed by `/api/tune` in `tune.go`, see [agent wiring](agent-wiring.md)). Strings go through `t()` with translations in `i18n.js`, and a plugin's own in its `i18n.js` (zh, zh-TW, ja and de; the English text is the key and the fallback). zh-TW is Traditional Chinese with Taiwan's words; a system language of zh-TW, zh-HK, zh-MO or any zh-Hant picks it, and the tray menu and notifications follow (`trayLang`). Dropdowns use `openProtoMenu`. Every app menu (`openProtoMenu`, `openRowMenu`, `openSessCombo`) is placed by `placeMenu`: under its anchor, or over it when the window runs out below; one that fits neither way takes the larger room, its height held to it, and scrolls inside itself, and a scroll inside a menu doesn't close it (#1437, `removed-groups-menu-scroll.test.cjs`). The highest any popover goes is `popTop`: 8px under `header.top` on a Mac window, where the traffic lights are drawn over the page, and 8px from the top elsewhere; `placeMenu`, the field picker's `placePop` (which also holds `#pop`'s height to that room) and an agent's model list (`openAgentModels`) all use it (#1573, `popover-mac-chrome.test.cjs`). Scrolling is done only by `scrollOnPurpose(e)` with the reader's event. | [`assets/app.js`](../../internal/gui/assets/app.js), [`assets/i18n.js`](../../internal/gui/assets/i18n.js) |
| Window navigation | In the window from 1024 points wide (`SIDE_AT`, the same width as app.css's `side-nav` rules), `layoutNav` moves the brand, the pages (`#nav`) and Settings into the sidebar (`#side`): the pages in four groups (Work, Models, Insights, Extend; a group none of whose pages shows, as in gateway mode, leaves out its name), the gateway's address at its foot (`sideGwRead`, read from `/api/providers` only while there is a sidebar), and the header a breadcrumb (`renderCrumb`). The open page's own tabs (`NAV_SUBS`: Usage, Library, Plugins, Settings) are listed under it as `.nav-s` rows (`role="tab"`, `data-of` the page tab's id) and the page's strip is hidden; a row's click clicks that tab at once, the selection (`.nav-hl`) having set off as the row was pressed (`navSubGlide`; back if the press leaves the row), and is the list's only shape: a row hovered or pressed has no ground of its own, and a `MutationObserver` draws the list again when the strip changes. A page's tabs share its one scroll, so a row that picks another tab opens it at its top (`scrollOnPurpose` with the row's click); the tab already open, picked again, leaves the page where it is (`sidebar-tab-top.test.cjs`). The list opens and folds with an iOS-like spring (`navSubEnter`, `navSubLeave`; none under reduced motion), and a folding list is out of reach at once. Narrower, the page beside a sidebar would be narrower than Usage's requests table needs (768 points), so they go back into the header's row, as a Mac sidebar gives way in a narrow window. At every width the reader can pick the sidebar or the header's tabs from the title bar's button (`#sideToggle`, ⌃⌘S or Ctrl+Shift+S; `toggleSideNav`), kept in localStorage `magpie.navLayout` (`side` or `top`) and so laid out from the first frame; none picked, the sidebar comes from `SIDE_AT`. Picked in a narrow window the sidebar is narrower (184 points under 860), and magpie web on a phone keeps its own tab bar and has no button. The two layouts trade places in a view transition (`navMorph`, app.css `.nav-morph`): the sidebar slides, each page's tab flies to its place in the other, and the page slides as one (its old image dropped, so no line prints twice); without view transitions, under reduced motion, or in the Linux app the change is at once: WebKitGTK with compositing off (`WEBKIT_DISABLE_COMPOSITING_MODE`, which `webkit_linux.go` sets under Wayland) crashes in a view transition. Elsewhere a transition still going after `MORPH_MAX` (1.5s) is skipped, so a webview that never ends one can't leave the window on the old layout's picture. See `side-toggle.test.cjs`. A window made wider or narrower drops what a click held (`heldWidth`): the page laid out again isn't the click's doing. The reader's own place is kept instead for a second while the page is laid out again (`relaid`, a `ResizeObserver` on the open page's parts calling `backToReader`): crossing `SIDE_AT` the browser clamps the scroll to each layout it passes through, and the page ended short of its foot (#1672, `text-size.test.cjs`). See `sidebar.test.cjs`. A sidebar longer than a short window keeps no scroll bar beside its pages: the native bars of `.side-scroll` and `.side-foot` are hidden, and `sideBars` lays a thin bar over each box's edge that shows while it scrolls, fades about a second after it stops (kept while hovered or dragged), can be dragged or clicked to page, and is gone when the box fits, the same in WebKit, WebView2 and WebKitGTK. See `sidebar-overlay-scrollbar.test.cjs`. The window opens on the page the reader last left, as a Mac app comes back as it was (molvqingtai and lc on Discord): `show` keeps the page in localStorage `magpie.lastView` (which the app's webview keeps across restarts, as it keeps `magpie.navLayout`), and `keptView` opens it at start. A page asked for in the address (`?view=`, the tray's links, a reload) wins, Agents too; a kept name that is no page opens the first page, and one gateway mode leaves out opens Providers (`show`). Opening on it scrolls nothing. See `last-page.test.cjs`. | [`assets/app.js`](../../internal/gui/assets/app.js), [`assets/app.css`](../../internal/gui/assets/app.css) |
| Built-in plugins | Plugins › Built-in, the page's first tab (`drawBuiltin` in `plugins.js`, rows by `renderBuiltins` in `app.js`), lists magpie's built-in plugins, each with a name, a line on what it is and a switch: Routing groups, Library, Observability, Sessions, Warm-up and check-in, and the Gateway page (Essential). A plugin on with settings has their rows under its row, drawn from its schema by the kernel's `ui.form`, and a change posts `{id, config}`. The Gateway page is drawn by its plugin's own scripts through the window's kernel (`kernel.js`, `assets/plugins/gateway/`); see the [plugin runtime](plugin-runtime.md), "The window's kernel". They are `plugins/*` registered with the [plugin runtime](plugin-runtime.md); `GET /api/plugins/builtin` says each one (`builtinJSON`: on is active, the user's own choice, what of it is in use) and `POST {id, on}` (or `{id, config}`) writes plugins.yml. A page marks what goes with a plugin `data-feature="<id>"`. Off, `featureStyle` hides everything so marked (rows drawn later too), `navHides` leaves its page's tab out of the sidebar and the header, `show` opens Agents for an address kept for it, and `setSetTab`, `partShows` and `findSettings` leave its Settings tab and rows out, of the search too. One in use stays on: its switch is disabled and the row says what uses it, and the POST refuses it off. A plugins.yml that doesn't parse is said above the list and no switch moves. `boot.js` says which are off (`featuresOff`) and their settings (`pluginConfig`) before the first paint, and `settings.builtins` carries the list on every state read. The TUI doesn't follow them. See `builtins.test.cjs`, `builtins_test.go`. | [`builtins.go`](../../internal/gui/builtins.go), [`assets/plugins.js`](../../internal/gui/assets/plugins.js), [`assets/app.js`](../../internal/gui/assets/app.js) |
| No GUI build | `-tags nogui` builds magpie without the GUI: `hasGUI` is false and `runGUI` says to use `magpie tui`. The files of `internal/gui` that need Wails build under `!nogui`. | [`gui_off.go`](../../internal/cli/gui_off.go) |
+35 -5
View File
@@ -7,7 +7,9 @@ order their services make, and disposes of what each registered when it is
turned off. `plugins.yml` says which are on. This page describes P0 (the
runtime, the file and the window's switch) and P1 (the window's kernel: a
plugin's page, its error boundary, the kit it draws with and its settings
form, with the Gateway page as the first plugin to draw its own page). OpenCode plugins (npm packages in
form, with the Gateway page as the first plugin to draw its own page), and
P2 so far (a page moved out of the core whole: its code, styles and words,
starting with Sessions). OpenCode plugins (npm packages in
the plugin host) are a different thing; see
[provider and plugin ownership](provider-plugins.md) and
[gateway middleware](gateway-middleware.md).
@@ -17,7 +19,7 @@ the plugin host) are a different thing; see
| Part | What it does | Source |
| --- | --- | --- |
| Registry | A plugin calls `pluginrt.Register(Manifest)` from `init`. `Registered` lists them by id; two with one id panic. `plugins/all` imports every plugin, and only `main.go` imports `plugins/all`, so core code and its tests run without any. | [`pluginrt.go`](../../internal/pluginrt/pluginrt.go), [`plugins/all/all.go`](../../plugins/all/all.go) |
| Manifest | `ID`, `API` (a caret range of the host API, `"^1"`; `pluginrt.API` is `"1.0"`), `Requires` and `Provides` (services), `Essential`, `Name`/`Sub` (English; the window translates them), `One`/`Many` (what is in use, of 1 or `{n}`), `InUse`, `Apply`, `Parts` (`{Slot, Key}`: the window's parts it is), `Defaults` (its config), `Settings` (a struct of its settings, made into `Defaults` and a schema at `Register`) and `Client` (its scripts in the window, under `internal/gui/assets/plugins/<id>/`). | [`pluginrt.go`](../../internal/pluginrt/pluginrt.go) |
| Manifest | `ID`, `API` (a caret range of the host API, `"^1"`; `pluginrt.API` is `"1.0"`), `Requires` and `Provides` (services), `Essential`, `Name`/`Sub` (English; the window translates them), `One`/`Many` (what is in use, of 1 or `{n}`), `InUse`, `Apply`, `Parts` (`{Slot, Key}`: the window's parts it is), `Defaults` (its config), `Settings` (a struct of its settings, made into `Defaults` and a schema at `Register`) and `Client` (its files in the window, under `internal/gui/assets/plugins/<id>/`: scripts, its `i18n.js` and a `.css`). | [`pluginrt.go`](../../internal/pluginrt/pluginrt.go) |
| Lifecycle | `Runtime.Reconcile(on, config)`. Off first: every plugin no longer wanted, and every one requiring a service one of those provided, is disposed newest first. Then on: each wanted plugin whose requirements are provided (by `Core`, `settings`, `providers`, `gateway`, `window`, or an active plugin) is applied, again and again until no more can be. States: `off`, `pending` (waiting for a service, logged), `active`, `failed` (Apply returned an error or panicked, or the API range doesn't match; what it registered before is undone), `disposed`. A failed plugin never stops the others. | [`pluginrt.go`](../../internal/pluginrt/pluginrt.go) |
| Ctx | What `Apply` gets: `OnDispose(f)`, `Contribute(slot, key)`, `Provide(name, v)` (withdrawn when it goes), `Service(name)`, and its composed `Config`. Disposers run in reverse, each one's panic logged and the rest still run. | [`pluginrt.go`](../../internal/pluginrt/pluginrt.go) |
| plugins.yml | `appdir.Config()/plugins.yml`: `preset` (`essentials` or `all`) and `plugins`, rows of `{id, enabled, config}` holding only what the user set. | [`config.go`](../../internal/pluginrt/config.go) |
@@ -46,8 +48,17 @@ plugins' scripts and `app.js`, all classic scripts sharing one scope. It is
`magpie.start()` when it is set up, which mounts every page, and then each
hook through `magpie.call(key, hook, …)`: `loading`, `draft` and `render`
around `/api/providers` for a page that `loads: "providers"`, `open` when
`show` opens it. `magpie.pages()` adds the plugins' pages to the views
`show` and `?view=` know.
`show` opens it (a promise it gives back puts the reader back where they
were once it settles), `relang` when the language changes on it.
`title` is the page's header (English; `show` translates it).
`magpie.pages()` adds the plugins' pages to the views `show` and
`?view=` know.
- **Words.** A plugin's `i18n.js` calls `magpie.strings({zh, "zh-TW", ja,
de})`, added to i18n.js's `I18N` before app.js translates anything. A key
already there is logged and not taken. `tests/strings.cjs` reads them as
the page does, for `gui-de`, `gui-ja`, `gui-zh-tw` and `i18n-keys`
(no key in two files, every key of a plugin's file in all four
languages).
- **Error boundary.** A hook that throws, or whose promise fails, is caught
in `run`: logged with `[magpie] <plugin>: <key>.<hook>`, and the page is
replaced by a card saying "This page stopped working", the error's message
@@ -73,7 +84,24 @@ was in app.js, ending in its `magpie.plugin("gateway", …)`. Still in
app.js and app.css: its styles, its sidebar and header buttons
(`data-feature="gateway"` in index.html), and `decideEntry`, which the model
info card shares. `TestBuiltinClientsLoaded` holds index.html to load every
plugin's `Client` file between kernel.js and app.js, each with its `?v=`.
plugin's `Client` script between kernel.js and app.js, and its stylesheet in
the head, each with its `?v=`.
## Pages moved out (P2)
Each page moves in a commit of its own, whole: its code into
`assets/plugins/<id>/client.js`, its styles beside it, and the words only it
says from i18n.js into its `i18n.js` (a key app.js, another page, index.html
or Go also says stays in i18n.js).
- **Sessions** (`plugins/sessions`, `Client: i18n.js, sessions.css,
client.js`): the page that was `sessions.js`, its markup all drawn by its
code, so its part has no `html`. Its hooks: `open` and `relang` load it,
and `reveal(s, e)` is the Usage page's way in (a session's row and All
sessions, #752), called through `magpie.call("sessions", "reveal", …)`,
so with no Sessions plugin it does nothing. Still in app.js: the Usage
page's Sessions tab (`/api/sessions`) and Settings' session terminal row
(`data-feature="sessions"`).
## Source of truth and composing
@@ -138,6 +166,8 @@ remembering its layer (`Source`):
- `go test ./internal/pluginrt/ -run 'TestSchemaOf|TestValidate|TestSetConfig'`.
- `go test ./internal/gui/ -run 'TestBuiltin|TestBootSaysBuiltinsOff'`
(`TestBuiltinConfig`, `TestBuiltinClientsLoaded`).
- `i18n-keys`, `gui-de`, `gui-ja`, `gui-zh-tw`, and a moved page's own
tests (`sessions-*`, `session-*`, `sess-*`) in Chromium and WebKit.
- `internal/gui/tests/builtins.test.cjs` (the settings form) and
`plugin-kernel.test.cjs` (the boundary, Try again, `callsPage` from
boot.js and from a change) in Chromium and WebKit, every language, 1100,
+1 -1
View File
@@ -244,7 +244,7 @@ func TestLoopGuardLeavesOrdinaryRepliesAlone(t *testing.T) {
var texts = map[string]string{}
for _, f := range []string{
"internal/gateway/gateway.go", "internal/gateway/fallback.go", "internal/gateway/anthropic.go",
"internal/gui/assets/app.js", "internal/gui/assets/i18n.js", "internal/gui/assets/app.css", "internal/gui/assets/routing.js", "internal/gui/assets/sessions.js", "internal/gui/assets/index.html",
"internal/gui/assets/app.js", "internal/gui/assets/i18n.js", "internal/gui/assets/app.css", "internal/gui/assets/routing.js", "internal/gui/assets/plugins/sessions/client.js", "internal/gui/assets/index.html",
"docs/code-standards.md", "LESSONS.md", "docs/subsystems/gateway-routing.md", "docs/subsystems/providers-accounts.md",
"go.sum",
} {
+8 -8
View File
@@ -3844,7 +3844,7 @@ async function load(again) {
again = false; // the Usage page too is drawn again, in the new language
if (view === "library") window.loadLibrary?.();
if (view === "plugins") window.loadPlugins?.();
if (view === "sessions") window.loadSessionsPage?.();
magpie.call(view, "relang"); // a plugin's page
}
// a Library drawn before the state came counted the hidden agents too
else if (view === "library" && hiddenIds().join() !== hid) window.redrawLibrary?.();
@@ -20066,7 +20066,7 @@ function sessionItem(s) {
const open = (e) => {
if (window.getSelection()?.toString()) return;
if (featuresOff.has("sessions")) return; // Sessions is switched off: there is no page to open it on
window.openSessionOnPage?.(s, e);
magpie.call("sessions", "reveal", s, e);
};
r.onclick = open;
r.onkeydown = (e) => { if (e.key === "Enter" || e.key === " ") { e.preventDefault(); open(e); } };
@@ -20121,7 +20121,7 @@ function viaText(v) {
}
// All sessions: the Sessions page, on the agent picked here if one is
$("#sessAll").onclick = (e) => window.openSessionOnPage?.(sessAgent === "all" ? {} : { agent: sessAgent }, e);
$("#sessAll").onclick = (e) => magpie.call("sessions", "reveal", sessAgent === "all" ? {} : { agent: sessAgent }, e);
$("#sessQ").oninput = (e) => { sessQuery = e.target.value; if (sessions) renderSessions(); };
$("#sessQ").onkeydown = (e) => { if (e.key === "Escape" && e.target.value) { e.stopPropagation(); e.target.value = ""; sessQuery = ""; if (sessions) renderSessions(); } };
@@ -23931,7 +23931,7 @@ async function show(v) {
view = v;
// the page the reader leaves is the one the window opens on next (keptView)
if (mode === "window") { try { localStorage.setItem("magpie.lastView", v); } catch { /* not kept */ } }
const title = ({ agents: "Agents", providers: "Providers", gateway: "Gateway", routing: "Routing", usage: "Usage", sessions: "Sessions", library: "Library", plugins: "Plugins", settings: "Settings" })[v];
const title = magpie.page(v)?.title ?? ({ agents: "Agents", providers: "Providers", routing: "Routing", usage: "Usage", library: "Library", plugins: "Plugins", settings: "Settings" })[v];
$("#pageTitle").dataset.en = title;
$("#pageTitle").textContent = t(title);
if (mode === "window") {
@@ -23945,14 +23945,15 @@ async function show(v) {
$("#prefs").classList.toggle("on", v === "settings");
if (v === "settings") $("#prefs").setAttribute("aria-current", "page"); else $("#prefs").removeAttribute("aria-current");
navSubs();
for (const id of ["agents", "providers", "routing", "usage", "sessions", "library", "plugins", "settings", ...magpie.pages()]) $("#view-" + id).hidden = v !== id;
for (const id of ["agents", "providers", "routing", "usage", "library", "plugins", "settings", ...magpie.pages()]) $("#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);
closePicker();
closeAgentModels();
if (v !== "providers" && editing !== null) cancelEdit(true);
magpie.call(v, "open");
// a plugin's page loads what it shows; back once it has
magpie.call(v, "open")?.then?.(back);
if (v === "providers" || v === "routing" || providersPage(v)) loadProviders().then(back, (e) => status(e.message, "err"));
// Routing's accounts show their windows as the Usage page read them
// (#1833): what is kept, read in an ordinary way, never an asked read
@@ -23961,7 +23962,6 @@ async function show(v) {
if (v === "settings") loadSettings().then(back, (e) => status(e.message, "err"));
if (v === "library") window.loadLibrary?.()?.then(back);
if (v === "plugins") window.loadPlugins?.()?.then(back);
if (v === "sessions") window.loadSessionsPage?.()?.then(back);
syncTitle();
syncURL();
return true;
@@ -25103,7 +25103,7 @@ navHides(); // the pages built-in plugins switched off have, from boot.js
// from the tray or a reload) first, then the one kept; a page gateway mode
// leaves out, or one there is no longer, gives way to the first page.
// the pages the window can open on besides the first (Agents)
const OPEN_VIEWS = ["providers", "routing", "usage", "sessions", "library", "plugins", "settings", ...magpie.pages()];
const OPEN_VIEWS = ["providers", "routing", "usage", "library", "plugins", "settings", ...magpie.pages()];
function keptView() {
const asked = params.get("view");
if (asked === "agents" || OPEN_VIEWS.includes(asked)) return asked;
-260
View File
@@ -22,14 +22,7 @@ const I18N = {
"{n} agents hidden": "已隐藏 {n} 个 Agent",
"{n} agent unhidden": "已取消隐藏 {n} 个 Agent",
"{n} agents unhidden": "已取消隐藏 {n} 个 Agent",
"Relocate project": "迁移项目会话",
"Relocate Claude Code project": "迁移 Claude Code 项目会话",
"New absolute project path": "新的项目绝对路径",
"Preview relocation": "预览迁移",
"Confirm relocation": "确认迁移",
"Close Claude Code and its editor sessions first. This moves the entire project's sessions, not just filtered or selected rows. Existing target storage is never overwritten. Desktop-only sessions are not changed.": "请先关闭 Claude Code 及编辑器内的会话。此操作迁移整个项目的会话,不仅是筛选或勾选的部分。不覆盖目标已有的会话存储,也不修改桌面端独立存储的会话。",
"Relocation complete. Original files and recovery manifest: {dir}": "迁移完成。原始文件及恢复清单保存在:{dir}",
"Move {n} sessions ({size}) from {from} to {to}. Originals are retained outside Claude's project list. Historical message text is unchanged.": "将 {n} 个会话({size})从 {from} 迁移至 {to}。原始文件保留在 Claude 项目列表之外,历史消息正文不变。",
"Get started": "快速上手",
"{n} of {m} done": "已完成 {n}/{m}",
"Hide Get started": "隐藏快速上手",
@@ -134,12 +127,6 @@ const I18N = {
"Through magpie": "经过 magpie 的",
"Enable": "启用",
"Record gateway conversations": "记录网关对话",
"Prompts, replies and tool results may contain private code and files. Store them on this server for up to 7 days (256 MiB total)? Recognized secrets are masked, but this is not a privacy guarantee.": "提示词、回复和工具结果可能包含私有代码与文件。是否在此服务器保存最多 7 天(总计 256 MiB)?已识别的密钥会被遮蔽,但不能保证所有敏感信息都被移除。",
"Stop recording and clear saved conversations": "停止记录并清空已保存的对话",
"Delete saved conversations…": "删除已保存的对话…",
"On: what agents send through the gateway, and the replies, are kept on this computer only, for up to 7 days (256 MiB), to read under each gateway session": "已开启:Agent 经网关发送的内容和回复只保存在这台电脑上,最多 7 天(256 MiB),可在每个网关会话下查看",
"Off: gateway sessions show only what they used. Turned on, their text is kept on this computer only, for up to 7 days (256 MiB)": "已关闭:网关会话只显示用量。开启后,对话内容只保存在这台电脑上,最多 7 天(256 MiB)",
"Delete all locally recorded gateway conversation content? Usage totals and native session files are kept.": "删除本地记录的全部网关对话内容?用量统计与原生会话文件会保留。",
"No saved gateway content for this session": "此会话没有已保存的网关正文",
"Recorded gateway traffic only; earlier, expired or uncaptured content may be missing": "仅包含已记录的网关内容;更早、已过期或未捕获的内容可能缺失",
// the context window (context.js)
@@ -474,7 +461,6 @@ const I18N = {
"No agents found": "没有找到 Agent",
"Install Claude Code, Codex, Gemini CLI, OpenCode… and magpie will list them here.": "安装 Claude Code、Codex、Gemini CLI、OpenCode 等之后,会列在这里。",
"Show {n} more": "显示其余 {n} 个",
"Show {n} more folders": "显示其余 {n} 个文件夹",
"Show less": "收起",
"Expand the list": "展开列表",
"Collapse the list": "收起列表",
@@ -2704,63 +2690,16 @@ const I18N = {
"Launch command": "启动命令",
"Copy launch command": "复制启动命令",
"Copied — run it to start {name} on magpie": "已复制,运行它即可让 {name} 走 magpie",
"Copy the command that resumes it: {cmd}": "复制继续这个会话的命令:{cmd}",
"Open in session terminal": "在所选终端中打开",
"Opening in session terminal": "正在所选终端中打开",
// the Sessions page (sessions.js)
"Filter sessions": "筛选会话",
"No sessions yet": "还没有会话",
"Claude Code's, Codex's, Hermes's, OpenCode's and Pi's sessions on this computer show up here, by the folder they ran in.": "本机 Claude Code、Codex、Hermes、OpenCode 和 Pi 的会话按运行目录列在这里。",
"magpie can list {agent}'s sessions and resume them, but not delete them: they aren't kept as files of their own.": "可列出并继续 {agent} 的会话,但无法删除:它们没有独立文件。",
"magpie can list {agent}'s sessions, but cannot resume or delete them.": "可列出 {agent} 的会话,但无法继续或删除。",
"These {agent} sessions are read only; magpie can list them, but cannot resume or delete them.": "这些 {agent} 会话只读:可列出,但无法继续或删除。",
"Some {agent} sessions are read only and cannot be deleted.": "部分 {agent} 会话为只读,无法删除。",
"In WSL {distro}: resumed there through wsl.exe": "在 WSL {distro} 中:通过 wsl.exe 在那里恢复",
"Select every session shown": "选中所有显示的会话",
"Select": "选择",
"Delete": "删除",
"Trash": "回收站",
"No folder": "无文件夹",
"deleted {when}": "{when}删除",
"Delete this session?": "删除这个会话?",
"Delete {n} sessions?": "删除这 {n} 个会话?",
"Delete all {n} sessions in {folder}?": "删除 {folder} 下的全部 {n} 个会话?",
"Delete all {n} sessions in {k} folders?": "删除 {k} 个文件夹下的全部 {n} 个会话?",
"Select every session in {folder}": "选中 {folder} 下的全部会话",
"Their files are moved to magpie's trash ({dir}), not erased: Trash puts them back. A session written to in the last minute is left alone, as {agent} may still be running it.": "会话文件移到 magpie 的回收站({dir}),不会抹除,可在「回收站」恢复。最近一分钟内有写入的会话不处理,{agent} 可能仍在运行它。",
"Seen through the gateway": "经网关看到的",
"These {agent} sessions were seen only through magpie's gateway: {agent}'s own files of them aren't on this computer (it may run on another one, in a container or with another config folder), so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "这些 {agent} 会话只经 magpie 网关看到:{agent} 自己的会话文件不在这台电脑上(它可能运行在另一台电脑、容器里,或用了另一个配置目录),所以无法在这里继续。删除会把它从列表移除,并把 magpie 录下的对话(如有)移到回收站;用量页仍保留它的花费。",
"Sessions under \"Seen through the gateway\" have no {agent} files on this computer, so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "「经网关看到的」下的会话在这台电脑上没有 {agent} 文件,所以无法在这里继续。删除会把它从列表移除,并把 magpie 录下的对话(如有)移到回收站;用量页仍保留它的花费。",
"{size} recorded": "已录 {size}",
"A session seen only through the gateway leaves this list, and any conversation magpie recorded of it is moved to magpie's trash ({dir}): Trash puts it back. {agent}'s own files elsewhere are not touched, and Usage keeps what it spent. One with a request in the last minute is left alone.": "只经网关看到的会话会从列表移除,magpie 录下的对话(如有)移到 magpie 的回收站({dir}),可在「回收站」恢复。别处 {agent} 自己的文件不会被改动,用量页仍保留它的花费。最近一分钟内有请求的会话不处理。",
"Conversations magpie recorded through the gateway still expire after 7 days here, and Delete saved conversations… erases them too.": "经网关录下的对话在回收站里同样 7 天后过期,「删除已保存的对话…」也会把它们一并删除。",
"Moved to magpie's trash": "已移到 magpie 的回收站",
"1 Codex session was made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so it doesn't show there.": "有 1 个 Codex 会话是用其他供应商({from})创建的。Codex 现在的历史列表只显示 {to} 的会话,所以看不到它。",
"{n} Codex sessions were made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so they don't show there.": "有 {n} 个 Codex 会话是用其他供应商({from})创建的。Codex 现在的历史列表只显示 {to} 的会话,所以看不到它们。",
"Move to {to}…": "迁移到 {to}…",
"Moved 1 session to {to}": "已把 1 个会话迁移到 {to}",
"Moved {n} sessions to {to}": "已把 {n} 个会话迁移到 {to}",
"Moved 1 session back": "已把 1 个会话迁移回去",
"Moved {n} sessions back": "已把 {n} 个会话迁移回去",
"Move sessions to {to}?": "把会话迁移到 {to}?",
"Only the provider each one names is changed, in its files and in Codex's database: its messages, id, title and archive stay as they are. A copy of its files is kept in magpie's trash folder first, and Undo moves them back. A session written to in the last minute is left alone.": "只改每个会话在文件和 Codex 数据库里记录的供应商,消息、会话 ID、标题和归档状态都不变。改之前会先在 magpie 的回收站文件夹里备份一份文件,「撤销」可以迁移回去。最近一分钟内还在写入的会话不会改动。",
"Made with {from}: Codex's history lists only {to}'s sessions now": "用 {from} 创建:Codex 现在的历史列表只显示 {to} 的会话",
"{n} sessions moved to magpie's trash": "{n} 个会话已移到 magpie 的回收站",
"{title} is still being written to; close it in {agent} and try again in a minute": "「{title}」仍在写入;请在 {agent} 中关闭它,一分钟后再试",
"{n} sessions are still being written to; close them in {agent} and try again in a minute": "{n} 个会话仍在写入;请在 {agent} 中关闭它们,一分钟后再试",
"Restore": "恢复",
"{title} restored": "已恢复「{title}」",
"Trash is empty": "回收站是空的",
"Sessions deleted here wait in magpie's trash, to be restored.": "在此删除的会话进入 magpie 回收站,可随时恢复。",
"Deleted sessions are kept in {dir} until you erase them here; magpie never erases them by itself.": "已删除的会话保存在 {dir},在此彻底删除前不会自动清除。",
"Empty trash": "清空回收站",
"Delete forever": "彻底删除",
"Empty magpie's trash?": "清空 magpie 的回收站?",
"Delete this session forever?": "彻底删除这个会话?",
"Every session in magpie's trash is erased for good: it can't be restored.": "回收站中的所有会话将被彻底删除,无法恢复。",
"Its files are erased for good: it can't be restored.": "其文件将被彻底删除,无法恢复。",
"Erased for good": "已彻底删除",
"{n} sessions erased for good": "已彻底删除 {n} 个会话",
"Session id": "会话 ID",
"(no prompt)": "(无提示词)",
"session": "个会话",
@@ -2771,10 +2710,6 @@ const I18N = {
"at effective prices": "按生效价格",
"just now": "刚刚",
"No session matches.": "没有匹配的会话。",
"Searching what was said…": "正在搜索对话内容…",
"Couldn't search what was said: {error}": "无法搜索对话内容:{error}",
"{agent}'s own files of its sessions can't be read here, so only what magpie recorded through the gateway is searched.": "这里读不到 {agent} 自己的会话文件,只搜索 magpie 通过网关记录的内容。",
"Searched what was said in the latest {n} of {total} sessions.": "已搜索最近 {n} 个会话的对话内容(共 {total} 个)。",
"No sessions yet. Claude Code's, Codex's, Hermes, OpenCode's and Pi's sessions on this computer show up here, with what each cost and the command that resumes it.": "还没有会话。本机 Claude Code、Codex、Hermes、OpenCode 和 Pi 的会话会显示在这里,附费用和继续会话的命令。",
"Reading the agents' session files…": "正在读取 Agent 的会话文件…",
"Totals count every session in the agents' own files; the list is the latest {n} by activity · {dirs}": "合计含 Agent 文件中的全部会话;列表为最近活动的 {n} 个 · {dirs}",
@@ -4783,14 +4718,7 @@ const I18N = {
"{n} agents hidden": "已隱藏 {n} 個 Agent",
"{n} agent unhidden": "已取消隱藏 {n} 個 Agent",
"{n} agents unhidden": "已取消隱藏 {n} 個 Agent",
"Relocate project": "遷移專案會話",
"Relocate Claude Code project": "遷移 Claude Code 專案會話",
"New absolute project path": "新的專案絕對路徑",
"Preview relocation": "預覽遷移",
"Confirm relocation": "確認遷移",
"Close Claude Code and its editor sessions first. This moves the entire project's sessions, not just filtered or selected rows. Existing target storage is never overwritten. Desktop-only sessions are not changed.": "請先關閉 Claude Code 及編輯器內的會話。此操作遷移整個專案的會話,不只是篩選或勾選的部分。不會覆寫目標已有的會話儲存,也不修改桌面版獨立儲存的會話。",
"Relocation complete. Original files and recovery manifest: {dir}": "遷移完成。原始檔案及復原清單保存在:{dir}",
"Move {n} sessions ({size}) from {from} to {to}. Originals are retained outside Claude's project list. Historical message text is unchanged.": "將 {n} 個會話({size})從 {from} 遷移至 {to}。原始檔案保留在 Claude 專案列表之外,歷史訊息內文不變。",
"Get started": "快速上手",
"{n} of {m} done": "已完成 {n}/{m}",
"Hide Get started": "隱藏快速上手",
@@ -4909,12 +4837,6 @@ const I18N = {
"Claude Code keeps its claude.ai sign-in (/login), so those work; it sends that sign-in to magpie, which never passes it on. Remote Control and ultrareview stay off: Claude Code has them only on Anthropic's own address": "Claude Code 保留 claude.ai 登入(/login),上述功能可用;它把這份登入憑證傳給 magpie,magpie 不會轉交到任何地方。Remote Control 和 ultrareview 仍無法使用:Claude Code 只在 Anthropic 官方位址上提供它們",
"Enable": "啟用",
"Record gateway conversations": "記錄閘道對話",
"Prompts, replies and tool results may contain private code and files. Store them on this server for up to 7 days (256 MiB total)? Recognized secrets are masked, but this is not a privacy guarantee.": "提示詞、回覆和工具結果可能包含私人程式碼與檔案。是否在此伺服器儲存最多 7 天(總計 256 MiB)?已辨識的金鑰會被遮蔽,但無法保證所有敏感資訊都被移除。",
"Stop recording and clear saved conversations": "停止記錄並清空已儲存的對話",
"Delete saved conversations…": "刪除已儲存的對話…",
"On: what agents send through the gateway, and the replies, are kept on this computer only, for up to 7 days (256 MiB), to read under each gateway session": "已開啟:Agent 經閘道傳送的內容和回覆只儲存在這臺電腦上,最多 7 天(256 MiB),可在每個閘道會話下查看",
"Off: gateway sessions show only what they used. Turned on, their text is kept on this computer only, for up to 7 days (256 MiB)": "已關閉:閘道會話只顯示用量。開啟後,對話內容只儲存在這臺電腦上,最多 7 天(256 MiB)",
"Delete all locally recorded gateway conversation content? Usage totals and native session files are kept.": "刪除本機記錄的全部閘道對話內容?用量統計與原生工作階段檔案會保留。",
"No saved gateway content for this session": "此工作階段沒有已儲存的閘道內容",
"Recorded gateway traffic only; earlier, expired or uncaptured content may be missing": "僅包含已記錄的閘道內容;更早、已過期或未擷取的內容可能缺失",
// the context window (context.js)
@@ -5238,7 +5160,6 @@ const I18N = {
"No agents found": "沒有找到 Agent",
"Install Claude Code, Codex, Gemini CLI, OpenCode… and magpie will list them here.": "安裝 Claude Code、Codex、Gemini CLI、OpenCode 等之後,會列在這裡。",
"Show {n} more": "顯示其餘 {n} 個",
"Show {n} more folders": "顯示其餘 {n} 個資料夾",
"Show less": "收起",
"Expand the list": "展開列表",
"Collapse the list": "收起列表",
@@ -7445,62 +7366,15 @@ const I18N = {
"Launch command": "啟動命令",
"Copy launch command": "複製啟動命令",
"Copied — run it to start {name} on magpie": "已複製,執行它即可讓 {name} 走 magpie",
"Copy the command that resumes it: {cmd}": "複製繼續這個會話的命令:{cmd}",
"Open in session terminal": "在所選終端機中開啟",
"Opening in session terminal": "正在所選終端機中開啟",
"Filter sessions": "篩選會話",
"No sessions yet": "還沒有會話",
"Claude Code's, Codex's, Hermes's, OpenCode's and Pi's sessions on this computer show up here, by the folder they ran in.": "本機 Claude Code、Codex、Hermes、OpenCode 和 Pi 的會話按執行目錄列在這裡。",
"magpie can list {agent}'s sessions and resume them, but not delete them: they aren't kept as files of their own.": "可列出並繼續 {agent} 的會話,但無法刪除:它們沒有獨立檔案。",
"magpie can list {agent}'s sessions, but cannot resume or delete them.": "可列出 {agent} 的會話,但無法繼續或刪除。",
"These {agent} sessions are read only; magpie can list them, but cannot resume or delete them.": "這些 {agent} 會話只讀:可列出,但無法繼續或刪除。",
"Some {agent} sessions are read only and cannot be deleted.": "部分 {agent} 會話為只讀,無法刪除。",
"In WSL {distro}: resumed there through wsl.exe": "在 WSL {distro} 中:透過 wsl.exe 在那裡恢復",
"Select every session shown": "選中所有顯示的會話",
"Select": "選擇",
"Delete": "刪除",
"Trash": "回收站",
"No folder": "無資料夾",
"deleted {when}": "{when}刪除",
"Delete this session?": "刪除這個會話?",
"Delete {n} sessions?": "刪除這 {n} 個會話?",
"Delete all {n} sessions in {folder}?": "刪除 {folder} 下的全部 {n} 個會話?",
"Delete all {n} sessions in {k} folders?": "刪除 {k} 個資料夾下的全部 {n} 個會話?",
"Select every session in {folder}": "選中 {folder} 下的全部會話",
"Their files are moved to magpie's trash ({dir}), not erased: Trash puts them back. A session written to in the last minute is left alone, as {agent} may still be running it.": "會話檔案移到 magpie 的回收站({dir}),不會抹除,可在「回收站」恢復。最近一分鐘內有寫入的會話不處理,{agent} 可能仍在執行它。",
"Seen through the gateway": "經閘道看到的",
"These {agent} sessions were seen only through magpie's gateway: {agent}'s own files of them aren't on this computer (it may run on another one, in a container or with another config folder), so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "這些 {agent} 會話只經 magpie 閘道看到:{agent} 自己的會話檔案不在這台電腦上(它可能執行在另一台電腦、容器裡,或用了另一個設定目錄),所以無法在這裡繼續。刪除會把它從清單移除,並把 magpie 錄下的對話(如有)移到回收站;用量頁仍保留它的花費。",
"Sessions under \"Seen through the gateway\" have no {agent} files on this computer, so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "「經閘道看到的」下的會話在這台電腦上沒有 {agent} 檔案,所以無法在這裡繼續。刪除會把它從清單移除,並把 magpie 錄下的對話(如有)移到回收站;用量頁仍保留它的花費。",
"{size} recorded": "已錄 {size}",
"A session seen only through the gateway leaves this list, and any conversation magpie recorded of it is moved to magpie's trash ({dir}): Trash puts it back. {agent}'s own files elsewhere are not touched, and Usage keeps what it spent. One with a request in the last minute is left alone.": "只經閘道看到的會話會從清單移除,magpie 錄下的對話(如有)移到 magpie 的回收站({dir}),可在「回收站」恢復。別處 {agent} 自己的檔案不會被改動,用量頁仍保留它的花費。最近一分鐘內有請求的會話不處理。",
"Conversations magpie recorded through the gateway still expire after 7 days here, and Delete saved conversations… erases them too.": "經閘道錄下的對話在回收站裡同樣 7 天後過期,「刪除已儲存的對話…」也會把它們一併刪除。",
"Moved to magpie's trash": "已移到 magpie 的回收站",
"1 Codex session was made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so it doesn't show there.": "有 1 個 Codex 會話是用其他供應商({from})建立的。Codex 現在的歷史列表只顯示 {to} 的會話,所以看不到它。",
"{n} Codex sessions were made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so they don't show there.": "有 {n} 個 Codex 會話是用其他供應商({from})建立的。Codex 現在的歷史列表只顯示 {to} 的會話,所以看不到它們。",
"Move to {to}…": "遷移到 {to}…",
"Moved 1 session to {to}": "已把 1 個會話遷移到 {to}",
"Moved {n} sessions to {to}": "已把 {n} 個會話遷移到 {to}",
"Moved 1 session back": "已把 1 個會話遷移回去",
"Moved {n} sessions back": "已把 {n} 個會話遷移回去",
"Move sessions to {to}?": "把會話遷移到 {to}?",
"Only the provider each one names is changed, in its files and in Codex's database: its messages, id, title and archive stay as they are. A copy of its files is kept in magpie's trash folder first, and Undo moves them back. A session written to in the last minute is left alone.": "只改每個會話在檔案和 Codex 資料庫裡記錄的供應商,訊息、會話 ID、標題和歸檔狀態都不變。改之前會先在 magpie 的回收站資料夾裡備份一份檔案,「復原」可以遷移回去。最近一分鐘內還在寫入的會話不會改動。",
"Made with {from}: Codex's history lists only {to}'s sessions now": "用 {from} 建立:Codex 現在的歷史列表只顯示 {to} 的會話",
"{n} sessions moved to magpie's trash": "{n} 個會話已移到 magpie 的回收站",
"{title} is still being written to; close it in {agent} and try again in a minute": "「{title}」仍在寫入;請在 {agent} 中關閉它,一分鐘後再試",
"{n} sessions are still being written to; close them in {agent} and try again in a minute": "{n} 個會話仍在寫入;請在 {agent} 中關閉它們,一分鐘後再試",
"Restore": "恢復",
"{title} restored": "已恢復「{title}」",
"Trash is empty": "回收站是空的",
"Sessions deleted here wait in magpie's trash, to be restored.": "在此刪除的會話進入 magpie 回收站,可隨時恢復。",
"Deleted sessions are kept in {dir} until you erase them here; magpie never erases them by itself.": "已刪除的會話儲存在 {dir},在此徹底刪除前不會自動清除。",
"Empty trash": "清空回收站",
"Delete forever": "徹底刪除",
"Empty magpie's trash?": "清空 magpie 的回收站?",
"Delete this session forever?": "徹底刪除這個會話?",
"Every session in magpie's trash is erased for good: it can't be restored.": "回收站中的所有會話將被徹底刪除,無法恢復。",
"Its files are erased for good: it can't be restored.": "其檔案將被徹底刪除,無法恢復。",
"Erased for good": "已徹底刪除",
"{n} sessions erased for good": "已徹底刪除 {n} 個會話",
"Session id": "會話 ID",
"(no prompt)": "(無提示詞)",
"session": "個會話",
@@ -7511,10 +7385,6 @@ const I18N = {
"at effective prices": "按生效價格",
"just now": "剛剛",
"No session matches.": "沒有匹配的會話。",
"Searching what was said…": "正在搜尋對話內容…",
"Couldn't search what was said: {error}": "無法搜尋對話內容:{error}",
"{agent}'s own files of its sessions can't be read here, so only what magpie recorded through the gateway is searched.": "這裡讀不到 {agent} 自己的會話檔案,只搜尋 magpie 透過閘道記錄的內容。",
"Searched what was said in the latest {n} of {total} sessions.": "已搜尋最近 {n} 個會話的對話內容(共 {total} 個)。",
"No sessions yet. Claude Code's, Codex's, Hermes, OpenCode's and Pi's sessions on this computer show up here, with what each cost and the command that resumes it.": "還沒有會話。本機 Claude Code、Codex、Hermes、OpenCode 和 Pi 的會話會顯示在這裡,附費用和繼續會話的命令。",
"Reading the agents' session files…": "正在讀取 Agent 的會話檔案…",
"Totals count every session in the agents' own files; the list is the latest {n} by activity · {dirs}": "合計含 Agent 檔案中的全部會話;列表為最近活動的 {n} 個 · {dirs}",
@@ -9515,14 +9385,7 @@ const I18N = {
"{n} agents hidden": "{n} 個のエージェントを非表示にしました",
"{n} agent unhidden": "{n} 個のエージェントの非表示を解除しました",
"{n} agents unhidden": "{n} 個のエージェントの非表示を解除しました",
"Relocate project": "プロジェクトを移動",
"Relocate Claude Code project": "Claude Code プロジェクトのセッションを移動",
"New absolute project path": "新しいプロジェクトの絶対パス",
"Preview relocation": "移動をプレビュー",
"Confirm relocation": "移動を確定",
"Close Claude Code and its editor sessions first. This moves the entire project's sessions, not just filtered or selected rows. Existing target storage is never overwritten. Desktop-only sessions are not changed.": "先に Claude Code とエディター内のセッションを閉じてください。絞り込みや選択した行だけでなく、プロジェクトのセッションすべてを移動します。移動先に既にあるセッションの保存場所は上書きしません。デスクトップ版だけのセッションは変更しません。",
"Relocation complete. Original files and recovery manifest: {dir}": "移動しました。元のファイルと復元用マニフェスト:{dir}",
"Move {n} sessions ({size}) from {from} to {to}. Originals are retained outside Claude's project list. Historical message text is unchanged.": "{n} 件のセッション({size})を {from} から {to} へ移動します。元のファイルは Claude のプロジェクト一覧の外に残します。過去のメッセージ本文は変わりません。",
"Get started": "はじめに",
"{n} of {m} done": "{m} 件中 {n} 件完了",
"Hide Get started": "「はじめに」を隠す",
@@ -9627,12 +9490,6 @@ const I18N = {
"Through magpie": "magpie 経由",
"Enable": "有効にする",
"Record gateway conversations": "ゲートウェイの会話を記録",
"Prompts, replies and tool results may contain private code and files. Store them on this server for up to 7 days (256 MiB total)? Recognized secrets are masked, but this is not a privacy guarantee.": "プロンプト、応答、ツールの結果には非公開のコードやファイルが含まれる場合があります。このサーバーに最大7日間(合計256 MiB)保存しますか?検出された秘密情報は隠されますが、すべての機密情報の除去は保証されません。",
"Stop recording and clear saved conversations": "記録を停止して保存済みの会話を消去",
"Delete saved conversations…": "保存済みの会話を削除…",
"On: what agents send through the gateway, and the replies, are kept on this computer only, for up to 7 days (256 MiB), to read under each gateway session": "オン:エージェントがゲートウェイ経由で送った内容と応答は、このコンピューターにのみ最大 7 日間(256 MiB)保存され、各ゲートウェイセッションで読めます",
"Off: gateway sessions show only what they used. Turned on, their text is kept on this computer only, for up to 7 days (256 MiB)": "オフ:ゲートウェイセッションには使用量のみ表示されます。オンにすると、会話の内容はこのコンピューターにのみ最大 7 日間(256 MiB)保存されます",
"Delete all locally recorded gateway conversation content? Usage totals and native session files are kept.": "ローカルに記録したゲートウェイの会話をすべて削除しますか?使用量の集計と元のセッションファイルは保持されます。",
"No saved gateway content for this session": "このセッションに保存済みのゲートウェイの内容はありません",
"Recorded gateway traffic only; earlier, expired or uncaptured content may be missing": "記録されたゲートウェイ通信のみです。以前の内容、期限切れ、未記録の内容は含まれない場合があります",
// the context window (context.js)
@@ -9954,7 +9811,6 @@ const I18N = {
"No agents found": "エージェントが見つかりません",
"Install Claude Code, Codex, Gemini CLI, OpenCode… and magpie will list them here.": "Claude Code、Codex、Gemini CLI、OpenCode… をインストールすると、magpie がここに表示します。",
"Show {n} more": "さらに {n} 件表示",
"Show {n} more folders": "さらに {n} 個のフォルダを表示",
"Show less": "表示を減らす",
"Expand the list": "リストを広げる",
"Collapse the list": "リストを畳む",
@@ -12187,62 +12043,15 @@ const I18N = {
"Launch command": "起動コマンド",
"Copy launch command": "起動コマンドをコピー",
"Copied — run it to start {name} on magpie": "コピーしました。実行すると {name} が magpie 経由で起動します",
"Copy the command that resumes it: {cmd}": "再開するコマンドをコピー:{cmd}",
"Open in session terminal": "セッション用ターミナルで開く",
"Opening in session terminal": "セッション用ターミナルで開いています",
"Filter sessions": "セッションを絞り込む",
"No sessions yet": "セッションはまだありません",
"Claude Code's, Codex's, Hermes's, OpenCode's and Pi's sessions on this computer show up here, by the folder they ran in.": "このコンピュータ上の Claude Code、Codex、Hermes、OpenCode、Pi のセッションが、実行されたフォルダごとにここに表示されます。",
"magpie can list {agent}'s sessions and resume them, but not delete them: they aren't kept as files of their own.": "magpie は {agent} のセッションを一覧表示・再開できますが、削除はできません。セッションごとのファイルとして保存されていないためです。",
"magpie can list {agent}'s sessions, but cannot resume or delete them.": "magpie は {agent} のセッションを一覧表示できますが、再開や削除はできません。",
"These {agent} sessions are read only; magpie can list them, but cannot resume or delete them.": "これらの {agent} セッションは読み取り専用です。magpie は一覧表示できますが、再開や削除はできません。",
"Some {agent} sessions are read only and cannot be deleted.": "一部の {agent} セッションは読み取り専用のため削除できません。",
"In WSL {distro}: resumed there through wsl.exe": "WSL {distro} 内:wsl.exe 経由でそこで再開します",
"Select every session shown": "表示中のセッションをすべて選択",
"Select": "選択",
"Delete": "削除",
"Trash": "ゴミ箱",
"No folder": "フォルダなし",
"deleted {when}": "{when}に削除",
"Delete this session?": "このセッションを削除しますか?",
"Delete {n} sessions?": "{n} 件のセッションを削除しますか?",
"Delete all {n} sessions in {folder}?": "{folder} のセッション {n} 件をすべて削除しますか?",
"Delete all {n} sessions in {k} folders?": "{k} 個のフォルダのセッション {n} 件をすべて削除しますか?",
"Select every session in {folder}": "{folder} のセッションをすべて選択",
"Their files are moved to magpie's trash ({dir}), not erased: Trash puts them back. A session written to in the last minute is left alone, as {agent} may still be running it.": "ファイルは消去されず、magpie のゴミ箱({dir})に移動されます。「ゴミ箱」から元に戻せます。直近 1 分以内に書き込まれたセッションは、{agent} がまだ実行中の可能性があるため対象外です。",
"Seen through the gateway": "ゲートウェイ経由で確認",
"These {agent} sessions were seen only through magpie's gateway: {agent}'s own files of them aren't on this computer (it may run on another one, in a container or with another config folder), so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "これらの {agent} セッションは magpie のゲートウェイ経由でのみ確認されたものです。{agent} 自身のセッションファイルはこのコンピュータにないため(別のコンピュータやコンテナ、別の設定フォルダで実行されている可能性があります)、ここでは再開できません。削除するとこの一覧から外れ、magpie が記録した会話があればゴミ箱に移動します。使用量ページには使った分が残ります。",
"Sessions under \"Seen through the gateway\" have no {agent} files on this computer, so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "「ゲートウェイ経由で確認」のセッションには、このコンピュータに {agent} のファイルがないため、ここでは再開できません。削除するとこの一覧から外れ、magpie が記録した会話があればゴミ箱に移動します。使用量ページには使った分が残ります。",
"{size} recorded": "{size} 記録済み",
"A session seen only through the gateway leaves this list, and any conversation magpie recorded of it is moved to magpie's trash ({dir}): Trash puts it back. {agent}'s own files elsewhere are not touched, and Usage keeps what it spent. One with a request in the last minute is left alone.": "ゲートウェイ経由でのみ確認されたセッションはこの一覧から外れ、magpie が記録した会話があれば magpie のゴミ箱({dir})に移動します。「ゴミ箱」から元に戻せます。ほかの場所にある {agent} 自身のファイルには触れず、使用量ページには使った分が残ります。直近 1 分以内にリクエストがあったセッションは対象外です。",
"Conversations magpie recorded through the gateway still expire after 7 days here, and Delete saved conversations… erases them too.": "ゲートウェイ経由で記録した会話は、ゴミ箱の中でも 7 日後に期限切れになり、「保存済みの会話を削除…」でも一緒に消去されます。",
"Moved to magpie's trash": "magpie のゴミ箱に移動しました",
"1 Codex session was made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so it doesn't show there.": "1 件の Codex セッションは別のプロバイダー({from})で作成されました。Codex の履歴には現在 {to} のセッションしか表示されないため、表示されません。",
"{n} Codex sessions were made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so they don't show there.": "{n} 件の Codex セッションは別のプロバイダー({from})で作成されました。Codex の履歴には現在 {to} のセッションしか表示されないため、表示されません。",
"Move to {to}…": "{to} に移行…",
"Moved 1 session to {to}": "1 件のセッションを {to} に移行しました",
"Moved {n} sessions to {to}": "{n} 件のセッションを {to} に移行しました",
"Moved 1 session back": "1 件のセッションを元に戻しました",
"Moved {n} sessions back": "{n} 件のセッションを元に戻しました",
"Move sessions to {to}?": "セッションを {to} に移行しますか?",
"Only the provider each one names is changed, in its files and in Codex's database: its messages, id, title and archive stay as they are. A copy of its files is kept in magpie's trash folder first, and Undo moves them back. A session written to in the last minute is left alone.": "変更されるのは、ファイルと Codex のデータベースに記録されたプロバイダーだけです。メッセージ、ID、タイトル、アーカイブ状態はそのままです。変更前にファイルのコピーを magpie のゴミ箱フォルダーに保存し、「取り消す」で元に戻せます。直近 1 分以内に書き込まれたセッションは変更しません。",
"Made with {from}: Codex's history lists only {to}'s sessions now": "{from} で作成:Codex の履歴には現在 {to} のセッションだけが表示されます",
"{n} sessions moved to magpie's trash": "{n} 件のセッションを magpie のゴミ箱に移動しました",
"{title} is still being written to; close it in {agent} and try again in a minute": "「{title}」はまだ書き込み中です。{agent} で閉じてから、1 分後にもう一度お試しください",
"{n} sessions are still being written to; close them in {agent} and try again in a minute": "{n} 件のセッションはまだ書き込み中です。{agent} で閉じてから、1 分後にもう一度お試しください",
"Restore": "元に戻す",
"{title} restored": "「{title}」を元に戻しました",
"Trash is empty": "ゴミ箱は空です",
"Sessions deleted here wait in magpie's trash, to be restored.": "ここで削除したセッションは magpie のゴミ箱に残り、元に戻せます。",
"Deleted sessions are kept in {dir} until you erase them here; magpie never erases them by itself.": "削除したセッションは、ここで消去するまで {dir} に保存されます。magpie が自動で消去することはありません。",
"Empty trash": "ゴミ箱を空にする",
"Delete forever": "完全に削除",
"Empty magpie's trash?": "magpie のゴミ箱を空にしますか?",
"Delete this session forever?": "このセッションを完全に削除しますか?",
"Every session in magpie's trash is erased for good: it can't be restored.": "magpie のゴミ箱内のすべてのセッションが完全に消去され、元に戻せなくなります。",
"Its files are erased for good: it can't be restored.": "ファイルは完全に消去され、元に戻せなくなります。",
"Erased for good": "完全に削除しました",
"{n} sessions erased for good": "{n} 件のセッションを完全に削除しました",
"Session id": "セッション ID",
"(no prompt)": "(プロンプトなし)",
"session": "セッション",
@@ -12253,10 +12062,6 @@ const I18N = {
"at effective prices": "有効な価格で",
"just now": "たった今",
"No session matches.": "一致するセッションはありません。",
"Searching what was said…": "会話の内容を検索中…",
"Couldn't search what was said: {error}": "会話の内容を検索できませんでした:{error}",
"{agent}'s own files of its sessions can't be read here, so only what magpie recorded through the gateway is searched.": "{agent} 自身のセッションファイルはここでは読めないため、magpie がゲートウェイ経由で記録した内容だけを検索します。",
"Searched what was said in the latest {n} of {total} sessions.": "最新 {n} 件の会話の内容を検索しました(全 {total} 件)。",
"No sessions yet. Claude Code's, Codex's, Hermes, OpenCode's and Pi's sessions on this computer show up here, with what each cost and the command that resumes it.": "セッションはまだありません。このコンピュータ上の Claude Code、Codex、Hermes、OpenCode、Pi のセッションが、それぞれの費用と再開コマンドとともにここに表示されます。",
"Reading the agents' session files…": "エージェントのセッションファイルを読み取り中…",
"Totals count every session in the agents' own files; the list is the latest {n} by activity · {dirs}": "合計はエージェント自身のファイルにあるすべてのセッションを集計しています。一覧は最近のアクティビティ順で {n} 件 · {dirs}",
@@ -14255,14 +14060,7 @@ const I18N = {
"{n} agents hidden": "{n} Agents ausgeblendet",
"{n} agent unhidden": "{n} Agent eingeblendet",
"{n} agents unhidden": "{n} Agents eingeblendet",
"Relocate project": "Projekt verschieben",
"Relocate Claude Code project": "Claude-Code-Projekt verschieben",
"New absolute project path": "Neuer absoluter Projektpfad",
"Preview relocation": "Verschieben prüfen",
"Confirm relocation": "Verschieben bestätigen",
"Close Claude Code and its editor sessions first. This moves the entire project's sessions, not just filtered or selected rows. Existing target storage is never overwritten. Desktop-only sessions are not changed.": "Schließe zuerst Claude Code und seine Sitzungen im Editor. Verschoben werden alle Sitzungen des Projekts, nicht nur gefilterte oder ausgewählte Zeilen. Ein bestehender Zielspeicher wird nie überschrieben. Sitzungen, die nur in der Desktop-App liegen, bleiben unverändert.",
"Relocation complete. Original files and recovery manifest: {dir}": "Verschoben. Originaldateien und Wiederherstellungsmanifest: {dir}",
"Move {n} sessions ({size}) from {from} to {to}. Originals are retained outside Claude's project list. Historical message text is unchanged.": "{n} Sitzungen ({size}) von {from} nach {to} verschieben. Die Originale bleiben außerhalb von Claudes Projektliste erhalten. Der Text früherer Nachrichten bleibt unverändert.",
"Get started": "Erste Schritte",
"{n} of {m} done": "{n} von {m} erledigt",
"Hide Get started": "Erste Schritte ausblenden",
@@ -14367,12 +14165,6 @@ const I18N = {
"Through magpie": "Über magpie",
"Enable": "Aktivieren",
"Record gateway conversations": "Gateway-Gespräche aufzeichnen",
"Prompts, replies and tool results may contain private code and files. Store them on this server for up to 7 days (256 MiB total)? Recognized secrets are masked, but this is not a privacy guarantee.": "Prompts, Antworten und Werkzeugergebnisse können privaten Code und Dateien enthalten. Bis zu 7 Tage auf diesem Server speichern (insgesamt 256 MiB)? Erkannte Geheimnisse werden maskiert, aber vollständiger Datenschutz ist nicht garantiert.",
"Stop recording and clear saved conversations": "Aufzeichnung stoppen und gespeicherte Gespräche löschen",
"Delete saved conversations…": "Gespeicherte Gespräche löschen…",
"On: what agents send through the gateway, and the replies, are kept on this computer only, for up to 7 days (256 MiB), to read under each gateway session": "An: Was Agenten über das Gateway senden, und die Antworten werden nur auf diesem Computer gespeichert, bis zu 7 Tage (256 MiB), zum Nachlesen in jeder Gateway-Sitzung",
"Off: gateway sessions show only what they used. Turned on, their text is kept on this computer only, for up to 7 days (256 MiB)": "Aus: Gateway-Sitzungen zeigen nur ihren Verbrauch. Eingeschaltet wird ihr Text nur auf diesem Computer gespeichert, bis zu 7 Tage (256 MiB)",
"Delete all locally recorded gateway conversation content? Usage totals and native session files are kept.": "Alle lokal aufgezeichneten Gateway-Gespräche löschen? Nutzungsstatistiken und native Sitzungsdateien bleiben erhalten.",
"No saved gateway content for this session": "Keine gespeicherten Gateway-Inhalte für diese Sitzung",
"Recorded gateway traffic only; earlier, expired or uncaptured content may be missing": "Nur aufgezeichneter Gateway-Verkehr; frühere, abgelaufene oder nicht erfasste Inhalte können fehlen",
// the context window (context.js)
@@ -14694,7 +14486,6 @@ const I18N = {
"No agents found": "Keine Agenten gefunden",
"Install Claude Code, Codex, Gemini CLI, OpenCode… and magpie will list them here.": "Installieren Sie Claude Code, Codex, Gemini CLI, OpenCode…, dann listet magpie sie hier auf.",
"Show {n} more": "{n} weitere anzeigen",
"Show {n} more folders": "{n} weitere Ordner anzeigen",
"Show less": "Weniger anzeigen",
"Expand the list": "Liste aufklappen",
"Collapse the list": "Liste einklappen",
@@ -16929,62 +16720,15 @@ const I18N = {
"Launch command": "Startbefehl",
"Copy launch command": "Startbefehl kopieren",
"Copied — run it to start {name} on magpie": "Kopiert — ausführen, um {name} über magpie zu starten",
"Copy the command that resumes it: {cmd}": "Befehl zum Fortsetzen kopieren: {cmd}",
"Open in session terminal": "Im Sitzungsterminal öffnen",
"Opening in session terminal": "Wird im Sitzungsterminal geöffnet",
"Filter sessions": "Sitzungen filtern",
"No sessions yet": "Noch keine Sitzungen",
"Claude Code's, Codex's, Hermes's, OpenCode's and Pi's sessions on this computer show up here, by the folder they ran in.": "Sitzungen von Claude Code, Codex, Hermes, OpenCode und Pi auf diesem Computer erscheinen hier, gruppiert nach dem Ordner, in dem sie liefen.",
"magpie can list {agent}'s sessions and resume them, but not delete them: they aren't kept as files of their own.": "magpie kann die Sitzungen von {agent} auflisten und fortsetzen, aber nicht löschen, da sie nicht als eigene Dateien vorliegen.",
"magpie can list {agent}'s sessions, but cannot resume or delete them.": "magpie kann die Sitzungen von {agent} auflisten, aber weder fortsetzen noch löschen.",
"These {agent} sessions are read only; magpie can list them, but cannot resume or delete them.": "Diese Sitzungen von {agent} sind schreibgeschützt; magpie kann sie auflisten, aber weder fortsetzen noch löschen.",
"Some {agent} sessions are read only and cannot be deleted.": "Einige Sitzungen von {agent} sind schreibgeschützt und können nicht gelöscht werden.",
"In WSL {distro}: resumed there through wsl.exe": "In WSL {distro}: wird dort über wsl.exe fortgesetzt",
"Select every session shown": "Alle angezeigten Sitzungen auswählen",
"Select": "Auswählen",
"Delete": "Löschen",
"Trash": "Papierkorb",
"No folder": "Kein Ordner",
"deleted {when}": "gelöscht {when}",
"Delete this session?": "Diese Sitzung löschen?",
"Delete {n} sessions?": "{n} Sitzungen löschen?",
"Delete all {n} sessions in {folder}?": "Alle {n} Sitzungen in {folder} löschen?",
"Delete all {n} sessions in {k} folders?": "Alle {n} Sitzungen in {k} Ordnern löschen?",
"Select every session in {folder}": "Alle Sitzungen in {folder} auswählen",
"Their files are moved to magpie's trash ({dir}), not erased: Trash puts them back. A session written to in the last minute is left alone, as {agent} may still be running it.": "Die Dateien werden in den Papierkorb von magpie ({dir}) verschoben, nicht gelöscht: Über „Papierkorb“ lassen sie sich wiederherstellen. Eine Sitzung, in die in der letzten Minute geschrieben wurde, bleibt unberührt, da {agent} sie eventuell noch ausführt.",
"Seen through the gateway": "Über das Gateway gesehen",
"These {agent} sessions were seen only through magpie's gateway: {agent}'s own files of them aren't on this computer (it may run on another one, in a container or with another config folder), so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "Diese Sitzungen von {agent} wurden nur über das Gateway von magpie gesehen: Die eigenen Dateien von {agent} dazu liegen nicht auf diesem Computer (es läuft vielleicht auf einem anderen, in einem Container oder mit einem anderen Konfigurationsordner), daher lassen sie sich hier nicht fortsetzen. Löschen nimmt eine aus dieser Liste und verschiebt ein von magpie aufgezeichnetes Gespräch in den Papierkorb; die Nutzung behält, was sie verbraucht hat.",
"Sessions under \"Seen through the gateway\" have no {agent} files on this computer, so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "Sitzungen unter „Über das Gateway gesehen“ haben keine Dateien von {agent} auf diesem Computer, daher lassen sie sich hier nicht fortsetzen. Löschen nimmt eine aus dieser Liste und verschiebt ein von magpie aufgezeichnetes Gespräch in den Papierkorb; die Nutzung behält, was sie verbraucht hat.",
"{size} recorded": "{size} aufgezeichnet",
"A session seen only through the gateway leaves this list, and any conversation magpie recorded of it is moved to magpie's trash ({dir}): Trash puts it back. {agent}'s own files elsewhere are not touched, and Usage keeps what it spent. One with a request in the last minute is left alone.": "Eine nur über das Gateway gesehene Sitzung verschwindet aus dieser Liste, und ein von magpie aufgezeichnetes Gespräch wird in den Papierkorb von magpie ({dir}) verschoben: Über „Papierkorb“ lässt es sich wiederherstellen. Die eigenen Dateien von {agent} anderswo bleiben unberührt, und die Nutzung behält, was sie verbraucht hat. Eine Sitzung mit einer Anfrage in der letzten Minute bleibt unberührt.",
"Conversations magpie recorded through the gateway still expire after 7 days here, and Delete saved conversations… erases them too.": "Über das Gateway aufgezeichnete Gespräche verfallen auch hier nach 7 Tagen, und „Gespeicherte Gespräche löschen…“ löscht sie ebenfalls.",
"Moved to magpie's trash": "In den Papierkorb von magpie verschoben",
"1 Codex session was made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so it doesn't show there.": "1 Codex-Sitzung wurde mit einem anderen Anbieter ({from}) erstellt: Codex zeigt in seinem Verlauf jetzt nur Sitzungen von {to}, daher erscheint sie dort nicht.",
"{n} Codex sessions were made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so they don't show there.": "{n} Codex-Sitzungen wurden mit einem anderen Anbieter ({from}) erstellt: Codex zeigt in seinem Verlauf jetzt nur Sitzungen von {to}, daher erscheinen sie dort nicht.",
"Move to {to}…": "Zu {to} umziehen…",
"Moved 1 session to {to}": "1 Sitzung zu {to} umgezogen",
"Moved {n} sessions to {to}": "{n} Sitzungen zu {to} umgezogen",
"Moved 1 session back": "1 Sitzung zurückgezogen",
"Moved {n} sessions back": "{n} Sitzungen zurückgezogen",
"Move sessions to {to}?": "Sitzungen zu {to} umziehen?",
"Only the provider each one names is changed, in its files and in Codex's database: its messages, id, title and archive stay as they are. A copy of its files is kept in magpie's trash folder first, and Undo moves them back. A session written to in the last minute is left alone.": "Geändert wird nur der Anbieter, den jede Sitzung in ihren Dateien und in der Datenbank von Codex nennt: Nachrichten, ID, Titel und Archivstatus bleiben, wie sie sind. Vorher wird eine Kopie der Dateien im Papierkorbordner von magpie abgelegt, und Rückgängig zieht sie zurück. Eine Sitzung, in die in der letzten Minute geschrieben wurde, bleibt unverändert.",
"Made with {from}: Codex's history lists only {to}'s sessions now": "Mit {from} erstellt: Der Verlauf von Codex zeigt jetzt nur Sitzungen von {to}",
"{n} sessions moved to magpie's trash": "{n} Sitzungen in den Papierkorb von magpie verschoben",
"{title} is still being written to; close it in {agent} and try again in a minute": "In „{title}“ wird noch geschrieben; schließen Sie die Sitzung in {agent} und versuchen Sie es in einer Minute erneut",
"{n} sessions are still being written to; close them in {agent} and try again in a minute": "In {n} Sitzungen wird noch geschrieben; schließen Sie sie in {agent} und versuchen Sie es in einer Minute erneut",
"Restore": "Wiederherstellen",
"{title} restored": "„{title}“ wiederhergestellt",
"Trash is empty": "Der Papierkorb ist leer",
"Sessions deleted here wait in magpie's trash, to be restored.": "Hier gelöschte Sitzungen bleiben zur Wiederherstellung im Papierkorb von magpie.",
"Deleted sessions are kept in {dir} until you erase them here; magpie never erases them by itself.": "Gelöschte Sitzungen bleiben in {dir}, bis Sie sie hier endgültig löschen; magpie löscht sie nie von selbst.",
"Empty trash": "Papierkorb leeren",
"Delete forever": "Endgültig löschen",
"Empty magpie's trash?": "Papierkorb von magpie leeren?",
"Delete this session forever?": "Diese Sitzung endgültig löschen?",
"Every session in magpie's trash is erased for good: it can't be restored.": "Alle Sitzungen im Papierkorb von magpie werden endgültig gelöscht und können nicht wiederhergestellt werden.",
"Its files are erased for good: it can't be restored.": "Die Dateien werden endgültig gelöscht und können nicht wiederhergestellt werden.",
"Erased for good": "Endgültig gelöscht",
"{n} sessions erased for good": "{n} Sitzungen endgültig gelöscht",
"Session id": "Sitzungs-ID",
"(no prompt)": "(kein Prompt)",
"session": "Sitzung",
@@ -16995,10 +16739,6 @@ const I18N = {
"at effective prices": "zu effektiven Preisen",
"just now": "gerade eben",
"No session matches.": "Keine passende Sitzung.",
"Searching what was said…": "Gesprächsinhalte werden durchsucht …",
"Couldn't search what was said: {error}": "Gesprächsinhalte konnten nicht durchsucht werden: {error}",
"{agent}'s own files of its sessions can't be read here, so only what magpie recorded through the gateway is searched.": "Die eigenen Sitzungsdateien von {agent} sind hier nicht lesbar, daher wird nur durchsucht, was magpie über das Gateway aufgezeichnet hat.",
"Searched what was said in the latest {n} of {total} sessions.": "Gesprächsinhalte der neuesten {n} von {total} Sitzungen durchsucht.",
"No sessions yet. Claude Code's, Codex's, Hermes, OpenCode's and Pi's sessions on this computer show up here, with what each cost and the command that resumes it.": "Noch keine Sitzungen. Sitzungen von Claude Code, Codex, Hermes, OpenCode und Pi auf diesem Computer erscheinen hier, jeweils mit Kosten und dem Befehl zum Fortsetzen.",
"Reading the agents' session files…": "Sitzungsdateien der Agenten werden gelesen…",
"Totals count every session in the agents' own files; the list is the latest {n} by activity · {dirs}": "Summen zählen jede Sitzung in den Dateien der Agenten; die Liste zeigt die {n} zuletzt aktiven · {dirs}",
+3 -3
View File
@@ -12,7 +12,7 @@
<link rel="stylesheet" href="routing.css">
<link rel="stylesheet" href="library.css">
<link rel="stylesheet" href="plugins.css">
<link rel="stylesheet" href="sessions.css">
<link rel="stylesheet" href="plugins/sessions/sessions.css">
<link rel="stylesheet" href="context.css">
<link rel="stylesheet" href="omarchy.css">
</head>
@@ -244,7 +244,6 @@
</div>
</main>
<main class="view" id="view-sessions" hidden></main>
<main class="view" id="view-library" hidden></main>
@@ -557,12 +556,13 @@
<!-- the built-in plugins' own scripts (pluginrt.Manifest.Client) -->
<script src="plugins/gateway/keys.js"></script>
<script src="plugins/gateway/client.js"></script>
<script src="plugins/sessions/i18n.js"></script>
<script src="plugins/sessions/client.js"></script>
<script src="purposes.js"></script>
<script src="app.js"></script>
<script src="routing.js"></script>
<script src="library.js"></script>
<script src="plugins.js"></script>
<script src="sessions.js"></script>
<script src="context.js"></script>
</body>
</html>
+16 -3
View File
@@ -8,9 +8,10 @@
// them (pluginrt.SchemaOf).
//
// Loaded after i18n.js and before the plugins' scripts and app.js. A
// plugin's scripts register at once, so its page is in the page before
// app.js looks for it, but run nothing of app.js's then: mount runs at
// magpie.start, which app.js calls once it is set up.
// plugin's words come with it (its i18n.js, magpie.strings). Its scripts
// register at once, so its page is in the page before app.js looks for
// it, but run nothing of app.js's then: mount runs at magpie.start, which
// app.js calls once it is set up.
(() => {
const plugins = new Map(); // id → { id, config, onConfig: [], disposers: [] }
const pages = new Map(); // key → { plugin, part, main, mounted, broken }
@@ -236,6 +237,18 @@
const page = pages.get(key);
return page ? run(page, hook, args) : undefined;
},
// a plugin's words in each language ({ zh: { English: 中文 }, … }),
// added to i18n.js's; one already there is a mistake, said and not
// taken, as the later one would silently win
strings(dict) {
for (const [lang, words] of Object.entries(dict)) {
const to = (I18N[lang] ||= {});
for (const [k, v] of Object.entries(words)) {
if (k in to) console.error(`[magpie] ${lang} ${JSON.stringify(k)} is said twice`);
else to[k] = v;
}
}
},
page: (key) => pages.get(key)?.part,
pages: () => [...pages.keys()],
// the plugins' settings as Plugins › Built-in or boot.js has them
@@ -651,6 +651,7 @@ magpie.plugin("gateway", (ctx) => {
});
ctx.slots.add("page", {
key: "gateway",
title: "Gateway",
// what the page draws from: the shell reads /api/providers for it
loads: "providers",
html: `
@@ -7,9 +7,14 @@
// may still be running, and is left as it is. Each row shows what the
// session spent, as the Usage page's list does, and that list's rows open
// here (#752). Everything comes from /api/sessions/manage.
(() => {
const page = $("#view-sessions");
if (!page) return;
//
// A page the Sessions plugin adds to the window (kernel.js), its words in
// i18n.js beside this file. Classic script, loaded before app.js: what
// runs as it loads touches neither the page nor app.js. mount, at
// magpie.start, is handed the page; open loads it, relang draws it again
// in a new language, and reveal is the Usage page's way in.
magpie.plugin("sessions", (ctx) => {
let page = null;
let data = null; // /api/sessions/manage
let failed = "";
@@ -84,13 +89,12 @@
}
if (view === "sessions") draw();
}
window.loadSessionsPage = load;
// openSessionOnPage: the Sessions page, from the Usage page's list (#752):
// reveal: the Sessions page, from the Usage page's list (#752):
// on the session's agent, its folder unfolded and the session opened to
// its details, brought into sight once it is drawn; with no id, the page
// on that agent (or as it was). The reader's click is what moves the view.
window.openSessionOnPage = (s, e) => {
function reveal(s, e) {
if (s.agent && s.agent !== agent) {
agent = s.agent;
try { localStorage.setItem("magpie.sessionsAgent", agent); } catch {}
@@ -108,7 +112,7 @@
focus = scrollOnPurpose(e) ? { agent, id: s.id, until: performance.now() + 5000 } : null;
}
show("sessions");
};
}
// bring the session asked for into sight, once its row is drawn
function toFocus() {
@@ -1130,4 +1134,13 @@
if (items.some((x) => x.gateway)) out.push(el("p", "usage-note sm-gw-trash-note", t("Conversations magpie recorded through the gateway still expire after 7 days here, and Delete saved conversations… erases them too.")));
return out;
}
})();
ctx.slots.add("page", {
key: "sessions",
title: "Sessions",
mount(main) { page = main; },
open: () => load(),
relang: () => load(),
reveal,
});
});
@@ -0,0 +1,272 @@
// The Sessions page's words in each language, the English the key: the
// kernel adds them to i18n.js's (magpie.strings).
magpie.strings({
zh: {
"Relocate project": "迁移项目会话",
"New absolute project path": "新的项目绝对路径",
"Preview relocation": "预览迁移",
"Confirm relocation": "确认迁移",
"Close Claude Code and its editor sessions first. This moves the entire project's sessions, not just filtered or selected rows. Existing target storage is never overwritten. Desktop-only sessions are not changed.": "请先关闭 Claude Code 及编辑器内的会话。此操作迁移整个项目的会话,不仅是筛选或勾选的部分。不覆盖目标已有的会话存储,也不修改桌面端独立存储的会话。",
"Relocation complete. Original files and recovery manifest: {dir}": "迁移完成。原始文件及恢复清单保存在:{dir}",
"Move {n} sessions ({size}) from {from} to {to}. Originals are retained outside Claude's project list. Historical message text is unchanged.": "将 {n} 个会话({size})从 {from} 迁移至 {to}。原始文件保留在 Claude 项目列表之外,历史消息正文不变。",
"Prompts, replies and tool results may contain private code and files. Store them on this server for up to 7 days (256 MiB total)? Recognized secrets are masked, but this is not a privacy guarantee.": "提示词、回复和工具结果可能包含私有代码与文件。是否在此服务器保存最多 7 天(总计 256 MiB)?已识别的密钥会被遮蔽,但不能保证所有敏感信息都被移除。",
"Stop recording and clear saved conversations": "停止记录并清空已保存的对话",
"Delete saved conversations…": "删除已保存的对话…",
"On: what agents send through the gateway, and the replies, are kept on this computer only, for up to 7 days (256 MiB), to read under each gateway session": "已开启:Agent 经网关发送的内容和回复只保存在这台电脑上,最多 7 天(256 MiB),可在每个网关会话下查看",
"Off: gateway sessions show only what they used. Turned on, their text is kept on this computer only, for up to 7 days (256 MiB)": "已关闭:网关会话只显示用量。开启后,对话内容只保存在这台电脑上,最多 7 天(256 MiB)",
"Delete all locally recorded gateway conversation content? Usage totals and native session files are kept.": "删除本地记录的全部网关对话内容?用量统计与原生会话文件会保留。",
"Show {n} more folders": "显示其余 {n} 个文件夹",
"Copy the command that resumes it: {cmd}": "复制继续这个会话的命令:{cmd}",
"Open in session terminal": "在所选终端中打开",
"Opening in session terminal": "正在所选终端中打开",
"Claude Code's, Codex's, Hermes's, OpenCode's and Pi's sessions on this computer show up here, by the folder they ran in.": "本机 Claude Code、Codex、Hermes、OpenCode 和 Pi 的会话按运行目录列在这里。",
"magpie can list {agent}'s sessions and resume them, but not delete them: they aren't kept as files of their own.": "可列出并继续 {agent} 的会话,但无法删除:它们没有独立文件。",
"magpie can list {agent}'s sessions, but cannot resume or delete them.": "可列出 {agent} 的会话,但无法继续或删除。",
"These {agent} sessions are read only; magpie can list them, but cannot resume or delete them.": "这些 {agent} 会话只读:可列出,但无法继续或删除。",
"Some {agent} sessions are read only and cannot be deleted.": "部分 {agent} 会话为只读,无法删除。",
"Select every session shown": "选中所有显示的会话",
"No folder": "无文件夹",
"deleted {when}": "{when}删除",
"Delete this session?": "删除这个会话?",
"Delete {n} sessions?": "删除这 {n} 个会话?",
"Delete all {n} sessions in {folder}?": "删除 {folder} 下的全部 {n} 个会话?",
"Delete all {n} sessions in {k} folders?": "删除 {k} 个文件夹下的全部 {n} 个会话?",
"Select every session in {folder}": "选中 {folder} 下的全部会话",
"Their files are moved to magpie's trash ({dir}), not erased: Trash puts them back. A session written to in the last minute is left alone, as {agent} may still be running it.": "会话文件移到 magpie 的回收站({dir}),不会抹除,可在「回收站」恢复。最近一分钟内有写入的会话不处理,{agent} 可能仍在运行它。",
"Seen through the gateway": "经网关看到的",
"These {agent} sessions were seen only through magpie's gateway: {agent}'s own files of them aren't on this computer (it may run on another one, in a container or with another config folder), so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "这些 {agent} 会话只经 magpie 网关看到:{agent} 自己的会话文件不在这台电脑上(它可能运行在另一台电脑、容器里,或用了另一个配置目录),所以无法在这里继续。删除会把它从列表移除,并把 magpie 录下的对话(如有)移到回收站;用量页仍保留它的花费。",
"Sessions under \"Seen through the gateway\" have no {agent} files on this computer, so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "「经网关看到的」下的会话在这台电脑上没有 {agent} 文件,所以无法在这里继续。删除会把它从列表移除,并把 magpie 录下的对话(如有)移到回收站;用量页仍保留它的花费。",
"{size} recorded": "已录 {size}",
"A session seen only through the gateway leaves this list, and any conversation magpie recorded of it is moved to magpie's trash ({dir}): Trash puts it back. {agent}'s own files elsewhere are not touched, and Usage keeps what it spent. One with a request in the last minute is left alone.": "只经网关看到的会话会从列表移除,magpie 录下的对话(如有)移到 magpie 的回收站({dir}),可在「回收站」恢复。别处 {agent} 自己的文件不会被改动,用量页仍保留它的花费。最近一分钟内有请求的会话不处理。",
"Conversations magpie recorded through the gateway still expire after 7 days here, and Delete saved conversations… erases them too.": "经网关录下的对话在回收站里同样 7 天后过期,「删除已保存的对话…」也会把它们一并删除。",
"Moved to magpie's trash": "已移到 magpie 的回收站",
"1 Codex session was made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so it doesn't show there.": "有 1 个 Codex 会话是用其他供应商({from})创建的。Codex 现在的历史列表只显示 {to} 的会话,所以看不到它。",
"{n} Codex sessions were made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so they don't show there.": "有 {n} 个 Codex 会话是用其他供应商({from})创建的。Codex 现在的历史列表只显示 {to} 的会话,所以看不到它们。",
"Move to {to}…": "迁移到 {to}…",
"Moved 1 session to {to}": "已把 1 个会话迁移到 {to}",
"Moved {n} sessions to {to}": "已把 {n} 个会话迁移到 {to}",
"Moved 1 session back": "已把 1 个会话迁移回去",
"Moved {n} sessions back": "已把 {n} 个会话迁移回去",
"Move sessions to {to}?": "把会话迁移到 {to}?",
"Only the provider each one names is changed, in its files and in Codex's database: its messages, id, title and archive stay as they are. A copy of its files is kept in magpie's trash folder first, and Undo moves them back. A session written to in the last minute is left alone.": "只改每个会话在文件和 Codex 数据库里记录的供应商,消息、会话 ID、标题和归档状态都不变。改之前会先在 magpie 的回收站文件夹里备份一份文件,「撤销」可以迁移回去。最近一分钟内还在写入的会话不会改动。",
"Made with {from}: Codex's history lists only {to}'s sessions now": "用 {from} 创建:Codex 现在的历史列表只显示 {to} 的会话",
"{n} sessions moved to magpie's trash": "{n} 个会话已移到 magpie 的回收站",
"{title} is still being written to; close it in {agent} and try again in a minute": "「{title}」仍在写入;请在 {agent} 中关闭它,一分钟后再试",
"{n} sessions are still being written to; close them in {agent} and try again in a minute": "{n} 个会话仍在写入;请在 {agent} 中关闭它们,一分钟后再试",
"{title} restored": "已恢复「{title}」",
"Trash is empty": "回收站是空的",
"Sessions deleted here wait in magpie's trash, to be restored.": "在此删除的会话进入 magpie 回收站,可随时恢复。",
"Deleted sessions are kept in {dir} until you erase them here; magpie never erases them by itself.": "已删除的会话保存在 {dir},在此彻底删除前不会自动清除。",
"Empty magpie's trash?": "清空 magpie 的回收站?",
"Delete this session forever?": "彻底删除这个会话?",
"Every session in magpie's trash is erased for good: it can't be restored.": "回收站中的所有会话将被彻底删除,无法恢复。",
"Its files are erased for good: it can't be restored.": "其文件将被彻底删除,无法恢复。",
"Erased for good": "已彻底删除",
"{n} sessions erased for good": "已彻底删除 {n} 个会话",
"Searching what was said…": "正在搜索对话内容…",
"Couldn't search what was said: {error}": "无法搜索对话内容:{error}",
"{agent}'s own files of its sessions can't be read here, so only what magpie recorded through the gateway is searched.": "这里读不到 {agent} 自己的会话文件,只搜索 magpie 通过网关记录的内容。",
"Searched what was said in the latest {n} of {total} sessions.": "已搜索最近 {n} 个会话的对话内容(共 {total} 个)。",
},
"zh-TW": {
"Relocate project": "遷移專案會話",
"New absolute project path": "新的專案絕對路徑",
"Preview relocation": "預覽遷移",
"Confirm relocation": "確認遷移",
"Close Claude Code and its editor sessions first. This moves the entire project's sessions, not just filtered or selected rows. Existing target storage is never overwritten. Desktop-only sessions are not changed.": "請先關閉 Claude Code 及編輯器內的會話。此操作遷移整個專案的會話,不只是篩選或勾選的部分。不會覆寫目標已有的會話儲存,也不修改桌面版獨立儲存的會話。",
"Relocation complete. Original files and recovery manifest: {dir}": "遷移完成。原始檔案及復原清單保存在:{dir}",
"Move {n} sessions ({size}) from {from} to {to}. Originals are retained outside Claude's project list. Historical message text is unchanged.": "將 {n} 個會話({size})從 {from} 遷移至 {to}。原始檔案保留在 Claude 專案列表之外,歷史訊息內文不變。",
"Prompts, replies and tool results may contain private code and files. Store them on this server for up to 7 days (256 MiB total)? Recognized secrets are masked, but this is not a privacy guarantee.": "提示詞、回覆和工具結果可能包含私人程式碼與檔案。是否在此伺服器儲存最多 7 天(總計 256 MiB)?已辨識的金鑰會被遮蔽,但無法保證所有敏感資訊都被移除。",
"Stop recording and clear saved conversations": "停止記錄並清空已儲存的對話",
"Delete saved conversations…": "刪除已儲存的對話…",
"On: what agents send through the gateway, and the replies, are kept on this computer only, for up to 7 days (256 MiB), to read under each gateway session": "已開啟:Agent 經閘道傳送的內容和回覆只儲存在這臺電腦上,最多 7 天(256 MiB),可在每個閘道會話下查看",
"Off: gateway sessions show only what they used. Turned on, their text is kept on this computer only, for up to 7 days (256 MiB)": "已關閉:閘道會話只顯示用量。開啟後,對話內容只儲存在這臺電腦上,最多 7 天(256 MiB)",
"Delete all locally recorded gateway conversation content? Usage totals and native session files are kept.": "刪除本機記錄的全部閘道對話內容?用量統計與原生工作階段檔案會保留。",
"Show {n} more folders": "顯示其餘 {n} 個資料夾",
"Copy the command that resumes it: {cmd}": "複製繼續這個會話的命令:{cmd}",
"Open in session terminal": "在所選終端機中開啟",
"Opening in session terminal": "正在所選終端機中開啟",
"Claude Code's, Codex's, Hermes's, OpenCode's and Pi's sessions on this computer show up here, by the folder they ran in.": "本機 Claude Code、Codex、Hermes、OpenCode 和 Pi 的會話按執行目錄列在這裡。",
"magpie can list {agent}'s sessions and resume them, but not delete them: they aren't kept as files of their own.": "可列出並繼續 {agent} 的會話,但無法刪除:它們沒有獨立檔案。",
"magpie can list {agent}'s sessions, but cannot resume or delete them.": "可列出 {agent} 的會話,但無法繼續或刪除。",
"These {agent} sessions are read only; magpie can list them, but cannot resume or delete them.": "這些 {agent} 會話只讀:可列出,但無法繼續或刪除。",
"Some {agent} sessions are read only and cannot be deleted.": "部分 {agent} 會話為只讀,無法刪除。",
"Select every session shown": "選中所有顯示的會話",
"No folder": "無資料夾",
"deleted {when}": "{when}刪除",
"Delete this session?": "刪除這個會話?",
"Delete {n} sessions?": "刪除這 {n} 個會話?",
"Delete all {n} sessions in {folder}?": "刪除 {folder} 下的全部 {n} 個會話?",
"Delete all {n} sessions in {k} folders?": "刪除 {k} 個資料夾下的全部 {n} 個會話?",
"Select every session in {folder}": "選中 {folder} 下的全部會話",
"Their files are moved to magpie's trash ({dir}), not erased: Trash puts them back. A session written to in the last minute is left alone, as {agent} may still be running it.": "會話檔案移到 magpie 的回收站({dir}),不會抹除,可在「回收站」恢復。最近一分鐘內有寫入的會話不處理,{agent} 可能仍在執行它。",
"Seen through the gateway": "經閘道看到的",
"These {agent} sessions were seen only through magpie's gateway: {agent}'s own files of them aren't on this computer (it may run on another one, in a container or with another config folder), so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "這些 {agent} 會話只經 magpie 閘道看到:{agent} 自己的會話檔案不在這台電腦上(它可能執行在另一台電腦、容器裡,或用了另一個設定目錄),所以無法在這裡繼續。刪除會把它從清單移除,並把 magpie 錄下的對話(如有)移到回收站;用量頁仍保留它的花費。",
"Sessions under \"Seen through the gateway\" have no {agent} files on this computer, so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "「經閘道看到的」下的會話在這台電腦上沒有 {agent} 檔案,所以無法在這裡繼續。刪除會把它從清單移除,並把 magpie 錄下的對話(如有)移到回收站;用量頁仍保留它的花費。",
"{size} recorded": "已錄 {size}",
"A session seen only through the gateway leaves this list, and any conversation magpie recorded of it is moved to magpie's trash ({dir}): Trash puts it back. {agent}'s own files elsewhere are not touched, and Usage keeps what it spent. One with a request in the last minute is left alone.": "只經閘道看到的會話會從清單移除,magpie 錄下的對話(如有)移到 magpie 的回收站({dir}),可在「回收站」恢復。別處 {agent} 自己的檔案不會被改動,用量頁仍保留它的花費。最近一分鐘內有請求的會話不處理。",
"Conversations magpie recorded through the gateway still expire after 7 days here, and Delete saved conversations… erases them too.": "經閘道錄下的對話在回收站裡同樣 7 天後過期,「刪除已儲存的對話…」也會把它們一併刪除。",
"Moved to magpie's trash": "已移到 magpie 的回收站",
"1 Codex session was made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so it doesn't show there.": "有 1 個 Codex 會話是用其他供應商({from})建立的。Codex 現在的歷史列表只顯示 {to} 的會話,所以看不到它。",
"{n} Codex sessions were made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so they don't show there.": "有 {n} 個 Codex 會話是用其他供應商({from})建立的。Codex 現在的歷史列表只顯示 {to} 的會話,所以看不到它們。",
"Move to {to}…": "遷移到 {to}…",
"Moved 1 session to {to}": "已把 1 個會話遷移到 {to}",
"Moved {n} sessions to {to}": "已把 {n} 個會話遷移到 {to}",
"Moved 1 session back": "已把 1 個會話遷移回去",
"Moved {n} sessions back": "已把 {n} 個會話遷移回去",
"Move sessions to {to}?": "把會話遷移到 {to}?",
"Only the provider each one names is changed, in its files and in Codex's database: its messages, id, title and archive stay as they are. A copy of its files is kept in magpie's trash folder first, and Undo moves them back. A session written to in the last minute is left alone.": "只改每個會話在檔案和 Codex 資料庫裡記錄的供應商,訊息、會話 ID、標題和歸檔狀態都不變。改之前會先在 magpie 的回收站資料夾裡備份一份檔案,「復原」可以遷移回去。最近一分鐘內還在寫入的會話不會改動。",
"Made with {from}: Codex's history lists only {to}'s sessions now": "用 {from} 建立:Codex 現在的歷史列表只顯示 {to} 的會話",
"{n} sessions moved to magpie's trash": "{n} 個會話已移到 magpie 的回收站",
"{title} is still being written to; close it in {agent} and try again in a minute": "「{title}」仍在寫入;請在 {agent} 中關閉它,一分鐘後再試",
"{n} sessions are still being written to; close them in {agent} and try again in a minute": "{n} 個會話仍在寫入;請在 {agent} 中關閉它們,一分鐘後再試",
"{title} restored": "已恢復「{title}」",
"Trash is empty": "回收站是空的",
"Sessions deleted here wait in magpie's trash, to be restored.": "在此刪除的會話進入 magpie 回收站,可隨時恢復。",
"Deleted sessions are kept in {dir} until you erase them here; magpie never erases them by itself.": "已刪除的會話儲存在 {dir},在此徹底刪除前不會自動清除。",
"Empty magpie's trash?": "清空 magpie 的回收站?",
"Delete this session forever?": "徹底刪除這個會話?",
"Every session in magpie's trash is erased for good: it can't be restored.": "回收站中的所有會話將被徹底刪除,無法恢復。",
"Its files are erased for good: it can't be restored.": "其檔案將被徹底刪除,無法恢復。",
"Erased for good": "已徹底刪除",
"{n} sessions erased for good": "已徹底刪除 {n} 個會話",
"Searching what was said…": "正在搜尋對話內容…",
"Couldn't search what was said: {error}": "無法搜尋對話內容:{error}",
"{agent}'s own files of its sessions can't be read here, so only what magpie recorded through the gateway is searched.": "這裡讀不到 {agent} 自己的會話檔案,只搜尋 magpie 透過閘道記錄的內容。",
"Searched what was said in the latest {n} of {total} sessions.": "已搜尋最近 {n} 個會話的對話內容(共 {total} 個)。",
},
ja: {
"Relocate project": "プロジェクトを移動",
"New absolute project path": "新しいプロジェクトの絶対パス",
"Preview relocation": "移動をプレビュー",
"Confirm relocation": "移動を確定",
"Close Claude Code and its editor sessions first. This moves the entire project's sessions, not just filtered or selected rows. Existing target storage is never overwritten. Desktop-only sessions are not changed.": "先に Claude Code とエディター内のセッションを閉じてください。絞り込みや選択した行だけでなく、プロジェクトのセッションすべてを移動します。移動先に既にあるセッションの保存場所は上書きしません。デスクトップ版だけのセッションは変更しません。",
"Relocation complete. Original files and recovery manifest: {dir}": "移動しました。元のファイルと復元用マニフェスト:{dir}",
"Move {n} sessions ({size}) from {from} to {to}. Originals are retained outside Claude's project list. Historical message text is unchanged.": "{n} 件のセッション({size})を {from} から {to} へ移動します。元のファイルは Claude のプロジェクト一覧の外に残します。過去のメッセージ本文は変わりません。",
"Prompts, replies and tool results may contain private code and files. Store them on this server for up to 7 days (256 MiB total)? Recognized secrets are masked, but this is not a privacy guarantee.": "プロンプト、応答、ツールの結果には非公開のコードやファイルが含まれる場合があります。このサーバーに最大7日間(合計256 MiB)保存しますか?検出された秘密情報は隠されますが、すべての機密情報の除去は保証されません。",
"Stop recording and clear saved conversations": "記録を停止して保存済みの会話を消去",
"Delete saved conversations…": "保存済みの会話を削除…",
"On: what agents send through the gateway, and the replies, are kept on this computer only, for up to 7 days (256 MiB), to read under each gateway session": "オン:エージェントがゲートウェイ経由で送った内容と応答は、このコンピューターにのみ最大 7 日間(256 MiB)保存され、各ゲートウェイセッションで読めます",
"Off: gateway sessions show only what they used. Turned on, their text is kept on this computer only, for up to 7 days (256 MiB)": "オフ:ゲートウェイセッションには使用量のみ表示されます。オンにすると、会話の内容はこのコンピューターにのみ最大 7 日間(256 MiB)保存されます",
"Delete all locally recorded gateway conversation content? Usage totals and native session files are kept.": "ローカルに記録したゲートウェイの会話をすべて削除しますか?使用量の集計と元のセッションファイルは保持されます。",
"Show {n} more folders": "さらに {n} 個のフォルダを表示",
"Copy the command that resumes it: {cmd}": "再開するコマンドをコピー:{cmd}",
"Open in session terminal": "セッション用ターミナルで開く",
"Opening in session terminal": "セッション用ターミナルで開いています",
"Claude Code's, Codex's, Hermes's, OpenCode's and Pi's sessions on this computer show up here, by the folder they ran in.": "このコンピュータ上の Claude Code、Codex、Hermes、OpenCode、Pi のセッションが、実行されたフォルダごとにここに表示されます。",
"magpie can list {agent}'s sessions and resume them, but not delete them: they aren't kept as files of their own.": "magpie は {agent} のセッションを一覧表示・再開できますが、削除はできません。セッションごとのファイルとして保存されていないためです。",
"magpie can list {agent}'s sessions, but cannot resume or delete them.": "magpie は {agent} のセッションを一覧表示できますが、再開や削除はできません。",
"These {agent} sessions are read only; magpie can list them, but cannot resume or delete them.": "これらの {agent} セッションは読み取り専用です。magpie は一覧表示できますが、再開や削除はできません。",
"Some {agent} sessions are read only and cannot be deleted.": "一部の {agent} セッションは読み取り専用のため削除できません。",
"Select every session shown": "表示中のセッションをすべて選択",
"No folder": "フォルダなし",
"deleted {when}": "{when}に削除",
"Delete this session?": "このセッションを削除しますか?",
"Delete {n} sessions?": "{n} 件のセッションを削除しますか?",
"Delete all {n} sessions in {folder}?": "{folder} のセッション {n} 件をすべて削除しますか?",
"Delete all {n} sessions in {k} folders?": "{k} 個のフォルダのセッション {n} 件をすべて削除しますか?",
"Select every session in {folder}": "{folder} のセッションをすべて選択",
"Their files are moved to magpie's trash ({dir}), not erased: Trash puts them back. A session written to in the last minute is left alone, as {agent} may still be running it.": "ファイルは消去されず、magpie のゴミ箱({dir})に移動されます。「ゴミ箱」から元に戻せます。直近 1 分以内に書き込まれたセッションは、{agent} がまだ実行中の可能性があるため対象外です。",
"Seen through the gateway": "ゲートウェイ経由で確認",
"These {agent} sessions were seen only through magpie's gateway: {agent}'s own files of them aren't on this computer (it may run on another one, in a container or with another config folder), so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "これらの {agent} セッションは magpie のゲートウェイ経由でのみ確認されたものです。{agent} 自身のセッションファイルはこのコンピュータにないため(別のコンピュータやコンテナ、別の設定フォルダで実行されている可能性があります)、ここでは再開できません。削除するとこの一覧から外れ、magpie が記録した会話があればゴミ箱に移動します。使用量ページには使った分が残ります。",
"Sessions under \"Seen through the gateway\" have no {agent} files on this computer, so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "「ゲートウェイ経由で確認」のセッションには、このコンピュータに {agent} のファイルがないため、ここでは再開できません。削除するとこの一覧から外れ、magpie が記録した会話があればゴミ箱に移動します。使用量ページには使った分が残ります。",
"{size} recorded": "{size} 記録済み",
"A session seen only through the gateway leaves this list, and any conversation magpie recorded of it is moved to magpie's trash ({dir}): Trash puts it back. {agent}'s own files elsewhere are not touched, and Usage keeps what it spent. One with a request in the last minute is left alone.": "ゲートウェイ経由でのみ確認されたセッションはこの一覧から外れ、magpie が記録した会話があれば magpie のゴミ箱({dir})に移動します。「ゴミ箱」から元に戻せます。ほかの場所にある {agent} 自身のファイルには触れず、使用量ページには使った分が残ります。直近 1 分以内にリクエストがあったセッションは対象外です。",
"Conversations magpie recorded through the gateway still expire after 7 days here, and Delete saved conversations… erases them too.": "ゲートウェイ経由で記録した会話は、ゴミ箱の中でも 7 日後に期限切れになり、「保存済みの会話を削除…」でも一緒に消去されます。",
"Moved to magpie's trash": "magpie のゴミ箱に移動しました",
"1 Codex session was made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so it doesn't show there.": "1 件の Codex セッションは別のプロバイダー({from})で作成されました。Codex の履歴には現在 {to} のセッションしか表示されないため、表示されません。",
"{n} Codex sessions were made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so they don't show there.": "{n} 件の Codex セッションは別のプロバイダー({from})で作成されました。Codex の履歴には現在 {to} のセッションしか表示されないため、表示されません。",
"Move to {to}…": "{to} に移行…",
"Moved 1 session to {to}": "1 件のセッションを {to} に移行しました",
"Moved {n} sessions to {to}": "{n} 件のセッションを {to} に移行しました",
"Moved 1 session back": "1 件のセッションを元に戻しました",
"Moved {n} sessions back": "{n} 件のセッションを元に戻しました",
"Move sessions to {to}?": "セッションを {to} に移行しますか?",
"Only the provider each one names is changed, in its files and in Codex's database: its messages, id, title and archive stay as they are. A copy of its files is kept in magpie's trash folder first, and Undo moves them back. A session written to in the last minute is left alone.": "変更されるのは、ファイルと Codex のデータベースに記録されたプロバイダーだけです。メッセージ、ID、タイトル、アーカイブ状態はそのままです。変更前にファイルのコピーを magpie のゴミ箱フォルダーに保存し、「取り消す」で元に戻せます。直近 1 分以内に書き込まれたセッションは変更しません。",
"Made with {from}: Codex's history lists only {to}'s sessions now": "{from} で作成:Codex の履歴には現在 {to} のセッションだけが表示されます",
"{n} sessions moved to magpie's trash": "{n} 件のセッションを magpie のゴミ箱に移動しました",
"{title} is still being written to; close it in {agent} and try again in a minute": "「{title}」はまだ書き込み中です。{agent} で閉じてから、1 分後にもう一度お試しください",
"{n} sessions are still being written to; close them in {agent} and try again in a minute": "{n} 件のセッションはまだ書き込み中です。{agent} で閉じてから、1 分後にもう一度お試しください",
"{title} restored": "「{title}」を元に戻しました",
"Trash is empty": "ゴミ箱は空です",
"Sessions deleted here wait in magpie's trash, to be restored.": "ここで削除したセッションは magpie のゴミ箱に残り、元に戻せます。",
"Deleted sessions are kept in {dir} until you erase them here; magpie never erases them by itself.": "削除したセッションは、ここで消去するまで {dir} に保存されます。magpie が自動で消去することはありません。",
"Empty magpie's trash?": "magpie のゴミ箱を空にしますか?",
"Delete this session forever?": "このセッションを完全に削除しますか?",
"Every session in magpie's trash is erased for good: it can't be restored.": "magpie のゴミ箱内のすべてのセッションが完全に消去され、元に戻せなくなります。",
"Its files are erased for good: it can't be restored.": "ファイルは完全に消去され、元に戻せなくなります。",
"Erased for good": "完全に削除しました",
"{n} sessions erased for good": "{n} 件のセッションを完全に削除しました",
"Searching what was said…": "会話の内容を検索中…",
"Couldn't search what was said: {error}": "会話の内容を検索できませんでした:{error}",
"{agent}'s own files of its sessions can't be read here, so only what magpie recorded through the gateway is searched.": "{agent} 自身のセッションファイルはここでは読めないため、magpie がゲートウェイ経由で記録した内容だけを検索します。",
"Searched what was said in the latest {n} of {total} sessions.": "最新 {n} 件の会話の内容を検索しました(全 {total} 件)。",
},
de: {
"Relocate project": "Projekt verschieben",
"New absolute project path": "Neuer absoluter Projektpfad",
"Preview relocation": "Verschieben prüfen",
"Confirm relocation": "Verschieben bestätigen",
"Close Claude Code and its editor sessions first. This moves the entire project's sessions, not just filtered or selected rows. Existing target storage is never overwritten. Desktop-only sessions are not changed.": "Schließe zuerst Claude Code und seine Sitzungen im Editor. Verschoben werden alle Sitzungen des Projekts, nicht nur gefilterte oder ausgewählte Zeilen. Ein bestehender Zielspeicher wird nie überschrieben. Sitzungen, die nur in der Desktop-App liegen, bleiben unverändert.",
"Relocation complete. Original files and recovery manifest: {dir}": "Verschoben. Originaldateien und Wiederherstellungsmanifest: {dir}",
"Move {n} sessions ({size}) from {from} to {to}. Originals are retained outside Claude's project list. Historical message text is unchanged.": "{n} Sitzungen ({size}) von {from} nach {to} verschieben. Die Originale bleiben außerhalb von Claudes Projektliste erhalten. Der Text früherer Nachrichten bleibt unverändert.",
"Prompts, replies and tool results may contain private code and files. Store them on this server for up to 7 days (256 MiB total)? Recognized secrets are masked, but this is not a privacy guarantee.": "Prompts, Antworten und Werkzeugergebnisse können privaten Code und Dateien enthalten. Bis zu 7 Tage auf diesem Server speichern (insgesamt 256 MiB)? Erkannte Geheimnisse werden maskiert, aber vollständiger Datenschutz ist nicht garantiert.",
"Stop recording and clear saved conversations": "Aufzeichnung stoppen und gespeicherte Gespräche löschen",
"Delete saved conversations…": "Gespeicherte Gespräche löschen…",
"On: what agents send through the gateway, and the replies, are kept on this computer only, for up to 7 days (256 MiB), to read under each gateway session": "An: Was Agenten über das Gateway senden, und die Antworten werden nur auf diesem Computer gespeichert, bis zu 7 Tage (256 MiB), zum Nachlesen in jeder Gateway-Sitzung",
"Off: gateway sessions show only what they used. Turned on, their text is kept on this computer only, for up to 7 days (256 MiB)": "Aus: Gateway-Sitzungen zeigen nur ihren Verbrauch. Eingeschaltet wird ihr Text nur auf diesem Computer gespeichert, bis zu 7 Tage (256 MiB)",
"Delete all locally recorded gateway conversation content? Usage totals and native session files are kept.": "Alle lokal aufgezeichneten Gateway-Gespräche löschen? Nutzungsstatistiken und native Sitzungsdateien bleiben erhalten.",
"Show {n} more folders": "{n} weitere Ordner anzeigen",
"Copy the command that resumes it: {cmd}": "Befehl zum Fortsetzen kopieren: {cmd}",
"Open in session terminal": "Im Sitzungsterminal öffnen",
"Opening in session terminal": "Wird im Sitzungsterminal geöffnet",
"Claude Code's, Codex's, Hermes's, OpenCode's and Pi's sessions on this computer show up here, by the folder they ran in.": "Sitzungen von Claude Code, Codex, Hermes, OpenCode und Pi auf diesem Computer erscheinen hier, gruppiert nach dem Ordner, in dem sie liefen.",
"magpie can list {agent}'s sessions and resume them, but not delete them: they aren't kept as files of their own.": "magpie kann die Sitzungen von {agent} auflisten und fortsetzen, aber nicht löschen, da sie nicht als eigene Dateien vorliegen.",
"magpie can list {agent}'s sessions, but cannot resume or delete them.": "magpie kann die Sitzungen von {agent} auflisten, aber weder fortsetzen noch löschen.",
"These {agent} sessions are read only; magpie can list them, but cannot resume or delete them.": "Diese Sitzungen von {agent} sind schreibgeschützt; magpie kann sie auflisten, aber weder fortsetzen noch löschen.",
"Some {agent} sessions are read only and cannot be deleted.": "Einige Sitzungen von {agent} sind schreibgeschützt und können nicht gelöscht werden.",
"Select every session shown": "Alle angezeigten Sitzungen auswählen",
"No folder": "Kein Ordner",
"deleted {when}": "gelöscht {when}",
"Delete this session?": "Diese Sitzung löschen?",
"Delete {n} sessions?": "{n} Sitzungen löschen?",
"Delete all {n} sessions in {folder}?": "Alle {n} Sitzungen in {folder} löschen?",
"Delete all {n} sessions in {k} folders?": "Alle {n} Sitzungen in {k} Ordnern löschen?",
"Select every session in {folder}": "Alle Sitzungen in {folder} auswählen",
"Their files are moved to magpie's trash ({dir}), not erased: Trash puts them back. A session written to in the last minute is left alone, as {agent} may still be running it.": "Die Dateien werden in den Papierkorb von magpie ({dir}) verschoben, nicht gelöscht: Über „Papierkorb“ lassen sie sich wiederherstellen. Eine Sitzung, in die in der letzten Minute geschrieben wurde, bleibt unberührt, da {agent} sie eventuell noch ausführt.",
"Seen through the gateway": "Über das Gateway gesehen",
"These {agent} sessions were seen only through magpie's gateway: {agent}'s own files of them aren't on this computer (it may run on another one, in a container or with another config folder), so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "Diese Sitzungen von {agent} wurden nur über das Gateway von magpie gesehen: Die eigenen Dateien von {agent} dazu liegen nicht auf diesem Computer (es läuft vielleicht auf einem anderen, in einem Container oder mit einem anderen Konfigurationsordner), daher lassen sie sich hier nicht fortsetzen. Löschen nimmt eine aus dieser Liste und verschiebt ein von magpie aufgezeichnetes Gespräch in den Papierkorb; die Nutzung behält, was sie verbraucht hat.",
"Sessions under \"Seen through the gateway\" have no {agent} files on this computer, so they can't be resumed here. Delete takes one off this list and moves any conversation magpie recorded of it to its trash; Usage keeps what it spent.": "Sitzungen unter „Über das Gateway gesehen“ haben keine Dateien von {agent} auf diesem Computer, daher lassen sie sich hier nicht fortsetzen. Löschen nimmt eine aus dieser Liste und verschiebt ein von magpie aufgezeichnetes Gespräch in den Papierkorb; die Nutzung behält, was sie verbraucht hat.",
"{size} recorded": "{size} aufgezeichnet",
"A session seen only through the gateway leaves this list, and any conversation magpie recorded of it is moved to magpie's trash ({dir}): Trash puts it back. {agent}'s own files elsewhere are not touched, and Usage keeps what it spent. One with a request in the last minute is left alone.": "Eine nur über das Gateway gesehene Sitzung verschwindet aus dieser Liste, und ein von magpie aufgezeichnetes Gespräch wird in den Papierkorb von magpie ({dir}) verschoben: Über „Papierkorb“ lässt es sich wiederherstellen. Die eigenen Dateien von {agent} anderswo bleiben unberührt, und die Nutzung behält, was sie verbraucht hat. Eine Sitzung mit einer Anfrage in der letzten Minute bleibt unberührt.",
"Conversations magpie recorded through the gateway still expire after 7 days here, and Delete saved conversations… erases them too.": "Über das Gateway aufgezeichnete Gespräche verfallen auch hier nach 7 Tagen, und „Gespeicherte Gespräche löschen…“ löscht sie ebenfalls.",
"Moved to magpie's trash": "In den Papierkorb von magpie verschoben",
"1 Codex session was made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so it doesn't show there.": "1 Codex-Sitzung wurde mit einem anderen Anbieter ({from}) erstellt: Codex zeigt in seinem Verlauf jetzt nur Sitzungen von {to}, daher erscheint sie dort nicht.",
"{n} Codex sessions were made with another provider ({from}): Codex lists only {to}'s sessions in its history now, so they don't show there.": "{n} Codex-Sitzungen wurden mit einem anderen Anbieter ({from}) erstellt: Codex zeigt in seinem Verlauf jetzt nur Sitzungen von {to}, daher erscheinen sie dort nicht.",
"Move to {to}…": "Zu {to} umziehen…",
"Moved 1 session to {to}": "1 Sitzung zu {to} umgezogen",
"Moved {n} sessions to {to}": "{n} Sitzungen zu {to} umgezogen",
"Moved 1 session back": "1 Sitzung zurückgezogen",
"Moved {n} sessions back": "{n} Sitzungen zurückgezogen",
"Move sessions to {to}?": "Sitzungen zu {to} umziehen?",
"Only the provider each one names is changed, in its files and in Codex's database: its messages, id, title and archive stay as they are. A copy of its files is kept in magpie's trash folder first, and Undo moves them back. A session written to in the last minute is left alone.": "Geändert wird nur der Anbieter, den jede Sitzung in ihren Dateien und in der Datenbank von Codex nennt: Nachrichten, ID, Titel und Archivstatus bleiben, wie sie sind. Vorher wird eine Kopie der Dateien im Papierkorbordner von magpie abgelegt, und Rückgängig zieht sie zurück. Eine Sitzung, in die in der letzten Minute geschrieben wurde, bleibt unverändert.",
"Made with {from}: Codex's history lists only {to}'s sessions now": "Mit {from} erstellt: Der Verlauf von Codex zeigt jetzt nur Sitzungen von {to}",
"{n} sessions moved to magpie's trash": "{n} Sitzungen in den Papierkorb von magpie verschoben",
"{title} is still being written to; close it in {agent} and try again in a minute": "In „{title}“ wird noch geschrieben; schließen Sie die Sitzung in {agent} und versuchen Sie es in einer Minute erneut",
"{n} sessions are still being written to; close them in {agent} and try again in a minute": "In {n} Sitzungen wird noch geschrieben; schließen Sie sie in {agent} und versuchen Sie es in einer Minute erneut",
"{title} restored": "„{title}“ wiederhergestellt",
"Trash is empty": "Der Papierkorb ist leer",
"Sessions deleted here wait in magpie's trash, to be restored.": "Hier gelöschte Sitzungen bleiben zur Wiederherstellung im Papierkorb von magpie.",
"Deleted sessions are kept in {dir} until you erase them here; magpie never erases them by itself.": "Gelöschte Sitzungen bleiben in {dir}, bis Sie sie hier endgültig löschen; magpie löscht sie nie von selbst.",
"Empty magpie's trash?": "Papierkorb von magpie leeren?",
"Delete this session forever?": "Diese Sitzung endgültig löschen?",
"Every session in magpie's trash is erased for good: it can't be restored.": "Alle Sitzungen im Papierkorb von magpie werden endgültig gelöscht und können nicht wiederhergestellt werden.",
"Its files are erased for good: it can't be restored.": "Die Dateien werden endgültig gelöscht und können nicht wiederhergestellt werden.",
"Erased for good": "Endgültig gelöscht",
"{n} sessions erased for good": "{n} Sitzungen endgültig gelöscht",
"Searching what was said…": "Gesprächsinhalte werden durchsucht …",
"Couldn't search what was said: {error}": "Gesprächsinhalte konnten nicht durchsucht werden: {error}",
"{agent}'s own files of its sessions can't be read here, so only what magpie recorded through the gateway is searched.": "Die eigenen Sitzungsdateien von {agent} sind hier nicht lesbar, daher wird nur durchsucht, was magpie über das Gateway aufgezeichnet hat.",
"Searched what was said in the latest {n} of {total} sessions.": "Gesprächsinhalte der neuesten {n} von {total} Sitzungen durchsucht.",
},
});
+1 -1
View File
@@ -98,7 +98,7 @@ func TestPageNamesItsFilesByContent(t *testing.T) {
t.Errorf("/: Content-Type %q", ct)
}
body := page.Body.String()
for _, f := range []string{"app.js", "routing.js", "library.js", "plugins.js", "sessions.js", "context.js", "i18n.js", "compat.js", "app.css", "routing.css", "context.css"} {
for _, f := range []string{"app.js", "routing.js", "library.js", "plugins.js", "plugins/sessions/client.js", "plugins/sessions/sessions.css", "context.js", "i18n.js", "compat.js", "app.css", "routing.css", "context.css"} {
b, err := fs.ReadFile(staticFS(), f)
if err != nil {
t.Fatal(err)
+17 -6
View File
@@ -173,9 +173,10 @@ func TestBuiltinConfig(t *testing.T) {
}
}
// Every script a built-in plugin says it has is on disk, loaded by the
// page after the kernel and before app.js, which looks for its pages, and
// named with its hash so a new one isn't read from the cache.
// Every file a built-in plugin says it has is on disk, loaded by the page
// and named with its hash so a new one isn't read from the cache: a script
// after the kernel and before app.js, which looks for its pages, a
// stylesheet in the head with the others.
func TestBuiltinClientsLoaded(t *testing.T) {
page, err := os.ReadFile("assets/index.html")
if err != nil {
@@ -183,7 +184,11 @@ func TestBuiltinClientsLoaded(t *testing.T) {
}
src := string(page)
at := func(name string) int {
i := strings.Index(src, `<script src="`+name+`"></script>`)
tag := `<script src="` + name + `"></script>`
if strings.HasSuffix(name, ".css") {
tag = `<link rel="stylesheet" href="` + name + `">`
}
i := strings.Index(src, tag)
if i < 0 {
t.Fatalf("index.html doesn't load %s", name)
}
@@ -200,10 +205,16 @@ func TestBuiltinClientsLoaded(t *testing.T) {
if _, err := os.Stat(filepath.Join("assets", name)); err != nil {
t.Errorf("%s: %v", name, err)
}
if i := at(name); i < kernel || i > app {
attr := "src"
if strings.HasSuffix(name, ".css") {
attr = "href"
if i := at(name); i > strings.Index(src, "</head>") {
t.Errorf("%s isn't in the head", name)
}
} else if i := at(name); i < kernel || i > app {
t.Errorf("%s isn't between kernel.js and app.js", name)
}
if !strings.Contains(string(versionedPage(page)), `src="`+name+`?v=`) {
if !strings.Contains(string(versionedPage(page)), attr+`="`+name+`?v=`) {
t.Errorf("%s isn't named with its hash", name)
}
n++
+1 -1
View File
@@ -9,7 +9,7 @@ const choice = (family, weight, style) => ({ family, name: "Chosen", weight, sty
for (const [name, engine] of [["chromium", chromium], ["webkit", webkit]]) {
test(`${name}: font reset restores the original cascade and explicit emphasis`, async () => {
const css = (await Promise.all(["app.css", "library.css", "routing.css", "sessions.css", "plugins.css"].map(f => fs.readFile(path.join(assets, f), "utf8")))).join("\n");
const css = (await Promise.all(["app.css", "library.css", "routing.css", "plugins/sessions/sessions.css", "plugins.css"].map(f => fs.readFile(path.join(assets, f), "utf8")))).join("\n");
const js = await fs.readFile(path.join(assets, "fonts.js"), "utf8");
const browser = await engine.launch();
try {
@@ -137,7 +137,7 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
// A transcript read started before clearing must not restore old content.
holdNextTranscript = true;
const readStarted = page.waitForRequest((r) => new URL(r.url()).pathname === "/api/sessions/transcript");
await page.evaluate(() => window.loadSessionsPage());
await page.evaluate(() => magpie.call("sessions", "open"));
await readStarted;
await assertRecordCard(page);
assert.equal(await page.locator(".sm-record .sm-record-clear").count(), 1, "kept text can be deleted from the card");
+2 -2
View File
@@ -7,13 +7,13 @@ const assert = require("node:assert/strict");
const fs = require("node:fs/promises");
const path = require("node:path");
const { test } = require("node:test");
const { strings } = require("./strings.cjs");
const { chromium, webkit } = require("playwright");
const assets = path.resolve(__dirname, "../assets");
test("de has every zh string, with its placeholders and tags", async () => {
const src = await fs.readFile(path.join(assets, "i18n.js"), "utf8");
const I18N = new Function(src.slice(0, src.indexOf("\n};") + 3) + "; return I18N;")();
const { I18N } = strings(); // i18n.js's and the plugins'
const zh = Object.keys(I18N.zh), de = I18N.de;
assert.deepEqual(zh.filter((k) => !(k in de)), [], "missing in de");
assert.deepEqual(Object.keys(de).filter((k) => !(k in I18N.zh)), [], "de only");
+2 -2
View File
@@ -7,13 +7,13 @@ const assert = require("node:assert/strict");
const fs = require("node:fs/promises");
const path = require("node:path");
const { test } = require("node:test");
const { strings } = require("./strings.cjs");
const { chromium, webkit } = require("playwright");
const assets = path.resolve(__dirname, "../assets");
test("ja has every zh string, with its placeholders and tags", async () => {
const src = await fs.readFile(path.join(assets, "i18n.js"), "utf8");
const I18N = new Function(src.slice(0, src.indexOf("\n};") + 3) + "; return I18N;")();
const { I18N } = strings(); // i18n.js's and the plugins'
const zh = Object.keys(I18N.zh), ja = I18N.ja;
assert.deepEqual(zh.filter((k) => !(k in ja)), [], "missing in ja");
assert.deepEqual(Object.keys(ja).filter((k) => !(k in I18N.zh)), [], "ja only");
+2 -2
View File
@@ -9,13 +9,13 @@ const assert = require("node:assert/strict");
const fs = require("node:fs/promises");
const path = require("node:path");
const { test } = require("node:test");
const { strings } = require("./strings.cjs");
const { chromium, webkit } = require("playwright");
const assets = path.resolve(__dirname, "../assets");
test("zh-TW has every zh string, with its placeholders and tags, in Traditional", async () => {
const src = await fs.readFile(path.join(assets, "i18n.js"), "utf8");
const I18N = new Function(src.slice(0, src.indexOf("\n};") + 3) + "; return I18N;")();
const { I18N } = strings(); // i18n.js's and the plugins'
const zh = Object.keys(I18N.zh), tw = I18N["zh-TW"];
assert.deepEqual(zh.filter((k) => !(k in tw)), [], "missing in zh-TW");
assert.deepEqual(Object.keys(tw).filter((k) => !(k in I18N.zh)), [], "zh-TW only");
+28 -17
View File
@@ -1,23 +1,34 @@
// Run with Node's test runner; needs no browser. A key written twice in one
// language of i18n.js is a trap: the later one silently wins, so an edit to
// the first does nothing. Every key appears once per language.
// language is a trap: the later one silently wins, so an edit to the first
// does nothing. Every key appears once per language, in i18n.js or in one
// plugin's i18n.js (strings.cjs), never in two of them, and a plugin's
// file says every one of its keys in every language.
const assert = require("node:assert/strict");
const fs = require("node:fs/promises");
const path = require("node:path");
const { test } = require("node:test");
const { strings } = require("./strings.cjs");
test("no language in i18n.js has a key twice", async () => {
const src = await fs.readFile(path.resolve(__dirname, "../assets/i18n.js"), "utf8");
const body = src.slice(0, src.indexOf("\n};"));
const twice = [];
let lang, seen;
body.split("\n").forEach((line, i) => {
const head = line.match(/^ "?([\w-]+)"?: \{/);
if (head) return void ((lang = head[1]), (seen = new Map()));
const key = line.match(/^ ("(?:[^"\\]|\\.)*")\s*:/);
if (!key || !lang) return;
if (seen.has(key[1])) twice.push(`${lang} ${key[1]}: lines ${seen.get(key[1])} and ${i + 1}`);
else seen.set(key[1], i + 1);
});
test("no language has a key twice", () => {
const { files, twice } = strings();
for (const { file, src } of files) {
const body = file === "i18n.js" ? src.slice(0, src.indexOf("\n};")) : src;
let lang, seen;
body.split("\n").forEach((line, i) => {
const head = line.match(/^ "?([\w-]+)"?: \{/);
if (head) return void ((lang = head[1]), (seen = new Map()));
const key = line.match(/^ ("(?:[^"\\]|\\.)*")\s*:/);
if (!key || !lang) return;
if (seen.has(key[1])) twice.push(`${file} ${lang} ${key[1]}: lines ${seen.get(key[1])} and ${i + 1}`);
else seen.set(key[1], i + 1);
});
}
assert.deepEqual(twice, []);
});
test("a plugin's words are said in every language", () => {
for (const { file, dict } of strings().files.slice(1)) {
assert.deepEqual(Object.keys(dict).sort(), ["de", "ja", "zh", "zh-TW"], file);
const zh = Object.keys(dict.zh);
assert.ok(zh.length, `${file} says nothing`);
for (const lang of ["zh-TW", "ja", "de"]) assert.deepEqual(Object.keys(dict[lang]).sort(), [...zh].sort(), `${file} ${lang}`);
}
});
@@ -128,10 +128,10 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
// another agent starts at a page; a session opened from the Usage
// page, far down the folders, is drawn
await page.evaluate(() => window.openSessionOnPage({ agent: "claude" }));
await page.evaluate(() => magpie.call("sessions", "reveal", { agent: "claude" }));
await view.locator('.row.sm-sess[data-id^="claude"]').first().waitFor();
assert.equal(await folders.count(), 3);
await page.evaluate(() => window.openSessionOnPage({ agent: "codex", id: "codex-230", cwd: "/pictures/inputs/0230" }));
await page.evaluate(() => magpie.call("sessions", "reveal", { agent: "codex", id: "codex-230", cwd: "/pictures/inputs/0230" }));
await view.locator('.sm-item.open .row.sm-sess[data-id="codex-230"]').waitFor();
assert.equal(await folders.count(), 231, "drawn down to the folder of the session opened");
assert(await view.locator(".row.sm-sess").count() <= 1, "only that folder is unfolded");
@@ -129,11 +129,11 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
await view.locator(".sm-bar .sm-check").uncheck();
// another agent starts at a page, and so does coming back
await page.evaluate(() => window.openSessionOnPage({ agent: "codex" }));
await page.evaluate(() => magpie.call("sessions", "reveal", { agent: "codex" }));
await view.locator('.row.sm-sess[data-id^="codex"]').first().waitFor();
assert.equal(await rows.count(), 100);
// a session opened from the Usage page, far down its folder, is drawn
await page.evaluate(() => window.openSessionOnPage({ agent: "claude", id: "claude-180", cwd: "/work/big" }));
await page.evaluate(() => magpie.call("sessions", "reveal", { agent: "claude", id: "claude-180", cwd: "/work/big" }));
await view.locator('.sm-item.open .row.sm-sess[data-id="claude-180"]').waitFor();
assert.equal(await rows.count(), 181);
assert.equal(await more.textContent(), lang === "en" ? "Show 69 more" : "显示其余 69 个");
+34
View File
@@ -0,0 +1,34 @@
// The window's words in each language, as the page has them: i18n.js's,
// and each plugin's (assets/plugins/<id>/i18n.js, added by the kernel's
// magpie.strings). files says which file said which; a key two files say
// is in twice.
const fs = require("node:fs");
const path = require("node:path");
const assets = path.resolve(__dirname, "../assets");
function strings() {
const src = fs.readFileSync(path.join(assets, "i18n.js"), "utf8");
const I18N = new Function(src.slice(0, src.indexOf("\n};") + 3) + "; return I18N;")();
const files = [{ file: "i18n.js", src, dict: structuredClone(I18N) }];
const twice = [];
const dir = path.join(assets, "plugins");
for (const id of fs.readdirSync(dir).sort()) {
const file = path.join(dir, id, "i18n.js");
if (!fs.existsSync(file)) continue;
const src = fs.readFileSync(file, "utf8");
let dict;
new Function("magpie", src)({ strings: (d) => { dict = d; } });
files.push({ file: path.relative(assets, file), src, dict });
for (const [lang, words] of Object.entries(dict)) {
const to = (I18N[lang] ||= {});
for (const [k, v] of Object.entries(words)) {
if (k in to) twice.push(`${lang} ${JSON.stringify(k)} in ${path.relative(assets, file)}`);
else to[k] = v;
}
}
}
return { I18N, files, twice };
}
module.exports = { strings };
+1 -1
View File
@@ -10,7 +10,7 @@ const { test } = require("node:test");
const { chromium, webkit } = require("playwright");
const assets = path.resolve(__dirname, "../assets");
const sheets = ["app.css", "library.css", "routing.css", "sessions.css", "plugins.css"];
const sheets = ["app.css", "library.css", "routing.css", "plugins/sessions/sessions.css", "plugins.css"];
test("no stylesheet names a monospace stack of its own", async () => {
for (const f of sheets) {
+3 -2
View File
@@ -63,8 +63,9 @@ type Manifest struct {
// (schema.go): the window draws their form, and SetConfig takes only
// what it allows. Register adds them to Defaults.
Settings any
// Client are its scripts in the window, under assets/plugins/<id>/:
// they register its parts with the window's kernel (kernel.js).
// Client are its files in the window, under assets/plugins/<id>/: its
// scripts register its parts with the window's kernel (kernel.js), its
// i18n.js says its words in each language, and a .css is its styles.
// TestBuiltinClientsLoaded holds the page to loading each.
Client []string
schema *Schema
+2 -1
View File
@@ -24,6 +24,7 @@ func init() {
}
return 0, nil
},
Parts: []pluginrt.Part{{Slot: "nav.page", Key: "sessions"}},
Parts: []pluginrt.Part{{Slot: "nav.page", Key: "sessions"}},
Client: []string{"i18n.js", "sessions.css", "client.js"},
})
}