codex-copilot-dx 1.4.10 → 1.4.12
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/bin/cli.mjs +2 -0
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/REFERENCE.md +11 -1
- package/package.json +1 -1
- package/src/access-settings.mjs +3 -1
- package/src/adapter.mjs +14 -5
- package/src/antigravity-handler.mjs +102 -7
- package/src/antigravity-models.mjs +3 -2
- package/src/antigravity-runtime.mjs +61 -18
- package/src/antigravity-usage.mjs +3 -3
- package/src/api-target.mjs +12 -1
- package/src/application-configuration.mjs +2 -1
- package/src/application-control.mjs +6 -3
- package/src/cli-management.mjs +4 -1
- package/src/connection-management.mjs +4 -2
- package/src/connection-policy.mjs +3 -3
- package/src/connection-routing.mjs +28 -10
- package/src/connection-runtime.mjs +4 -0
- package/src/connection-view.mjs +12 -0
- package/src/copilot-client.mjs +3 -2
- package/src/copilot.mjs +13 -2
- package/src/dashboard/connections.js +5 -5
- package/src/dashboard/console.js +9 -4
- package/src/dashboard/context.js +15 -5
- package/src/dashboard/flow.js +1 -0
- package/src/dashboard/gemini.js +40 -10
- package/src/dashboard/index.html +10 -7
- package/src/dashboard/language.js +14 -3
- package/src/dashboard/status.js +15 -2
- package/src/dashboard/tool-activity.js +63 -35
- package/src/dashboard/ui.css +25 -16
- package/src/dashboard-api.mjs +2 -1
- package/src/failure-history.mjs +97 -0
- package/src/messages-tool-schema.mjs +1 -1
- package/src/model-capabilities.mjs +1 -1
- package/src/privacy-transform.mjs +22 -4
- package/src/provider-metadata.mjs +1 -1
- package/src/providers/api-network.mjs +4 -3
- package/src/providers/api.mjs +79 -15
- package/src/response-failures.mjs +3 -1
- package/src/runtime-config.mjs +1 -0
- package/src/source-admission.mjs +1 -1
- package/src/windows-http-network.mjs +4 -3
- package/src/windows-prediction-network.cs +11 -0
|
@@ -33,7 +33,8 @@ export async function inspectApplicationConfiguration(id, { port = 2026, host =
|
|
|
33
33
|
} else {
|
|
34
34
|
let settings;try { settings = await read(userSettingsPath(options)); } catch (error) { if (error.code !== "ENOENT") throw error;settings = {}; }
|
|
35
35
|
value = { enabled: settings.gemini_antigravity_enabled === true, models: settings.gemini_antigravity_models || null, defaultModel: settings.gemini_antigravity_default_model ?? null, port, host };
|
|
36
|
-
|
|
36
|
+
if (settings.gemini_antigravity_native_source) value.nativeSource = settings.gemini_antigravity_native_source;
|
|
37
|
+
state = value.enabled || value.nativeSource ? "configured" : "native";
|
|
37
38
|
}
|
|
38
39
|
const reload = { ...value };delete reload.key;
|
|
39
40
|
return { state, revision: digest(value), reloadRevision: digest(reload) };
|
|
@@ -97,11 +97,14 @@ export function createApplicationControl({ providerRuntime, clientIntegration, i
|
|
|
97
97
|
return { status: "opened", app: states[id] };
|
|
98
98
|
}
|
|
99
99
|
async function antigravityPlan(app) {
|
|
100
|
-
const
|
|
101
|
-
|
|
100
|
+
const bridgeEnabled = () => {
|
|
101
|
+
const config = readUserSettings({ env, home, strict: true });
|
|
102
|
+
return config.gemini_antigravity_enabled === true || typeof config.gemini_antigravity_native_source === "string";
|
|
103
|
+
};
|
|
104
|
+
if (!bridgeEnabled()) return { status: "prepared", command: "/usr/bin/open", args: ["-a", app.app] };
|
|
102
105
|
const verified = await inspectGemini({ ...options, app: app.app });
|
|
103
106
|
if (verified.status !== "stopped") return { status: verified.status === "running" ? "app_changed" : verified.status };
|
|
104
|
-
if (
|
|
107
|
+
if (!bridgeEnabled()) return { status: "prepared", command: "/usr/bin/open", args: ["-a", app.app] };
|
|
105
108
|
return planGeminiAppLaunch(verified, { cloudCodeUrl: `http://${host}:${port}/antigravity`, env, home });
|
|
106
109
|
}
|
|
107
110
|
return { snapshot, evidence, check, busy: () => operations > 0,
|
package/src/cli-management.mjs
CHANGED
|
@@ -289,7 +289,10 @@ export async function runManagementCommand(command, options = {}) {
|
|
|
289
289
|
const reviewId = client.auto_review_model || preference.auto_review_model || preference.model || null;
|
|
290
290
|
const reviewModel = modelPlan?.models.find(model => [model.id, model.public_id, model.route_id].includes(reviewId));
|
|
291
291
|
const details = { predictions: snapshot.client_integrations?.prediction || null, images: settings?.effective?.image_enabled || null,
|
|
292
|
-
auto_review: { model: reviewModel?.id || reviewId, source: reviewModel?.source || client.source,
|
|
292
|
+
auto_review: { model: reviewModel?.id || reviewId, source: reviewModel?.source || client.source,
|
|
293
|
+
...(preference.followModel ? { mode: "Follow conversation model" } : {}),
|
|
294
|
+
effort: client.auto_review_effort ?? preference.auto_review_effort ?? preference.reasoningEffort
|
|
295
|
+
?? (preference.followModel && reviewModel?.capability?.values?.reasoning_efforts?.includes("low") ? "low if omitted" : "Follows client") }, memory_model: client.memory_model || { model: null } };
|
|
293
296
|
if (feature) return print({ client: "Codex", feature, state: details[{ prediction: "predictions", image: "images", review: "auto_review" }[feature]] });
|
|
294
297
|
const observed = retainedRequests(snapshot).filter(row => id === "codex" ? ["codex", "codex_app", "codex_cli"].includes(row.application) : row.application === id).at(-1);
|
|
295
298
|
return print({ id: ids.app, access: client.enabled ? clientSetup(client) === "Paused" ? "Paused" : "Enabled" : "Disabled", setup: view.clients.find(row => row.id === id)?.setup || clientSetup(client),
|
|
@@ -193,14 +193,16 @@ export function createConnectionManagement({ binding, catalogRefresh, save, disc
|
|
|
193
193
|
const c = binding("codex"),
|
|
194
194
|
compiled = plan("codex");
|
|
195
195
|
if (!c.enabled || input.provider !== c.source) throw accessError("ccdx_client_source_mismatch", 409);
|
|
196
|
-
const
|
|
196
|
+
const follow = input.model === "";
|
|
197
|
+
const record = follow ? compiled.routes.get(compiled.defaultModel) : [...compiled.routes.values()].find(
|
|
197
198
|
record => record.source === input.provider && record.upstreamModel === input.model
|
|
198
199
|
);
|
|
199
200
|
if (!record) throw accessError("ccdx_api_model_unavailable");
|
|
200
201
|
if (input.effort && !record.model.capability.values.reasoning_efforts?.includes(input.effort))
|
|
201
202
|
throw accessError("ccdx_api_effort_unavailable");
|
|
202
203
|
const next = editable();
|
|
203
|
-
next.clients.codex.auto_review_model
|
|
204
|
+
if(follow)delete next.clients.codex.auto_review_model;
|
|
205
|
+
else next.clients.codex.auto_review_model = record.model.route_id;
|
|
204
206
|
next.clients.codex.auto_review_effort = input.effort || null;
|
|
205
207
|
save(next);
|
|
206
208
|
return this.snapshot();
|
|
@@ -198,10 +198,10 @@ export function createConnectionPolicy({ validObject, binding, catalogRefresh, s
|
|
|
198
198
|
[...compiled.routes.values()].find(
|
|
199
199
|
record => record.source === old.source && record.upstreamModel === old.auto_review_model
|
|
200
200
|
);
|
|
201
|
-
if (c.
|
|
202
|
-
c.auto_review_model = review
|
|
201
|
+
if (review?.source === c.source)
|
|
202
|
+
c.auto_review_model = review.model.route_id;
|
|
203
203
|
else delete c.auto_review_model;
|
|
204
|
-
if (review?.source === c.source && old.auto_review_effort !== undefined)
|
|
204
|
+
if ((review?.source === c.source || !old.auto_review_model) && old.auto_review_effort !== undefined)
|
|
205
205
|
c.auto_review_effort = old.auto_review_effort;
|
|
206
206
|
else delete c.auto_review_effort;
|
|
207
207
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createHmac, randomBytes } from "node:crypto";
|
|
1
2
|
import { accessError } from "./access-settings.mjs";
|
|
2
3
|
import { gatewayClient } from "./client-gateway-keys.mjs";
|
|
3
4
|
import { createClaudeGatewayHandler } from "./claude-gateway.mjs";
|
|
@@ -8,6 +9,12 @@ export function createConnectionRouting({ legacy, legacyClaudeAccess, isManaged,
|
|
|
8
9
|
resolveDeployment, codexAccessMode, codexRequiresKey, requireCodexKey, identities, track, guardConversation, messagesTransfer,
|
|
9
10
|
acquireClaudeRequest, privacy, env, log, lastClients, capabilitySupport, applicationEvidence }) {
|
|
10
11
|
const handlers = new Map();
|
|
12
|
+
const reviewSessions = new Map(), reviewSalt = randomBytes(32);
|
|
13
|
+
const reviewSession = (headers, app) => {
|
|
14
|
+
const id = headers.session_id || headers["session-id"] || headers["x-conversation-id"];
|
|
15
|
+
return typeof id === "string" && id.length > 0 && id.length <= 512 && !/[\x00-\x1f\x7f]/.test(id)
|
|
16
|
+
? createHmac("sha256", reviewSalt).update((app || "codex") + "\0" + id).digest("hex") : null;
|
|
17
|
+
};
|
|
11
18
|
function requireSource(clientId, id) {
|
|
12
19
|
if (!permitted(clientId, id)) throw accessError("ccdx_client_source_disabled", 503);
|
|
13
20
|
if (id === "m365" && legacy.snapshot().m365.account_change_in_flight)
|
|
@@ -91,19 +98,30 @@ export function createConnectionRouting({ legacy, legacyClaudeAccess, isManaged,
|
|
|
91
98
|
if (!isManaged()) return null;
|
|
92
99
|
const mode = codexAccessMode();
|
|
93
100
|
if (mode === "paused" || mode === "disabled") throw accessError("ccdx_client_source_disabled", 503);
|
|
94
|
-
|
|
101
|
+
const codex = binding("codex");
|
|
102
|
+
if (!Array.isArray(codex.deployments)) return null;
|
|
95
103
|
if (codexRequiresKey()) requireCodexKey(req);
|
|
96
|
-
const
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
104
|
+
const context = currentRequestContext(), review = body.model === "codex-auto-review";
|
|
105
|
+
const key = !codex.auto_review_model && (review || context?.purpose === "conversation") ? reviewSession(req.headers, context?.application) : null;
|
|
106
|
+
let requested = body.model;
|
|
107
|
+
if (review) {
|
|
108
|
+
const compiled = plan("codex"), remembered = key && reviewSessions.get(key);
|
|
109
|
+
const candidate = remembered && Date.now() - remembered.at <= 1800000 && compiled.routes.get(remembered.route);
|
|
110
|
+
const sameProfile = candidate && typeof remembered.profile === "string" && candidate.provider.profileId?.("responses") === remembered.profile;
|
|
111
|
+
requested = codex.auto_review_model || (sameProfile ? remembered.route : compiled.defaultModel);
|
|
101
112
|
delete body.service_tier;
|
|
102
|
-
if (binding("codex").auto_review_effort)
|
|
103
|
-
body.reasoning = { ...body.reasoning, effort: binding("codex").auto_review_effort };
|
|
104
113
|
}
|
|
105
|
-
const record = resolveDeployment("codex", requested)
|
|
106
|
-
|
|
114
|
+
const record = resolveDeployment("codex", requested);
|
|
115
|
+
if (review) {
|
|
116
|
+
const supports = record.model.capability.values.reasoning_efforts || [];
|
|
117
|
+
const chosen = codex.auto_review_effort && supports.includes(codex.auto_review_effort) ? codex.auto_review_effort
|
|
118
|
+
: body.reasoning?.effort === undefined && supports.includes("low") ? "low" : undefined;
|
|
119
|
+
if (chosen) body.reasoning = { ...body.reasoning, effort: chosen };
|
|
120
|
+
} else if (key && context) context.noteReviewModel = () => {
|
|
121
|
+
reviewSessions.delete(key);
|
|
122
|
+
reviewSessions.set(key, { route: record.model.route_id, profile: record.provider.profileId?.("responses"), at: Date.now() });
|
|
123
|
+
if (reviewSessions.size > 256) reviewSessions.delete(reviewSessions.keys().next().value);
|
|
124
|
+
};
|
|
107
125
|
if (context) {
|
|
108
126
|
context.finishProvider?.();
|
|
109
127
|
context.finishProvider = track(record.provider);
|
|
@@ -86,6 +86,10 @@ export function createConnectionRuntime({
|
|
|
86
86
|
const catalogRefresh = createApiCatalogRefresh({
|
|
87
87
|
config: id => settings.apis.find(api => api.id === id),
|
|
88
88
|
source: getSource,
|
|
89
|
+
antigravitySources() {
|
|
90
|
+
return settings.apis.filter(api => api.enabled && api.endpoints.gemini && api.models.some(model => model.protocols.includes("gemini")))
|
|
91
|
+
.map(api => ({ id: api.id, name: api.name, models: getSource(api.id)?.models("gemini") || [] }));
|
|
92
|
+
},
|
|
89
93
|
track,
|
|
90
94
|
complete: api => modelDisplay.has(api.id, deploymentRevision(api, env)),
|
|
91
95
|
revision: api => deploymentRevision(api, env),
|
package/src/connection-view.mjs
CHANGED
|
@@ -208,6 +208,17 @@ export function createConnectionView({ legacy, env, binding, plan, getSource, en
|
|
|
208
208
|
snapshot() {
|
|
209
209
|
const result = legacy.snapshot();
|
|
210
210
|
if (!isManaged()) return result;
|
|
211
|
+
const codex = binding("codex");
|
|
212
|
+
let githubPreference;
|
|
213
|
+
if (codex.source === "github" && Array.isArray(codex.deployments) && result.github?.preference?.source !== "environment") {
|
|
214
|
+
const compiled = plan("codex"), reviewId = codex.auto_review_model || compiled.defaultModel;
|
|
215
|
+
const model = compiled.routes.get(reviewId)?.upstreamModel ??
|
|
216
|
+
(reviewId ? codex.deployments.find(item => deploymentModelId(item.source, item.model) === reviewId)?.model : null);
|
|
217
|
+
if (model) githubPreference = {
|
|
218
|
+
model, source: codex.auto_review_model ? "settings" : "default", reasoningEffort: codex.auto_review_effort,
|
|
219
|
+
...(!codex.auto_review_model ? { followModel: true } : {}),
|
|
220
|
+
};
|
|
221
|
+
}
|
|
211
222
|
const performance = legacy.claudePerformance.snapshot(),
|
|
212
223
|
totals = performance.by_route.messages.terminal_outcomes.totals;
|
|
213
224
|
const ms = performance.by_route.messages.by_provider.m365;
|
|
@@ -226,6 +237,7 @@ export function createConnectionView({ legacy, env, binding, plan, getSource, en
|
|
|
226
237
|
: null;
|
|
227
238
|
return {
|
|
228
239
|
...result,
|
|
240
|
+
...(githubPreference ? { github: { ...result.github, preference: githubPreference } } : {}),
|
|
229
241
|
codex_provider: this.selection().codex,
|
|
230
242
|
connections: snapshot(true),
|
|
231
243
|
m365: {
|
package/src/copilot-client.mjs
CHANGED
|
@@ -92,6 +92,7 @@ export function createCopilotClientRuntime({
|
|
|
92
92
|
retryOptions,
|
|
93
93
|
bodyText,
|
|
94
94
|
observeBodyWrite,
|
|
95
|
+
onBodySent,
|
|
95
96
|
onUpstreamStart,
|
|
96
97
|
...sourceOptions
|
|
97
98
|
} = {}) {
|
|
@@ -109,13 +110,13 @@ export function createCopilotClientRuntime({
|
|
|
109
110
|
});
|
|
110
111
|
const bodyBytes = Buffer.byteLength(serializedBody);
|
|
111
112
|
headers["Content-Length"] = String(bodyBytes);
|
|
112
|
-
return sourceTransport({ ...sourceOptions, signal, onUpstreamStart }, { send: fetchCopilotUpstream, model: upstreamReq.model,
|
|
113
|
+
return sourceTransport({ ...sourceOptions, signal, onUpstreamStart }, { send: fetchCopilotUpstream, model: upstreamReq.model, bodyBytes, stream: upstreamReq.stream === true, observe: true,
|
|
113
114
|
evidence: { payload_bytes: bodyBytes }, args: [`${tokenSession.getApiBase()}/chat/completions`, {
|
|
114
115
|
method: "POST",
|
|
115
116
|
headers,
|
|
116
117
|
body: serializedBody,
|
|
117
118
|
signal,
|
|
118
|
-
}, { fetchImpl, ...retryOptions, observeBodyWrite }] });
|
|
119
|
+
}, { fetchImpl, ...retryOptions, observeBodyWrite, onBodySent }] });
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
async function fetchModels({ signal, fetchImpl, retryOptions }) {
|
package/src/copilot.mjs
CHANGED
|
@@ -163,6 +163,7 @@ export async function fetchCopilotUpstream(
|
|
|
163
163
|
retries = UPSTREAM_RETRIES,
|
|
164
164
|
retryDelayMs = UPSTREAM_RETRY_DELAY_MS,
|
|
165
165
|
observeBodyWrite = false,
|
|
166
|
+
onBodySent,
|
|
166
167
|
} = {},
|
|
167
168
|
) {
|
|
168
169
|
const retryCount = parseUpstreamRetries(retries);
|
|
@@ -176,8 +177,18 @@ export async function fetchCopilotUpstream(
|
|
|
176
177
|
const attemptStart = Date.now();
|
|
177
178
|
debugLog(`upstream ${method} ${target} attempt=${attempt + 1}/${retryCount + 1}`);
|
|
178
179
|
try {
|
|
179
|
-
const
|
|
180
|
-
const
|
|
180
|
+
const observedPost = observeBodyWrite && method === "POST" && fetchImpl === fetch;
|
|
181
|
+
const observe = observedPost && observeUpstreamBodyWrite(init.headers?.["X-Request-Id"]);
|
|
182
|
+
const releaseInput = observedPost && retryCount === 0 && typeof onBodySent === "function";
|
|
183
|
+
const report = releaseInput ? (kind, value) => {
|
|
184
|
+
if (observe) observe(kind, value);
|
|
185
|
+
if (kind === "sent" && !signal?.aborted) {
|
|
186
|
+
delete init.body;
|
|
187
|
+
onBodySent();
|
|
188
|
+
}
|
|
189
|
+
} : observe;
|
|
190
|
+
if (releaseInput) init.redirect = "error";
|
|
191
|
+
const resp = await (report ? fetchWithBodyWriteTiming(url, init, report) : fetchImpl(url, init));
|
|
181
192
|
debugLog(`upstream ${method} ${target} status=${resp.status} attempt=${attempt + 1}/${retryCount + 1} attempt_ms=${Date.now() - attemptStart} total_ms=${Date.now() - totalStart}`);
|
|
182
193
|
if (attempt < retryCount && isRetryableUpstreamStatus(resp.status, method)) {
|
|
183
194
|
await discardBoundedResponseBody(resp);
|
|
@@ -210,7 +210,7 @@
|
|
|
210
210
|
cell.append(detail);row.append(cell);modelRow.after(row);
|
|
211
211
|
trigger.setAttribute("aria-expanded", "true");
|
|
212
212
|
const heading = node("div", undefined, "panel-heading");heading.append(node("h3", model.id), button("close", () => { closeModelDetail();trigger.focus(); }));detail.append(heading);
|
|
213
|
-
const protocol = choice(model.protocols.map(id => ({ id, name:
|
|
213
|
+
const protocol = choice(model.protocols.map(id => ({ id, name: { messages: "Messages", responses: "Responses", chat: "Chat", gemini: "Gemini" }[id] || id })), model.protocols.includes("messages") ? "messages" : model.protocols[0], false);
|
|
214
214
|
protocol.setAttribute("aria-label", format("cap_api"));detail.append(protocol);
|
|
215
215
|
const status = node("p", undefined, "hint"), table = node("table"), body = node("tbody");table.append(body);detail.append(status, table);
|
|
216
216
|
const maker = model.display || source(editing)?.model_display?.[model.id] || {};
|
|
@@ -296,8 +296,8 @@
|
|
|
296
296
|
selection.firstChild.addEventListener("change", e => { if (e.target.checked) selectedModels.add(model.id);else selectedModels.delete(model.id); });name.append(selection);
|
|
297
297
|
const maker = model.display || source(editing)?.model_display?.[model.id];
|
|
298
298
|
if (maker?.publisher || maker?.vendor) name.append(node("span", maker.publisher || maker.vendor, "model-maker"));
|
|
299
|
-
for (const protocol of
|
|
300
|
-
const label = check("model-api", protocol, model.protocols.includes(protocol),
|
|
299
|
+
for (const [protocol, title] of Object.entries({ messages: "Messages", responses: "Responses", chat: "Chat", gemini: "Gemini" })) {
|
|
300
|
+
const label = check("model-api", protocol, model.protocols.includes(protocol), title);
|
|
301
301
|
label.firstChild.disabled = !apiForm.querySelector(`[name="protocol"][value="${protocol}"]`).checked;
|
|
302
302
|
label.firstChild.addEventListener("change", e => {
|
|
303
303
|
model.protocols = [...new Set([...model.protocols.filter(api => api !== protocol), ...(e.target.checked ? [protocol] : [])])];
|
|
@@ -313,14 +313,14 @@
|
|
|
313
313
|
apis.append(group);actions.append(details, button("api_remove_model", () => { models = models.filter(item => item !== model);selectedModels.delete(model.id);modelRows(); }));tr.append(name, apis, context, reasoning, search, actions);body.append(tr);
|
|
314
314
|
}
|
|
315
315
|
}
|
|
316
|
-
function setEndpoints(base, endpoints) { for (const [api, path] of [["messages", "messages"], ["responses", "responses"], ["chat", "chat/completions"]]) apiForm.elements[api + "_url"].value = endpoints?.[api] || base.replace(/\/+$/, "") + "/" + path; }
|
|
316
|
+
function setEndpoints(base, endpoints) { for (const [api, path] of [["messages", "messages"], ["responses", "responses"], ["chat", "chat/completions"], ["gemini", "models"]]) apiForm.elements[api + "_url"].value = endpoints?.[api] || base.replace(/\/+$/, "") + "/" + path; }
|
|
317
317
|
function editApi(provider) {
|
|
318
318
|
stopDiscovery();editorOrigin = document.activeElement;editing = provider?.id || null;panels("api");apiForm.reset();words(el("connection-editor-title"), provider ? "api_manage" : "api_add");
|
|
319
319
|
apiForm.elements.name.value = provider?.name || "";apiForm.elements.base.value = provider?.base_url || "";
|
|
320
320
|
apiForm.elements.key.required = !provider;globalThis.ccdxLanguage.set(apiForm.elements.key, provider ? "api_key_keep" : "api_key_enter", {}, "placeholder");
|
|
321
321
|
apiForm.elements.auth_header.value = provider?.auth_header || "x-api-key";
|
|
322
322
|
apiForm.elements.key_env.value = provider?.key_env || "";keyMode();
|
|
323
|
-
for (const input of apiForm.querySelectorAll('[name="protocol"]')) input.checked = provider ? Boolean(provider.endpoints?.[input.value]) : input.value
|
|
323
|
+
for (const input of apiForm.querySelectorAll('[name="protocol"]')) input.checked = provider ? Boolean(provider.endpoints?.[input.value]) : ["messages", "responses"].includes(input.value);
|
|
324
324
|
setEndpoints(provider?.base_url || "", provider?.endpoints);
|
|
325
325
|
el("connection-model-detail").hidden = true;
|
|
326
326
|
models = structuredClone(provider?.models || []);selectedModels = new Set(models.map(model => model.id));modelRows();el("connection-manual-model").open = false;el("connection-discover").disabled = !editing;el("connection-model-id").value = "";apiForm.elements.name.focus();
|
package/src/dashboard/console.js
CHANGED
|
@@ -95,16 +95,18 @@
|
|
|
95
95
|
const selectedSource = () => providerEntries.find(source => source.id === el("source-provider").value);
|
|
96
96
|
const sourceReady = () => Boolean(selectedSource()) && (!selectedSource().selection.models_required || Boolean(modelsSource === selectedSource().id && el("source-model").value && el("source-review").value));
|
|
97
97
|
const reviewLocked = () => selectedSource()?.id === "github" && settings?.providers?.github?.preference?.source === "environment";
|
|
98
|
+
const reviewCanFollow = () => selectedSource()?.id === "github" && settings?.providers?.codex_provider === "github" &&
|
|
99
|
+
Array.isArray(settings?.providers?.connections?.clients?.find(client => client.id === "codex")?.deployments);
|
|
98
100
|
function syncReviewButton() {
|
|
99
101
|
const sameSource = selectedSource()?.id === settings?.providers?.codex_provider;
|
|
100
|
-
el("save-review").disabled = settingsPending || !sameSource || reviewLocked() || modelsSource !== selectedSource()?.id || !el("source-review").value;
|
|
102
|
+
el("save-review").disabled = settingsPending || !sameSource || reviewLocked() || modelsSource !== selectedSource()?.id || !el("source-review").value && !reviewCanFollow();
|
|
101
103
|
el("source-review").disabled = settingsPending || reviewLocked() || !sourceModels.length;
|
|
102
104
|
el("source-review-effort").disabled = el("source-review").disabled;
|
|
103
105
|
if (reviewLocked()) label(el("review-control-note"), "review_environment_override");
|
|
104
106
|
else if (!sameSource) label(el("review-control-note"), "review_save_source_first");
|
|
105
107
|
}
|
|
106
108
|
function syncEfforts(chosen) {
|
|
107
|
-
const model = sourceModels.find(model => model.id === el("source-review").value);
|
|
109
|
+
const model = sourceModels.find(model => model.id === (el("source-review").value || settings?.providers?.github?.preference?.model));
|
|
108
110
|
const efforts = model?.auto_review_efforts || model?.reasoning_efforts || [];
|
|
109
111
|
const follow = document.createElement("option");follow.value = "";label(follow, "follow_client");
|
|
110
112
|
el("source-review-effort").replaceChildren(follow, ...efforts.map(effort => { const option = document.createElement("option");option.value = effort;option.textContent = effort;return option; }));
|
|
@@ -301,9 +303,12 @@
|
|
|
301
303
|
const preference = settings?.providers?.[source.id]?.preference;
|
|
302
304
|
for (const [id, key] of [["source-model", "model"], ["source-review", "auto_review_model"]]) {
|
|
303
305
|
el(id).replaceChildren(...models.map(model => { const option = document.createElement("option");option.value = model.id;option.textContent = model.id;return option; }));
|
|
304
|
-
const
|
|
305
|
-
const
|
|
306
|
+
const follow = key === "auto_review_model" && reviewCanFollow();
|
|
307
|
+
if (follow) { const option = document.createElement("option");option.value = "";label(option, "review_follow_model");el(id).prepend(option); }
|
|
308
|
+
const saved = key === "auto_review_model" && source.id === "github" ? (follow && preference?.followModel ? "" : preference?.model) : preference?.[key];
|
|
309
|
+
const chosen = unsaved?.[key] ?? saved;
|
|
306
310
|
if (chosen && models.some(model => model.id === chosen)) el(id).value = chosen;
|
|
311
|
+
else if (follow && chosen === "") el(id).value = "";
|
|
307
312
|
}
|
|
308
313
|
modelsSource = source.id;modelsPreference = JSON.stringify(preference);
|
|
309
314
|
const savedEffort = source.id === "github" ? preference?.reasoningEffort : preference?.auto_review_effort === undefined ? "low" : preference.auto_review_effort;
|
package/src/dashboard/context.js
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
if (!points.some(point => valid(point.input_tokens))) { label(host, "context_no_input");return; }
|
|
21
21
|
if (!entry.identified) { label(host, "context_unassigned");return; }
|
|
22
22
|
const width = host.clientWidth;if (!width) return;
|
|
23
|
-
const height =
|
|
23
|
+
const height = 225, right = 12, top = 40, bottom = 35;
|
|
24
24
|
const measured = Math.max(...points.map(point => valid(point.input_tokens) ? point.input_tokens : 0), 1);
|
|
25
25
|
const maximum = Math.max(measured, latest(entry).context_window_tokens || 0);
|
|
26
26
|
const svg = document.createElementNS(ns, "svg");svg.setAttribute("viewBox", `0 0 ${width} ${height}`);
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
shape("line", { x1: left, x2: width - right, y1: py, y2: py, class: "context-grid" });
|
|
42
42
|
shape("text", { x: left - 8, y: py + 4, "text-anchor": "end" }, ticks[index]);
|
|
43
43
|
}
|
|
44
|
-
shape("text", { x: left, y: 12 }, "
|
|
44
|
+
shape("text", { x: left, y: 12, class: "context-unit" }, "Token");
|
|
45
45
|
let path = "", continuing = false;
|
|
46
46
|
points.forEach((point, index) => {
|
|
47
47
|
if (!valid(point.input_tokens)) { continuing = false;return; }
|
|
@@ -54,11 +54,21 @@
|
|
|
54
54
|
for (const index of new Set([0, Math.floor((points.length - 1) / 2), points.length - 1])) {
|
|
55
55
|
shape("text", { x: x(index), y: height - 14, "text-anchor": index === 0 ? "start" : "end" }, String(index + 1));
|
|
56
56
|
}
|
|
57
|
-
|
|
57
|
+
const marker = language.format("context_compact_event");
|
|
58
|
+
const measurement = shape("text", { visibility: "hidden" }, marker);
|
|
59
|
+
const markerWidth = measurement.getComputedTextLength();
|
|
60
|
+
measurement.remove();
|
|
61
|
+
let previousEnd = -Infinity;
|
|
62
|
+
for (const compact of [...entry.compactions].sort((a, b) => a.order - b.order)) {
|
|
58
63
|
const index = points.findIndex(point => point.order >= compact.order);
|
|
59
64
|
if (index < 0 || compact.outcome !== "completed") continue;
|
|
60
|
-
const px = x(index)
|
|
61
|
-
|
|
65
|
+
const px = x(index), line = shape("line", { x1: px, x2: px, y1: top, y2: height - bottom, class: "context-compact" });
|
|
66
|
+
const title = document.createElementNS(ns, "title");title.textContent = marker;line.append(title);
|
|
67
|
+
if (width - right - left < markerWidth) continue;
|
|
68
|
+
const center = Math.min(width - right - markerWidth / 2, Math.max(left + markerWidth / 2, px));
|
|
69
|
+
if (center - markerWidth / 2 < previousEnd + 8) continue;
|
|
70
|
+
shape("text", { x: center, y: top - 8, "text-anchor": "middle", class: "context-compact-label" }, marker);
|
|
71
|
+
previousEnd = center + markerWidth / 2;
|
|
62
72
|
}
|
|
63
73
|
}
|
|
64
74
|
function render() {
|
package/src/dashboard/flow.js
CHANGED
|
@@ -181,6 +181,7 @@
|
|
|
181
181
|
el("flow-hub").addEventListener("click", () => { selected = null;render(); });
|
|
182
182
|
el("flow-more").addEventListener("click", () => { expanded = !expanded;render(); });
|
|
183
183
|
el("flow-active").addEventListener("toggle", details);
|
|
184
|
+
el("flow-network").parentElement?.addEventListener("scroll", () => { positions = null;draw(); }, { passive: true });
|
|
184
185
|
document.addEventListener("visibilitychange", visibilityChanged);
|
|
185
186
|
globalThis.addEventListener("pagehide", () => { root.dataset.paused = "true"; });
|
|
186
187
|
globalThis.addEventListener("pageshow", visibilityChanged);
|
package/src/dashboard/gemini.js
CHANGED
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
(() => {
|
|
2
2
|
const el=id=>document.getElementById(id),language=globalThis.ccdxLanguage;
|
|
3
|
-
let busy=false,state=null,draft=null,defaultDraft,notice=null,pendingAction=null;
|
|
4
|
-
let sharedApplication=null,sharedPending=false,savedTimer,showSaved=false;
|
|
3
|
+
let busy=false,state=null,draft=null,defaultDraft,timeoutDraft,nativeDraft,notice=null,pendingAction=null;
|
|
4
|
+
let sharedApplication=null,sharedPending=false,savedTimer,showSaved=false,savedModels=false;
|
|
5
5
|
const words=(id,key)=>language.set(el(id),key);
|
|
6
6
|
const clear=id=>{el(id).removeAttribute('data-i18n');el(id).removeAttribute('data-i18n-args');el(id).textContent='';el(id).title=''};
|
|
7
7
|
const controls=['gemini-enabled','gemini-open','gemini-refresh','gemini-save','gemini-cancel','gemini-use-app-default'];
|
|
8
8
|
const selected=()=>state?.models.filter(model=>model.selected!==false).map(model=>model.id)||[];
|
|
9
9
|
const savedDefault=()=>state?.default_model??null;
|
|
10
10
|
const currentDefault=()=>defaultDraft===undefined?savedDefault():defaultDraft;
|
|
11
|
-
const
|
|
11
|
+
const modelsDirty=()=>currentDefault()!==savedDefault()||draft!==null&&JSON.stringify([...draft].sort())!==JSON.stringify(selected().sort());
|
|
12
|
+
const savedTimeout=()=>String(state?.copilot_timeout_seconds??'');
|
|
13
|
+
const timeoutDirty=()=>timeoutDraft!==undefined&&timeoutDraft!==savedTimeout();
|
|
14
|
+
const nativeDirty=()=>nativeDraft!==undefined&&nativeDraft!==(state?.native_source??null);
|
|
15
|
+
const dirty=()=>modelsDirty()||timeoutDirty()||nativeDirty();
|
|
16
|
+
const syncSaveControls=()=>{
|
|
17
|
+
el('gemini-save').disabled=busy||sharedPending||!dirty();
|
|
18
|
+
el('gemini-cancel').disabled=busy||sharedPending||!dirty();
|
|
19
|
+
el('gemini-draft-state').hidden=dirty()||!showSaved||savedModels&&state.app.status==='running'&&(state.models_reload_required===true||sharedApplication?.needs_reload===true);
|
|
20
|
+
if(!el('gemini-draft-state').hidden)words('gemini-draft-state','cap_saved');
|
|
21
|
+
};
|
|
12
22
|
const count=value=>!value?'—':value>=1000000?`${Number((value/1000000).toFixed(2))}M`:value>=1000?`${Number((value/1000).toFixed(1))}K`:String(value);
|
|
13
23
|
const groupedModels=()=>{
|
|
14
24
|
if(Array.isArray(state.model_groups))return state.model_groups;
|
|
@@ -25,10 +35,23 @@
|
|
|
25
35
|
if(!state)return;
|
|
26
36
|
if(sharedApplication&&(sharedApplication.inspection||0)>=(state.application?.inspection||0))state.app={...state.app,status:sharedApplication.status,version:sharedApplication.version||state.app.version};
|
|
27
37
|
if(!busy)el('gemini-enabled').checked=state.enabled;
|
|
28
|
-
el('gemini-
|
|
38
|
+
const timeout=el('gemini-copilot-timeout'),limit=state.copilot_timeout;
|
|
39
|
+
timeout.disabled=busy||sharedPending||!limit||limit.locked;
|
|
40
|
+
el('gemini-timeout-lock').hidden=limit?.locked!==true;
|
|
41
|
+
if(limit){
|
|
42
|
+
const value=limit.locked?String(limit.effective_ms/1000):timeoutDraft??savedTimeout();
|
|
43
|
+
if(timeout.value!==value)timeout.value=value;
|
|
44
|
+
timeout.placeholder=language.format('gemini_timeout_default',{seconds:limit.default_ms/1000});
|
|
45
|
+
}
|
|
46
|
+
const native=el('gemini-native-source'), sources=state.native_sources||[];
|
|
47
|
+
el('gemini-native-source-field').hidden=!sources.length&&!state.native_source;
|
|
48
|
+
native.disabled=busy||sharedPending;
|
|
49
|
+
const options=[{id:'',name:language.format('gemini_native_source_none')},...sources];
|
|
50
|
+
if(state.native_source&&!sources.some(source=>source.id===state.native_source))options.push({id:state.native_source,name:language.format('unknown'),disabled:true});
|
|
51
|
+
native.replaceChildren(...options.map(source=>{const option=document.createElement('option');option.value=source.id;option.textContent=source.name;option.disabled=source.disabled===true;return option}));
|
|
52
|
+
native.value=nativeDraft===undefined?state.native_source??'':nativeDraft??'';
|
|
53
|
+
syncSaveControls();
|
|
29
54
|
words('gemini-save',busy&&pendingAction==='models'?'api_saving':'api_save');if(busy&&pendingAction==='models')el('gemini-save').setAttribute('aria-busy','true');else el('gemini-save').removeAttribute('aria-busy');
|
|
30
|
-
el('gemini-draft-state').hidden=dirty()||!showSaved||state.app.status==='running'&&(state.models_reload_required===true||sharedApplication?.needs_reload===true);
|
|
31
|
-
if(!el('gemini-draft-state').hidden)words('gemini-draft-state','cap_saved');
|
|
32
55
|
el('gemini-use-app-default').hidden=currentDefault()===null;
|
|
33
56
|
el('gemini-default-note').hidden=!state.default_model_unavailable||currentDefault()!==savedDefault();
|
|
34
57
|
if(!el('gemini-default-note').hidden)words('gemini-default-note','gemini_default_unavailable');
|
|
@@ -82,7 +105,7 @@
|
|
|
82
105
|
const write=action&&action!=='summary',response=await fetch('/_ccdx/ui/gemini'+(action==='summary'?'?scope=summary':''),{method:write?'POST':'GET',headers:{'X-CCDX-Dashboard':'1',...(write?{'Content-Type':'application/json'}:{})},cache:'no-store',signal:AbortSignal.timeout(20000),...(write?{body:JSON.stringify({action,...(action==='enable'?{accept_background_copilot:true}:{}),...extra})}:{})});
|
|
83
106
|
const value=await response.json();if(!response.ok)throw Error(value.error||'Antigravity setup failed');
|
|
84
107
|
state=value;if(action==='models'){
|
|
85
|
-
draft=null;defaultDraft=undefined;showSaved=true;clearTimeout(savedTimer);savedTimer=setTimeout(()=>{showSaved=false;render()},2200);
|
|
108
|
+
draft=null;defaultDraft=undefined;timeoutDraft=undefined;nativeDraft=undefined;showSaved=true;savedModels=extra.models!==undefined||extra.native_source!==undefined;clearTimeout(savedTimer);savedTimer=setTimeout(()=>{showSaved=false;render()},2200);
|
|
86
109
|
}
|
|
87
110
|
globalThis.ccdxGeminiStatus=state;
|
|
88
111
|
if(action&&action!=='summary'){
|
|
@@ -91,12 +114,19 @@
|
|
|
91
114
|
}
|
|
92
115
|
return state;
|
|
93
116
|
}catch(error){if(!report)throw error;notice='gemini_operation_failed';words('gemini-note',notice);el('gemini-note').title=error.message}
|
|
94
|
-
finally{busy=false;pendingAction=null;render();window.dispatchEvent(new CustomEvent('ccdx-gemini-state',{detail:{application:state?.application,needsCatalogReload:state?.enabled===true&&state.source_enabled!==false&&state.models_reload_required===true&&state.default_model_unavailable!==true}}))}
|
|
117
|
+
finally{busy=false;pendingAction=null;render();window.dispatchEvent(new CustomEvent('ccdx-gemini-state',{detail:{application:state?.application,needsCatalogReload:(state?.enabled===true&&state.source_enabled!==false||Boolean(state?.native_source))&&state.models_reload_required===true&&state.default_model_unavailable!==true}}))}
|
|
95
118
|
}
|
|
96
119
|
globalThis.ccdxAntigravity={get state(){return state},get pending(){return busy},refreshStatus:()=>load('summary'),setEnabled:enabled=>load(enabled?'enable':'disable',{},false)};
|
|
97
120
|
el('gemini-enabled').addEventListener('change',event=>void load(event.target.checked?'enable':'disable'));
|
|
98
|
-
el('gemini-model-form').addEventListener('submit',event=>{
|
|
99
|
-
|
|
121
|
+
el('gemini-model-form').addEventListener('submit',event=>{
|
|
122
|
+
event.preventDefault();if(!dirty())return;
|
|
123
|
+
void load('models',{...(modelsDirty()?{models:draft||selected(),...(defaultDraft!==undefined?{default_model:defaultDraft}:{})}:{}),
|
|
124
|
+
...(timeoutDirty()?{copilot_timeout_seconds:timeoutDraft===''?null:Number(timeoutDraft)}:{}),
|
|
125
|
+
...(nativeDirty()?{native_source:nativeDraft}:{})});
|
|
126
|
+
});
|
|
127
|
+
el('gemini-copilot-timeout').addEventListener('input',event=>{timeoutDraft=event.target.value;notice=null;clear('gemini-note');syncSaveControls()});
|
|
128
|
+
el('gemini-native-source').addEventListener('change',event=>{nativeDraft=event.target.value||null;notice=null;clear('gemini-note');syncSaveControls()});
|
|
129
|
+
el('gemini-cancel').addEventListener('click',()=>{draft=null;defaultDraft=undefined;timeoutDraft=undefined;nativeDraft=undefined;notice=null;clear('gemini-note');render()});
|
|
100
130
|
el('gemini-use-app-default').addEventListener('click',()=>{defaultDraft=null;render();el('gemini-save').focus();});
|
|
101
131
|
el('gemini-open').addEventListener('click',()=>{if(globalThis.ccdxApplicationControls)globalThis.ccdxApplicationControls.open('antigravity');else void load('open')});
|
|
102
132
|
window.addEventListener('ccdx:application-state',event=>{if(event.detail?.id==='antigravity'){sharedApplication=event.detail.application;sharedPending=event.detail.pending;render()}});
|
package/src/dashboard/index.html
CHANGED
|
@@ -179,6 +179,8 @@
|
|
|
179
179
|
<div class="panel-heading"><h2 data-i18n="cap_visible_model">Available models</h2><span id="gemini-draft-state" role="status" hidden></span></div>
|
|
180
180
|
<form id="gemini-model-form">
|
|
181
181
|
<div class="table-wrap"><table class="binding-table"><thead><tr><th data-i18n="model">Model</th><th data-i18n="source">Source</th><th data-i18n="cap_context">Context</th><th data-i18n="cap_reasoning">Reasoning</th><th data-i18n="gemini_new_chat_default">New chat default</th></tr></thead><tbody id="gemini-models"></tbody></table></div>
|
|
182
|
+
<div class="section-actions"><label><span data-i18n="gemini_copilot_timeout">Copilot response timeout (s)</span> <input id="gemini-copilot-timeout" type="number" min="1" max="600" step="1" inputmode="numeric" disabled></label><span id="gemini-timeout-lock" class="hint" data-i18n="controlled_by_environment" hidden>Set at startup</span>
|
|
183
|
+
<label id="gemini-native-source-field" hidden><span data-i18n="gemini_native_source">Custom Gemini source</span> <select id="gemini-native-source" disabled></select></label></div>
|
|
182
184
|
<div class="section-actions"><button id="gemini-save" type="submit" data-i18n="api_save" disabled>Save</button><button id="gemini-cancel" type="button" data-i18n="cap_discard_changes" disabled>Discard changes</button><button id="gemini-use-app-default" type="button" data-i18n="gemini_use_app_default" hidden>Use app default</button></div>
|
|
183
185
|
</form>
|
|
184
186
|
<p id="gemini-default-note" class="hint" role="status" hidden></p>
|
|
@@ -214,9 +216,9 @@
|
|
|
214
216
|
<label><span data-i18n="api_base">API address</span><input id="connection-base" name="base" type="url" required autocomplete="off" spellcheck="false" placeholder="https://api.example.com/v1"></label>
|
|
215
217
|
<label><span>API Key</span><input id="connection-key" name="key" type="password" autocomplete="off" spellcheck="false"><span class="hint" data-i18n="api_key_private">Stored separately. Never sent to clients.</span></label>
|
|
216
218
|
</div>
|
|
217
|
-
<fieldset><legend data-i18n="api_protocols">Available APIs</legend><div class="connection-checks"><label><input type="checkbox" name="protocol" value="messages" checked>Messages</label><label><input type="checkbox" name="protocol" value="responses" checked>Responses</label><label><input type="checkbox" name="protocol" value="chat">Chat Completions</label></div></fieldset>
|
|
219
|
+
<fieldset><legend data-i18n="api_protocols">Available APIs</legend><div class="connection-checks"><label><input type="checkbox" name="protocol" value="messages" checked>Messages</label><label><input type="checkbox" name="protocol" value="responses" checked>Responses</label><label><input type="checkbox" name="protocol" value="chat">Chat Completions</label><label><input type="checkbox" name="protocol" value="gemini">Gemini</label></div></fieldset>
|
|
218
220
|
<details class="tool-details"><summary data-i18n="api_endpoint_options">Addresses & authentication</summary><div class="connection-fields">
|
|
219
|
-
<label>Messages<input name="messages_url" type="url"></label><label>Responses<input name="responses_url" type="url"></label><label>Chat Completions<input name="chat_url" type="url"></label>
|
|
221
|
+
<label>Messages<input name="messages_url" type="url"></label><label>Responses<input name="responses_url" type="url"></label><label>Chat Completions<input name="chat_url" type="url"></label><label>Gemini<input name="gemini_url" type="url"></label>
|
|
220
222
|
<label><span data-i18n="api_messages_auth">Messages authentication</span><select name="auth_header"><option value="x-api-key">x-api-key</option><option value="bearer">Bearer token</option></select></label>
|
|
221
223
|
<label><span data-i18n="api_key_env">Read key from environment</span><input name="key_env" type="text" autocomplete="off" spellcheck="false" placeholder="CCDX_COMPANY_API_KEY"><span class="hint" data-i18n="api_key_env_hint">Optional for servers without a credential service. Set before starting CCDX.</span></label>
|
|
222
224
|
</div></details>
|
|
@@ -391,23 +393,23 @@
|
|
|
391
393
|
<div data-view="requests" hidden>
|
|
392
394
|
<section class="panel dashboard-section" id="request-flow" data-state="unknown">
|
|
393
395
|
<div class="panel-heading"><h2 data-i18n="request_flow">REQUEST FLOW</h2><span id="flow-state" role="status" aria-live="polite" data-i18n="flow_status_unknown">Status unavailable</span></div>
|
|
394
|
-
<div id="flow-network" class="flow-network" role="group" data-i18n-label="request_flow" aria-label="Request flow">
|
|
396
|
+
<div class="flow-viewport"><div id="flow-network" class="flow-network" role="group" data-i18n-label="request_flow" aria-label="Request flow">
|
|
395
397
|
<svg id="flow-wires" class="flow-wires" aria-hidden="true"></svg>
|
|
396
398
|
<svg id="flow-active-wires" class="flow-wires flow-activity" aria-hidden="true" hidden></svg>
|
|
397
399
|
<div class="flow-column"><p class="flow-column-title" data-i18n="clients">Apps</p><div id="flow-apps" class="flow-apps"></div></div>
|
|
398
400
|
<div class="flow-hub-column"><button id="flow-hub" type="button" data-i18n-label="flow_show_all" aria-label="Show all requests"><b>CCDX</b></button></div>
|
|
399
401
|
<div class="flow-column"><p class="flow-column-title" data-i18n="flow_sources_models">Sources / models</p><div id="flow-models"></div></div>
|
|
400
|
-
</div>
|
|
402
|
+
</div></div>
|
|
401
403
|
<div class="flow-caption"><span id="flow-caption" data-i18n="flow_status_unknown">Status unavailable</span><button id="flow-clear" type="button" data-i18n="flow_show_all" hidden>Show all</button><button id="flow-more" type="button" hidden>More models</button></div>
|
|
402
|
-
<details id="flow-active" class="tool-details"><summary id="flow-active-title" data-i18n="flow_active_requests">Active requests</summary><div class="table-wrap"><table><thead><tr><th data-i18n="client">App</th><th data-i18n="source">Source</th><th data-i18n="model">Model</th><th data-i18n="state">State</th><th data-i18n="flow_elapsed">Elapsed</th><th data-i18n="attempts">Attempts</th></tr></thead><tbody id="flow-active-body"></tbody></table></div></details>
|
|
403
404
|
</section>
|
|
404
405
|
<section id="tool-activity" class="panel dashboard-section" aria-labelledby="tool-title" data-paused="true">
|
|
405
|
-
<div class="panel-heading"><h2 id="tool-title" data-i18n="tool_heading">TOOL AND AGENT ACTIVITY</h2><label class="tool-style" for="tool-style"><span data-i18n="tool_style">Style</span><select id="tool-style"><option value="
|
|
406
|
-
<div id="tool-stage" class="tool-stage" data-style="
|
|
406
|
+
<div class="panel-heading"><h2 id="tool-title" data-i18n="tool_heading">TOOL AND AGENT ACTIVITY</h2><label class="tool-style" for="tool-style"><span data-i18n="tool_style">Style</span><select id="tool-style"><option value="assembly" data-i18n="tool_style_assembly">Assembly line</option><option value="halo" data-i18n="tool_style_halo">Beam ring</option><option value="grid" data-i18n="tool_style_grid">Grid</option><option value="off" data-i18n="tool_style_off">Off</option></select></label></div>
|
|
407
|
+
<div id="tool-stage" class="tool-stage" data-style="assembly">
|
|
407
408
|
<div class="tool-visual"><div class="tool-orbit"><canvas id="tool-canvas" role="img" data-i18n-label="tool_heading" aria-label="Tool and agent activity"></canvas></div><p class="tool-narration"><span id="tool-state" role="status" aria-live="polite" data-i18n="flow_status_unknown">Waiting for a fresh status</span><span id="tool-cursor" aria-hidden="true" hidden> …</span></p></div>
|
|
408
409
|
<div class="tool-content"><p id="tool-context" class="tool-context" hidden></p><div id="tool-list"></div><p id="tool-more" class="hint" hidden></p><details id="tool-details" class="tool-details tool-technical" hidden><summary data-i18n="tool_details">Call details</summary><div id="tool-technical"></div></details></div>
|
|
409
410
|
</div>
|
|
410
411
|
</section>
|
|
412
|
+
<details id="flow-active" class="panel dashboard-section"><summary id="flow-active-title" data-i18n="flow_active_requests">Active requests</summary><div class="table-wrap"><table><thead><tr><th data-i18n="client">App</th><th data-i18n="source">Source</th><th data-i18n="model">Model</th><th data-i18n="state">State</th><th data-i18n="flow_elapsed">Elapsed</th><th data-i18n="attempts">Attempts</th></tr></thead><tbody id="flow-active-body"></tbody></table></div></details>
|
|
411
413
|
<details class="panel dashboard-section" id="source-requests" open>
|
|
412
414
|
<summary data-i18n="requests_by_source">REQUESTS BY SOURCE</summary>
|
|
413
415
|
<p class="hint" data-i18n="results_since_startup_partial_usage_is_marked_separately">Results since startup. Partial usage is marked separately.</p>
|
|
@@ -424,6 +426,7 @@
|
|
|
424
426
|
<label for="failure-kind" class="sr-only" data-i18n="issue_category">Issue category</label>
|
|
425
427
|
<select id="failure-kind"><option value="issues" data-i18n="issue_replies">Reply issues</option><option value="capability" data-i18n="issue_capabilities">Capability notices</option><option value="connection" data-i18n="issue_connections">Connections and paths</option><option value="discovery" data-i18n="issue_discovery">Service probes</option></select>
|
|
426
428
|
<ol id="failures"><li class="empty" data-i18n="reading_874bf">Reading…</li></ol>
|
|
429
|
+
<details id="failure-history" class="tool-details" hidden><summary id="failure-history-title">Failures over 24 hours</summary><div class="table-wrap"><table><thead><tr><th data-i18n="client">App</th><th data-i18n="model">Model</th><th data-i18n="phase">Phase</th><th data-i18n="failed">Failed</th><th data-i18n="time">Time</th><th data-i18n="request_id">Request ID</th></tr></thead><tbody id="failure-history-body"></tbody></table></div></details>
|
|
427
430
|
</details>
|
|
428
431
|
</div>
|
|
429
432
|
<div data-view="system" hidden>
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
"tool_style": ["Style","样式"],
|
|
5
5
|
"tool_style_grid": ["Grid","格子进度条"],
|
|
6
6
|
"tool_style_halo": ["Beam ring","光束圆环"],
|
|
7
|
-
"
|
|
8
|
-
"tool_style_speed": ["Fast streaks","疾速流光"],
|
|
9
|
-
"tool_style_assembly": ["Assembly line","装配流水线"],
|
|
7
|
+
"tool_style_assembly": ["Assembly line","装配线"],
|
|
10
8
|
"tool_style_off": ["Off","关闭"],
|
|
11
9
|
"tool_preparing": ["Preparing a tool call","正在准备调用"],
|
|
12
10
|
"tool_preparing_many": ["Preparing {count} calls","并行准备 {count} 项调用"],
|
|
@@ -49,6 +47,10 @@
|
|
|
49
47
|
gemini_source_disabled: ["Copilot source is off.", "Copilot 来源未启用。"],
|
|
50
48
|
gemini_open_sources: ["Model sources", "前往模型来源"],
|
|
51
49
|
gemini_new_chat_default: ["New chat default", "新会话默认"],
|
|
50
|
+
gemini_copilot_timeout: ["Copilot response timeout (s)", "Copilot 响应超时(秒)"],
|
|
51
|
+
gemini_timeout_default: ["Default: {seconds}", "默认:{seconds}"],
|
|
52
|
+
gemini_native_source: ["Custom Gemini source", "自定义 Gemini 来源"],
|
|
53
|
+
gemini_native_source_none: ["None", "不使用"],
|
|
52
54
|
gemini_settings_saved: ["Model settings saved", "模型设置已保存"],
|
|
53
55
|
gemini_scope: ["Native Google models keep their route. Copilot models and all Antigravity summaries, searches and images use Copilot. Ordinary Gemini chat keeps Google.", "原生 Google 模型保留原路由;Copilot 模型及全部 Antigravity 摘要、搜索和图像使用 Copilot。Gemini 普通聊天保留 Google。"],
|
|
54
56
|
gemini_enable: ["Enable Copilot access", "启用 Copilot 接入"], gemini_disable: ["Pause Copilot access", "停用 Copilot 接入"], gemini_open: ["Open client", "打开客户端"],
|
|
@@ -193,6 +195,13 @@
|
|
|
193
195
|
"issue_access_denied": ["Access was denied", "请求被拒绝访问"],
|
|
194
196
|
"issue_request_failed": ["Request did not complete", "请求未完成"],
|
|
195
197
|
"issue_upstream_timeout": ["Source request timed out", "来源请求超时"],
|
|
198
|
+
"issue_upstream_response_timeout": ["Timed out waiting for the model source to respond.", "等待模型来源响应超时。"],
|
|
199
|
+
"failure_history_count": ["Failures over 24 hours ({count})", "近 24 小时失败({count})"],
|
|
200
|
+
"failure_phase_local": ["Before sending", "发送前"],
|
|
201
|
+
"failure_phase_send": ["Sending upstream", "发送上游"],
|
|
202
|
+
"failure_phase_headers": ["Waiting for response headers", "等待响应头"],
|
|
203
|
+
"failure_phase_stream": ["Reading response", "读取响应"],
|
|
204
|
+
"failure_phase_upstream": ["Upstream rejected", "上游拒绝"],
|
|
196
205
|
"issue_after_send_timeout": ["Timed out waiting for the source", "等待来源响应超时"],
|
|
197
206
|
"issue_source_rate_wait": ["Source rate limit. Wait {seconds} s.", "来源限流。建议等待 {seconds} 秒。"],
|
|
198
207
|
"api_save_read": ["Save & read models", "保存并读取模型"],
|
|
@@ -899,6 +908,7 @@
|
|
|
899
908
|
"review_uses_selected_source": ["Uses the selected source above.", "使用上方选定的来源。"],
|
|
900
909
|
"thinking_level": ["Thinking level", "思考强度"],
|
|
901
910
|
"follow_client": ["Follow Codex (low if omitted)", "跟随 Codex(未指定时用 low)"],
|
|
911
|
+
"review_follow_model": ["Follow conversation model", "跟随会话模型"],
|
|
902
912
|
"save_review": ["Save review settings", "保存审查设置"],
|
|
903
913
|
"m365_source_access": ["Provides models for Codex and Claude on supported devices.", "在支持的设备上为 Codex 和 Claude 提供模型。"],
|
|
904
914
|
"confirm_disable_m365": ["Disable Microsoft 365? Its Claude connection will stop and unchanged CCDX-owned settings will be restored. Codex will use GitHub Copilot. Your sign-in and usage history will be kept.", "停用 Microsoft 365?Claude 本地连接将关闭,未被您改动的 CCDX 设置将恢复。Codex 将改用 GitHub Copilot。登录信息和用量记录会保留。"],
|
|
@@ -1636,6 +1646,7 @@
|
|
|
1636
1646
|
"Output limit reached.": "output_limit_reached",
|
|
1637
1647
|
"Connection to the model source failed.": "source_connection_failed",
|
|
1638
1648
|
"HTTP request failed; original response was preserved.": "http_request_failed_original_response_was_preserved",
|
|
1649
|
+
"Timed out waiting for the model source to respond.": "issue_upstream_response_timeout",
|
|
1639
1650
|
"phase": "phase",
|
|
1640
1651
|
"http_status": "http_status",
|
|
1641
1652
|
"upstream_attempts": "upstream_attempts",
|