codex-copilot-dx 1.3.16 → 1.3.18

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.
@@ -260,9 +260,13 @@ export function createStreamPerformanceMetrics({ now = () => performance.now(),
260
260
  let stopReason = null;
261
261
  const elapsed = (time) => time === null ? null : Number(Math.max(0, time - requestStartedAt).toFixed(1));
262
262
  if (activeRequests.size < MAX_ACTIVE_REQUESTS) activeRequests.set(activeId, () => ({
263
- request_id: safeRequestId, application: client, route: routeName, provider, model, phase,
263
+ request_id: safeRequestId, session_id: session ? session.slice(0, 16) : null, application: client, route: routeName, provider, model, phase,
264
264
  started_at: at, elapsed_ms: elapsed(now()), first_output_ms: elapsed(firstOutputAt),
265
265
  upstream_attempts: attempts, terminal_outcome: terminalOutcome,
266
+ previous_request: session ? (() => {
267
+ const previous = recentRequests.findLast(row => row.session_id === session.slice(0, 16) && row.application === client && row.provider === provider);
268
+ return previous ? { request_id: previous.request_id, stop_reason: previous.stop_reason || null, outcome: previous.outcome, elapsed_ms: previous.timings_ms.finished } : null;
269
+ })() : null,
266
270
  attempts: attemptTimings.map(attempt => ({ ...attempt })),
267
271
  }));
268
272
  changes.changed();
@@ -404,7 +408,7 @@ export function createStreamPerformanceMetrics({ now = () => performance.now(),
404
408
  finished: finishedAt, request_id: safeRequestId, outcome, context, cached_input_tokens: cachedInput });
405
409
  // Only scalar, allowlisted metadata survives the request; never retain payloads.
406
410
  recentRequests.push({
407
- request_id: safeRequestId, application: client,
411
+ request_id: safeRequestId, ...(session ? { session_id: session.slice(0, 16) } : {}), application: client,
408
412
  at, route: routeName, model, outcome, origin, phase,
409
413
  ...(["ccdx_model_not_selected", "ccdx_client_source_disabled"].includes(rejectionReason) ? { rejection_reason: rejectionReason } : {}),
410
414
  ...(stopReason ? { stop_reason: stopReason } : {}),
@@ -15,6 +15,7 @@ export function createTerminalConsole({ output = process.stdout, errorOutput = p
15
15
  snapshot = () => ({}), subscribe, preferences = () => ({}), baseUrl = "", verbose = false,
16
16
  timers = { setTimeout, clearTimeout }, now = Date.now } = {}) {
17
17
  let running = false, timer = null, lines = 0, frame = 0, lastRead = 0, data = {}, projection = projectTerminalState();
18
+ let imageRuntime = null;
18
19
  let notices = 0, lastNotice = "", lastPrintedNotice = "", previous = [];
19
20
  let content = [], dirty = true, readFailed = false, updatedAt = null, fits = true;
20
21
  let current = { theme: DEFAULT_TERMINAL_ANIMATION_THEME, color_theme: "green", terminal_animation_enabled: true };
@@ -87,7 +88,7 @@ export function createTerminalConsole({ output = process.stdout, errorOutput = p
87
88
  const appSize = width < 64 ? 13 : 15, setupSize = Math.max(10, Math.min(20, width - appSize - 7));
88
89
  const appRows = view.clients.map(client => `${clip(client.name, appSize - 1).padEnd(appSize)}${clip(client.setup, setupSize - 1).padEnd(setupSize)}${String(readFailed || client.active === null ? "—" : client.active).padStart(6)}`);
89
90
  const issue = view.issue?.label;
90
- const notice = notices ? `${notices} ${notices === 1 ? "notice" : "notices"}${issue ? ` · last model issue: ${issue}` : " · ccdx status --details"}` : issue ? `Last model issue: ${issue}` : "No notices";
91
+ const notice = notices ? `${notices} ${notices === 1 ? "notice" : "notices"}${issue ? ` · last model issue: ${issue}` : " · ccdx status --details"}` : issue ? `Last model issue: ${issue}` : `Image evidence: ${imageRuntime?.tool_registration === "observed" ? "tool registered" : imageRuntime?.connected ? "host connected" : "unconfirmed"} · ccdx app codex image repair`;
91
92
  content = [clip(heading, width), clip(webAddress, width), sourceHeader,
92
93
  ...(view.sources ? wrap(view.sources.map(source => source.name).join(" · "), width) : []),
93
94
  `${"App".padEnd(appSize)}${"Setup".padEnd(setupSize)}${"Active".padStart(6)}`, ...appRows,
@@ -144,6 +145,7 @@ export function createTerminalConsole({ output = process.stdout, errorOutput = p
144
145
  });
145
146
  },
146
147
  pause() { running = false;unsubscribe?.();unsubscribe = null;if (timer) timers.clearTimeout(timer);timer = null;if (lines) output.write("\n");lines = 0;previous = [];dirty = true; },
148
+ image(value) { imageRuntime = value;dirty = true; },
147
149
  beginRequest() { dirty = true;return () => { dirty = true; }; },
148
150
  log(method, args) {
149
151
  const message = redactDiagnosticText(format(...args));