gui: Usage is a plugin's page, its code, markup and words in plugins/usage (P2)
P2 of docs/subsystems/plugin-runtime.md, the fourth page after Sessions,
Library and Routing, and the largest part of app.js.
- The Usage page's code (~3000 lines: the Overview's cards, the
Requests ledger and heatmap, the Sessions tab, the Agents list) moves
from app.js to assets/plugins/usage/page.js; its markup, index.html's
<main id="view-usage">, is client.js's part html. app.js 25756 →
22675 lines (1,355,376 → 1,198,239 bytes).
- page.js builds on app.js at the top level (its timers, ?view=usage's
tab and filters), so it is the one plugin script that loads after
app.js. index.html: kernel.js, the plugins' other scripts, app.js and
the scripts beside it, each page.js, then start.js, which is app.js's
old tail (magpie.start(), navHides, OPEN_VIEWS, the first page shown,
load()), so the first page has its code. TestBuiltinClientsLoaded
holds that order.
- Hooks: open loads it, refresh(again) is load()'s read of it, reload is
Refresh now, costs redraws costs on a currency change, tab says the
tab for focusQuotaCard. app.js calls those through magpie.call. The
allowance cards, quotasOpened, panelQuotaFocus and panelUseFocus stay
in app.js: the tray panel draws them too.
- plugins/usage: Essential, Requires window, no InUse. Off, its nav tab
goes and so do the ways to it (data-feature="usage": the panel's Open
Usage, Routing's View usage); show("usage") gives way to Agents; the
panel's Allowances tab stays. builtins.test.cjs switches it off and
checks each.
- The 173 strings only Usage says move to plugins/usage/i18n.js;
i18n.js 15032 → 14344 lines. "{n}s" and
"All sessions" stay: context.js says them too since #1591.
- context.js: with context.js now in before the first page is shown,
the page's open and load()'s first refresh both reached loadContext,
and the second drew "Reading…" again over the advice the first had
just drawn, so its curves never played their entrance (context-tune,
3 of 3 red). loadContext draws the waiting pane once for the same
days. Its dead last line, which loaded the tab once context.js came
in late, goes.
- context-window.test.cjs's "arrives after the state" becomes "loads at
once though context.js is slow": start.js now waits for it.
usage-stale-answer reads page.js beside app.js. quota-refresh-order
(#1630) cut app.js at the period picker's comment, now in page.js; it
ends at the next comment that stays (5 of 5; without keepRefreshedQuotas'
call, 2 of 5 red).
- docs: plugin-runtime.md, gui-shell.md.
Run, at this tree on origin/main af27b70b4 (main's keepRefreshedQuotas
and quotaRefresh changes, #1630, stay in app.js beside loadQuotas: the
tray panel draws those cards too):
- gofmt -l clean; go vet darwin, GOOS=linux -tags nogui, GOOS=windows.
- go test -count=1 ./internal/gui ./internal/pluginrt ./plugins/...: ok
(-skip TestMainWindowCorners, #1936); gateway and usage as above.
- usage-card-refresh, quota-refresh-order, builtins, editor-picker-clicks,
context-window, usage-stale-answer: Chromium and WebKit green.
- The full GUI set: see the Routing commit; every Usage red there is the
same on main or red only under load.
This commit is contained in:
@@ -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: `plugins.js` and `context.js`, and those a plugin adds under `assets/plugins/<id>/` (the Gateway, Sessions, Library and Routing 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) |
|
||||
| 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: `plugins.js` and `context.js`, and those a plugin adds under `assets/plugins/<id>/` (the Gateway, Sessions, Library, Routing and Usage 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 and Routing pages (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) |
|
||||
@@ -59,7 +59,7 @@ refresh was requested this time; a failed read retains its failure notice.
|
||||
Usage rows and aggregates use `Record.Decode` and `DecodeOf` in
|
||||
[`internal/usage/usage.go`](../../internal/usage/usage.go). Routing uses
|
||||
`decodeOf` in [`plugins/routing/client.js`](../../internal/gui/assets/plugins/routing/client.js); Usage
|
||||
rows use `ledDecode` in [`app.js`](../../internal/gui/assets/app.js).
|
||||
rows use `ledDecode` in [`plugins/usage/page.js`](../../internal/gui/assets/plugins/usage/page.js).
|
||||
|
||||
When an answer follows reasoning, only answer tokens are timed from the
|
||||
first answer text. Without answer text, all output tokens are timed only
|
||||
|
||||
@@ -9,7 +9,7 @@ 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), and
|
||||
P2 so far (a page moved out of the core whole: its code, styles and words:
|
||||
Sessions, Library and Routing). OpenCode plugins (npm packages in
|
||||
Sessions, Library, Routing and Usage). 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).
|
||||
@@ -24,7 +24,7 @@ the plugin host) are a different thing; see
|
||||
| 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) |
|
||||
| Settings schema | `SchemaOf(Settings)` makes a JSON Schema object of the struct, in its fields' order (`x-order`): each exported field with a json name is a setting, of `bool`, an int, `float64` or `string`, with tags `title` (English; the window translates it), `description`, `enum` (comma separated) and `min`/`max`. Its values are the defaults. A field a form can't draw, or a tag that doesn't parse, panics at `Register`. `Schema.Validate` takes a value only as the schema allows it (a JSON float64 or a YAML int for an integer); `SetConfig(id, config)` writes the user's row through it, and `Compose` leaves out a value edited into plugins.yml by hand that it doesn't allow, so the default stands. | [`schema.go`](../../internal/pluginrt/schema.go), [`config.go`](../../internal/pluginrt/config.go) |
|
||||
| Built-in plugins | `groups`, `library`, `otel`, `sessions`, `warmups` (P0), `gateway` (P1), the Gateway page, which is Essential and in use while a gateway key is there (`access.List`), and `routing` (P2), the Routing page, Essential and in use while the user has a routing group, since the page is where groups are made and changed. The Gateway page's one setting, `callsPage` (10, 20, 50 or 100; 20), is how many recent calls the page shows at a time. The other five aren't Essential. Each one's `InUse` counts what the user made with it: routing groups not Auto and not hidden, library items given to agents, a collector sent to, gateway conversations recorded, warm-ups and check-ins on. | [`plugins/`](../../plugins) |
|
||||
| Built-in plugins | `groups`, `library`, `otel`, `sessions`, `warmups` (P0), `gateway` (P1), the Gateway page, which is Essential and in use while a gateway key is there (`access.List`), and `routing` (P2), the Routing page, Essential and in use while the user has a routing group, since the page is where groups are made and changed. `usage` (P2), the Usage page, is Essential too, with no `InUse`: what it shows the gateway counts anyway, and the tray panel's Usage tab still shows the allowances with it off. The Gateway page's one setting, `callsPage` (10, 20, 50 or 100; 20), is how many recent calls the page shows at a time. The other five aren't Essential. Each one's `InUse` counts what the user made with it: routing groups not Auto and not hidden, library items given to agents, a collector sent to, gateway conversations recorded, warm-ups and check-ins on. | [`plugins/`](../../plugins) |
|
||||
|
||||
The boundary is checked by `TestPluginsImportOnlyCore`: no package outside
|
||||
`plugins/` imports one (but `main.go`, through `plugins/all`), a plugin never
|
||||
@@ -130,6 +130,27 @@ says one of its words, which goes back to i18n.js.
|
||||
Providers' "Make a routing group of …" (`data-feature="routing"`), the
|
||||
Usage list's View routing and its time as a link, and the context card's
|
||||
Latest request; a panel left on its Routing tab shows Agents.
|
||||
- **Usage** (`plugins/usage`, `Client: i18n.js, client.js, page.js`):
|
||||
the page that was the largest part of app.js (about 3000 lines: the
|
||||
Overview's cards, the Requests ledger, the Sessions tab and the Agents
|
||||
list). Its part's `html` is the page's markup that was index.html's
|
||||
`#view-usage`. Its code builds on app.js at the top level (its timers,
|
||||
`?view=usage`'s tab and filters), so `page.js` is the one script a
|
||||
plugin loads after app.js: index.html loads kernel.js, the plugins'
|
||||
other scripts, app.js and the scripts beside it, then each `page.js`,
|
||||
then `start.js`, which is app.js's old tail (`magpie.start()`, the
|
||||
first page shown, the first `load()`), so the first page has its code.
|
||||
`TestBuiltinClientsLoaded` holds that order. Its hooks: `open` loads
|
||||
it, `refresh(again)` is `load()`'s read of it (coming back to the
|
||||
Overview is opening the allowances, #1588), `reload` is Refresh now,
|
||||
`costs` draws the costs again when Settings' currency changes, and
|
||||
`tab` says which tab it is on, for `focusQuotaCard`. Still in app.js,
|
||||
since the tray panel draws them too: the allowance cards,
|
||||
`quotasOpened`, `panelQuotaFocus` and `panelUseFocus`. With the plugin
|
||||
off, its nav tab goes, and so do the ways to the page
|
||||
(`data-feature="usage"`): the tray panel's Open Usage and Routing's View
|
||||
usage. A `show("usage")` left anywhere gives way to Agents. The panel's
|
||||
Allowances tab stays.
|
||||
|
||||
## Source of truth and composing
|
||||
|
||||
|
||||
+8
-3089
File diff suppressed because it is too large
Load Diff
@@ -735,6 +735,10 @@
|
||||
let ctxDays = "7";
|
||||
try { const d = localStorage.getItem("magpie.ctxDays"); if (CTX_RANGES.some(([id]) => id === d)) ctxDays = d; } catch {}
|
||||
let ctxData = null, ctxJSON = "", ctxRead = 0, ctxOpen = "", ctxAgent = "all";
|
||||
// the days the pane shows "Reading…" for: a second read before the history
|
||||
// answers (the page opened, then the first state's refresh) leaves it be,
|
||||
// so the advice drawn meanwhile keeps its entrance
|
||||
let ctxWaiting = "";
|
||||
|
||||
const SCORE_NAMES = { cache: "Cache", lean: "Lean start", pace: "Pace", reliable: "Reliability" };
|
||||
const SCORE_NOTES = {
|
||||
@@ -1258,7 +1262,8 @@
|
||||
async function loadContext() {
|
||||
const read = ++ctxRead, days = ctxDays;
|
||||
if (tuneData && tuneData.days !== +days) tuneData = null;
|
||||
if (!ctxData || ctxData.days !== +days) { ctxData = null; renderContext(); }
|
||||
if (ctxData && ctxData.days !== +days) ctxData = null;
|
||||
if (!ctxData && (ctxWaiting !== days || !$("#contextPane")?.childElementCount)) { ctxWaiting = days; renderContext(); }
|
||||
loadTune().catch((e) => status(e.message, "err"));
|
||||
const data = await api("context?days=" + days);
|
||||
if (read !== ctxRead) return;
|
||||
@@ -1274,7 +1279,4 @@
|
||||
}
|
||||
window.loadContext = loadContext;
|
||||
window.renderContext = renderContext;
|
||||
// opened on the Context tab (?view=usage): app.js showed it, and may have
|
||||
// read the state, before this file was here to load it
|
||||
if (view === "usage" && usageTab === "context") loadContext().catch((e) => status(e.message, "err"));
|
||||
})();
|
||||
|
||||
+4
-692
File diff suppressed because it is too large
Load Diff
@@ -54,7 +54,7 @@
|
||||
<button data-view="routing" data-feature="routing"><svg class="nav-ic" viewBox="0 0 20 20" width="16" height="16" aria-hidden="true"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M3 10h5l4-5h5M8 10l4 5h5M14.5 3l2.5 2-2.5 2M14.5 13l2.5 2-2.5 2"/></g></svg><span data-t>Routing</span></button>
|
||||
<button data-view="gateway" data-feature="gateway"><svg class="nav-ic" viewBox="0 0 20 20" width="16" height="16" aria-hidden="true"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="4" width="14" height="5" rx="1.5"/><rect x="3" y="11" width="14" height="5" rx="1.5"/><path d="M6 6.5h.01M6 13.5h.01"/></g></svg><span data-t>Gateway</span></button>
|
||||
<span class="nav-gl" data-t>Insights</span>
|
||||
<button data-view="usage"><svg class="nav-ic" viewBox="0 0 20 20" width="16" height="16" aria-hidden="true"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M4 16V9M8 16V5M12 16v-5M16 16V7"/></g></svg><span data-t>Usage</span></button>
|
||||
<button data-view="usage" data-feature="usage"><svg class="nav-ic" viewBox="0 0 20 20" width="16" height="16" aria-hidden="true"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M4 16V9M8 16V5M12 16v-5M16 16V7"/></g></svg><span data-t>Usage</span></button>
|
||||
<span class="nav-gl" data-t>Extend</span>
|
||||
<button data-view="plugins"><svg class="nav-ic" viewBox="0 0 20 20" width="16" height="16" aria-hidden="true"><g fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="M8 3.5h4v2.5a1.5 1.5 0 0 0 3 0V3.5h1.5v13H4v-4h2.5a1.5 1.5 0 0 0 0-3H4v-6z"/></g></svg><span data-t>Plugins</span></button>
|
||||
</nav>
|
||||
@@ -124,117 +124,6 @@
|
||||
<!-- the pages plugins add (kernel.js) go here, in the order they register -->
|
||||
<template data-slot="page"></template>
|
||||
|
||||
<main class="view" id="view-usage" hidden>
|
||||
<div class="usage-head">
|
||||
<div class="segs" id="usageTab"></div>
|
||||
<div class="segs" id="period"></div>
|
||||
<div class="segs" id="sessRange" hidden></div>
|
||||
<span class="ctx-range" id="ctxRange" hidden></span>
|
||||
<span class="grow"></span>
|
||||
<span class="usage-refresh" id="usageRefresh">
|
||||
<button class="icon" id="usageReload" type="button" aria-label="Refresh now" data-tt><svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13.5 8a5.5 5.5 0 1 1-1.6-3.9M13.5 2.5v3h-3"/></svg></button>
|
||||
<button class="sess-pick" id="usageEvery" type="button"></button>
|
||||
</span>
|
||||
<span class="usage-cost" id="usageCost"></span>
|
||||
</div>
|
||||
<div class="usage-pane" id="usagePane">
|
||||
<div class="row-head quota-head" id="quotaHead" hidden>
|
||||
<span class="label" data-t>Allowances</span>
|
||||
<span class="grow"></span>
|
||||
<button class="sess-pick quota-trend" id="quotaTrend" type="button" hidden></button>
|
||||
<button class="text rt-mask" id="usageMask" aria-pressed="false" data-tt="Mask the accounts on this page — email addresses and account names — for a screenshot to share"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9.9 4.2A10.4 10.4 0 0 1 12 4c6.5 0 10 8 10 8a17.6 17.6 0 0 1-2.2 3.2M6.6 6.6C3.9 8.4 2 12 2 12s3.5 8 10 8a9.7 9.7 0 0 0 5.4-1.6M9.9 9.9a3 3 0 0 0 4.2 4.2M2 2l20 20"/></svg><span data-t>Hide accounts</span></button>
|
||||
<div class="segs" id="quotaMode" hidden></div>
|
||||
</div>
|
||||
<section class="subscription-usage" id="subscriptionUsage"></section>
|
||||
<p class="usage-note" id="usageScope" data-t>Gateway calls only; session-log calls are in Requests. Local rejections are excluded from totals.</p>
|
||||
<section class="stats" id="stats"></section>
|
||||
<section class="chart" id="chart"></section>
|
||||
<div class="row-head"><span class="label" data-t>Agents</span></div>
|
||||
<div class="list" id="usageAgents"></div>
|
||||
<div class="us-hid" id="usageAgentsHid" hidden><button class="text us-hidline" type="button" aria-expanded="false"></button><div class="list" hidden></div></div>
|
||||
<div class="row-head"><span class="label" data-t>Models</span></div>
|
||||
<div class="list" id="usageModels"></div>
|
||||
<div class="row-head" id="usageAccountsHead" hidden><span class="label" data-t>Accounts</span></div>
|
||||
<div class="list" id="usageAccounts" hidden></div>
|
||||
<div class="row-head" id="usageKeysHead" hidden><span class="label" data-t>Gateway keys</span></div>
|
||||
<div class="list" id="usageKeys" hidden></div>
|
||||
<p class="usage-note" id="usageNote"></p>
|
||||
</div>
|
||||
<div class="usage-pane" id="ledgerPane" hidden>
|
||||
<div class="sess-tools">
|
||||
<button class="sess-pick" id="ledComputer" type="button" hidden></button>
|
||||
<button class="sess-pick" id="ledAgent" type="button" hidden></button>
|
||||
<button class="sess-pick" id="ledPurpose" type="button" hidden></button>
|
||||
<button class="sess-pick" id="ledProvider" type="button" hidden></button>
|
||||
<button class="sess-pick" id="ledAccount" type="button" hidden></button>
|
||||
<button class="sess-pick" id="ledKey" type="button" hidden></button>
|
||||
<div class="segs" id="ledStatus"></div>
|
||||
<span id="ledRoute" hidden><span id="ledRouteLabel"></span><button class="text" id="ledRouteClear" type="button" data-tt="Clear filter" aria-label="Clear filter">×</button></span>
|
||||
<span class="grow"></span>
|
||||
<input class="sess-filter" id="ledQ" type="search" spellcheck="false" autocomplete="off" placeholder="Search models, providers, sessions" data-tp>
|
||||
<button class="text" id="ledExport" type="button" title="Save every request listed, all pages, as a CSV file in Downloads" data-tt><span data-t>Export CSV</span></button>
|
||||
</div>
|
||||
<p class="usage-note" id="ledScope" data-t>Gateway and session-log calls; local rejections excluded from totals.</p>
|
||||
<div class="led-dash" id="ledDash" hidden>
|
||||
<div class="led-strip" id="ledKpi"></div>
|
||||
<section class="led-trend">
|
||||
<div class="led-bar">
|
||||
<div class="segs" id="ledMetric"></div>
|
||||
<span class="grow"></span>
|
||||
<span class="led-split"><span class="led-by" data-t>Split by</span><span class="segs" id="ledSplit"></span></span>
|
||||
</div>
|
||||
<div class="led-body">
|
||||
<div class="led-chart" id="ledChart"></div>
|
||||
<div class="led-rank" id="ledRank"></div>
|
||||
<div class="led-rail" id="ledRail" hidden><i></i></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<section class="led-heat" id="ledHeat" hidden>
|
||||
<div class="led-bar">
|
||||
<div class="heat-title"><b data-t>Usage heatmap</b><span data-t>Daily usage over the last 53 weeks</span></div>
|
||||
<span class="grow"></span>
|
||||
<div class="segs" id="ledHeatMetric"></div>
|
||||
</div>
|
||||
<div class="heat-scroll" id="ledHeatScroll"></div>
|
||||
<div class="heat-foot"></div>
|
||||
<div class="heat-tip" id="ledHeatTip" hidden></div>
|
||||
</section>
|
||||
<div class="led-head"><p class="led-sum" id="ledSum"></p><span class="grow"></span><span class="led-arch" id="ledArchive"></span></div>
|
||||
<div class="led-strip led-vias" id="ledVia" hidden></div>
|
||||
<div class="led-wrap" id="ledWrap"></div>
|
||||
<div class="led-hscroll" id="ledHScroll" hidden><div></div></div>
|
||||
<div class="led-pager" id="ledPager" hidden></div>
|
||||
<p class="usage-note" id="ledNote"></p>
|
||||
</div>
|
||||
<div class="usage-pane ctx-pane" id="contextPane" hidden></div>
|
||||
<div class="usage-pane sess-pane" id="sessionsPane" hidden>
|
||||
<div class="sess-tools">
|
||||
<div class="segs" id="sessAgent"></div>
|
||||
<button class="sess-pick" id="sessModel" type="button" hidden></button>
|
||||
<button class="sess-pick" id="sessFolder" type="button" hidden></button>
|
||||
</div>
|
||||
<section class="stats" id="sessStats"></section>
|
||||
<section class="chart sess-chart" id="sessChart" hidden></section>
|
||||
<div class="sess-grid" id="sessGrid" hidden>
|
||||
<section class="sess-card" id="sessProjects"></section>
|
||||
<section class="sess-card" id="sessModels"></section>
|
||||
<section class="sess-card" id="sessHours"></section>
|
||||
<section class="sess-card" id="sessTop"></section>
|
||||
<section class="sess-card" id="sessShape"></section>
|
||||
<section class="sess-card" id="sessSkills"></section>
|
||||
<section class="sess-card wide" id="sessTools"></section>
|
||||
</div>
|
||||
<div class="row-head" id="sessListHead" hidden>
|
||||
<span class="label" data-t>Latest sessions</span>
|
||||
<span class="grow"></span>
|
||||
<button class="text sess-all" id="sessAll" type="button" data-feature="sessions" data-t>All sessions</button>
|
||||
<input class="sess-filter" id="sessQ" type="search" spellcheck="false" autocomplete="off" placeholder="Search sessions" data-tp>
|
||||
</div>
|
||||
<div class="list sess-list" id="sessList"></div>
|
||||
<p class="usage-note" id="sessNote"></p>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
|
||||
|
||||
@@ -561,9 +450,13 @@
|
||||
<script src="plugins/library/client.js"></script>
|
||||
<script src="plugins/routing/i18n.js"></script>
|
||||
<script src="plugins/routing/client.js"></script>
|
||||
<script src="plugins/usage/i18n.js"></script>
|
||||
<script src="plugins/usage/client.js"></script>
|
||||
<script src="purposes.js"></script>
|
||||
<script src="app.js"></script>
|
||||
<script src="plugins.js"></script>
|
||||
<script src="context.js"></script>
|
||||
<script src="plugins/usage/page.js"></script>
|
||||
<script src="start.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1682,6 +1682,7 @@ function routingPage(part) {
|
||||
el("span", "grow"));
|
||||
if (!rp && r.done) {
|
||||
const usage = el("button", "text", t("View usage"));
|
||||
usage.dataset.feature = "usage"; // it opens on the Usage page
|
||||
usage.onclick = () => window.openUsageRoute(logR);
|
||||
logHead.append(usage);
|
||||
const again = el("button", "text", t("Replay"));
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
// The Usage page: the allowances, what was spent and on what, the
|
||||
// sessions, each request, and what filled the context window.
|
||||
//
|
||||
// A page the Usage plugin adds to the window (kernel.js), its words in
|
||||
// i18n.js beside this file. This file registers the page and its markup,
|
||||
// before app.js; page.js, after app.js and the scripts it shares the page
|
||||
// with, is the page's code, and start.js then shows the first page. The
|
||||
// hooks are what the shell asks of it: open (the reader came to the page),
|
||||
// refresh (the window came back: the tab shown read again, quietly when it
|
||||
// has its figures), reload (Refresh in the sidebar), costs (the currency
|
||||
// or a rate changed) and tab (the tab shown, for the allowance card a
|
||||
// link opens on). The allowance cards themselves, which the tray panel
|
||||
// shows too, stay app.js's.
|
||||
magpie.plugin("usage", (ctx) => {
|
||||
ctx.slots.add("page", {
|
||||
key: "usage",
|
||||
title: "Usage",
|
||||
html: `
|
||||
<div class="usage-head">
|
||||
<div class="segs" id="usageTab"></div>
|
||||
<div class="segs" id="period"></div>
|
||||
<div class="segs" id="sessRange" hidden></div>
|
||||
<span class="ctx-range" id="ctxRange" hidden></span>
|
||||
<span class="grow"></span>
|
||||
<span class="usage-refresh" id="usageRefresh">
|
||||
<button class="icon" id="usageReload" type="button" aria-label="Refresh now" data-tt><svg viewBox="0 0 16 16" width="13" height="13" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13.5 8a5.5 5.5 0 1 1-1.6-3.9M13.5 2.5v3h-3"/></svg></button>
|
||||
<button class="sess-pick" id="usageEvery" type="button"></button>
|
||||
</span>
|
||||
<span class="usage-cost" id="usageCost"></span>
|
||||
</div>
|
||||
<div class="usage-pane" id="usagePane">
|
||||
<div class="row-head quota-head" id="quotaHead" hidden>
|
||||
<span class="label" data-t>Allowances</span>
|
||||
<span class="grow"></span>
|
||||
<button class="sess-pick quota-trend" id="quotaTrend" type="button" hidden></button>
|
||||
<button class="text rt-mask" id="usageMask" aria-pressed="false" data-tt="Mask the accounts on this page — email addresses and account names — for a screenshot to share"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M9.9 4.2A10.4 10.4 0 0 1 12 4c6.5 0 10 8 10 8a17.6 17.6 0 0 1-2.2 3.2M6.6 6.6C3.9 8.4 2 12 2 12s3.5 8 10 8a9.7 9.7 0 0 0 5.4-1.6M9.9 9.9a3 3 0 0 0 4.2 4.2M2 2l20 20"/></svg><span data-t>Hide accounts</span></button>
|
||||
<div class="segs" id="quotaMode" hidden></div>
|
||||
</div>
|
||||
<section class="subscription-usage" id="subscriptionUsage"></section>
|
||||
<p class="usage-note" id="usageScope" data-t>Gateway calls only; session-log calls are in Requests. Local rejections are excluded from totals.</p>
|
||||
<section class="stats" id="stats"></section>
|
||||
<section class="chart" id="chart"></section>
|
||||
<div class="row-head"><span class="label" data-t>Agents</span></div>
|
||||
<div class="list" id="usageAgents"></div>
|
||||
<div class="us-hid" id="usageAgentsHid" hidden><button class="text us-hidline" type="button" aria-expanded="false"></button><div class="list" hidden></div></div>
|
||||
<div class="row-head"><span class="label" data-t>Models</span></div>
|
||||
<div class="list" id="usageModels"></div>
|
||||
<div class="row-head" id="usageAccountsHead" hidden><span class="label" data-t>Accounts</span></div>
|
||||
<div class="list" id="usageAccounts" hidden></div>
|
||||
<div class="row-head" id="usageKeysHead" hidden><span class="label" data-t>Gateway keys</span></div>
|
||||
<div class="list" id="usageKeys" hidden></div>
|
||||
<p class="usage-note" id="usageNote"></p>
|
||||
</div>
|
||||
<div class="usage-pane" id="ledgerPane" hidden>
|
||||
<div class="sess-tools">
|
||||
<button class="sess-pick" id="ledComputer" type="button" hidden></button>
|
||||
<button class="sess-pick" id="ledAgent" type="button" hidden></button>
|
||||
<button class="sess-pick" id="ledPurpose" type="button" hidden></button>
|
||||
<button class="sess-pick" id="ledProvider" type="button" hidden></button>
|
||||
<button class="sess-pick" id="ledAccount" type="button" hidden></button>
|
||||
<button class="sess-pick" id="ledKey" type="button" hidden></button>
|
||||
<div class="segs" id="ledStatus"></div>
|
||||
<span id="ledRoute" hidden><span id="ledRouteLabel"></span><button class="text" id="ledRouteClear" type="button" data-tt="Clear filter" aria-label="Clear filter">×</button></span>
|
||||
<span class="grow"></span>
|
||||
<input class="sess-filter" id="ledQ" type="search" spellcheck="false" autocomplete="off" placeholder="Search models, providers, sessions" data-tp>
|
||||
<button class="text" id="ledExport" type="button" title="Save every request listed, all pages, as a CSV file in Downloads" data-tt><span data-t>Export CSV</span></button>
|
||||
</div>
|
||||
<p class="usage-note" id="ledScope" data-t>Gateway and session-log calls; local rejections excluded from totals.</p>
|
||||
<div class="led-dash" id="ledDash" hidden>
|
||||
<div class="led-strip" id="ledKpi"></div>
|
||||
<section class="led-trend">
|
||||
<div class="led-bar">
|
||||
<div class="segs" id="ledMetric"></div>
|
||||
<span class="grow"></span>
|
||||
<span class="led-split"><span class="led-by" data-t>Split by</span><span class="segs" id="ledSplit"></span></span>
|
||||
</div>
|
||||
<div class="led-body">
|
||||
<div class="led-chart" id="ledChart"></div>
|
||||
<div class="led-rank" id="ledRank"></div>
|
||||
<div class="led-rail" id="ledRail" hidden><i></i></div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
<section class="led-heat" id="ledHeat" hidden>
|
||||
<div class="led-bar">
|
||||
<div class="heat-title"><b data-t>Usage heatmap</b><span data-t>Daily usage over the last 53 weeks</span></div>
|
||||
<span class="grow"></span>
|
||||
<div class="segs" id="ledHeatMetric"></div>
|
||||
</div>
|
||||
<div class="heat-scroll" id="ledHeatScroll"></div>
|
||||
<div class="heat-foot"></div>
|
||||
<div class="heat-tip" id="ledHeatTip" hidden></div>
|
||||
</section>
|
||||
<div class="led-head"><p class="led-sum" id="ledSum"></p><span class="grow"></span><span class="led-arch" id="ledArchive"></span></div>
|
||||
<div class="led-strip led-vias" id="ledVia" hidden></div>
|
||||
<div class="led-wrap" id="ledWrap"></div>
|
||||
<div class="led-hscroll" id="ledHScroll" hidden><div></div></div>
|
||||
<div class="led-pager" id="ledPager" hidden></div>
|
||||
<p class="usage-note" id="ledNote"></p>
|
||||
</div>
|
||||
<div class="usage-pane ctx-pane" id="contextPane" hidden></div>
|
||||
<div class="usage-pane sess-pane" id="sessionsPane" hidden>
|
||||
<div class="sess-tools">
|
||||
<div class="segs" id="sessAgent"></div>
|
||||
<button class="sess-pick" id="sessModel" type="button" hidden></button>
|
||||
<button class="sess-pick" id="sessFolder" type="button" hidden></button>
|
||||
</div>
|
||||
<section class="stats" id="sessStats"></section>
|
||||
<section class="chart sess-chart" id="sessChart" hidden></section>
|
||||
<div class="sess-grid" id="sessGrid" hidden>
|
||||
<section class="sess-card" id="sessProjects"></section>
|
||||
<section class="sess-card" id="sessModels"></section>
|
||||
<section class="sess-card" id="sessHours"></section>
|
||||
<section class="sess-card" id="sessTop"></section>
|
||||
<section class="sess-card" id="sessShape"></section>
|
||||
<section class="sess-card" id="sessSkills"></section>
|
||||
<section class="sess-card wide" id="sessTools"></section>
|
||||
</div>
|
||||
<div class="row-head" id="sessListHead" hidden>
|
||||
<span class="label" data-t>Latest sessions</span>
|
||||
<span class="grow"></span>
|
||||
<button class="text sess-all" id="sessAll" type="button" data-feature="sessions" data-t>All sessions</button>
|
||||
<input class="sess-filter" id="sessQ" type="search" spellcheck="false" autocomplete="off" placeholder="Search sessions" data-tp>
|
||||
</div>
|
||||
<div class="list sess-list" id="sessList"></div>
|
||||
<p class="usage-note" id="sessNote"></p>
|
||||
</div>
|
||||
`,
|
||||
open() { return loadUsage(true).catch((e) => status(e.message, "err")); },
|
||||
refresh(again) {
|
||||
// on the Overview, where the allowances are, coming back is opening them (#1588)
|
||||
if (again && usageTab === "usage") quotasOpened();
|
||||
return (again && usageDrawn() ? refreshUsage() : loadUsage()).catch((e) => status(e.message, "err"));
|
||||
},
|
||||
reload() { return refreshUsage(true); },
|
||||
costs() { renderCosts(); },
|
||||
tab() { return usageTab; },
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,704 @@
|
||||
// The Usage page's words in each language, the English the key: the
|
||||
// kernel adds them to i18n.js's (magpie.strings).
|
||||
magpie.strings({
|
||||
zh: {
|
||||
"Yesterday": "昨天",
|
||||
"This month": "本月",
|
||||
"Last month": "上个月",
|
||||
"Pick days": "选择日期",
|
||||
"Previous month": "上个月",
|
||||
"Next month": "下个月",
|
||||
"Days picked: {days}": "所选日期:{days}",
|
||||
"Now the last day": "再选最后一天",
|
||||
"Pick the first day, then the last": "先选第一天,再选最后一天",
|
||||
"No calls on the days picked.": "所选日期内没有调用。",
|
||||
"All gateway keys": "全部网关密钥",
|
||||
"All accounts": "全部账号",
|
||||
"{agent} · on {computer}": "{agent} · 在 {computer}",
|
||||
"What was said stays on {computer}: sync shares the usage alone.": "对话内容留在 {computer} 上:同步只共享用量。",
|
||||
"Model · provider": "模型 · 供应商",
|
||||
"Not archived": "无存档",
|
||||
"Estimated using effective model prices, including custom prices": "按模型生效价格估算,包含自定义价格",
|
||||
"Search models, providers, sessions": "搜索模型、供应商、会话",
|
||||
"Save every request listed, all pages, as a CSV file in Downloads": "将列出的全部请求(所有页)存为 CSV,保存到“下载”文件夹",
|
||||
"All agents": "全部 Agent",
|
||||
"{n} out": "输出 {n}",
|
||||
"{n} cache write": "缓存写入 {n}",
|
||||
"{n} cache read": "缓存读取 {n}",
|
||||
"reported by apps": "由应用上报",
|
||||
"Reported by the app that made it, through POST /v1/magpie/usage/requests: the call went straight to its vendor, not through magpie.": "由发起请求的应用通过 POST /v1/magpie/usage/requests 上报:这次请求直接发给了服务商,没有经过 magpie。",
|
||||
"all requests": "全部请求",
|
||||
"Show only these requests": "只看这些请求",
|
||||
"Show every request again": "重新显示全部请求",
|
||||
"View routing": "查看路由",
|
||||
"Request: {what}": "请求:{what}",
|
||||
"Provider · account": "供应商 · 账号",
|
||||
"{m} for 5 minutes, {h} for an hour": "{m} 保留 5 分钟,{h} 保留 1 小时",
|
||||
"session {id}": "会话 {id}",
|
||||
"{agent} · via {host}": "{agent} · 来自 {host}",
|
||||
"Not kept for requests before this version": "此版本之前的请求没有记下",
|
||||
"{n} reasoning, inside output": "其中推理 {n}(已计入输出)",
|
||||
"No known price for this model": "此模型没有已知价格",
|
||||
"Failed: the agent was answered {status}": "失败:Agent 收到的是 {status}",
|
||||
"Error type": "错误类型",
|
||||
"Upstream said": "上游返回",
|
||||
"Data source": "数据来源",
|
||||
"Nothing more was kept of this request": "这个请求没有更多记录",
|
||||
"OFFICIAL": "官方",
|
||||
"No session was named with this request, so its session file can't be found": "此请求未带会话 ID,找不到其会话文件",
|
||||
"magpie reads the session files of Claude Code, Claude Desktop and Codex only": "magpie 只读 Claude Code、Claude Desktop 和 Codex 的会话文件",
|
||||
"This request isn't in the agent's session files: they may be deleted, moved, or not written yet": "Agent 会话文件中没有此请求:文件可能已删除、移走或尚未写入",
|
||||
"The session file couldn't be read": "会话文件读取失败",
|
||||
"Refresh every": "刷新周期",
|
||||
"Updated {time}": "更新于 {time}",
|
||||
"Model recorded in the local session log; the outbound HTTP request was not captured.": "本地会话日志记录的模型;未采集实际发出的 HTTP 请求。",
|
||||
"About: told from the session file's times, a little more or less than it took": "估算值:按会话文件中的时间计算,与实际耗时略有出入",
|
||||
"{n} call unpriced": "{n} 次调用未计价",
|
||||
"{n} calls unpriced": "{n} 次调用未计价",
|
||||
"{n} model unpriced": "{n} 个模型未计价",
|
||||
"{n} models unpriced": "{n} 个模型未计价",
|
||||
"Show only the requests answered on a retry": "只看重试后成功的请求",
|
||||
"Show only the failed requests": "只看失败的请求",
|
||||
"This try failed and the request was handed on to the next: the request is counted by how it ended, not by this try": "这次尝试失败,请求已转交给下一个:请求按最终结果计数,不算这次尝试",
|
||||
"{p} succeeded": "成功 {p}",
|
||||
"{a} cache": "缓存 {a}",
|
||||
"{a}–{b} of {n}": "第 {a}–{b} 条,共 {n} 条",
|
||||
"Each request's tokens as its provider reported them; the cost estimated using effective model prices, including custom prices. Export CSV saves every page.": "每个请求的 token 数取自供应商报告,费用按模型生效价格(含自定义价格)估算。导出 CSV 包含所有页。",
|
||||
"Saved {n} request to {path}": "已将 {n} 个请求保存到 {path}",
|
||||
"Saved {n} requests to {path}": "已将 {n} 个请求保存到 {path}",
|
||||
"Login method": "登录方式",
|
||||
"Official login": "官方登录",
|
||||
"Duration colors: ≤10 s green · 10–30 s amber · >30 s red": "耗时颜色:≤10 秒绿色 · 10–30 秒黄色 · >30 秒红色",
|
||||
"Official login confirmed for this account by local login metadata. This does not establish the route or authentication used for this request.": "本地登录资料确认此账号采用官方登录;不代表已确认这次请求的渠道或认证方式。",
|
||||
"API price reference": "API 估价参考模型",
|
||||
"Price reference: {model}": "估价参考:{model}",
|
||||
"Model used for the API price estimate; this is not an observed model forwarding event.": "用于 API 费用估算的参考模型;并非实际观测到的模型转发记录。",
|
||||
"Read from the agent's session file. The account is shown only when local metadata identifies it; no service provider is inferred.": "读自 Agent 的会话文件;仅在本地元数据能够明确识别时显示账号,不推断供应商。",
|
||||
"Read from the agent's session file, which names the provider it was set up to call. The name shown is that record, not a route magpie saw.": "读自 Agent 的会话文件,其中记录了它被配置去调用的供应商。此处显示的就是那条记录,不是 magpie 看到的路由。",
|
||||
"Session account": "会话账号",
|
||||
"Gateway calls only; session-log calls are in Requests. Local rejections are excluded from totals.": "仅统计网关调用;会话日志调用请查看「请求」。本地拒绝的请求不计入汇总。",
|
||||
"at effective prices": "按生效价格",
|
||||
"Reading the agents' session files…": "正在读取 Agent 的会话文件…",
|
||||
"Totals count native sessions and gateway requests with a session ID": "合计含本机会话和带有会话 ID 的网关请求",
|
||||
"showing {drawn} of {n}": "显示 {n} 个中的 {drawn} 个",
|
||||
"All folders": "全部文件夹",
|
||||
"Indexing your sessions": "正在为你的会话建立索引",
|
||||
"Looking for session files…": "正在查找会话文件…",
|
||||
"Reading the kept index…": "正在读取已建好的索引…",
|
||||
"Indexed · putting the page together…": "索引完成 · 正在生成页面…",
|
||||
"{done} of {files} files · {read} of {bytes}": "{done} / {files} 个文件 · {read} / {bytes}",
|
||||
"about {t} left": "约剩 {t}",
|
||||
"Read once, kept: after this the page opens from the index in a blink": "只需索引一次:之后打开这一页几乎是瞬间的",
|
||||
"Only what changed is read again, from where it was left": "之后只读新增的部分,从上次读到的地方接着读",
|
||||
"Every session is read on this computer; nothing leaves it": "所有会话都在本机读取,不会上传到任何地方",
|
||||
"The biggest files go first, so none is left running on alone": "最大的文件先读,所有核心一起跑满",
|
||||
"Nothing in this range.": "这段时间没有用量。",
|
||||
"Usage heatmap": "用量热力图",
|
||||
"Daily usage over the last 53 weeks": "最近 53 周的每日用量",
|
||||
"{d} active": "活跃 {d}",
|
||||
"Latest sessions": "最近的会话",
|
||||
"Open in Sessions": "在会话页打开",
|
||||
"Top sessions": "最耗会话",
|
||||
"Session shape": "会话形态",
|
||||
"{r}m": "{r} 分钟",
|
||||
"{r} messages": "{r} 条消息",
|
||||
"{r} minutes at work": "工作 {r} 分钟",
|
||||
"{r} tool calls a prompt": "每条提示 {r} 次工具调用",
|
||||
"Across: {axis} · Height: sessions": "横轴:{axis} · 柱高:会话数",
|
||||
"messages in a session, prompts and replies": "一个会话里的消息数(提示加回复)",
|
||||
"minutes a session was at work": "一个会话实际工作的分钟数",
|
||||
"tool calls the agent made on its own for each prompt": "你每发一条提示,Agent 自己调用工具的次数",
|
||||
"No tool calls in this range.": "这段时间没有工具调用。",
|
||||
"Top skills": "常用 Skills",
|
||||
"No skill was called up in this range.": "这段时间没有调用 skill。",
|
||||
"last {when}": "最近 {when}",
|
||||
"By hour": "按时段",
|
||||
"Still counting": "还在统计",
|
||||
"days at work": "活跃天数",
|
||||
"longest streak": "最长连续",
|
||||
"busiest day": "最忙的一天",
|
||||
"Reading the session…": "正在读取会话…",
|
||||
"Click to show only this": "点击只看这一项",
|
||||
"Click again to show every one": "再点一次显示全部",
|
||||
"median {m} · p90 {p}": "中位 {m} · p90 {p}",
|
||||
"{p} in {name}": "{name} 占 {p}",
|
||||
"Busiest at {when}": "最忙:{when}",
|
||||
"Active time isn't kept by model.": "活跃时长不按模型统计。",
|
||||
"No active time in this range.": "这段时间没有活跃时长。",
|
||||
"Tokens in and out per session: the middle session's, and what nine in ten stay under": "每个会话的输入加输出 token:中位数,以及九成会话不超过的量",
|
||||
"on {n} day": "共 {n} 天",
|
||||
"on {n} days": "共 {n} 天",
|
||||
"The time the sessions were at work: the pauses between one message and the next, each under five minutes": "会话实际工作的时间:相邻两条消息之间的间隔,只计不到五分钟的",
|
||||
"{m}m": "{m} 分钟",
|
||||
"{h}h {m}m": "{h} 小时 {m} 分",
|
||||
"By day": "每日趋势",
|
||||
"By week": "每周趋势",
|
||||
"{when} · {tokens} tokens": "{when} · {tokens} token",
|
||||
"No known price for {models}": "{models} 没有已知价格",
|
||||
"Not counted: {models}, with no known price": "未计入:{models},没有已知价格",
|
||||
"No calls today.": "今天没有调用。",
|
||||
"No calls in the last 7 days.": "最近 7 天没有调用。",
|
||||
"No calls in the last 30 days.": "最近 30 天没有调用。",
|
||||
"No calls yet.": "还没有调用。",
|
||||
"Point an agent at a catalog model and use it; every call through the gateway is counted here.": "让某个 Agent 使用目录中的模型;每次经过网关的调用都会计入这里。",
|
||||
"inside output": "计入输出",
|
||||
"{when} · {tokens} tokens · {n} call": "{when} · {tokens} token · {n} 次调用",
|
||||
"{when} · {tokens} tokens · {n} calls": "{when} · {tokens} token · {n} 次调用",
|
||||
"{n}% of tokens": "占 token 的 {n}%",
|
||||
"Counted from the providers' own usage reports on every call through the gateway · {path}": "根据供应商在每次网关调用中返回的用量统计 · {path}",
|
||||
"Hide from this list": "从列表中隐藏",
|
||||
"Count as an agent…": "计入某个 Agent…",
|
||||
"Count {client} on its own": "将 {client} 单独计算",
|
||||
"with {clients}": "含 {clients}",
|
||||
"Count this client's calls as": "将此客户端的调用计入",
|
||||
"{client} is counted as {agent}": "{client} 已计入 {agent}",
|
||||
"{client} is counted on its own": "{client} 已单独计算",
|
||||
"Actions for {name}": "{name} 的操作",
|
||||
"Hidden from this list only: their calls still count in the totals and the chart. Click to see them.": "只是不在此列表中显示,它们的调用仍计入总数和图表。点击查看。",
|
||||
"Vendor's first token": "厂商首字等待",
|
||||
"Tries that failed first": "之前失败的尝试",
|
||||
"Waiting for a slot": "排队等空位",
|
||||
"Connecting and sending": "连接并发送请求",
|
||||
"Refresh now, the allowances too; a Claude account's is read by running Claude Code's own /usage": "立即刷新,含额度;Claude 账号的额度通过运行 Claude Code 自带的 /usage 读取",
|
||||
"{n} by magpie itself": "其中 {n} 次由 magpie 自身发出",
|
||||
"first token in {ms} on average": "首字平均 {ms}",
|
||||
"no streamed replies timed": "没有可计时的流式回复",
|
||||
"Sent, Effort and the cache are in each row's details": "窗口较窄:发送模型、推理强度和缓存在每行的详情里",
|
||||
"{n} output tokens in {ms} after the first": "首字后 {ms} 输出 {n} 个 token",
|
||||
"At least: {n} output tokens in {ms}, from the line that asked for it to its last. The session file has no first token, so the wait for it is counted too": "下限:从发出请求的那一行到最后一行,{ms} 输出 {n} 个 token。会话文件没有首字时间,等首字的时间也算在里面",
|
||||
"At least: {n} answer tokens in {ms} after the first token, the {r} reasoning tokens left out. The session file has no first text, so reasoning after the first token is counted too": "下限:首字后 {ms} 输出 {n} 个正文 token,{r} 个推理 token 不计。会话文件没有首个正文的时间,首字后的推理时间也算在里面",
|
||||
"At least: {n} output tokens in {ms}, the whole turn. What came after the first token ({after}) is too little to time a speed by: under a second or under 100 tokens, so the wait for it is counted too": "下限:整轮 {ms} 输出 {n} 个 token。首字后只有 {after},不足 1 秒或不足 100 个 token,测不出速度,等首字的时间也算在里面",
|
||||
"The session file has no first token to time a speed from": "会话文件没有首字时间,算不出速度",
|
||||
"{n} answer tokens in {ms} after the first text, the {r} reasoning tokens before it left out": "首个正文后 {ms} 输出 {n} 个正文 token,之前的 {r} 个推理 token 不计",
|
||||
"Not streamed: no first token to time a speed from": "非流式:没有首字时间,算不出速度",
|
||||
"{i} in · {o} out · {r} cache read · {w} cache creation": "输入 {i} · 输出 {o} · 缓存读取 {r} · 缓存创建 {w}",
|
||||
"Upstream provider": "上游",
|
||||
"The agent spoke {from}; sent upstream as {to}": "agent 用 {from} 协议请求;以 {to} 协议发往上游",
|
||||
"Sent upstream as {to}, as the agent spoke it": "以 {to} 协议发往上游,与 agent 所用协议相同",
|
||||
},
|
||||
"zh-TW": {
|
||||
"Yesterday": "昨天",
|
||||
"This month": "本月",
|
||||
"Last month": "上個月",
|
||||
"Pick days": "選擇日期",
|
||||
"Previous month": "上個月",
|
||||
"Next month": "下個月",
|
||||
"Days picked: {days}": "所選日期:{days}",
|
||||
"Now the last day": "再選最後一天",
|
||||
"Pick the first day, then the last": "先選第一天,再選最後一天",
|
||||
"No calls on the days picked.": "所選日期內沒有呼叫。",
|
||||
"All gateway keys": "全部閘道金鑰",
|
||||
"All accounts": "全部帳號",
|
||||
"{agent} · on {computer}": "{agent} · 在 {computer}",
|
||||
"What was said stays on {computer}: sync shares the usage alone.": "對話內容留在 {computer} 上:同步只共享用量。",
|
||||
"Model · provider": "模型 · 供應商",
|
||||
"Not archived": "無存檔",
|
||||
"Estimated using effective model prices, including custom prices": "按模型生效價格估算,包含自定義價格",
|
||||
"Search models, providers, sessions": "搜尋模型、供應商、會話",
|
||||
"Save every request listed, all pages, as a CSV file in Downloads": "將列出的全部請求(所有頁)存為 CSV,儲存到「下載」資料夾",
|
||||
"All agents": "全部 Agent",
|
||||
"{n} out": "輸出 {n}",
|
||||
"{n} cache write": "快取寫入 {n}",
|
||||
"{n} cache read": "快取讀取 {n}",
|
||||
"reported by apps": "由應用程式回報",
|
||||
"Reported by the app that made it, through POST /v1/magpie/usage/requests: the call went straight to its vendor, not through magpie.": "由發出請求的應用程式透過 POST /v1/magpie/usage/requests 回報:這次請求直接送往服務商,沒有經過 magpie。",
|
||||
"all requests": "全部請求",
|
||||
"Show only these requests": "只看這些請求",
|
||||
"Show every request again": "重新顯示全部請求",
|
||||
"View routing": "檢視路由",
|
||||
"Request: {what}": "請求:{what}",
|
||||
"Provider · account": "供應商 · 帳號",
|
||||
"{m} for 5 minutes, {h} for an hour": "{m} 保留 5 分鐘,{h} 保留 1 小時",
|
||||
"session {id}": "會話 {id}",
|
||||
"{agent} · via {host}": "{agent} · 來自 {host}",
|
||||
"Not kept for requests before this version": "此版本之前的請求沒有記下",
|
||||
"{n} reasoning, inside output": "其中推理 {n}(已計入輸出)",
|
||||
"No known price for this model": "此模型沒有已知價格",
|
||||
"Failed: the agent was answered {status}": "失敗:Agent 收到的是 {status}",
|
||||
"Error type": "錯誤型別",
|
||||
"Upstream said": "上游返回",
|
||||
"Data source": "資料來源",
|
||||
"Nothing more was kept of this request": "這個請求沒有更多記錄",
|
||||
"OFFICIAL": "官方",
|
||||
"No session was named with this request, so its session file can't be found": "此請求未帶會話 ID,找不到其會話檔案",
|
||||
"magpie reads the session files of Claude Code, Claude Desktop and Codex only": "magpie 只讀 Claude Code、Claude Desktop 和 Codex 的會話檔案",
|
||||
"This request isn't in the agent's session files: they may be deleted, moved, or not written yet": "Agent 會話檔案中沒有此請求:檔案可能已刪除、移走或尚未寫入",
|
||||
"The session file couldn't be read": "會話檔案讀取失敗",
|
||||
"Refresh every": "重新整理週期",
|
||||
"Updated {time}": "更新於 {time}",
|
||||
"Model recorded in the local session log; the outbound HTTP request was not captured.": "本地會話日誌記錄的模型;未採集實際發出的 HTTP 請求。",
|
||||
"About: told from the session file's times, a little more or less than it took": "估算值:按會話檔案中的時間計算,與實際耗時略有出入",
|
||||
"{n} call unpriced": "{n} 次呼叫未計價",
|
||||
"{n} calls unpriced": "{n} 次呼叫未計價",
|
||||
"{n} model unpriced": "{n} 個模型未計價",
|
||||
"{n} models unpriced": "{n} 個模型未計價",
|
||||
"Show only the requests answered on a retry": "只看重試後成功的請求",
|
||||
"Show only the failed requests": "只看失敗的請求",
|
||||
"This try failed and the request was handed on to the next: the request is counted by how it ended, not by this try": "這次嘗試失敗,請求已轉交給下一個:請求依最終結果計數,不算這次嘗試",
|
||||
"{p} succeeded": "成功 {p}",
|
||||
"{a} cache": "快取 {a}",
|
||||
"{a}–{b} of {n}": "第 {a}–{b} 條,共 {n} 條",
|
||||
"Each request's tokens as its provider reported them; the cost estimated using effective model prices, including custom prices. Export CSV saves every page.": "每個請求的 token 數取自供應商報告,費用按模型生效價格(含自定義價格)估算。匯出 CSV 包含所有頁。",
|
||||
"Saved {n} request to {path}": "已將 {n} 個請求儲存到 {path}",
|
||||
"Saved {n} requests to {path}": "已將 {n} 個請求儲存到 {path}",
|
||||
"Login method": "登入方式",
|
||||
"Official login": "官方登入",
|
||||
"Duration colors: ≤10 s green · 10–30 s amber · >30 s red": "耗時顏色:≤10 秒綠色 · 10–30 秒黃色 · >30 秒紅色",
|
||||
"Official login confirmed for this account by local login metadata. This does not establish the route or authentication used for this request.": "本地登入資料確認此帳號採用官方登入;不代表已確認這次請求的渠道或認證方式。",
|
||||
"API price reference": "API 估價參考模型",
|
||||
"Price reference: {model}": "估價參考:{model}",
|
||||
"Model used for the API price estimate; this is not an observed model forwarding event.": "用於 API 費用估算的參考模型;並非實際觀測到的模型轉發記錄。",
|
||||
"Read from the agent's session file. The account is shown only when local metadata identifies it; no service provider is inferred.": "讀自 Agent 的會話檔案;僅在本地後設資料能夠明確識別時顯示帳號,不推斷供應商。",
|
||||
"Read from the agent's session file, which names the provider it was set up to call. The name shown is that record, not a route magpie saw.": "讀自 Agent 的會話檔案,其中記錄了它被設定去呼叫的供應商。此處顯示的就是那條記錄,不是 magpie 看到的路由。",
|
||||
"Session account": "會話帳號",
|
||||
"Gateway calls only; session-log calls are in Requests. Local rejections are excluded from totals.": "僅統計閘道呼叫;會話日誌呼叫請檢視「請求」。本地拒絕的請求不計入彙總。",
|
||||
"at effective prices": "按生效價格",
|
||||
"Reading the agents' session files…": "正在讀取 Agent 的會話檔案…",
|
||||
"Totals count native sessions and gateway requests with a session ID": "合計含本機會話和帶有會話 ID 的閘道請求",
|
||||
"showing {drawn} of {n}": "顯示 {n} 箇中的 {drawn} 個",
|
||||
"All folders": "全部資料夾",
|
||||
"Indexing your sessions": "正在為你的會話建立索引",
|
||||
"Looking for session files…": "正在查詢會話檔案…",
|
||||
"Reading the kept index…": "正在讀取已建好的索引…",
|
||||
"Indexed · putting the page together…": "索引完成 · 正在生成頁面…",
|
||||
"{done} of {files} files · {read} of {bytes}": "{done} / {files} 個檔案 · {read} / {bytes}",
|
||||
"about {t} left": "約剩 {t}",
|
||||
"Read once, kept: after this the page opens from the index in a blink": "只需索引一次:之後開啟這一頁幾乎是瞬間的",
|
||||
"Only what changed is read again, from where it was left": "之後只讀新增的部分,從上次讀到的地方接著讀",
|
||||
"Every session is read on this computer; nothing leaves it": "所有會話都在本機讀取,不會上傳到任何地方",
|
||||
"The biggest files go first, so none is left running on alone": "最大的檔案先讀,所有核心一起跑滿",
|
||||
"Nothing in this range.": "這段時間沒有用量。",
|
||||
"Usage heatmap": "用量熱力圖",
|
||||
"Daily usage over the last 53 weeks": "最近 53 週的每日用量",
|
||||
"{d} active": "活躍 {d}",
|
||||
"Latest sessions": "最近的會話",
|
||||
"Open in Sessions": "在會話頁開啟",
|
||||
"Top sessions": "最耗會話",
|
||||
"Session shape": "會話形態",
|
||||
"{r}m": "{r} 分鐘",
|
||||
"{r} messages": "{r} 條訊息",
|
||||
"{r} minutes at work": "工作 {r} 分鐘",
|
||||
"{r} tool calls a prompt": "每條提示 {r} 次工具呼叫",
|
||||
"Across: {axis} · Height: sessions": "橫軸:{axis} · 柱高:會話數",
|
||||
"messages in a session, prompts and replies": "一個會話裡的訊息數(提示加回覆)",
|
||||
"minutes a session was at work": "一個會話實際工作的分鐘數",
|
||||
"tool calls the agent made on its own for each prompt": "你每發一條提示,Agent 自己呼叫工具的次數",
|
||||
"No tool calls in this range.": "這段時間沒有工具呼叫。",
|
||||
"Top skills": "常用 Skills",
|
||||
"No skill was called up in this range.": "這段時間沒有呼叫 skill。",
|
||||
"last {when}": "最近 {when}",
|
||||
"By hour": "按時段",
|
||||
"Still counting": "還在統計",
|
||||
"days at work": "活躍天數",
|
||||
"longest streak": "最長連續",
|
||||
"busiest day": "最忙的一天",
|
||||
"Reading the session…": "正在讀取會話…",
|
||||
"Click to show only this": "點選只看這一項",
|
||||
"Click again to show every one": "再點一次顯示全部",
|
||||
"median {m} · p90 {p}": "中位 {m} · p90 {p}",
|
||||
"{p} in {name}": "{name} 佔 {p}",
|
||||
"Busiest at {when}": "最忙:{when}",
|
||||
"Active time isn't kept by model.": "活躍時長不按模型統計。",
|
||||
"No active time in this range.": "這段時間沒有活躍時長。",
|
||||
"Tokens in and out per session: the middle session's, and what nine in ten stay under": "每個會話的輸入加輸出 token:中位數,以及九成會話不超過的量",
|
||||
"on {n} day": "共 {n} 天",
|
||||
"on {n} days": "共 {n} 天",
|
||||
"The time the sessions were at work: the pauses between one message and the next, each under five minutes": "會話實際工作的時間:相鄰兩條訊息之間的間隔,只計不到五分鐘的",
|
||||
"{m}m": "{m} 分鐘",
|
||||
"{h}h {m}m": "{h} 小時 {m} 分",
|
||||
"By day": "每日趨勢",
|
||||
"By week": "每週趨勢",
|
||||
"{when} · {tokens} tokens": "{when} · {tokens} token",
|
||||
"No known price for {models}": "{models} 沒有已知價格",
|
||||
"Not counted: {models}, with no known price": "未計入:{models},沒有已知價格",
|
||||
"No calls today.": "今天沒有呼叫。",
|
||||
"No calls in the last 7 days.": "最近 7 天沒有呼叫。",
|
||||
"No calls in the last 30 days.": "最近 30 天沒有呼叫。",
|
||||
"No calls yet.": "還沒有呼叫。",
|
||||
"Point an agent at a catalog model and use it; every call through the gateway is counted here.": "讓某個 Agent 使用目錄中的模型;每次經過閘道的呼叫都會計入這裡。",
|
||||
"inside output": "計入輸出",
|
||||
"{when} · {tokens} tokens · {n} call": "{when} · {tokens} token · {n} 次呼叫",
|
||||
"{when} · {tokens} tokens · {n} calls": "{when} · {tokens} token · {n} 次呼叫",
|
||||
"{n}% of tokens": "佔 token 的 {n}%",
|
||||
"Counted from the providers' own usage reports on every call through the gateway · {path}": "根據供應商在每次閘道呼叫中返回的用量統計 · {path}",
|
||||
"Hide from this list": "從列表中隱藏",
|
||||
"Count as an agent…": "計入某個 Agent…",
|
||||
"Count {client} on its own": "將 {client} 單獨計算",
|
||||
"with {clients}": "含 {clients}",
|
||||
"Count this client's calls as": "將此用戶端的呼叫計入",
|
||||
"{client} is counted as {agent}": "{client} 已計入 {agent}",
|
||||
"{client} is counted on its own": "{client} 已單獨計算",
|
||||
"Actions for {name}": "{name} 的操作",
|
||||
"Hidden from this list only: their calls still count in the totals and the chart. Click to see them.": "只是不在此列表中顯示,它們的呼叫仍計入總數和圖表。點按查看。",
|
||||
"Vendor's first token": "廠商首字等待",
|
||||
"Tries that failed first": "之前失敗的嘗試",
|
||||
"Waiting for a slot": "排隊等空位",
|
||||
"Connecting and sending": "連線並傳送請求",
|
||||
"Refresh now, the allowances too; a Claude account's is read by running Claude Code's own /usage": "立即重新整理,含額度;Claude 帳號的額度透過執行 Claude Code 自帶的 /usage 讀取",
|
||||
"{n} by magpie itself": "其中 {n} 次由 magpie 自身發出",
|
||||
"first token in {ms} on average": "首字平均 {ms}",
|
||||
"no streamed replies timed": "沒有可計時的流式回覆",
|
||||
"Sent, Effort and the cache are in each row's details": "視窗較窄:傳送模型、推理強度和快取在每行的詳情裡",
|
||||
"{n} output tokens in {ms} after the first": "首字後 {ms} 輸出 {n} 個 token",
|
||||
"At least: {n} output tokens in {ms}, from the line that asked for it to its last. The session file has no first token, so the wait for it is counted too": "下限:從發出請求的那一行到最後一行,{ms} 輸出 {n} 個 token。會話檔案沒有首字時間,等首字的時間也算在裡面",
|
||||
"At least: {n} answer tokens in {ms} after the first token, the {r} reasoning tokens left out. The session file has no first text, so reasoning after the first token is counted too": "下限:首字後 {ms} 輸出 {n} 個正文 token,{r} 個推理 token 不計。會話檔案沒有首個正文的時間,首字後的推理時間也算在裡面",
|
||||
"At least: {n} output tokens in {ms}, the whole turn. What came after the first token ({after}) is too little to time a speed by: under a second or under 100 tokens, so the wait for it is counted too": "下限:整輪 {ms} 輸出 {n} 個 token。首字後只有 {after},不足 1 秒或不足 100 個 token,測不出速度,等首字的時間也算在裡面",
|
||||
"The session file has no first token to time a speed from": "會話檔案沒有首字時間,算不出速度",
|
||||
"{n} answer tokens in {ms} after the first text, the {r} reasoning tokens before it left out": "首個正文後 {ms} 輸出 {n} 個正文 token,之前的 {r} 個推理 token 不計",
|
||||
"Not streamed: no first token to time a speed from": "非流式:沒有首字時間,算不出速度",
|
||||
"{i} in · {o} out · {r} cache read · {w} cache creation": "輸入 {i} · 輸出 {o} · 快取讀取 {r} · 快取建立 {w}",
|
||||
"Upstream provider": "上游",
|
||||
"The agent spoke {from}; sent upstream as {to}": "agent 用 {from} 協議請求;以 {to} 協議發往上游",
|
||||
"Sent upstream as {to}, as the agent spoke it": "以 {to} 協議發往上游,與 agent 所用協議相同",
|
||||
},
|
||||
ja: {
|
||||
"Yesterday": "昨日",
|
||||
"This month": "今月",
|
||||
"Last month": "先月",
|
||||
"Pick days": "日付を選ぶ",
|
||||
"Previous month": "前の月",
|
||||
"Next month": "次の月",
|
||||
"Days picked: {days}": "選んだ日付:{days}",
|
||||
"Now the last day": "次に最終日を選択",
|
||||
"Pick the first day, then the last": "最初の日、次に最終日を選択",
|
||||
"No calls on the days picked.": "選んだ日付の呼び出しはありません。",
|
||||
"All gateway keys": "すべてのゲートウェイキー",
|
||||
"All accounts": "すべてのアカウント",
|
||||
"{agent} · on {computer}": "{agent} · {computer} 上",
|
||||
"What was said stays on {computer}: sync shares the usage alone.": "会話内容は {computer} に残ります。同期で共有されるのは使用量だけです。",
|
||||
"Model · provider": "モデル · プロバイダ",
|
||||
"Not archived": "アーカイブなし",
|
||||
"Estimated using effective model prices, including custom prices": "カスタム価格を含む、モデルの適用価格で見積もり",
|
||||
"Search models, providers, sessions": "モデル、プロバイダ、セッションを検索",
|
||||
"Save every request listed, all pages, as a CSV file in Downloads": "一覧のリクエストを全ページ分、CSV ファイルとして「ダウンロード」フォルダに保存",
|
||||
"All agents": "すべてのエージェント",
|
||||
"{n} out": "出力 {n}",
|
||||
"{n} cache write": "キャッシュ書き込み {n}",
|
||||
"{n} cache read": "キャッシュ読み取り {n}",
|
||||
"reported by apps": "アプリからの報告",
|
||||
"Reported by the app that made it, through POST /v1/magpie/usage/requests: the call went straight to its vendor, not through magpie.": "リクエストを送ったアプリが POST /v1/magpie/usage/requests で報告したものです。このリクエストは magpie を経由せず、直接ベンダーに送られました。",
|
||||
"all requests": "すべてのリクエスト",
|
||||
"Show only these requests": "これらのリクエストだけを表示",
|
||||
"Show every request again": "すべてのリクエストを再表示",
|
||||
"View routing": "ルーティングを表示",
|
||||
"Request: {what}": "リクエスト:{what}",
|
||||
"Provider · account": "プロバイダ · アカウント",
|
||||
"{m} for 5 minutes, {h} for an hour": "{m} は 5 分間、{h} は 1 時間保持",
|
||||
"session {id}": "セッション {id}",
|
||||
"{agent} · via {host}": "{agent} · {host} 経由",
|
||||
"Not kept for requests before this version": "このバージョンより前のリクエストでは記録されていません",
|
||||
"{n} reasoning, inside output": "推論 {n}(出力に含む)",
|
||||
"No known price for this model": "このモデルの価格は不明です",
|
||||
"Failed: the agent was answered {status}": "失敗:エージェントには {status} が返されました",
|
||||
"Error type": "エラーの種類",
|
||||
"Upstream said": "上流の応答",
|
||||
"Data source": "データソース",
|
||||
"Nothing more was kept of this request": "このリクエストについてこれ以上の記録はありません",
|
||||
"OFFICIAL": "公式",
|
||||
"No session was named with this request, so its session file can't be found": "このリクエストにはセッションが指定されていないため、セッションファイルが見つかりません",
|
||||
"magpie reads the session files of Claude Code, Claude Desktop and Codex only": "magpie が読み取れるのは Claude Code、Claude Desktop、Codex のセッションファイルのみです",
|
||||
"This request isn't in the agent's session files: they may be deleted, moved, or not written yet": "このリクエストはエージェントのセッションファイルにありません。削除・移動されたか、まだ書き込まれていない可能性があります",
|
||||
"The session file couldn't be read": "セッションファイルを読み取れませんでした",
|
||||
"Refresh every": "更新間隔",
|
||||
"Updated {time}": "{time} に更新",
|
||||
"Model recorded in the local session log; the outbound HTTP request was not captured.": "ローカルのセッションログに記録されたモデルです。実際に送信された HTTP リクエストは取得していません。",
|
||||
"About: told from the session file's times, a little more or less than it took": "概算:セッションファイルの時刻から算出しており、実際の所要時間とは多少ずれます",
|
||||
"{n} call unpriced": "{n} 件の呼び出しは価格不明",
|
||||
"{n} calls unpriced": "{n} 件の呼び出しは価格不明",
|
||||
"{n} model unpriced": "{n} 個のモデルは価格不明",
|
||||
"{n} models unpriced": "{n} 個のモデルは価格不明",
|
||||
"Show only the requests answered on a retry": "再試行で成功したリクエストだけを表示",
|
||||
"Show only the failed requests": "失敗したリクエストだけを表示",
|
||||
"This try failed and the request was handed on to the next: the request is counted by how it ended, not by this try": "この試行は失敗し、リクエストは次へ引き継がれました。リクエストはこの試行ではなく最終結果で数えます",
|
||||
"{p} succeeded": "成功 {p}",
|
||||
"{a} cache": "キャッシュ {a}",
|
||||
"{a}–{b} of {n}": "{n} 件中 {a}–{b}",
|
||||
"Each request's tokens as its provider reported them; the cost estimated using effective model prices, including custom prices. Export CSV saves every page.": "各リクエストのトークン数はプロバイダの報告によるもので、費用はカスタム価格を含む有効なモデル価格で見積もっています。CSV エクスポートは全ページを保存します。",
|
||||
"Saved {n} request to {path}": "{n} 件のリクエストを {path} に保存しました",
|
||||
"Saved {n} requests to {path}": "{n} 件のリクエストを {path} に保存しました",
|
||||
"Login method": "ログイン方法",
|
||||
"Official login": "公式ログイン",
|
||||
"Duration colors: ≤10 s green · 10–30 s amber · >30 s red": "所要時間の色:≤10 秒 緑 · 10–30 秒 黄 · >30 秒 赤",
|
||||
"Official login confirmed for this account by local login metadata. This does not establish the route or authentication used for this request.": "ローカルのログイン情報により、このアカウントは公式ログインであることが確認されています。このリクエストの経路や認証方式を確認するものではありません。",
|
||||
"API price reference": "API 価格の参考モデル",
|
||||
"Price reference: {model}": "価格の参考:{model}",
|
||||
"Model used for the API price estimate; this is not an observed model forwarding event.": "API 費用の見積もりに使った参考モデルです。実際に観測されたモデル転送ではありません。",
|
||||
"Read from the agent's session file. The account is shown only when local metadata identifies it; no service provider is inferred.": "エージェントのセッションファイルから読み取り。アカウントはローカルのメタデータで特定できる場合のみ表示し、プロバイダは推測しません。",
|
||||
"Read from the agent's session file, which names the provider it was set up to call. The name shown is that record, not a route magpie saw.": "エージェントのセッションファイルから読み取り。呼び出すよう設定されたプロバイダが記録されています。ここに表示されるのはその記録であり、magpie が確認したルートではありません。",
|
||||
"Session account": "セッションのアカウント",
|
||||
"Gateway calls only; session-log calls are in Requests. Local rejections are excluded from totals.": "ゲートウェイ経由の呼び出しのみ。セッションログの呼び出しは「リクエスト」にあります。ローカルで拒否されたものは合計に含みません。",
|
||||
"at effective prices": "有効な価格で",
|
||||
"Reading the agents' session files…": "エージェントのセッションファイルを読み取り中…",
|
||||
"Totals count native sessions and gateway requests with a session ID": "合計にはローカルのセッションとセッション ID のあるゲートウェイ要求が含まれます",
|
||||
"showing {drawn} of {n}": "{n} 件中 {drawn} 件を表示",
|
||||
"All folders": "すべてのフォルダ",
|
||||
"Indexing your sessions": "セッションのインデックスを作成中",
|
||||
"Looking for session files…": "セッションファイルを探しています…",
|
||||
"Reading the kept index…": "保存済みのインデックスを読み取り中…",
|
||||
"Indexed · putting the page together…": "インデックス作成完了 · ページを準備しています…",
|
||||
"{done} of {files} files · {read} of {bytes}": "{done} / {files} ファイル · {read} / {bytes}",
|
||||
"about {t} left": "残り約 {t}",
|
||||
"Read once, kept: after this the page opens from the index in a blink": "一度読み取れば保存されます。次回からはインデックスから一瞬で開きます",
|
||||
"Only what changed is read again, from where it was left": "次回からは変更された部分だけを、前回の続きから読み取ります",
|
||||
"Every session is read on this computer; nothing leaves it": "すべてのセッションはこのコンピュータ上で読み取られ、外部には送信されません",
|
||||
"The biggest files go first, so none is left running on alone": "大きいファイルから先に読むので、最後に 1 つだけ残って時間がかかることはありません",
|
||||
"Nothing in this range.": "この期間のデータはありません。",
|
||||
"Usage heatmap": "使用量ヒートマップ",
|
||||
"Daily usage over the last 53 weeks": "直近 53 週間の日ごとの使用量",
|
||||
"{d} active": "アクティブ {d}",
|
||||
"Latest sessions": "最近のセッション",
|
||||
"Open in Sessions": "セッションで開く",
|
||||
"Top sessions": "上位のセッション",
|
||||
"Session shape": "セッションの傾向",
|
||||
"{r}m": "{r} 分",
|
||||
"{r} messages": "{r} 件のメッセージ",
|
||||
"{r} minutes at work": "作業時間 {r} 分",
|
||||
"{r} tool calls a prompt": "プロンプトあたり {r} 回のツール呼び出し",
|
||||
"Across: {axis} · Height: sessions": "横軸:{axis} · 高さ:セッション数",
|
||||
"messages in a session, prompts and replies": "セッション内のメッセージ数(プロンプトと応答)",
|
||||
"minutes a session was at work": "セッションが作業していた分数",
|
||||
"tool calls the agent made on its own for each prompt": "プロンプト 1 つにつきエージェントが自ら行ったツール呼び出しの回数",
|
||||
"No tool calls in this range.": "この期間のツール呼び出しはありません。",
|
||||
"Top skills": "よく使うスキル",
|
||||
"No skill was called up in this range.": "この期間に呼び出されたスキルはありません。",
|
||||
"last {when}": "最終 {when}",
|
||||
"By hour": "時間帯別",
|
||||
"Still counting": "集計中",
|
||||
"days at work": "作業日数",
|
||||
"longest streak": "最長連続日数",
|
||||
"busiest day": "最も忙しかった日",
|
||||
"Reading the session…": "セッションを読み取り中…",
|
||||
"Click to show only this": "クリックでこれだけを表示",
|
||||
"Click again to show every one": "もう一度クリックですべて表示",
|
||||
"median {m} · p90 {p}": "中央値 {m} · p90 {p}",
|
||||
"{p} in {name}": "{name} が {p}",
|
||||
"Busiest at {when}": "最も忙しい時間:{when}",
|
||||
"Active time isn't kept by model.": "アクティブ時間はモデル別には記録されません。",
|
||||
"No active time in this range.": "この期間のアクティブ時間はありません。",
|
||||
"Tokens in and out per session: the middle session's, and what nine in ten stay under": "セッションあたりの入出力トークン:中央値と、9 割のセッションが収まる量",
|
||||
"on {n} day": "{n} 日間",
|
||||
"on {n} days": "{n} 日間",
|
||||
"The time the sessions were at work: the pauses between one message and the next, each under five minutes": "セッションが作業していた時間:メッセージ間の間隔のうち、5 分未満のものだけを合計",
|
||||
"{m}m": "{m} 分",
|
||||
"{h}h {m}m": "{h} 時間 {m} 分",
|
||||
"By day": "日別",
|
||||
"By week": "週別",
|
||||
"{when} · {tokens} tokens": "{when} · {tokens} トークン",
|
||||
"No known price for {models}": "{models} の価格は不明です",
|
||||
"Not counted: {models}, with no known price": "計上されていません:{models}(価格不明)",
|
||||
"No calls today.": "今日の呼び出しはありません。",
|
||||
"No calls in the last 7 days.": "過去 7 日間の呼び出しはありません。",
|
||||
"No calls in the last 30 days.": "過去 30 日間の呼び出しはありません。",
|
||||
"No calls yet.": "呼び出しはまだありません。",
|
||||
"Point an agent at a catalog model and use it; every call through the gateway is counted here.": "エージェントにカタログのモデルを指定して使うと、ゲートウェイ経由のすべての呼び出しがここに集計されます。",
|
||||
"inside output": "出力に含む",
|
||||
"{when} · {tokens} tokens · {n} call": "{when} · {tokens} トークン · {n} 回の呼び出し",
|
||||
"{when} · {tokens} tokens · {n} calls": "{when} · {tokens} トークン · {n} 回の呼び出し",
|
||||
"{n}% of tokens": "トークンの {n}%",
|
||||
"Counted from the providers' own usage reports on every call through the gateway · {path}": "ゲートウェイ経由の各呼び出しでプロバイダが返した使用量から集計 · {path}",
|
||||
"Hide from this list": "この一覧から隠す",
|
||||
"Count as an agent…": "エージェントとして数える…",
|
||||
"Count {client} on its own": "{client} を別に数える",
|
||||
"with {clients}": "{clients} を含む",
|
||||
"Count this client's calls as": "このクライアントの呼び出しを数える先",
|
||||
"{client} is counted as {agent}": "{client} を {agent} として数えます",
|
||||
"{client} is counted on its own": "{client} を別に数えます",
|
||||
"Actions for {name}": "{name} の操作",
|
||||
"Hidden from this list only: their calls still count in the totals and the chart. Click to see them.": "この一覧に表示しないだけで、呼び出しは合計とグラフに含まれます。クリックで表示します。",
|
||||
"Vendor's first token": "ベンダーの最初のトークン",
|
||||
"Tries that failed first": "先に失敗した試行",
|
||||
"Waiting for a slot": "空き枠待ち",
|
||||
"Connecting and sending": "接続と送信",
|
||||
"Refresh now, the allowances too; a Claude account's is read by running Claude Code's own /usage": "今すぐ更新し、利用枠も読み込み直します。Claude アカウントの利用枠は Claude Code 自身の /usage を実行して読み取ります",
|
||||
"{n} by magpie itself": "うち {n} 件は magpie 自身",
|
||||
"first token in {ms} on average": "最初のトークンまで平均 {ms}",
|
||||
"no streamed replies timed": "計測できたストリーミング応答なし",
|
||||
"Sent, Effort and the cache are in each row's details": "ウィンドウが狭いため、送信したモデル・推論レベル・キャッシュは各行の詳細にあります",
|
||||
"{n} output tokens in {ms} after the first": "最初のトークン後 {ms} で {n} トークンを出力",
|
||||
"At least: {n} output tokens in {ms}, from the line that asked for it to its last. The session file has no first token, so the wait for it is counted too": "下限:要求した行から最後の行まで {ms} で {n} トークンを出力。セッションファイルには最初のトークンの時刻がないため、それを待つ時間も含まれます",
|
||||
"At least: {n} answer tokens in {ms} after the first token, the {r} reasoning tokens left out. The session file has no first text, so reasoning after the first token is counted too": "下限:最初のトークン後 {ms} で回答 {n} トークン(推論 {r} トークンは含めず)。セッションファイルには最初の本文の時刻がないため、最初のトークン後の推論の時間も含まれます",
|
||||
"At least: {n} output tokens in {ms}, the whole turn. What came after the first token ({after}) is too little to time a speed by: under a second or under 100 tokens, so the wait for it is counted too": "下限:ターン全体の {ms} で {n} トークンを出力。最初のトークン後は {after} だけで、1 秒未満か 100 トークン未満のため速度を計れず、それを待つ時間も含まれます",
|
||||
"The session file has no first token to time a speed from": "セッションファイルには、速度を計れる最初のトークンの時刻がありません",
|
||||
"{n} answer tokens in {ms} after the first text, the {r} reasoning tokens before it left out": "最初の本文後 {ms} で回答 {n} トークン(その前の推論 {r} トークンは含めず)",
|
||||
"Not streamed: no first token to time a speed from": "ストリーミングではないため、速度を計れる最初のトークンの時刻がありません",
|
||||
"{i} in · {o} out · {r} cache read · {w} cache creation": "入力 {i} · 出力 {o} · キャッシュ読み取り {r} · キャッシュ作成 {w}",
|
||||
"Upstream provider": "上流プロバイダー",
|
||||
"The agent spoke {from}; sent upstream as {to}": "エージェントは {from} で要求し、上流へは {to} で送信",
|
||||
"Sent upstream as {to}, as the agent spoke it": "エージェントと同じ {to} で上流へ送信",
|
||||
},
|
||||
de: {
|
||||
"Yesterday": "Gestern",
|
||||
"This month": "Dieser Monat",
|
||||
"Last month": "Letzter Monat",
|
||||
"Pick days": "Tage wählen",
|
||||
"Previous month": "Vorheriger Monat",
|
||||
"Next month": "Nächster Monat",
|
||||
"Days picked: {days}": "Gewählte Tage: {days}",
|
||||
"Now the last day": "Jetzt den letzten Tag",
|
||||
"Pick the first day, then the last": "Erst den ersten Tag, dann den letzten wählen",
|
||||
"No calls on the days picked.": "An den gewählten Tagen keine Aufrufe.",
|
||||
"All gateway keys": "Alle Zugangsschlüssel",
|
||||
"All accounts": "Alle Konten",
|
||||
"{agent} · on {computer}": "{agent} · auf {computer}",
|
||||
"What was said stays on {computer}: sync shares the usage alone.": "Die Inhalte bleiben auf {computer}: Die Synchronisierung teilt nur die Nutzung.",
|
||||
"Model · provider": "Modell · Anbieter",
|
||||
"Not archived": "Nicht archiviert",
|
||||
"Estimated using effective model prices, including custom prices": "Geschätzt mit effektiven Modellpreisen, einschließlich eigener Preise",
|
||||
"Search models, providers, sessions": "Modelle, Anbieter, Sitzungen durchsuchen",
|
||||
"Save every request listed, all pages, as a CSV file in Downloads": "Alle aufgeführten Anfragen aller Seiten als CSV-Datei unter „Downloads“ speichern",
|
||||
"All agents": "Alle Agenten",
|
||||
"{n} out": "{n} aus",
|
||||
"{n} cache write": "{n} Cache-Schreiben",
|
||||
"{n} cache read": "{n} Cache-Lesen",
|
||||
"reported by apps": "von Apps gemeldet",
|
||||
"Reported by the app that made it, through POST /v1/magpie/usage/requests: the call went straight to its vendor, not through magpie.": "Von der App gemeldet, die die Anfrage gestellt hat (POST /v1/magpie/usage/requests): Die Anfrage ging direkt an den Anbieter, nicht über magpie.",
|
||||
"all requests": "alle Anfragen",
|
||||
"Show only these requests": "Nur diese Anfragen zeigen",
|
||||
"Show every request again": "Wieder alle Anfragen zeigen",
|
||||
"View routing": "Weiterleitung anzeigen",
|
||||
"Request: {what}": "Anfrage: {what}",
|
||||
"Provider · account": "Anbieter · Konto",
|
||||
"{m} for 5 minutes, {h} for an hour": "{m} für 5 Minuten, {h} für eine Stunde",
|
||||
"session {id}": "Sitzung {id}",
|
||||
"{agent} · via {host}": "{agent} · über {host}",
|
||||
"Not kept for requests before this version": "Für Anfragen vor dieser Version nicht gespeichert",
|
||||
"{n} reasoning, inside output": "{n} Reasoning, in der Ausgabe enthalten",
|
||||
"No known price for this model": "Kein bekannter Preis für dieses Modell",
|
||||
"Failed: the agent was answered {status}": "Fehlgeschlagen: Der Agent erhielt {status}",
|
||||
"Error type": "Fehlertyp",
|
||||
"Upstream said": "Upstream-Antwort",
|
||||
"Data source": "Datenquelle",
|
||||
"Nothing more was kept of this request": "Zu dieser Anfrage wurde nichts weiter gespeichert",
|
||||
"OFFICIAL": "OFFIZIELL",
|
||||
"No session was named with this request, so its session file can't be found": "Diese Anfrage nannte keine Sitzung, daher lässt sich ihre Sitzungsdatei nicht finden",
|
||||
"magpie reads the session files of Claude Code, Claude Desktop and Codex only": "magpie liest nur die Sitzungsdateien von Claude Code, Claude Desktop und Codex",
|
||||
"This request isn't in the agent's session files: they may be deleted, moved, or not written yet": "Diese Anfrage ist nicht in den Sitzungsdateien des Agenten: Die Dateien wurden eventuell gelöscht, verschoben oder noch nicht geschrieben",
|
||||
"The session file couldn't be read": "Die Sitzungsdatei konnte nicht gelesen werden",
|
||||
"Refresh every": "Aktualisieren alle",
|
||||
"Updated {time}": "Aktualisiert {time}",
|
||||
"Model recorded in the local session log; the outbound HTTP request was not captured.": "Modell laut lokalem Sitzungslog; die ausgehende HTTP-Anfrage wurde nicht erfasst.",
|
||||
"About: told from the session file's times, a little more or less than it took": "Ungefähr: aus den Zeiten der Sitzungsdatei ermittelt, etwas mehr oder weniger als die tatsächliche Dauer",
|
||||
"{n} call unpriced": "{n} Aufruf ohne Preis",
|
||||
"{n} calls unpriced": "{n} Aufrufe ohne Preis",
|
||||
"{n} model unpriced": "{n} Modell ohne Preis",
|
||||
"{n} models unpriced": "{n} Modelle ohne Preis",
|
||||
"Show only the requests answered on a retry": "Nur die nach erneutem Versuch beantworteten Anfragen zeigen",
|
||||
"Show only the failed requests": "Nur die fehlgeschlagenen Anfragen zeigen",
|
||||
"This try failed and the request was handed on to the next: the request is counted by how it ended, not by this try": "Dieser Versuch schlug fehl, und die Anfrage ging an den nächsten weiter: Gezählt wird die Anfrage nach ihrem Ausgang, nicht nach diesem Versuch",
|
||||
"{p} succeeded": "{p} erfolgreich",
|
||||
"{a} cache": "{a} Cache",
|
||||
"{a}–{b} of {n}": "{a}–{b} von {n}",
|
||||
"Each request's tokens as its provider reported them; the cost estimated using effective model prices, including custom prices. Export CSV saves every page.": "Token jeder Anfrage laut Angabe des Anbieters; Kosten geschätzt mit effektiven Modellpreisen, einschließlich eigener Preise. „CSV exportieren“ speichert alle Seiten.",
|
||||
"Saved {n} request to {path}": "{n} Anfrage unter {path} gespeichert",
|
||||
"Saved {n} requests to {path}": "{n} Anfragen unter {path} gespeichert",
|
||||
"Login method": "Anmeldemethode",
|
||||
"Official login": "Offizielle Anmeldung",
|
||||
"Duration colors: ≤10 s green · 10–30 s amber · >30 s red": "Farben der Dauer: ≤10 s grün · 10–30 s gelb · >30 s rot",
|
||||
"Official login confirmed for this account by local login metadata. This does not establish the route or authentication used for this request.": "Offizielle Anmeldung für dieses Konto durch lokale Anmelde-Metadaten bestätigt. Weiterleitung oder Authentifizierung dieser Anfrage sind damit nicht belegt.",
|
||||
"API price reference": "API-Preisreferenz",
|
||||
"Price reference: {model}": "Preisreferenz: {model}",
|
||||
"Model used for the API price estimate; this is not an observed model forwarding event.": "Für die API-Preisschätzung verwendetes Modell; keine beobachtete Weiterleitung an ein Modell.",
|
||||
"Read from the agent's session file. The account is shown only when local metadata identifies it; no service provider is inferred.": "Aus der Sitzungsdatei des Agenten gelesen. Das Konto wird nur angezeigt, wenn lokale Metadaten es identifizieren; ein Dienstanbieter wird nicht abgeleitet.",
|
||||
"Read from the agent's session file, which names the provider it was set up to call. The name shown is that record, not a route magpie saw.": "Aus der Sitzungsdatei des Agenten gelesen, die den Anbieter nennt, für den er eingerichtet wurde. Der angezeigte Name ist diese Aufzeichnung, keine von magpie gesehene Route.",
|
||||
"Session account": "Sitzungskonto",
|
||||
"Gateway calls only; session-log calls are in Requests. Local rejections are excluded from totals.": "Nur Aufrufe über den Zugangspunkt; Aufrufe aus Sitzungslogs stehen unter „Anfragen“. Lokale Ablehnungen sind nicht in den Summen enthalten.",
|
||||
"at effective prices": "zu effektiven Preisen",
|
||||
"Reading the agents' session files…": "Sitzungsdateien der Agenten werden gelesen…",
|
||||
"Totals count native sessions and gateway requests with a session ID": "Summen zählen lokale Sitzungen und Gateway-Anfragen mit Sitzungs-ID",
|
||||
"showing {drawn} of {n}": "{drawn} von {n} angezeigt",
|
||||
"All folders": "Alle Ordner",
|
||||
"Indexing your sessions": "Ihre Sitzungen werden indiziert",
|
||||
"Looking for session files…": "Sitzungsdateien werden gesucht…",
|
||||
"Reading the kept index…": "Gespeicherter Index wird gelesen…",
|
||||
"Indexed · putting the page together…": "Indiziert · Seite wird aufgebaut…",
|
||||
"{done} of {files} files · {read} of {bytes}": "{done} von {files} Dateien · {read} von {bytes}",
|
||||
"about {t} left": "noch etwa {t}",
|
||||
"Read once, kept: after this the page opens from the index in a blink": "Einmal gelesen, dauerhaft gespeichert: Danach öffnet sich die Seite blitzschnell aus dem Index",
|
||||
"Only what changed is read again, from where it was left": "Nur Änderungen werden erneut gelesen, ab der letzten Stelle",
|
||||
"Every session is read on this computer; nothing leaves it": "Jede Sitzung wird auf diesem Computer gelesen; nichts verlässt ihn",
|
||||
"The biggest files go first, so none is left running on alone": "Die größten Dateien zuerst, damit keine am Ende allein weiterläuft",
|
||||
"Nothing in this range.": "Nichts in diesem Zeitraum.",
|
||||
"Usage heatmap": "Nutzungs-Heatmap",
|
||||
"Daily usage over the last 53 weeks": "Tägliche Nutzung der letzten 53 Wochen",
|
||||
"{d} active": "{d} aktiv",
|
||||
"Latest sessions": "Neueste Sitzungen",
|
||||
"Open in Sessions": "In „Sitzungen“ öffnen",
|
||||
"Top sessions": "Top-Sitzungen",
|
||||
"Session shape": "Sitzungsprofil",
|
||||
"{r}m": "{r} Min.",
|
||||
"{r} messages": "{r} Nachrichten",
|
||||
"{r} minutes at work": "{r} Minuten aktiv",
|
||||
"{r} tool calls a prompt": "{r} Tool-Aufrufe pro Prompt",
|
||||
"Across: {axis} · Height: sessions": "Horizontal: {axis} · Höhe: Sitzungen",
|
||||
"messages in a session, prompts and replies": "Nachrichten einer Sitzung, Prompts und Antworten",
|
||||
"minutes a session was at work": "Minuten, die eine Sitzung aktiv war",
|
||||
"tool calls the agent made on its own for each prompt": "Tool-Aufrufe, die der Agent pro Prompt selbstständig ausführte",
|
||||
"No tool calls in this range.": "Keine Tool-Aufrufe in diesem Zeitraum.",
|
||||
"Top skills": "Top-Skills",
|
||||
"No skill was called up in this range.": "In diesem Zeitraum wurde kein Skill aufgerufen.",
|
||||
"last {when}": "zuletzt {when}",
|
||||
"By hour": "Nach Stunde",
|
||||
"Still counting": "Wird noch gezählt",
|
||||
"days at work": "aktive Tage",
|
||||
"longest streak": "längste Serie",
|
||||
"busiest day": "aktivster Tag",
|
||||
"Reading the session…": "Sitzung wird gelesen…",
|
||||
"Click to show only this": "Klicken, um nur dies anzuzeigen",
|
||||
"Click again to show every one": "Erneut klicken, um alle anzuzeigen",
|
||||
"median {m} · p90 {p}": "Median {m} · p90 {p}",
|
||||
"{p} in {name}": "{p} in {name}",
|
||||
"Busiest at {when}": "Am aktivsten: {when}",
|
||||
"Active time isn't kept by model.": "Die aktive Zeit wird nicht pro Modell erfasst.",
|
||||
"No active time in this range.": "Keine aktive Zeit in diesem Zeitraum.",
|
||||
"Tokens in and out per session: the middle session's, and what nine in ten stay under": "Ein- und Ausgabe-Token pro Sitzung: der Median und der Wert, den neun von zehn Sitzungen nicht überschreiten",
|
||||
"on {n} day": "an {n} Tag",
|
||||
"on {n} days": "an {n} Tagen",
|
||||
"The time the sessions were at work: the pauses between one message and the next, each under five minutes": "Die aktive Zeit der Sitzungen: die Pausen zwischen zwei Nachrichten, jeweils unter fünf Minuten",
|
||||
"{m}m": "{m} Min.",
|
||||
"{h}h {m}m": "{h} Std. {m} Min.",
|
||||
"By day": "Pro Tag",
|
||||
"By week": "Pro Woche",
|
||||
"{when} · {tokens} tokens": "{when} · {tokens} Token",
|
||||
"No known price for {models}": "Kein bekannter Preis für {models}",
|
||||
"Not counted: {models}, with no known price": "Nicht gezählt: {models}, ohne bekannten Preis",
|
||||
"No calls today.": "Heute keine Aufrufe.",
|
||||
"No calls in the last 7 days.": "Keine Aufrufe in den letzten 7 Tagen.",
|
||||
"No calls in the last 30 days.": "Keine Aufrufe in den letzten 30 Tagen.",
|
||||
"No calls yet.": "Noch keine Aufrufe.",
|
||||
"Point an agent at a catalog model and use it; every call through the gateway is counted here.": "Richten Sie einen Agenten auf ein Katalogmodell aus und nutzen Sie ihn; jeder Aufruf über den Zugangspunkt wird hier gezählt.",
|
||||
"inside output": "in der Ausgabe enthalten",
|
||||
"{when} · {tokens} tokens · {n} call": "{when} · {tokens} Token · {n} Aufruf",
|
||||
"{when} · {tokens} tokens · {n} calls": "{when} · {tokens} Token · {n} Aufrufe",
|
||||
"{n}% of tokens": "{n} % der Token",
|
||||
"Counted from the providers' own usage reports on every call through the gateway · {path}": "Gezählt aus den Nutzungsangaben der Anbieter bei jedem Aufruf über den Zugangspunkt · {path}",
|
||||
"Hide from this list": "In dieser Liste ausblenden",
|
||||
"Count as an agent…": "Als Agent zählen…",
|
||||
"Count {client} on its own": "{client} wieder einzeln zählen",
|
||||
"with {clients}": "mit {clients}",
|
||||
"Count this client's calls as": "Aufrufe dieses Clients zählen als",
|
||||
"{client} is counted as {agent}": "{client} wird als {agent} gezählt",
|
||||
"{client} is counted on its own": "{client} wird einzeln gezählt",
|
||||
"Actions for {name}": "Aktionen für {name}",
|
||||
"Hidden from this list only: their calls still count in the totals and the chart. Click to see them.": "Nur in dieser Liste ausgeblendet: Ihre Aufrufe zählen weiter in den Summen und im Diagramm. Klicken, um sie zu sehen.",
|
||||
"Vendor's first token": "Erstes Token des Anbieters",
|
||||
"Tries that failed first": "Zuvor fehlgeschlagene Versuche",
|
||||
"Waiting for a slot": "Warten auf einen freien Platz",
|
||||
"Connecting and sending": "Verbinden und Senden",
|
||||
"Refresh now, the allowances too; a Claude account's is read by running Claude Code's own /usage": "Jetzt aktualisieren, auch die Kontingente; das eines Claude-Kontos wird über das eigene /usage von Claude Code gelesen",
|
||||
"{n} by magpie itself": "{n} von magpie selbst",
|
||||
"first token in {ms} on average": "erstes Token im Schnitt nach {ms}",
|
||||
"no streamed replies timed": "keine gestreamte Antwort gemessen",
|
||||
"Sent, Effort and the cache are in each row's details": "Schmales Fenster: Gesendet, Effort und Cache stehen in den Details jeder Zeile",
|
||||
"{n} output tokens in {ms} after the first": "{n} Ausgabe-Token in {ms} nach dem ersten",
|
||||
"At least: {n} output tokens in {ms}, from the line that asked for it to its last. The session file has no first token, so the wait for it is counted too": "Mindestens: {n} Ausgabe-Token in {ms}, von der Zeile, die sie anforderte, bis zu ihrer letzten. Die Sitzungsdatei hat kein erstes Token, also zählt das Warten darauf mit",
|
||||
"At least: {n} answer tokens in {ms} after the first token, the {r} reasoning tokens left out. The session file has no first text, so reasoning after the first token is counted too": "Mindestens: {n} Antwort-Token in {ms} nach dem ersten Token, ohne die {r} Reasoning-Token. Die Sitzungsdatei hat keinen ersten Text, also zählt Reasoning nach dem ersten Token mit",
|
||||
"At least: {n} output tokens in {ms}, the whole turn. What came after the first token ({after}) is too little to time a speed by: under a second or under 100 tokens, so the wait for it is counted too": "Mindestens: {n} Ausgabe-Token in {ms}, der ganze Turn. Nach dem ersten Token kam nur {after}, unter einer Sekunde oder unter 100 Token, zu wenig für ein Tempo, also zählt das Warten darauf mit",
|
||||
"The session file has no first token to time a speed from": "Die Sitzungsdatei hat kein erstes Token, an dem sich ein Tempo messen ließe",
|
||||
"{n} answer tokens in {ms} after the first text, the {r} reasoning tokens before it left out": "{n} Antwort-Token in {ms} nach dem ersten Text, ohne die {r} Reasoning-Token davor",
|
||||
"Not streamed: no first token to time a speed from": "Nicht gestreamt: kein erstes Token, an dem sich ein Tempo messen ließe",
|
||||
"{i} in · {o} out · {r} cache read · {w} cache creation": "{i} Eingabe · {o} Ausgabe · {r} Cache-Lesen · {w} Cache-Erstellung",
|
||||
"Upstream provider": "Upstream-Anbieter",
|
||||
"The agent spoke {from}; sent upstream as {to}": "Der Agent sprach {from}; an den Upstream als {to} gesendet",
|
||||
"Sent upstream as {to}, as the agent spoke it": "An den Upstream als {to} gesendet, wie der Agent es sprach",
|
||||
},
|
||||
});
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
// The window's start, loaded last: app.js, the plugins' pages and the
|
||||
// scripts after app.js are all there, so the first page shown has its
|
||||
// code (the Usage page's is a plugin's, run after app.js).
|
||||
// the plugins' pages wired up (kernel.js), before the first is shown
|
||||
magpie.start();
|
||||
navHides(); // the pages built-in plugins switched off have, from boot.js
|
||||
// The window opens on the page the reader last left, as a Mac app comes back
|
||||
// as it was (molvqingtai, lc on Discord): a page asked for (?view=, a link
|
||||
// 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", "plugins", "settings", ...magpie.pages()];
|
||||
function keptView() {
|
||||
const asked = params.get("view");
|
||||
if (asked === "agents" || OPEN_VIEWS.includes(asked)) return asked;
|
||||
let v = "";
|
||||
try { v = localStorage.getItem("magpie.lastView") || ""; } catch { /* none kept */ }
|
||||
return OPEN_VIEWS.includes(v) ? v : ""; // one gateway mode leaves out, show() makes Providers
|
||||
}
|
||||
const firstView = mode === "window" ? keptView() : "";
|
||||
if (OPEN_VIEWS.includes(firstView)) show(firstView);
|
||||
else if (mode === "window" && !gatewayMode && !sideNav()) slide($("#nav"), "nav");
|
||||
// in gateway mode the first page is Providers, Agents' tab gone
|
||||
if (gatewayMode) setGatewayMode(true);
|
||||
load();
|
||||
@@ -44,12 +44,12 @@ func TestBuiltinSwitch(t *testing.T) {
|
||||
if err := json.Unmarshal(rec.Body.Bytes(), &out); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if len(out) != 7 {
|
||||
if len(out) != 8 {
|
||||
t.Fatalf("the built-ins: %+v", out)
|
||||
}
|
||||
for _, b := range out {
|
||||
// the Gateway and Routing pages are essential: on in every preset
|
||||
if b.On != (b.ID == "library" || b.ID == "gateway" || b.ID == "routing") || b.On != (b.State == pluginrt.Active) {
|
||||
// the Gateway, Routing and Usage pages are essential: on in every preset
|
||||
if b.On != (b.ID == "library" || b.ID == "gateway" || b.ID == "routing" || b.ID == "usage") || b.On != (b.State == pluginrt.Active) {
|
||||
t.Fatalf("after library on: %+v", out)
|
||||
}
|
||||
}
|
||||
@@ -194,9 +194,9 @@ func TestBuiltinClientsLoaded(t *testing.T) {
|
||||
}
|
||||
return i
|
||||
}
|
||||
kernel, app := at("kernel.js"), at("app.js")
|
||||
if kernel > app {
|
||||
t.Fatal("kernel.js after app.js")
|
||||
kernel, app, start := at("kernel.js"), at("app.js"), at("start.js")
|
||||
if kernel > app || app > start {
|
||||
t.Fatal("kernel.js, app.js and start.js out of order")
|
||||
}
|
||||
n := 0
|
||||
for _, m := range pluginrt.Registered() {
|
||||
@@ -211,6 +211,12 @@ func TestBuiltinClientsLoaded(t *testing.T) {
|
||||
if i := at(name); i > strings.Index(src, "</head>") {
|
||||
t.Errorf("%s isn't in the head", name)
|
||||
}
|
||||
} else if c == "page.js" {
|
||||
// a page's code that runs on app.js's helpers: after app.js,
|
||||
// before start.js shows the first page
|
||||
if i := at(name); i < app || i > start {
|
||||
t.Errorf("%s isn't between app.js and start.js", name)
|
||||
}
|
||||
} else if i := at(name); i < kernel || i > app {
|
||||
t.Errorf("%s isn't between kernel.js and app.js", name)
|
||||
}
|
||||
|
||||
@@ -25,11 +25,12 @@ const PLUGINS = [
|
||||
{ id: "otel", name: "Observability", sub: "Send each request's traces and metrics to an OpenTelemetry collector, such as Langfuse", one: "Sending to a collector", many: "Sending to a collector" },
|
||||
{ id: "routing", name: "Routing", sub: "Each request as the gateway routes it, the accounts it weighed and what each answered, and your routing groups", one: "1 group in use", many: "{n} groups in use" },
|
||||
{ id: "sessions", name: "Sessions", sub: "Your agents' past conversations: read, search, resume and export them", one: "Recording gateway conversations", many: "Recording gateway conversations" },
|
||||
{ id: "usage", name: "Usage", sub: "Your allowances, what was spent and on what, each request, and what filled the context window" },
|
||||
{ id: "warmups", name: "Warm-up and check-in", sub: "Start a subscription's usage window at a time you pick, and claim vendors' daily check-in credits", one: "1 warm-up or check-in on", many: "{n} warm-ups and check-ins on" },
|
||||
];
|
||||
// a new install's (the Essentials preset): all off but the Gateway page,
|
||||
// which is essential, and two routing groups the user made
|
||||
const START = { gateway: [true, 0], groups: [false, 2], library: [false, 0], otel: [false, 0], routing: [true, 0], sessions: [false, 0], warmups: [false, 0] };
|
||||
// a new install's (the Essentials preset): all off but the Gateway, Routing
|
||||
// and Usage pages, which are essential, and two routing groups the user made
|
||||
const START = { gateway: [true, 0], groups: [false, 2], library: [false, 0], otel: [false, 0], routing: [true, 0], sessions: [false, 0], usage: [true, 0], warmups: [false, 0] };
|
||||
|
||||
// the Gateway page's settings, as pluginrt.SchemaOf makes them
|
||||
const GATEWAY_SCHEMA = {
|
||||
@@ -161,7 +162,9 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
assert.deepEqual([gw.on, gw.disabled], ["true", false], `${where}: the Gateway page, on`);
|
||||
const rt = rows.find((r) => r.id === "routing");
|
||||
assert.deepEqual([rt.on, rt.disabled], ["true", false], `${where}: the Routing page, on`);
|
||||
for (const r of rows.filter((r) => !["groups", "gateway", "routing"].includes(r.id))) assert.deepEqual([r.on, r.disabled, r.why], ["false", false, ""], `${where}: ${r.id}`);
|
||||
const us = rows.find((r) => r.id === "usage");
|
||||
assert.deepEqual([us.on, us.disabled], ["true", false], `${where}: the Usage page, on`);
|
||||
for (const r of rows.filter((r) => !["groups", "gateway", "routing", "usage"].includes(r.id))) assert.deepEqual([r.on, r.disabled, r.why], ["false", false, ""], `${where}: ${r.id}`);
|
||||
await page.locator('#builtinList [data-id="groups"] [role="switch"]').click({ force: true });
|
||||
await page.waitForTimeout(100);
|
||||
assert.deepEqual(posts, [], `${where}: a locked switch posts nothing`);
|
||||
@@ -199,9 +202,18 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
assert.deepEqual(posts.at(-1), ["routing", false], where);
|
||||
if (width >= 800) assert.deepEqual(await tabs(page), ["agents", "library", ...KEPT.slice(1).filter((k) => k !== "routing")], `${where}: Routing gone`);
|
||||
assert.deepEqual(await viewShown(page), ["view-plugins"], `${where}: Plugins stays`);
|
||||
// and Usage: its tab goes
|
||||
await page.locator('#builtinList [data-id="usage"] [role="switch"]').click();
|
||||
await page.waitForSelector('#builtinList [data-id="usage"] [aria-checked="false"]');
|
||||
assert.deepEqual(posts.at(-1), ["usage", false], where);
|
||||
if (width >= 800) assert.deepEqual(await tabs(page), ["agents", "library", ...KEPT.slice(1).filter((k) => k !== "routing" && k !== "usage")], `${where}: Usage gone`);
|
||||
assert.deepEqual(await viewShown(page), ["view-plugins"], `${where}: Plugins stays`);
|
||||
// Discover brings the search back
|
||||
await pluginTabs(page, side).nth(1).click();
|
||||
assert.ok(await page.locator("#view-plugins .pm-find").isVisible(), `${where}: search on Discover`);
|
||||
// a way to Usage left somewhere (the tray's Open Usage) gives way to Agents
|
||||
await page.evaluate(() => show("usage"));
|
||||
assert.deepEqual(await viewShown(page), ["view-agents"], `${where}: no Usage page with it off`);
|
||||
assert.deepEqual(errors, [], where);
|
||||
await context.close();
|
||||
}
|
||||
|
||||
@@ -183,29 +183,29 @@ for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium",
|
||||
}
|
||||
}
|
||||
|
||||
// context.js comes after app.js, which shows the page and reads the state
|
||||
// before it is there: the state answered first, the tab still loads at once
|
||||
// rather than at the refresh's first tick, five seconds on
|
||||
// context.js once came after the script that shows the page and reads the
|
||||
// state, so a state answered first left the tab empty until the refresh's
|
||||
// first tick. start.js, which does both, now comes after it: a slow context.js
|
||||
// holds the first read back, and the tab loads as soon as it is in
|
||||
for (const engine of (process.env.BROWSER ? [process.env.BROWSER] : ["chromium", "webkit"])) {
|
||||
test(`${engine}: the Context tab loads when context.js arrives after the state`, async (t) => {
|
||||
test(`${engine}: the Context tab loads at once though context.js is slow`, async (t) => {
|
||||
const browser = await (engine === "webkit" ? webkit.launch() : chromium.launch({ channel: "chromium" }));
|
||||
t.after(() => browser.close());
|
||||
const page = await (await browser.newContext({ viewport: { width: 1100, height: 900 } })).newPage();
|
||||
const errors = [], asked = [];
|
||||
const errors = [], asked = [], order = [];
|
||||
page.on("pageerror", (e) => errors.push(e.message));
|
||||
const base = serve("en", asked);
|
||||
let answered;
|
||||
const stateDone = new Promise((res) => { answered = res; });
|
||||
await page.route("**/*", async (r) => {
|
||||
const p = new URL(r.request().url()).pathname;
|
||||
if (p === "/context.js") await stateDone.then(() => new Promise((res) => setTimeout(res, 150)));
|
||||
if (p === "/context.js") await new Promise((res) => setTimeout(res, 1000));
|
||||
if (p === "/context.js" || p === "/api/state") order.push(p);
|
||||
await base(r);
|
||||
if (p === "/api/state") answered();
|
||||
});
|
||||
await page.addInitScript(() => { try { localStorage.clear(); localStorage.setItem("magpie.usageTab", "context"); } catch {} });
|
||||
await page.goto("http://magpie.test/?view=usage");
|
||||
await page.locator(".ctx-agent", { hasText: "Codex" }).waitFor({ timeout: 2500 });
|
||||
assert.equal(asked[0], "7");
|
||||
assert.deepEqual(order.slice(0, 2), ["/context.js", "/api/state"], "the state is read once context.js is in");
|
||||
assert.doesNotMatch(await page.locator("#status").innerText(), /loadContext|not a function/);
|
||||
assert.deepEqual(errors, []);
|
||||
});
|
||||
|
||||
@@ -30,7 +30,7 @@ function page() {
|
||||
if (path.includes("history")) return Promise.resolve([]);
|
||||
return new Promise((resolve, reject) => requests.push({ path, resolve, reject }));
|
||||
}
|
||||
${section("let quotasLoading =", "// the period picker, in the page's head")}
|
||||
${section("let quotasLoading =", "// A period of picked days is")}
|
||||
${section("const quotaRefreshing =", "// familyQuota:")}
|
||||
globalThis.p = {
|
||||
requests, errors,
|
||||
|
||||
@@ -17,9 +17,12 @@ const vm = require("node:vm");
|
||||
const { test } = require("node:test");
|
||||
|
||||
// Another revision of app.js can be selected with MAGPIE_APP_JS to check
|
||||
// the same behavior cases against the implementation before the fix.
|
||||
// the same behavior cases against the implementation before the fix. The
|
||||
// Usage page's code is the Usage plugin's page.js, beside app.js's
|
||||
// allowances (quotasOpened).
|
||||
const APP = process.env.MAGPIE_APP_JS || path.resolve(__dirname, "../assets/app.js");
|
||||
const source = fs.readFileSync(APP, "utf8").replace(/\r\n/g, "\n");
|
||||
const PAGE = path.resolve(__dirname, "../assets/plugins/usage/page.js");
|
||||
const source = [APP, PAGE].filter((f) => fs.existsSync(f)).map((f) => fs.readFileSync(f, "utf8")).join("\n").replace(/\r\n/g, "\n");
|
||||
|
||||
// lift a top-level function out of app.js whole: from its `function` line to
|
||||
// the `}` at the left margin that closes it
|
||||
|
||||
@@ -9,5 +9,6 @@ import (
|
||||
_ "github.com/yetone/magpie/plugins/otel"
|
||||
_ "github.com/yetone/magpie/plugins/routing"
|
||||
_ "github.com/yetone/magpie/plugins/sessions"
|
||||
_ "github.com/yetone/magpie/plugins/usage"
|
||||
_ "github.com/yetone/magpie/plugins/warmups"
|
||||
)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
// Package usage is the Usage page: the allowances, what was spent and on
|
||||
// what, the sessions, each request, and what filled the context window.
|
||||
// Off, the page leaves the window; the gateway still counts what it
|
||||
// passes on, and the tray panel's Usage tab still shows the allowances.
|
||||
package usage
|
||||
|
||||
import "github.com/yetone/magpie/internal/pluginrt"
|
||||
|
||||
func init() {
|
||||
pluginrt.Register(pluginrt.Manifest{
|
||||
ID: "usage", API: "^1", Requires: []string{"window"}, Essential: true,
|
||||
Name: "Usage", Sub: "Your allowances, what was spent and on what, each request, and what filled the context window",
|
||||
Parts: []pluginrt.Part{{Slot: "nav.page", Key: "usage"}},
|
||||
Client: []string{"i18n.js", "client.js", "page.js"},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user