codex-copilot-dx 1.4.20 → 1.4.21
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/docs/REFERENCE.md +2 -0
- package/package.json +1 -1
- package/src/dashboard/index.html +6 -1
- package/src/dashboard/language.js +2 -0
- package/src/dashboard/tool-activity.js +18 -3
- package/src/dashboard/ui.css +24 -0
- package/src/dashboard/ui.js +27 -0
- package/src/dashboard.mjs +2 -2
- package/src/optional-routes.mjs +1 -1
package/docs/REFERENCE.md
CHANGED
|
@@ -286,6 +286,8 @@ The initial internal ceiling is 128 concurrent requests per source/account. This
|
|
|
286
286
|
|
|
287
287
|
Settings separates saved preferences from effective state. Auto-save applies changes by default; required restarts remain explicit. Restore-defaults creates a backup first and keeps accounts, keys, model plans and chats. CLI preference reset/restore uses its own service-only backup; it does not change browser appearance or replace the Web UI's backup.
|
|
288
288
|
|
|
289
|
+
Use the button beside the CCDX wordmark to collapse the sidebar to icons. The browser remembers the layout for this dashboard address. The current page stays selected when the sidebar changes width.
|
|
290
|
+
|
|
289
291
|
**Settings → Bark notifications** is collapsed by default. Enable it and paste the URL containing the device key from Bark. The minimum duration defaults to 30 minutes. Zero includes every eligible completed turn. Leave the title and description blank to use the name of the app that finished. The phone retrieves the matching public PNG from [Lobe Icons](https://github.com/lobehub/lobe-icons).
|
|
290
292
|
|
|
291
293
|
New Bark URLs require HTTPS. Existing HTTP addresses remain usable with a settings warning. If a custom reverse-proxy prefix makes a copied URL ambiguous, use `https://host/prefix/push?device_key=KEY`. CCDX removes the query before sending and passes the key in the push body.
|
package/package.json
CHANGED
package/src/dashboard/index.html
CHANGED
|
@@ -14,8 +14,13 @@
|
|
|
14
14
|
<body>
|
|
15
15
|
<div class="shell">
|
|
16
16
|
<aside class="sidebar">
|
|
17
|
+
<div class="sidebar-header">
|
|
17
18
|
<a class="sidebar-brand" href="#overview"><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 class="brand-name">CCDX</span></a>
|
|
18
|
-
|
|
19
|
+
<button class="icon-button sidebar-toggle" id="sidebar-toggle" type="button" aria-controls="sidebar-navigation" aria-expanded="true" aria-label="Collapse sidebar" title="Collapse sidebar">
|
|
20
|
+
<svg class="nav-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M9 4v16"/><path class="sidebar-chevron" d="m16 9-3 3 3 3"/></svg>
|
|
21
|
+
</button>
|
|
22
|
+
</div>
|
|
23
|
+
<nav id="sidebar-navigation" aria-label="Navigation" data-i18n-label="main_navigation">
|
|
19
24
|
<a href="#overview" data-route="overview" aria-current="page"><svg class="nav-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="3" y="3" width="7" height="7" rx="1"/><rect x="14" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><rect x="14" y="14" width="7" height="7" rx="1"/></svg><span data-i18n="overview">Overview</span></a>
|
|
20
25
|
<span class="nav-group" data-i18n="clients">Apps</span>
|
|
21
26
|
<a class="nav-child" href="#codex" data-route="codex"><svg class="nav-icon" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><rect x="3" y="3" width="18" height="18" rx="2"/><path d="m7 8 4 4-4 4m7 0h3"/></svg><span>Codex</span></a>
|
|
@@ -963,6 +963,8 @@
|
|
|
963
963
|
"usage_and_diagnostics": ["Usage", "用量统计"],
|
|
964
964
|
"system_and_settings": ["Settings", "设置"],
|
|
965
965
|
"main_navigation": ["Navigation", "页面导航"],
|
|
966
|
+
"sidebar_collapse": ["Collapse sidebar", "收起侧栏"],
|
|
967
|
+
"sidebar_expand": ["Expand sidebar", "展开侧栏"],
|
|
966
968
|
"local_control": ["LOCAL CONTROL", "本机控制"],
|
|
967
969
|
"terminal_appearance": ["Terminal appearance", "终端外观"],
|
|
968
970
|
"configuration_observation": ["SETUP AND ACTIVITY", "接入状态"],
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
const phrase = (key, values = {}) => globalThis.ccdxLanguage.format(key, values);
|
|
7
7
|
const text = (id, key, values) => globalThis.ccdxLanguage.set(el(id), key, values);
|
|
8
8
|
const state = { scene: "idle", style: "production" };
|
|
9
|
-
const
|
|
9
|
+
const dashboardScript = document.currentScript.src;
|
|
10
|
+
let drawMachine, machineRequested = false;
|
|
10
11
|
try { const saved = localStorage.getItem(storageKey);if (styles.has(saved)) state.style = saved; } catch {}
|
|
11
12
|
const motion = globalThis.matchMedia?.("(prefers-reduced-motion: reduce)") || { matches: false, addEventListener() {} };
|
|
12
13
|
let records = [], fresh = false, supported = false, visible = true, raf = 0, last = 0, start = performance.now(), expiry = null;
|
|
@@ -39,10 +40,23 @@
|
|
|
39
40
|
}
|
|
40
41
|
function refreshAnimation() {
|
|
41
42
|
cancelAnimationFrame(raf);raf = 0;
|
|
42
|
-
root.dataset.paused = String(!shown() || motion.matches || !animating() || state.style === "off");
|
|
43
|
-
if (!shown() || state.style === "off") return;
|
|
43
|
+
root.dataset.paused = String(!drawMachine || !shown() || motion.matches || !animating() || state.style === "off");
|
|
44
|
+
if (!shown() || state.style === "off" || !drawMachine) return;
|
|
44
45
|
draw();if (!motion.matches && animating()) raf = requestAnimationFrame(animate);
|
|
45
46
|
}
|
|
47
|
+
function loadMachine() {
|
|
48
|
+
if (!ctx || state.style === "off" || machineRequested) return;
|
|
49
|
+
machineRequested = true;
|
|
50
|
+
const asset = new URL(dashboardScript);
|
|
51
|
+
asset.pathname = "/tool-activity-machines.js";
|
|
52
|
+
const script = document.createElement("script");
|
|
53
|
+
script.src = asset.href;
|
|
54
|
+
script.addEventListener("load", () => {
|
|
55
|
+
drawMachine = globalThis.ccdxToolMachines(ctx);
|
|
56
|
+
refreshAnimation();
|
|
57
|
+
}, { once: true });
|
|
58
|
+
document.head.append(script);
|
|
59
|
+
}
|
|
46
60
|
function category(name) {
|
|
47
61
|
const value = String(name || "").toLowerCase().split(/__|\./).at(-1);
|
|
48
62
|
if (["read_file", "readfile", "view_file", "open_file", "get_file_content"].includes(value)) return "tool_action_read";
|
|
@@ -56,6 +70,7 @@
|
|
|
56
70
|
const sourceName = id => id === "github" ? "GitHub Copilot" : id === "m365" ? "Microsoft 365" : id === "google" ? "Google" : globalThis.ccdxConnectionNames?.[id] || phrase("flow_source_unknown");
|
|
57
71
|
function render(force = false) {
|
|
58
72
|
if (root.closest("[hidden]")) { signature = "";refreshAnimation();return; }
|
|
73
|
+
loadMachine();
|
|
59
74
|
const time = performance.now();
|
|
60
75
|
if (requestDeadline && time >= requestDeadline) { requests = [];requestDeadline = 0;fresh = false; }
|
|
61
76
|
for (const row of records) if (row.until <= time && pending(row.state)) { row.state = "unknown";row.until = time + 300000; }
|
package/src/dashboard/ui.css
CHANGED
|
@@ -238,8 +238,12 @@ footer { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; color:
|
|
|
238
238
|
[hidden] { display: none !important; }
|
|
239
239
|
.shell { max-width: 1520px; min-height: 100vh; display: grid; grid-template-columns: 204px minmax(0, 1fr); grid-template-rows: 64px minmax(0, 1fr) auto; column-gap: 34px; padding: 0 28px; }
|
|
240
240
|
.sidebar { grid-row: 1 / 4; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 28px 22px 24px 0; border-right: 1px solid var(--border); }
|
|
241
|
+
.sidebar-header { display: flex; align-items: center; gap: 12px; min-height: 44px; }
|
|
241
242
|
.sidebar-brand { display: grid; grid-template-columns: 44px minmax(0, 1fr); align-items: center; column-gap: 12px; color: var(--accent); text-decoration: none; font-size: 23px; font-weight: 750; letter-spacing: .04em; }
|
|
242
243
|
.sidebar-brand > .status-icon, .sidebar-brand > .brand-name { grid-row: 1; }
|
|
244
|
+
.sidebar-toggle { color: var(--accent); }
|
|
245
|
+
.sidebar-toggle:hover { background: var(--option-hover); }
|
|
246
|
+
.sidebar-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
|
243
247
|
|
|
244
248
|
.sidebar nav { display: flex; flex-direction: column; gap: 5px; margin-top: 28px; }
|
|
245
249
|
.sidebar nav a { color: var(--muted); text-decoration: none; padding: 8px 12px; font-size: 13px; border-left: 2px solid transparent; }
|
|
@@ -321,6 +325,26 @@ input[role="switch"]:disabled { opacity: .5; cursor: wait; }
|
|
|
321
325
|
.section-actions > label { flex: 1 1 180px; }
|
|
322
326
|
.section-actions select { max-width: 100%; }
|
|
323
327
|
}
|
|
328
|
+
@media (min-width: 641px) and (max-width: 900px) {
|
|
329
|
+
.sidebar-header { gap: 8px; }
|
|
330
|
+
.sidebar-brand { column-gap: 8px; font-size: 21px; }
|
|
331
|
+
}
|
|
332
|
+
[data-sidebar-collapsed] .shell { grid-template-columns: 64px minmax(0, 1fr); column-gap: 20px; }
|
|
333
|
+
[data-sidebar-collapsed] .sidebar { padding-inline-end: 8px; }
|
|
334
|
+
[data-sidebar-collapsed] .sidebar-header { justify-content: center; }
|
|
335
|
+
[data-sidebar-collapsed] :is(.sidebar-brand, .nav-group) { display: none; }
|
|
336
|
+
[data-sidebar-collapsed] .sidebar-chevron { transform: scaleX(-1); transform-origin: 14.5px 12px; }
|
|
337
|
+
[data-sidebar-collapsed] .sidebar nav a { position: relative; justify-content: center; gap: 0; padding-inline: 0; min-height: 36px; border-inline-end: 2px solid transparent; }
|
|
338
|
+
[data-sidebar-collapsed] .sidebar nav a > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
|
339
|
+
@media (max-width: 640px) {
|
|
340
|
+
[data-sidebar-collapsed] .sidebar { padding-inline-end: 0; }
|
|
341
|
+
[data-sidebar-collapsed] .sidebar-header { justify-content: flex-start; }
|
|
342
|
+
[data-sidebar-collapsed] .sidebar nav a { width: 36px; }
|
|
343
|
+
}
|
|
344
|
+
@media (pointer: coarse) {
|
|
345
|
+
.sidebar-toggle { min-width: 44px; min-height: 44px; }
|
|
346
|
+
[data-sidebar-collapsed] .sidebar nav a { min-width: 44px; min-height: 44px; }
|
|
347
|
+
}
|
|
324
348
|
|
|
325
349
|
/* Independent color palettes; green remains the unchanged default. */
|
|
326
350
|
:root[data-palette="klein"][data-theme="light"] {
|
package/src/dashboard/ui.js
CHANGED
|
@@ -58,6 +58,33 @@ element("refresh").addEventListener("click", () => {
|
|
|
58
58
|
});
|
|
59
59
|
document.querySelector(".sidebar-brand").addEventListener("click", animateLogo);
|
|
60
60
|
|
|
61
|
+
const sidebarPreference = "ccdx.dashboard.sidebar";
|
|
62
|
+
const sidebarToggle = element("sidebar-toggle");
|
|
63
|
+
const sidebarLinks = element("sidebar-navigation").querySelectorAll("a");
|
|
64
|
+
function setSidebarCollapsed(collapsed) {
|
|
65
|
+
if (collapsed) document.documentElement.dataset.sidebarCollapsed = "true";
|
|
66
|
+
else delete document.documentElement.dataset.sidebarCollapsed;
|
|
67
|
+
sidebarToggle.setAttribute("aria-expanded", String(!collapsed));
|
|
68
|
+
const label = collapsed ? "sidebar_expand" : "sidebar_collapse";
|
|
69
|
+
localize(sidebarToggle, label, {}, "aria-label");
|
|
70
|
+
localize(sidebarToggle, label, {}, "title");
|
|
71
|
+
for (const link of sidebarLinks) {
|
|
72
|
+
const name = link.querySelector("span");
|
|
73
|
+
localize(link, collapsed ? name.dataset.i18n || name.textContent : "", {}, "title");
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
try { setSidebarCollapsed(localStorage.getItem(sidebarPreference) === "collapsed"); }
|
|
77
|
+
catch { setSidebarCollapsed(false); }
|
|
78
|
+
sidebarToggle.addEventListener("click", () => {
|
|
79
|
+
const collapsed = sidebarToggle.getAttribute("aria-expanded") === "true";
|
|
80
|
+
setSidebarCollapsed(collapsed);
|
|
81
|
+
try { localStorage.setItem(sidebarPreference, collapsed ? "collapsed" : "expanded"); }
|
|
82
|
+
catch { /* The tab still keeps its own choice. */ }
|
|
83
|
+
});
|
|
84
|
+
globalThis.addEventListener?.("storage", event => {
|
|
85
|
+
if (event.key === sidebarPreference) setSidebarCollapsed(event.newValue === "collapsed");
|
|
86
|
+
});
|
|
87
|
+
|
|
61
88
|
const reducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)");
|
|
62
89
|
const animationView = globalThis.ccdxViewBoundary.create("animation-settings", () => globalThis.ccdxDashboardAnimation.create({ element, phrase, localize, text, reducedMotion,
|
|
63
90
|
getRefresh: () => dashboardRefresh, document }), ["apply", "load", "save", "sync", "stop", "select"]);
|
package/src/dashboard.mjs
CHANGED
|
@@ -43,8 +43,8 @@ function assets() {
|
|
|
43
43
|
})).then(async entries => {
|
|
44
44
|
const installed = JSON.parse(await readFile(new URL("../package.json", import.meta.url), "utf8"));
|
|
45
45
|
if (installed.version !== ADAPTER_VERSION) throw new Error("Dashboard files changed; restart CCDX before loading the new dashboard");
|
|
46
|
-
//
|
|
47
|
-
const scripts = entries.filter(([name, asset]) => asset.type.startsWith("text/javascript") && !["/language.js", "/theme.js"].includes(name));
|
|
46
|
+
// The Requests view loads its drawing code separately. Shared view code remains bundled.
|
|
47
|
+
const scripts = entries.filter(([name, asset]) => asset.type.startsWith("text/javascript") && !["/language.js", "/theme.js", "/tool-activity-machines.js"].includes(name));
|
|
48
48
|
const body = Buffer.concat(scripts.flatMap(([name, asset]) => [Buffer.from("// " + name + "\n"), asset.body, Buffer.from("\n;\n")]));
|
|
49
49
|
return new Map([...entries, ["/dashboard.js", { body, type: "text/javascript; charset=utf-8", etag: `"${createHash("sha256").update(body).digest("hex")}"` }]]);
|
|
50
50
|
}).catch(error => { bundle = null;throw error; });
|
package/src/optional-routes.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const DASHBOARD_PATHS = new Set(["/", "/ui.css", "/theme.js", "/language.js", "/refresh.js", "/live.js", "/time.js", "/animation.js", "/status.js", "/view-boundary.js", "/activity.js", "/flow.js", "/usage.js", "/context.js", "/ui.js", "/console.js", "/updates.js", "/preferences.js", "/features.js", "/icons.js", "/disclosure.js", "/tools.js", "/connections.js", "/privacy.js"]);
|
|
1
|
+
export const DASHBOARD_PATHS = new Set(["/", "/ui.css", "/theme.js", "/language.js", "/refresh.js", "/live.js", "/time.js", "/animation.js", "/status.js", "/view-boundary.js", "/activity.js", "/flow.js", "/tool-activity-machines.js", "/usage.js", "/context.js", "/ui.js", "/console.js", "/updates.js", "/preferences.js", "/features.js", "/icons.js", "/disclosure.js", "/tools.js", "/connections.js", "/privacy.js"]);
|
|
2
2
|
export const DASHBOARD_API_PATHS = new Set(["/_ccdx/ui/animation", "/_ccdx/ui/models/live", "/_ccdx/ui/usage", "/_ccdx/ui/auth", "/_ccdx/ui/providers", "/_ccdx/ui/settings", "/_ccdx/ui/m365/accounts", "/_ccdx/ui/updates", "/_ccdx/ui/account", "/_ccdx/ui/checks", "/_ccdx/ui/connections", "/_ccdx/ui/context", "/_ccdx/ui/privacy"]);
|
|
3
3
|
|
|
4
4
|
DASHBOARD_PATHS.add("/gemini.js");
|