lvwerra HF Staff commited on
Commit
c369cea
·
verified ·
1 Parent(s): 3352e86

Upload static/index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. static/index.html +26 -9
static/index.html CHANGED
@@ -330,13 +330,12 @@
330
  }
331
  .msg .ts {
332
  font-family: "JetBrains Mono", monospace;
333
- font-size: 10px; color: var(--muted-3); font-variant-numeric: tabular-nums;
 
 
 
 
334
  line-height: 16px;
335
- /* Optical alignment: 10px digit glyphs (no descenders) sit ~1.5px
336
- higher than 11px mixed-case text in the same 16px line-box, so
337
- align-items: center leaves them looking off. translateY doesn't
338
- affect layout, just rendering. */
339
- transform: translateY(2px);
340
  }
341
  .msg .quote-btn {
342
  margin-left: auto;
@@ -409,6 +408,11 @@
409
  color: var(--ink);
410
  border: 1px solid var(--border); background: #fff;
411
  padding: 8px 10px; border-radius: 2px;
 
 
 
 
 
412
  /* Default to 1-line height; JS auto-grows on input up to max. */
413
  min-height: 36px; max-height: 200px;
414
  resize: none; overflow-y: auto;
@@ -1510,7 +1514,16 @@ function renderChart(entries) {
1510
  ticks: {
1511
  color: '#888',
1512
  font: { family: "'JetBrains Mono', monospace", size: 10 },
1513
- callback: v => new Date(v).toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', hour12: false }),
 
 
 
 
 
 
 
 
 
1514
  maxTicksLimit: 8,
1515
  },
1516
  },
@@ -1796,8 +1809,12 @@ async function refreshMe() {
1796
  }
1797
 
1798
  function autosizeTextarea() {
1799
- humanMessageInput.style.height = 'auto';
1800
- humanMessageInput.style.height = Math.min(humanMessageInput.scrollHeight, 200) + 'px';
 
 
 
 
1801
  }
1802
  humanMessageInput.addEventListener('input', () => {
1803
  autosizeTextarea();
 
330
  }
331
  .msg .ts {
332
  font-family: "JetBrains Mono", monospace;
333
+ /* Match the agent name's font-size so both share identical vertical
334
+ metrics — alignment becomes trivial under align-items: center. ts
335
+ stays visually secondary via lighter weight + muted color. */
336
+ font-size: 11px; font-weight: 400;
337
+ color: var(--muted-3); font-variant-numeric: tabular-nums;
338
  line-height: 16px;
 
 
 
 
 
339
  }
340
  .msg .quote-btn {
341
  margin-left: auto;
 
408
  color: var(--ink);
409
  border: 1px solid var(--border); background: #fff;
410
  padding: 8px 10px; border-radius: 2px;
411
+ /* border-box keeps the autosize math simple: scrollHeight measures
412
+ padding+content, height includes border, so the +2 in the JS exactly
413
+ compensates for the 1px top/bottom borders and content fits with no
414
+ phantom scrollbar. */
415
+ box-sizing: border-box;
416
  /* Default to 1-line height; JS auto-grows on input up to max. */
417
  min-height: 36px; max-height: 200px;
418
  resize: none; overflow-y: auto;
 
1514
  ticks: {
1515
  color: '#888',
1516
  font: { family: "'JetBrains Mono', monospace", size: 10 },
1517
+ callback: v => {
1518
+ const d = new Date(v);
1519
+ // When the chart spans more than a day, time labels lose
1520
+ // meaning across the gap — show "May 6" instead of "09:23".
1521
+ if ((extendedEnd - xMin) > 24 * 3600 * 1000) {
1522
+ const months = ['Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'];
1523
+ return `${months[d.getMonth()]} ${d.getDate()}`;
1524
+ }
1525
+ return d.toLocaleTimeString('en-US', { hour: '2-digit', minute: '2-digit', hour12: false });
1526
+ },
1527
  maxTicksLimit: 8,
1528
  },
1529
  },
 
1809
  }
1810
 
1811
  function autosizeTextarea() {
1812
+ const ta = humanMessageInput;
1813
+ ta.style.height = 'auto';
1814
+ // scrollHeight = content + padding (no border). With border-box, the CSS
1815
+ // height includes the border, so add 2px (1px top + 1px bottom) so the
1816
+ // content area is exactly tall enough — no phantom scrollbar.
1817
+ ta.style.height = Math.min(ta.scrollHeight + 2, 200) + 'px';
1818
  }
1819
  humanMessageInput.addEventListener('input', () => {
1820
  autosizeTextarea();