@try-works/dsh-minimal-router 0.2.11 → 0.2.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.
Files changed (2) hide show
  1. package/client/index.js +15 -5
  2. package/package.json +1 -1
package/client/index.js CHANGED
@@ -66835,8 +66835,8 @@ var TELEMETRY_CSS = [
66835
66835
  ".router-range-row { display: flex; flex-direction: row; align-items: center; gap: var(--spacing-2); padding-block: var(--spacing-2); }",
66836
66836
  '.router-range-chip[aria-pressed="true"] { background: var(--color-ink); color: var(--color-bg); border-color: var(--color-ink); }',
66837
66837
  ".router-range-chip { font-family: var(--font-mono); font-size: var(--text-caption); padding-inline: var(--spacing-3); }",
66838
- ...Array.from({ length: 21 }, (_, i) => ".router-tl-dot.w" + i + " { left: " + i * 5 + "%; }"),
66839
- ...Array.from({ length: 21 }, (_, i) => ".router-tl-dot.scatter-y-" + i + " { bottom: " + i * 5 + "%; }")
66838
+ ...Array.from({ length: 41 }, (_, i) => ".router-tl-dot.w" + i + " { left: " + i * 2.5 + "%; }"),
66839
+ ...Array.from({ length: 41 }, (_, i) => ".router-tl-dot.scatter-y-" + i + " { bottom: " + i * 2.5 + "%; }")
66840
66840
  ].join("\n");
66841
66841
  var EvidenceContentCss = `
66842
66842
  ${TELEMETRY_CSS}
@@ -68406,7 +68406,9 @@ var speedStripLine = (h3, strip) => {
68406
68406
  if (strip.available !== true) return "speed \xB7 not reported (" + (strip.reason ?? "no series") + ")";
68407
68407
  return "speed \xB7 p50 " + (strip.p50 ?? "\u2014") + " tps \xB7 floor " + strip.floor + " \xB7 " + (strip.belowFloor ?? 0) + " of " + strip.total + " below floor \xB7 " + strip.range;
68408
68408
  };
68409
+ var stepIndex = (pct) => Math.max(0, Math.min(40, Math.round(pct / 2.5)));
68409
68410
  var step3 = (pct) => "w" + Math.max(0, Math.min(20, Math.round(pct / 5)));
68411
+ var scatterDotClass = (xPct, yPct) => "router-tl-dot w" + stepIndex(xPct) + " scatter-y-" + stepIndex(yPct);
68410
68412
  var TelemetryPageSchema = Schema_exports.Struct({
68411
68413
  /** The window the reader selected; when it differs from view.range, data is in flight. */
68412
68414
  selectedRange: Schema_exports.optional(Schema_exports.Literals(["24h", "7d", "all"])),
@@ -68475,9 +68477,17 @@ var TelemetryPage = Html_exports.component({
68475
68477
  // property path in this snapshot), so the dots stay until the bridge
68476
68478
  // is proven. A half-wired plot would be worse than the fallback.
68477
68479
  h3.div.class("router-tl-scatter").children(
68478
- ...view2.scatter.points.map(
68479
- (point) => h3.div.class("router-tl-dot " + step3(point.promptTokens / (view2.scatter.xMax ?? 131072) * 100) + " scatter-y-" + step3(point.tps / 260 * 100)).attr("data-below-floor", point.tps < (view2.scatter.floor ?? 30) ? "true" : void 0)
68480
- )
68480
+ ...(() => {
68481
+ const yTop = Math.max(60, Math.ceil(Math.max(...view2.scatter.points.map((p) => p.tps)) / 20) * 20);
68482
+ return view2.scatter.points.map(
68483
+ (point) => h3.div.class(
68484
+ scatterDotClass(
68485
+ point.promptTokens / (view2.scatter.xMax ?? 131072) * 100,
68486
+ point.tps / yTop * 100
68487
+ )
68488
+ ).attr("data-below-floor", point.tps < (view2.scatter.floor ?? 30) ? "true" : void 0)
68489
+ );
68490
+ })()
68481
68491
  ),
68482
68492
  h3.div.class("router-tl-foot").children(view2.scatter.n + " requests \xB7 " + view2.scatter.plotted + " plotted \xB7 floor " + (view2.scatter.floor ?? 30) + " tps")
68483
68493
  ] : [unavailable(h3, view2.scatter.reason)]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@try-works/dsh-minimal-router",
3
- "version": "0.2.11",
3
+ "version": "0.2.12",
4
4
  "description": "DSH local router plugin: per-session auto-routing between a local engine and remote models, evidence pages, and a plugin-owned engine provider.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",