codex-copilot-dx 0.10.1 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -17
- package/bin/cli.mjs +24 -3
- package/docs/ARCHITECTURE.md +60 -14
- package/docs/README.md +3 -0
- package/docs/REFERENCE.md +186 -45
- package/package.json +2 -2
- package/src/adapter.mjs +19 -4
- package/src/browser-launch.mjs +22 -0
- package/src/claude-client-config.mjs +22 -5
- package/src/claude-gateway.mjs +30 -8
- package/src/claude-models.mjs +26 -0
- package/src/cli-animation.mjs +1 -1
- package/src/cli-image.mjs +3 -0
- package/src/cli-m365.mjs +1 -1
- package/src/cli-options.mjs +11 -6
- package/src/cli-table.mjs +1 -1
- package/src/client-integration.mjs +5 -1
- package/src/dashboard/console.js +141 -0
- package/src/dashboard/index.html +105 -52
- package/src/dashboard/language.js +103 -0
- package/src/dashboard/refresh.js +2 -1
- package/src/dashboard/status.js +60 -29
- package/src/dashboard/ui.css +49 -0
- package/src/dashboard/ui.js +113 -26
- package/src/dashboard-api.mjs +72 -7
- package/src/dashboard.mjs +1 -0
- package/src/image-mcp.mjs +9 -6
- package/src/live-models.mjs +11 -3
- package/src/log.mjs +13 -11
- package/src/m365-settings.mjs +0 -2
- package/src/native-prediction-recovery.mjs +1 -0
- package/src/native-prediction.mjs +6 -2
- package/src/observability.mjs +8 -1
- package/src/optional-routes.mjs +2 -2
- package/src/provider-metadata.mjs +21 -0
- package/src/provider-runtime.mjs +80 -26
- package/src/providers/m365-auth.mjs +4 -4
- package/src/providers/m365.mjs +10 -2
- package/src/response-failures.mjs +1 -1
- package/src/service-control.mjs +60 -0
- package/src/startup-ui.mjs +4 -3
- package/src/terminal-console.mjs +87 -0
- package/src/usage-analysis.mjs +1 -1
- package/src/usage-analytics.mjs +3 -3
- package/src/usage-store.mjs +40 -17
- package/src/usage.mjs +14 -7
- package/src/user-settings.mjs +21 -0
package/src/cli-animation.mjs
CHANGED
|
@@ -137,7 +137,7 @@ export async function runAnimationCommand({
|
|
|
137
137
|
output.write(`CCDX_TERMINAL_ANIMATION=${disabledValue} remains effective until it is unset; terminal animation stays disabled.\n`);
|
|
138
138
|
output.write("The saved animation will be used on the next ccdx start after the override is unset.\n");
|
|
139
139
|
} else {
|
|
140
|
-
output.write("
|
|
140
|
+
output.write("Running CCDX 1.1.0+ picks up this animation without restart; older services need a restart.\n");
|
|
141
141
|
}
|
|
142
142
|
return { ...result, cancelled: false, theme: selectedTheme };
|
|
143
143
|
}
|
package/src/cli-image.mjs
CHANGED
|
@@ -9,6 +9,7 @@ import { terminalCell } from "./cli-table.mjs";
|
|
|
9
9
|
import { computeImageMcpCodexConfig } from "./config.mjs";
|
|
10
10
|
import { probeImageTool } from "./image-readiness.mjs";
|
|
11
11
|
import { updateImageSkill } from "./image-skill.mjs";
|
|
12
|
+
import { servicePreferences, writeServicePreference } from "./user-settings.mjs";
|
|
12
13
|
import {
|
|
13
14
|
imageProviderConfigPath,
|
|
14
15
|
inspectImageProvider,
|
|
@@ -193,6 +194,7 @@ export async function runImageCommand({
|
|
|
193
194
|
}
|
|
194
195
|
const summary = configSummary(config);
|
|
195
196
|
output.write(`Image generation: enabled\nEndpoint: ${terminalCell(summary.endpoint)}\nModel: ${terminalCell(summary.model)}\nProtocol: ${terminalCell(summary.protocol)}\n`);
|
|
197
|
+
if (!servicePreferences({ env, home }).image_enabled) output.write("New image calls: paused by the WebUI preference; provider configuration is retained.\n");
|
|
196
198
|
const readiness = await probeImageTool(fileContent(codexPath), { fetchImpl: probeFetchImpl });
|
|
197
199
|
printImageReadiness(readiness, output, commandName);
|
|
198
200
|
return { enabled: true, ...summary, readiness };
|
|
@@ -249,6 +251,7 @@ export async function runImageCommand({
|
|
|
249
251
|
adapterPort,
|
|
250
252
|
adapterHost,
|
|
251
253
|
});
|
|
254
|
+
if (!servicePreferences({ env, home }).image_enabled) writeServicePreference("image_enabled", true, { env, home });
|
|
252
255
|
output.write(`Enabled image generation with ${terminalCell(model)}.\n`);
|
|
253
256
|
const readiness = await probeImageTool(fileContent(codexPath), { fetchImpl: probeFetchImpl });
|
|
254
257
|
printImageReadiness(readiness, output, commandName);
|
package/src/cli-m365.mjs
CHANGED
|
@@ -36,7 +36,7 @@ export function formatM365Status(state) {
|
|
|
36
36
|
`Microsoft 365: ${terminalCell(m.state || "not running")}${m.reason ? ` (${terminalCell(m.reason)})` : ""}`,
|
|
37
37
|
...(m.account?.login ? [`Account: ${terminalCell(m.account.login)}`] : []),
|
|
38
38
|
`Models: ${models.claude || 0} Claude / ${models.gpt || 0} GPT (${models.source || "unavailable"})`,
|
|
39
|
-
`Claude gateway: ${claude.gateway || "not running"}${claude.
|
|
39
|
+
`Claude gateway: ${claude.gateway || "not running"}${claude.base_url ? ` / ${claude.base_url}` : ""}`,
|
|
40
40
|
...(claude.reason ? [`Claude detail: ${terminalCell(claude.reason)}`] : []),
|
|
41
41
|
...(claude.requests ? [`Claude requests: ${claude.requests.completed} completed / ${claude.requests.incomplete} incomplete / ${claude.requests.failed} failed / ${claude.requests.active} active`] : []),
|
|
42
42
|
`Claude Code: ${claude.clients?.code || "unknown"}; Claude App: ${claude.clients?.app || "unknown"}`,
|
package/src/cli-options.mjs
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import { isProviderId } from "./provider-metadata.mjs";
|
|
1
2
|
import { MAX_TIMER_DELAY_MS } from "./runtime-config.mjs";
|
|
2
3
|
|
|
3
4
|
const HELP_COMMANDS = new Set(["help", "--help", "-h"]);
|
|
4
5
|
const VERSION_COMMANDS = new Set(["version", "--version", "-v"]);
|
|
5
6
|
const START_OPTIONS = new Map([
|
|
6
7
|
["--show-request-id", "show-request-id"],
|
|
8
|
+
["--no-browser", "no-browser"],
|
|
9
|
+
["--verbose", "verbose"],
|
|
7
10
|
]);
|
|
8
11
|
const RETIRED_CLAUDE_OPTIONS = new Set([
|
|
9
12
|
"--configure-claude-desktop",
|
|
@@ -118,6 +121,8 @@ function parseStartOptions(args) {
|
|
|
118
121
|
}
|
|
119
122
|
return baseCommand("start", {
|
|
120
123
|
showRequestId: seen.has("show-request-id"),
|
|
124
|
+
...(seen.has("no-browser") ? { noBrowser: true } : {}),
|
|
125
|
+
...(seen.has("verbose") ? { verbose: true } : {}),
|
|
121
126
|
});
|
|
122
127
|
}
|
|
123
128
|
|
|
@@ -167,7 +172,7 @@ export function parseCliArgs(args = []) {
|
|
|
167
172
|
}
|
|
168
173
|
if (command === "usage") {
|
|
169
174
|
const options = parseOptions(rest, new Map([["--format", "value"], ["--provider", "value"]]));
|
|
170
|
-
if (options["--provider"] && !
|
|
175
|
+
if (options["--provider"] && !isProviderId(options["--provider"])) throw new Error("Usage provider must be a valid provider ID");
|
|
171
176
|
return baseCommand("usage", { ...outputFormatOption(options["--format"]), ...(options["--provider"] ? { provider: options["--provider"] } : {}) });
|
|
172
177
|
}
|
|
173
178
|
if (command === "cache") {
|
|
@@ -375,17 +380,17 @@ export function cliCommandName() {
|
|
|
375
380
|
|
|
376
381
|
function topicHelp(name, topic) {
|
|
377
382
|
const sections = {
|
|
378
|
-
start: `Usage:\n ${name} [start] [--show-request-id]\n\nStarts or reuses the local adapter, updates Codex configuration, and attempts to open Codex App when auto-launch is enabled and supported.`,
|
|
383
|
+
start: `Usage:\n ${name} [start] [--show-request-id] [--no-browser] [--verbose]\n\nStarts or reuses the local adapter, updates Codex configuration, and attempts to open Codex App when auto-launch is enabled and supported. Interactive desktop starts also open WebUI once; --no-browser skips that attempt. After startup the terminal shows fixed status/returned usage; --verbose or --show-request-id retains request detail.`,
|
|
379
384
|
auth: `Usage:\n ${name} auth status [--online] [--format table|plain]\n\nShows the saved GitHub Copilot account without exposing credentials. --online also verifies its entitlement and model catalog.`,
|
|
380
385
|
"auth status": `Usage:\n ${name} auth status [--online] [--format table|plain]\n\nShows the saved GitHub Copilot account without exposing credentials. --online also verifies its entitlement and model catalog. Interactive terminals use a table by default.`,
|
|
381
386
|
doctor: `Usage:\n ${name} doctor [--online] [--compat] [--fix] [--json]\n ${name} doctor config\n\nChecks credentials, managed configuration, command launchers, adapter, enabled optional features and observed client catalog. Default is read-only; no inference requests. --online validates account entitlement; --compat sends minimal inference requests and consumes a small amount of Copilot usage, requiring successful model completion rather than HTTP 200 alone. --fix repairs owned Windows launchers and managed config, imports a verified existing credential only if none is saved, and asks the running adapter to repair enabled predictions once. No interactive login, client program edits, forced App restarts, policy changes or optional feature activation. Missing-credential repair can contact GitHub without --online. Changed existing config is backed up to config.toml.ccdx-doctor.bak. Partial repairs exit 1. --json emits a redacted report, including before_checks for repairs. App-internal cache and visible predictions are not externally verified. The config subcommand remains strictly read-only.`,
|
|
382
387
|
"doctor config": `Usage:\n ${name} doctor config\n\nReads ~/.codex/config.toml, checks TOML syntax and CCDX-managed settings, and previews the existing startup writer's changes. Does not merge Codex profiles or validate the complete installed Codex schema. No authentication, network requests, file writes, or adapter/GUI startup. Existing context_management=false is valid. Exit 1 for errors, 0 for OK/warnings; unsupported arguments exit 2.`,
|
|
383
388
|
status: `Usage:\n ${name} status\n\nShows bounded runtime, routing, performance, queue, and cache metrics from a running adapter.`,
|
|
384
389
|
models: `Usage:\n ${name} models [--format table|plain]\n\nShows GPT models for the selected Codex provider. GitHub performs a fresh read-only lookup; M365 uses its isolated catalog in the running service. Interactive terminals use a table by default.`,
|
|
385
|
-
usage: `Usage:\n ${name} usage [--format table|plain] [--provider
|
|
390
|
+
usage: `Usage:\n ${name} usage [--format table|plain] [--provider ID]\n\nSummarizes local token usage metadata without reading prompt or completion content. Optional provider filtering separates sources; default totals include all recorded sources. Interactive terminals use a table by default.`,
|
|
386
391
|
cache: `Usage:\n ${name} cache\n ${name} cache --limit <MiB|default>\n ${name} cache --clean [--history] [--yes]\n\nShows runtime cache use, saves and applies the shared response-history limit, or clears the rebuildable image-transform cache. --history also clears in-memory response history for all tasks and can make their next continuation fail, so interactive confirmation or --yes is required. Generated image files and saved Codex transcripts are never deleted. Short aliases: -128 sets 128 MiB and -clean equals --clean.`,
|
|
387
392
|
limits: `Usage:\n ${name} limits\n ${name} limits --decoded <MiB|default>\n\nShows configured and running request-body limits, or saves a decoded request-body limit from 128 to 512 MiB. The raw-body limit is unchanged. Restart ccdx to apply a saved change; no conversation or cache is cleared. Short alias: -256 sets 256 MiB.`,
|
|
388
|
-
animation: `Usage:\n ${name} animation\n\nPreviews all terminal activity animations together and selects the theme
|
|
393
|
+
animation: `Usage:\n ${name} animation\n\nPreviews all terminal activity animations together and selects the saved theme. Running CCDX 1.1.0+ applies it live; older services need a restart.`,
|
|
389
394
|
"enable-image": `Usage:\n ${name} enable-image\n\nInteractively configures an HTTPS image API endpoint (base URLs are also accepted) and API key, detects its supported image model and protocol, installs CCDX image guidance, and checks the local image tool for Codex App without generating an image. A blank key preserves the saved key only for the same origin; a new origin requires explicit key entry. Concurrent unrelated config edits are preserved.`,
|
|
390
395
|
"disable-image": `Usage:\n ${name} disable-image\n\nDisables the local CCDX image tool and removes its stored API credential and unmodified CCDX image guidance.`,
|
|
391
396
|
"image-status": `Usage:\n ${name} image-status\n\nShows provider configuration and locally advertised generation/editing tools without generating an image or exposing its API key.`,
|
|
@@ -404,13 +409,13 @@ export function cliHelp(commandName = "ccdx", topic = "") {
|
|
|
404
409
|
const normalizedTopic = checkedHelpTopic(topic ? topic.split(" ") : []);
|
|
405
410
|
if (normalizedTopic) return topicHelp(name, normalizedTopic);
|
|
406
411
|
return `Usage:
|
|
407
|
-
${name} [start] [--show-request-id]
|
|
412
|
+
${name} [start] [--show-request-id] [--no-browser] [--verbose]
|
|
408
413
|
${name} auth status [--online] [--format table|plain]
|
|
409
414
|
${name} doctor [--online] [--compat] [--fix] [--json]
|
|
410
415
|
${name} doctor config
|
|
411
416
|
${name} status
|
|
412
417
|
${name} models [--format table|plain]
|
|
413
|
-
${name} usage [--format table|plain] [--provider
|
|
418
|
+
${name} usage [--format table|plain] [--provider ID]
|
|
414
419
|
${name} cache [--limit <MiB|default> | --clean [--history] [--yes]]
|
|
415
420
|
${name} limits [--decoded <MiB|default>]
|
|
416
421
|
${name} animation
|
package/src/cli-table.mjs
CHANGED
|
@@ -35,7 +35,7 @@ function graphemeWidth(segment) {
|
|
|
35
35
|
return width;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
function displayWidth(value) {
|
|
38
|
+
export function displayWidth(value) {
|
|
39
39
|
if (SIMPLE_WIDTH.test(value)) return value.length;
|
|
40
40
|
graphemeSegmenter ||= new Intl.Segmenter("en", { granularity: "grapheme" });
|
|
41
41
|
let width = 0;
|
|
@@ -116,7 +116,11 @@ export function createClientIntegration({ port, host, info = () => {}, warning =
|
|
|
116
116
|
}); },
|
|
117
117
|
pacUrl() { return native?.pacUrl || null; },
|
|
118
118
|
launched(route) { prediction.launch(route); },
|
|
119
|
-
|
|
119
|
+
setPredictionActive(value) {
|
|
120
|
+
const active = native?.setActive?.(value) ?? false;
|
|
121
|
+
return { active, state: active ? "active" : native ? "paused" : "needs_setup" };
|
|
122
|
+
},
|
|
123
|
+
snapshot() { return { prediction: { ...prediction.snapshot(), active: native?.enabled?.() === true } }; },
|
|
120
124
|
async close() { closed = true;try { await operation; } finally { await native?.close();native = null; } },
|
|
121
125
|
};
|
|
122
126
|
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
(() => {
|
|
2
|
+
const el = id => document.getElementById(id);
|
|
3
|
+
const label = (node, key, values = {}) => globalThis.ccdxLanguage.set(node, key, values);
|
|
4
|
+
const titles = { overview: "Overview", codex: "Codex", claude: "Claude", models: "Model services", usage: "Usage and diagnostics", system: "System and settings" };
|
|
5
|
+
let current = "overview", settings = null, settingsPending = false, stopped = false, timer = null, ticks = 0;
|
|
6
|
+
let sourceDirty = false, sourceGeneration = 0;
|
|
7
|
+
let settingsReadAt = null;
|
|
8
|
+
function navigate() {
|
|
9
|
+
const route = location.hash.slice(1), next = Object.hasOwn(titles, route) ? route : "overview";
|
|
10
|
+
current = next;
|
|
11
|
+
for (const view of document.querySelectorAll("[data-view]")) view.hidden = view.dataset.view !== next;
|
|
12
|
+
for (const item of document.querySelectorAll("[data-route]")) {
|
|
13
|
+
if (item.dataset.route === next) item.setAttribute("aria-current", "page");else item.removeAttribute("aria-current");
|
|
14
|
+
}
|
|
15
|
+
label(el("page-title"), titles[next]);
|
|
16
|
+
if (["codex", "models", "system"].includes(next)) void loadSettings();
|
|
17
|
+
if (next === "models") { void dashboardRefresh.refresh("models");void dashboardRefresh.refresh("auth"); }
|
|
18
|
+
if (next === "usage") void dashboardRefresh.refresh("usage");
|
|
19
|
+
if (next === "system") void dashboardRefresh.refresh("animation");
|
|
20
|
+
syncAnimationPreview();
|
|
21
|
+
}
|
|
22
|
+
async function api(body) {
|
|
23
|
+
const response = await fetch("/_ccdx/ui/settings", { method: body ? "POST" : "GET", cache: "no-store",
|
|
24
|
+
headers: { "X-CCDX-Dashboard": "1", ...(body ? { "Content-Type": "application/json" } : {}) },
|
|
25
|
+
...(body ? { body: JSON.stringify(body) } : {}), signal: AbortSignal.timeout(15000) });
|
|
26
|
+
const data = await response.json();if (!response.ok) throw new Error(data.error || `HTTP ${response.status}`);return data;
|
|
27
|
+
}
|
|
28
|
+
const states = { immediate: "Effective now", terminal_unavailable: "Terminal animation unavailable in this output mode", next_start: "Next CCDX start", next_call: "Applies to new calls", needs_setup: "Setup required",
|
|
29
|
+
next_config_request: "Next configuration request; cached suggestions may remain", needs_app_relaunch: "Reopen the client to finish", needs_service_restart: "Restart CCDX to finish" };
|
|
30
|
+
function applySettings(data) {
|
|
31
|
+
settings = data;
|
|
32
|
+
for (const key of ["terminal_animation_enabled", "open_webui", "image_enabled", "prediction_enabled"]) {
|
|
33
|
+
const input = el(`setting-${key}`), effective = data.effective[key];
|
|
34
|
+
input.checked = data.saved[key];input.disabled = Boolean(effective.locked);
|
|
35
|
+
label(el(`effect-${key}`), "Saved {saved} / effective {effective} / {state}", {
|
|
36
|
+
saved: { key: data.saved[key] ? "On" : "Off" }, effective: { key: effective.value ? "On" : "Off" },
|
|
37
|
+
state: { key: effective.locked ? "Controlled by environment" : states[effective.state] || effective.state } });
|
|
38
|
+
}
|
|
39
|
+
if (document.activeElement !== el("history-limit")) el("history-limit").value = data.history.maxBytes / 1048576;
|
|
40
|
+
el("history-limit").disabled = data.history.source === "environment";
|
|
41
|
+
el("save-history").disabled = data.history.source === "environment";
|
|
42
|
+
label(el("effect-history"), data.history.source === "environment" ? "Controlled by environment" : "Applies to new calls");
|
|
43
|
+
label(el("settings-note"), "Settings read from the running service.");
|
|
44
|
+
el("page-settings-note").textContent = "";
|
|
45
|
+
const state = data.providers;
|
|
46
|
+
if (state && !sourceDirty && el("source-provider").value !== state.codex_provider) {
|
|
47
|
+
el("source-provider").value = state.codex_provider;void loadSourceModels();
|
|
48
|
+
}
|
|
49
|
+
el("source-control-note").textContent = state ? `Codex → ${state.codex_provider} / Microsoft 365: ${state.m365.state}${state.m365.reason ? ` / ${state.m365.reason}` : ""}` : "—";
|
|
50
|
+
el("process-notice").textContent = data.terminal?.last_notice || "";
|
|
51
|
+
}
|
|
52
|
+
async function loadSettings() {
|
|
53
|
+
if (settingsPending) return;
|
|
54
|
+
settingsPending = true;
|
|
55
|
+
try { applySettings(await api());settingsReadAt = new Date().toLocaleTimeString(); }
|
|
56
|
+
catch (error) {
|
|
57
|
+
const detail = `${error.message}${settingsReadAt ? ` / ${settingsReadAt}` : ""}`;
|
|
58
|
+
el("settings-note").textContent = detail;el("page-settings-note").textContent = detail;
|
|
59
|
+
}
|
|
60
|
+
finally { settingsPending = false; }
|
|
61
|
+
}
|
|
62
|
+
async function change(body, button) {
|
|
63
|
+
if (settingsPending) return;
|
|
64
|
+
settingsPending = true;
|
|
65
|
+
const controls = [...document.querySelectorAll("[role=switch], #save-history, #clean-history, #fix-prediction, #apply-source, #m365-on, #m365-off")];
|
|
66
|
+
controls.forEach(input => { input.disabled = true; });
|
|
67
|
+
label(el("settings-note"), "Applying…");
|
|
68
|
+
if (button) button.setAttribute("aria-busy", "true");
|
|
69
|
+
try {
|
|
70
|
+
const data = await api(body);if (body.action === "provider" && body.operation === "switch") sourceDirty = false;
|
|
71
|
+
applySettings(data);await dashboardRefresh.refresh("status", { force: true });await dashboardRefresh.refresh("auth", { force: true });
|
|
72
|
+
}
|
|
73
|
+
catch (error) {
|
|
74
|
+
if (settings) applySettings(settings);
|
|
75
|
+
el("settings-note").textContent = error.message;el("source-control-note").textContent = error.message;el("effect-history").textContent = error.message;
|
|
76
|
+
if (body.key) el(`effect-${body.key}`).textContent = error.message;
|
|
77
|
+
} finally {
|
|
78
|
+
settingsPending = false;controls.forEach(input => { input.disabled = false; });
|
|
79
|
+
if (settings) for (const [key, value] of Object.entries(settings.effective)) if (value.locked) el(`setting-${key}`).disabled = true;
|
|
80
|
+
if (settings?.history.source === "environment") el("save-history").disabled = true;
|
|
81
|
+
if (el("source-provider").value === "m365") el("apply-source").disabled = !el("source-model").value || !el("source-review").value;
|
|
82
|
+
button?.removeAttribute("aria-busy");
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
for (const input of document.querySelectorAll("[role=switch]")) input.addEventListener("change", () => {
|
|
86
|
+
void change({ action: "preference", key: input.id.slice("setting-".length), value: input.checked }, input);
|
|
87
|
+
});
|
|
88
|
+
el("save-history").addEventListener("click", () => void change({ action: "history_limit", mib: Number(el("history-limit").value) }, el("save-history")));
|
|
89
|
+
el("clean-history").addEventListener("click", () => {
|
|
90
|
+
if (window.confirm(globalThis.ccdxLanguage.format("Clear inactive Codex conversation data? Older continuation IDs may stop working."))) void change({ action: "history_clean" }, el("clean-history"));
|
|
91
|
+
});
|
|
92
|
+
el("fix-prediction").addEventListener("click", () => void change({ action: "prediction_fix" }, el("fix-prediction")));
|
|
93
|
+
for (const operation of ["on", "off"]) el(`m365-${operation}`).addEventListener("click", () => void change({ action: "provider", operation }, el(`m365-${operation}`)));
|
|
94
|
+
async function loadSourceModels() {
|
|
95
|
+
const generation = ++sourceGeneration;
|
|
96
|
+
const m365 = el("source-provider").value === "m365";
|
|
97
|
+
el("source-model").disabled = el("source-review").disabled = !m365;
|
|
98
|
+
if (!m365) { el("apply-source").disabled = settingsPending;return; }
|
|
99
|
+
el("apply-source").disabled = true;
|
|
100
|
+
el("source-model").replaceChildren();el("source-review").replaceChildren();
|
|
101
|
+
try {
|
|
102
|
+
const response = await fetch("/_ccdx/ui/models/live?provider=m365", { headers: { "X-CCDX-Dashboard": "1" }, cache: "no-store", signal: AbortSignal.timeout(15000) });
|
|
103
|
+
const data = await response.json();if (!response.ok) throw new Error(data.error);
|
|
104
|
+
if (generation !== sourceGeneration) return;
|
|
105
|
+
const models = data.models.filter(model => model.selectable && model.clients.includes("codex"));
|
|
106
|
+
for (const [id, list] of [["source-model", models], ["source-review", models.filter(model => model.reasoning_efforts?.includes("low"))]]) {
|
|
107
|
+
el(id).replaceChildren(...list.map(model => { const option = document.createElement("option");option.value = model.id;option.textContent = model.id;return option; }));
|
|
108
|
+
const saved = settings?.providers?.m365?.preference?.[id === "source-model" ? "model" : "auto_review_model"];
|
|
109
|
+
if (!sourceDirty && saved && list.some(model => model.id === saved)) el(id).value = saved;
|
|
110
|
+
}
|
|
111
|
+
el("apply-source").disabled = !el("source-model").value || !el("source-review").value;
|
|
112
|
+
} catch (error) { if (generation === sourceGeneration) el("source-control-note").textContent = error.message; }
|
|
113
|
+
}
|
|
114
|
+
el("source-provider").addEventListener("change", () => { sourceDirty = true;void loadSourceModels(); });
|
|
115
|
+
for (const id of ["source-model", "source-review"]) el(id).addEventListener("change", () => { sourceDirty = true; });
|
|
116
|
+
el("apply-source").addEventListener("click", () => {
|
|
117
|
+
const provider = el("source-provider").value;
|
|
118
|
+
void change({ action: "provider", operation: "switch", provider, ...(provider === "m365" ? { model: el("source-model").value, auto_review_model: el("source-review").value } : {}) }, el("apply-source"));
|
|
119
|
+
});
|
|
120
|
+
// Only the small in-memory status snapshot is read at this cadence. Catalogs
|
|
121
|
+
// and retained usage keep their existing on-demand, bounded refresh policy.
|
|
122
|
+
function schedule() {
|
|
123
|
+
clearTimeout(timer);if (stopped) return;
|
|
124
|
+
timer = setTimeout(async () => {
|
|
125
|
+
if (document.visibilityState === "visible" && dashboardRefresh.automatic) {
|
|
126
|
+
await dashboardRefresh.refresh("status", { force: true });
|
|
127
|
+
if (++ticks % 8 === 0) {
|
|
128
|
+
await dashboardRefresh.refresh("auth", { force: true });
|
|
129
|
+
if (["codex", "models", "system"].includes(current)) await loadSettings();
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
schedule();
|
|
133
|
+
}, 2000);
|
|
134
|
+
}
|
|
135
|
+
window.addEventListener("hashchange", navigate);
|
|
136
|
+
el("refresh").addEventListener("click", () => { if (["codex", "models", "system"].includes(current)) void loadSettings(); });
|
|
137
|
+
window.addEventListener("pagehide", () => { stopped = true;clearTimeout(timer); });
|
|
138
|
+
window.addEventListener("pageshow", () => { stopped = false;schedule(); });
|
|
139
|
+
el("open-animation").addEventListener("click", () => { location.hash = "system";navigate(); });
|
|
140
|
+
navigate();schedule();
|
|
141
|
+
})();
|
package/src/dashboard/index.html
CHANGED
|
@@ -12,82 +12,120 @@
|
|
|
12
12
|
<script src="/status.js" defer></script>
|
|
13
13
|
<script src="/usage.js" defer></script>
|
|
14
14
|
<script src="/ui.js" defer></script>
|
|
15
|
+
<script src="/console.js" defer></script>
|
|
15
16
|
<title data-i18n>CCDX · Local dashboard</title>
|
|
16
17
|
</head>
|
|
17
18
|
<body>
|
|
18
19
|
<div class="shell">
|
|
20
|
+
<aside class="sidebar">
|
|
21
|
+
<a class="sidebar-brand" href="#overview">CCDX<span data-i18n>LOCAL CONTROL</span></a>
|
|
22
|
+
<nav aria-label="Main navigation" data-i18n-label>
|
|
23
|
+
<a href="#overview" data-route="overview" aria-current="page" data-i18n>Overview</a>
|
|
24
|
+
<span class="nav-group" data-i18n>Clients</span>
|
|
25
|
+
<a href="#codex" data-route="codex">Codex</a>
|
|
26
|
+
<a href="#claude" data-route="claude">Claude</a>
|
|
27
|
+
<a href="#models" data-route="models" data-i18n>Model services</a>
|
|
28
|
+
<a href="#usage" data-route="usage" data-i18n>Usage and diagnostics</a>
|
|
29
|
+
<a href="#system" data-route="system" data-i18n>System and settings</a>
|
|
30
|
+
</nav>
|
|
31
|
+
<div class="sidebar-bottom"><button id="open-animation" type="button" aria-controls="animation-settings" aria-expanded="false" data-i18n>Terminal appearance</button><p data-i18n>Local service. Client-specific capabilities stay with their client.</p></div>
|
|
32
|
+
</aside>
|
|
33
|
+
|
|
19
34
|
<header class="topbar">
|
|
20
35
|
<div class="brand">CCDX <span class="brand-detail" data-i18n>/ LOCAL STATUS</span></div>
|
|
21
|
-
<div class="topbar-actions"><span id="connection" class="badge neutral" role="status" data-i18n>READING</span><button id="theme-toggle" class="icon-button" type="button" aria-label="Switch to light mode" title="Switch to light mode"><svg class="icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="4"/><path d="M12 2v2m0 16v2M4.93 4.93l1.42 1.42m11.3 11.3 1.42 1.42M2 12h2m16 0h2M4.93 19.07l1.42-1.42m11.3-11.3 1.42-1.42"/></svg><svg class="icon-moon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false"><path d="M12 3A9 9 0 1 0 21 12 7 7 0 0 1 12 3Z"/></svg></button><button id="language-toggle" class="icon-button language-button" type="button" aria-label="Switch to Chinese" title="Switch to Chinese">中文</button><button id="
|
|
36
|
+
<div class="topbar-actions"><span id="connection" class="badge neutral" role="status" data-i18n>READING</span><button id="theme-toggle" class="icon-button" type="button" aria-label="Switch to light mode" title="Switch to light mode"><svg class="icon-sun" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" aria-hidden="true" focusable="false"><circle cx="12" cy="12" r="4"/><path d="M12 2v2m0 16v2M4.93 4.93l1.42 1.42m11.3 11.3 1.42 1.42M2 12h2m16 0h2M4.93 19.07l1.42-1.42m11.3-11.3 1.42-1.42"/></svg><svg class="icon-moon" viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" focusable="false"><path d="M12 3A9 9 0 1 0 21 12 7 7 0 0 1 12 3Z"/></svg></button><button id="language-toggle" class="icon-button language-button" type="button" aria-label="Switch to Chinese" title="Switch to Chinese">中文</button><button id="auto-refresh" type="button" aria-pressed="true" data-i18n data-i18n-title title="Visible status updates every 2 seconds. Catalogs and retained usage refresh on demand or every 30 minutes while open.">Auto refresh</button><button id="refresh" type="button" data-i18n>Refresh</button></div>
|
|
22
37
|
</header>
|
|
23
38
|
|
|
24
|
-
<main>
|
|
39
|
+
<main id="main-content" tabindex="-1">
|
|
25
40
|
<section class="intro">
|
|
26
|
-
<h1><svg id="status-icon" class="status-icon" viewBox="0 0 64 64" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round"><ellipse cx="32" cy="32" rx="26" ry="10"/><ellipse cx="32" cy="32" rx="26" ry="10" transform="rotate(60 32 32)"/><ellipse cx="32" cy="32" rx="26" ry="10" transform="rotate(120 32 32)"/></g><circle cx="32" cy="32" r="4.5" fill="currentColor"/></svg>
|
|
27
|
-
<div class="snapshot-meta"><p id="auth-account" role="status" data-i18n data-i18n-title title="
|
|
41
|
+
<h1><svg id="status-icon" class="status-icon" viewBox="0 0 64 64" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round"><ellipse cx="32" cy="32" rx="26" ry="10"/><ellipse cx="32" cy="32" rx="26" ry="10" transform="rotate(60 32 32)"/><ellipse cx="32" cy="32" rx="26" ry="10" transform="rotate(120 32 32)"/></g><circle cx="32" cy="32" r="4.5" fill="currentColor"/></svg> <span id="page-title" data-i18n>Overview</span></h1>
|
|
42
|
+
<div class="snapshot-meta"><p id="auth-account" role="status" data-i18n data-i18n-title title="Provider status / authorization and inference are separate.">READING</p><p id="updated" data-i18n>Reading status…</p></div>
|
|
43
|
+
<p id="page-settings-note" class="hint" role="status"></p>
|
|
28
44
|
</section>
|
|
29
45
|
|
|
30
|
-
<section class="overview" aria-label="Overview" data-i18n-label>
|
|
31
|
-
<article class="card"><h2 data-i18n>ADAPTER</h2><strong id="version">—</strong><p id="uptime">—</p></article>
|
|
32
|
-
<article class="card"><h2>Copilot</h2><strong id="copilot">—</strong><p id="token">—</p></article>
|
|
33
|
-
<article class="card"><h2 data-i18n>KNOWN MODELS</h2><strong id="models">—</strong><p id="model-source">—</p></article>
|
|
34
|
-
<article class="card"><h2 data-i18n>REQUESTS</h2><strong id="requests">—</strong><p id="request-errors">—</p><p id="http-error-breakdown">—</p><p><span data-i18n>Per-request limits (active)</span><br><span id="body-limits">—</span></p></article>
|
|
35
|
-
</section>
|
|
36
46
|
|
|
37
|
-
<
|
|
38
|
-
|
|
47
|
+
<div data-view="overview">
|
|
48
|
+
<section class="overview" aria-label="Overview" data-i18n-label><article class="card"><h2 data-i18n>ADAPTER</h2><strong id="version">—</strong><p id="uptime">—</p></article><article class="card"><h2 data-i18n>SOURCES</h2><strong id="source-summary">—</strong><p id="source-detail">—</p></article></section>
|
|
49
|
+
<details class="panel dashboard-section" id="client-features" open>
|
|
50
|
+
<summary class="panel-heading"><h2 data-i18n>CLIENT CONNECTIONS</h2><span data-i18n>CONFIGURATION + OBSERVATION</span></summary>
|
|
51
|
+
<div class="table-wrap"><table><thead><tr><th data-i18n>Source</th><th data-i18n>CLIENT</th><th data-i18n>STATE</th><th data-i18n>GATEWAY</th><th data-i18n>LAST REQUEST</th></tr></thead><tbody id="provider-clients"></tbody></table></div>
|
|
52
|
+
<div id="provider-requests" class="hint"></div>
|
|
53
|
+
</details>
|
|
54
|
+
<section class="panel dashboard-section"><h2 data-i18n>THIS RUN USAGE</h2><p id="runtime-usage" class="table-note"></p><p class="hint" data-i18n>Updated from returned usage, not a live bill. Pending usage is not included.</p></section>
|
|
55
|
+
</div>
|
|
56
|
+
<div data-view="codex" hidden>
|
|
57
|
+
<section class="overview client-overview"><article class="card"><h2 data-i18n>CODEX MODELS</h2><strong id="models">—</strong><p id="model-source">—</p></article></section>
|
|
58
|
+
<details class="panel dashboard-section" id="runtime-resources" open>
|
|
59
|
+
<summary data-i18n>CODEX CONVERSATIONS</summary>
|
|
60
|
+
<div class="details"><article class="panel">
|
|
39
61
|
<div class="panel-heading"><h2 data-i18n>MODEL OUTCOMES</h2><span>RESPONSES</span></div>
|
|
40
62
|
<dl class="stats"><div><dt data-i18n>Completed</dt><dd id="completed">—</dd></div><div><dt data-i18n>Incomplete</dt><dd id="incomplete">—</dd></div><div><dt data-i18n>Failed</dt><dd id="failed">—</dd></div><div><dt data-i18n>Cancelled</dt><dd id="cancelled">—</dd></div></dl>
|
|
41
63
|
<p class="hint" data-i18n>HTTP 2xx != model completed.</p>
|
|
42
64
|
<dl class="stats timing-stats"><div><dt data-i18n>First output</dt><dd id="ttft">—</dd></div><div><dt data-i18n>Output speed</dt><dd id="tpot">—</dd></div></dl>
|
|
43
|
-
<p class="hint" data-i18n>
|
|
44
|
-
</article>
|
|
45
|
-
|
|
46
|
-
<div class="panel-heading"><h2 data-i18n>LOCAL HISTORY</h2><span data-i18n>ACTIVE LIMIT</span></div>
|
|
65
|
+
<p class="hint" data-i18n>Codex Responses timing since startup. Output speed is estimated.</p>
|
|
66
|
+
</article><article class="panel">
|
|
67
|
+
<div class="panel-heading"><h2 data-i18n>CODEX CONVERSATION BUFFER</h2><span data-i18n>ACTIVE LIMIT</span></div>
|
|
47
68
|
<strong id="history">—</strong><progress id="history-meter" class="meter" max="100" value="0" aria-label="History cache usage" data-i18n-label></progress>
|
|
48
69
|
<p id="history-detail" class="hint">—</p>
|
|
49
|
-
</article>
|
|
70
|
+
</article></div>
|
|
71
|
+
<p class="hint" data-i18n>Temporary local data for Responses continuation, not a conversation archive.</p>
|
|
72
|
+
<div class="section-actions"><label><span data-i18n>Buffer limit MiB</span> <input id="history-limit" type="number" min="1" max="65536" step="1"></label><button id="save-history" type="button" data-i18n>Apply limit</button><button id="clean-history" type="button" data-i18n>Clear inactive buffer</button></div>
|
|
73
|
+
<p id="effect-history" class="hint" role="status"></p>
|
|
74
|
+
</details>
|
|
75
|
+
<details class="panel dashboard-section" id="prediction-settings" open>
|
|
76
|
+
<summary class="panel-heading"><h2 data-i18n>CODEX INPUT PREDICTIONS</h2><span data-i18n>CODEX ONLY</span></summary>
|
|
77
|
+
<dl class="stats"><div><dt data-i18n>Prediction integration setup</dt><dd id="prediction-preference">—</dd></div><div><dt data-i18n>Local bridge</dt><dd id="prediction-bridge">—</dd></div><div><dt data-i18n>Client route</dt><dd id="prediction-route">—</dd></div><div><dt data-i18n>Visible candidate</dt><dd id="prediction-candidate">—</dd></div></dl>
|
|
78
|
+
<p id="prediction-note" class="hint">—</p>
|
|
79
|
+
<p class="hint" data-i18n>Configured does not mean displayed. Use ccdx prediction status for details.</p>
|
|
80
|
+
<div class="setting-row"><label for="setting-prediction_enabled" data-i18n>Allow prediction configuration</label><input id="setting-prediction_enabled" type="checkbox" role="switch" disabled><span id="effect-prediction_enabled" class="hint" role="status"></span></div>
|
|
81
|
+
<div class="section-actions"><button id="fix-prediction" type="button" data-i18n>Check and repair</button></div>
|
|
82
|
+
<p class="hint" data-i18n>Pause keeps the existing trust and route. Codex may retain cached suggestions. First-time setup: quit Codex, then ccdx prediction on.</p>
|
|
83
|
+
</details>
|
|
84
|
+
<details class="panel dashboard-section" id="additional-capabilities">
|
|
85
|
+
<summary data-i18n>CODEX IMAGE GENERATION</summary>
|
|
50
86
|
<article class="panel">
|
|
51
|
-
<div class="panel-heading"><h2 data-i18n>
|
|
87
|
+
<div class="panel-heading"><h2 data-i18n>Image service</h2><span data-i18n>CODEX ONLY</span></div>
|
|
52
88
|
<strong id="image">—</strong><p id="image-detail" class="hint">—</p>
|
|
53
89
|
</article>
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
<strong id="m365-state">—</strong>
|
|
57
|
-
<p id="m365-account" class="hint">—</p>
|
|
58
|
-
<p id="m365-models" class="hint">—</p>
|
|
59
|
-
<p id="m365-claude" class="hint">—</p>
|
|
60
|
-
<p id="m365-requests" class="hint">—</p>
|
|
61
|
-
<p id="m365-clients" class="hint">—</p>
|
|
62
|
-
<p id="m365-codex" class="hint">—</p>
|
|
63
|
-
</article>
|
|
64
|
-
</section>
|
|
65
|
-
|
|
66
|
-
<details class="panel dashboard-section" id="client-features" open>
|
|
67
|
-
<summary class="panel-heading"><h2 data-i18n>CLIENT FEATURES</h2><span data-i18n>OBSERVED STATE</span></summary>
|
|
68
|
-
<dl class="stats"><div><dt data-i18n>Native predictions</dt><dd id="prediction-preference">—</dd></div><div><dt data-i18n>Local bridge</dt><dd id="prediction-bridge">—</dd></div><div><dt data-i18n>Client route</dt><dd id="prediction-route">—</dd></div><div><dt data-i18n>Visible candidate</dt><dd id="prediction-candidate">—</dd></div></dl>
|
|
69
|
-
<p id="prediction-note" class="hint">—</p>
|
|
70
|
-
<p class="hint" data-i18n>Configured does not mean displayed. Use ccdx prediction status for details.</p>
|
|
90
|
+
<div class="setting-row"><label for="setting-image_enabled" data-i18n>Allow new image calls</label><input id="setting-image_enabled" type="checkbox" role="switch" disabled><span id="effect-image_enabled" class="hint" role="status"></span></div>
|
|
91
|
+
<p class="hint" data-i18n>Pause keeps the provider configuration. Running calls can finish. First-time setup: ccdx enable-image.</p>
|
|
71
92
|
</details>
|
|
72
|
-
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
<
|
|
76
|
-
<
|
|
77
|
-
<p class="hint"
|
|
93
|
+
</div>
|
|
94
|
+
<div data-view="claude" hidden>
|
|
95
|
+
<section class="panel dashboard-section" aria-labelledby="claude-heading">
|
|
96
|
+
<div class="panel-heading"><h2 id="claude-heading">Claude App / Claude Code</h2><span>ANTHROPIC MESSAGES</span></div>
|
|
97
|
+
<p id="claude-route" class="table-note"></p>
|
|
98
|
+
<p id="claude-client-state" class="hint"></p>
|
|
99
|
+
<dl class="stats"><div><dt data-i18n>Completed</dt><dd id="claude-completed">—</dd></div><div><dt data-i18n>Incomplete</dt><dd id="claude-incomplete">—</dd></div><div><dt data-i18n>Failed</dt><dd id="claude-failed">—</dd></div><div><dt data-i18n>Cancelled</dt><dd id="claude-cancelled">—</dd></div><div><dt data-i18n>First output</dt><dd id="claude-ttft">—</dd></div><div><dt data-i18n>Output speed</dt><dd id="claude-speed">—</dd></div></dl>
|
|
100
|
+
<p class="hint" data-i18n>Since this service started. Configuration, authorization, model discovery and successful inference are separate evidence.</p>
|
|
101
|
+
</section>
|
|
102
|
+
</div>
|
|
103
|
+
<div data-view="models" hidden>
|
|
104
|
+
<details class="panel dashboard-section" id="account-authorization">
|
|
105
|
+
<summary class="panel-heading"><h2 data-i18n>ACCOUNT AUTHORIZATION</h2><span data-i18n>BY PROVIDER</span></summary>
|
|
106
|
+
<p class="hint" data-i18n>Saved credentials, authorization, model access and client requests are separate evidence.</p>
|
|
107
|
+
<div class="table-wrap"><table><thead><tr><th data-i18n>Source</th><th data-i18n>ACCOUNT</th><th data-i18n>AUTHORIZATION</th><th data-i18n>SERVICE</th><th data-i18n>LAST VERIFIED</th><th>TTL</th></tr></thead><tbody id="provider-auth"></tbody></table></div>
|
|
78
108
|
</details>
|
|
79
|
-
|
|
80
109
|
<details class="panel dashboard-section" id="upstream-models" open>
|
|
81
|
-
<summary class="panel-heading"><h2 data-i18n>
|
|
110
|
+
<summary class="panel-heading"><h2 data-i18n>MODEL CATALOG</h2><span id="models-state" data-i18n>CHECKING LIVE</span></summary>
|
|
111
|
+
<div id="model-providers" class="provider-tabs" role="tablist" aria-label="Model providers" data-i18n-label></div>
|
|
82
112
|
<div class="section-actions"><button id="refresh-models" type="button" data-i18n>Refresh</button></div>
|
|
83
|
-
<p id="models-note" class="table-note" data-i18n>
|
|
84
|
-
<div class="table-wrap"><table><thead><tr><th scope="col" data-i18n>MODEL</th><th scope="col" data-i18n>VENDOR</th><th scope="col" data-i18n>API</th><th scope="col" data-i18n>
|
|
113
|
+
<p id="models-note" class="table-note" data-i18n>Reading provider catalog…</p>
|
|
114
|
+
<div class="table-wrap"><table><thead><tr><th scope="col" data-i18n>MODEL</th><th scope="col" data-i18n>VENDOR</th><th scope="col" data-i18n>API</th><th scope="col" data-i18n>CLIENT</th><th scope="col" data-i18n>REASONING</th><th scope="col" data-i18n>STATE</th></tr></thead><tbody id="live-models-body" role="tabpanel"><tr><td colspan="6" data-i18n>Loading…</td></tr></tbody></table></div>
|
|
85
115
|
<p class="hint" data-i18n>Catalog listing does not guarantee inference access.</p>
|
|
86
116
|
</details>
|
|
87
|
-
|
|
117
|
+
<section class="panel dashboard-section" aria-labelledby="routing-heading">
|
|
118
|
+
<h2 id="routing-heading" data-i18n>CODEX MODEL SOURCE</h2>
|
|
119
|
+
<p class="hint" data-i18n>Catalog tabs only change the view. Apply explicitly to change the source for future Codex requests.</p>
|
|
120
|
+
<div class="section-actions"><label><span data-i18n>Source</span> <select id="source-provider"><option value="github">GitHub Copilot</option><option value="m365">Microsoft 365</option></select></label><label><span data-i18n>Model</span> <select id="source-model" disabled></select></label><label><span data-i18n>Auto-review model</span> <select id="source-review" disabled></select></label><button id="apply-source" type="button" data-i18n>Apply source</button></div>
|
|
121
|
+
<div class="section-actions"><span>Microsoft 365</span><button id="m365-on" type="button" data-i18n>Enable service</button><button id="m365-off" type="button" data-i18n>Disable service</button></div>
|
|
122
|
+
<p id="source-control-note" class="hint" role="status"></p>
|
|
123
|
+
</section>
|
|
124
|
+
</div>
|
|
125
|
+
<div data-view="usage" hidden>
|
|
88
126
|
<details class="panel dashboard-section" id="model-usage" open>
|
|
89
127
|
<summary class="panel-heading"><h2 data-i18n>USAGE</h2><span id="usage-state" data-i18n>READING LOG</span></summary>
|
|
90
|
-
<div class="section-actions"><label><span data-i18n>Source</span> <select id="usage-provider"><option value="" data-i18n>All providers</option
|
|
128
|
+
<div class="section-actions"><label><span data-i18n>Source</span> <select id="usage-provider"><option value="" data-i18n>All providers</option></select></label><button id="clear-usage-day" type="button" hidden data-i18n>All history</button><button id="refresh-usage" type="button" data-i18n>Refresh</button></div>
|
|
91
129
|
<p id="usage-note" class="table-note" data-i18n>Aggregating local usage metadata…</p>
|
|
92
130
|
<div class="table-wrap"><table class="usage-table"><thead><tr><th scope="col" data-i18n>MODEL</th><th scope="col" data-i18n>CALLS</th><th scope="col" data-i18n>INPUT</th><th scope="col" data-i18n>CACHE READ</th><th scope="col" data-i18n>OUTPUT</th><th scope="col" data-i18n>TOTAL</th><th scope="col" data-i18n>CACHE HIT</th></tr></thead><tbody id="usage-body"><tr><td colspan="7" data-i18n>Loading…</td></tr></tbody></table></div>
|
|
93
131
|
<p class="hint" data-i18n>Cache hit = recorded cached / input tokens. ~ = incomplete history. — = unavailable or invalid counts.</p>
|
|
@@ -109,20 +147,35 @@
|
|
|
109
147
|
<p id="analytics-selection" class="hint" role="status" data-i18n>Select a day to inspect its model totals. No history is distinct from zero recorded calls.</p>
|
|
110
148
|
</details>
|
|
111
149
|
</details>
|
|
112
|
-
|
|
113
150
|
<details class="lower" id="recent-failures" open>
|
|
114
|
-
<summary class="panel-heading"><h2 data-i18n>RECENT
|
|
151
|
+
<summary class="panel-heading"><h2 data-i18n>RECENT INFERENCE + HTTP FAILURES</h2><span id="failure-count">requests + events</span></summary>
|
|
115
152
|
<ol id="failures"><li class="empty" data-i18n>Reading…</li></ol>
|
|
116
153
|
<p class="hint" data-i18n>Upstream messages may contain sensitive text.</p>
|
|
117
154
|
</details>
|
|
118
|
-
|
|
155
|
+
<details class="panel dashboard-section" id="request-context">
|
|
156
|
+
<summary data-i18n>RECENT REQUEST CONTEXT</summary>
|
|
157
|
+
<p id="context-note" class="table-note">—</p>
|
|
158
|
+
<div class="table-wrap"><table><thead><tr><th scope="col" data-i18n>MODEL</th><th scope="col" data-i18n>WIRE MiB</th><th scope="col" data-i18n>IMAGES</th><th scope="col" data-i18n>INPUT TOKENS</th><th scope="col" data-i18n>MODEL WINDOW</th><th scope="col" data-i18n>INPUT / WINDOW</th><th scope="col" data-i18n>OUTCOME</th></tr></thead><tbody id="context-body"><tr><td colspan="7" data-i18n>No observed request metadata.</td></tr></tbody></table></div>
|
|
159
|
+
<p class="hint" data-i18n>Recent upstream request metadata, not exact live session occupancy. Missing values are unknown. No prompt or image content is retained.</p>
|
|
160
|
+
</details>
|
|
161
|
+
</div>
|
|
162
|
+
<div data-view="system" hidden>
|
|
163
|
+
<section class="panel dashboard-section"><h2 data-i18n>PROCESS + LISTENER</h2><p id="process-state" class="table-note"></p><p id="process-memory" class="hint"></p><p id="process-queues" class="hint"></p><p id="process-notice" class="hint" role="status"></p></section>
|
|
164
|
+
<section class="overview client-overview"><article class="card"><h2 data-i18n>HTTP TRAFFIC</h2><strong id="requests">—</strong><p id="request-errors">—</p><p id="http-error-breakdown">—</p><p><span data-i18n>Per-request limits (active)</span><br><span id="body-limits">—</span></p></article></section>
|
|
165
|
+
<section class="panel dashboard-section" aria-labelledby="settings-heading">
|
|
166
|
+
<h2 id="settings-heading" data-i18n>SERVICE SETTINGS</h2>
|
|
167
|
+
<p class="hint" data-i18n>Saved preference and effective state are separate. Environment overrides and client restarts are shown explicitly.</p>
|
|
168
|
+
<div class="setting-row"><label for="setting-terminal_animation_enabled" data-i18n>Terminal animation</label><input id="setting-terminal_animation_enabled" type="checkbox" role="switch" disabled><span id="effect-terminal_animation_enabled" class="hint" role="status"></span></div>
|
|
169
|
+
<div class="setting-row"><label for="setting-open_webui" data-i18n>Open WebUI at startup</label><input id="setting-open_webui" type="checkbox" role="switch" disabled><span id="effect-open_webui" class="hint" role="status"></span></div>
|
|
170
|
+
<p id="settings-note" class="hint" role="status" data-i18n>Reading settings…</p>
|
|
171
|
+
</section>
|
|
119
172
|
<details id="animation-settings" class="panel dashboard-section settings-panel">
|
|
120
173
|
<summary class="panel-heading"><h2 data-i18n>TERMINAL ANIMATION</h2><span id="animation-state" data-i18n>READING</span></summary>
|
|
121
174
|
<div id="animation-options" class="animation-options" role="group" aria-label="Animation theme" data-i18n-label></div>
|
|
122
|
-
<div class="section-actions"><button id="save-animation" type="button" disabled data-i18n>Save selection</button><span id="animation-note" role="status" data-i18n>Applies
|
|
175
|
+
<div class="section-actions"><button id="save-animation" type="button" disabled data-i18n>Save selection</button><span id="animation-note" role="status" data-i18n>Applies to the running terminal.</span></div>
|
|
123
176
|
</details>
|
|
177
|
+
</div>
|
|
124
178
|
</main>
|
|
125
|
-
|
|
126
179
|
<footer data-i18n>LOCAL ONLY / VISIBLE PAGE UPDATES</footer>
|
|
127
180
|
</div>
|
|
128
181
|
</body>
|