shadok-ai 0.17.17 → 0.17.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/public/index.html +12 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shadok-ai",
3
- "version": "0.17.17",
3
+ "version": "0.17.18",
4
4
  "main": "dist/session.js",
5
5
  "scripts": {
6
6
  "test": "node --import tsx --test --test-timeout=120000 test/*.ts context/*/test/*.test.mjs",
package/public/index.html CHANGED
@@ -1564,7 +1564,10 @@
1564
1564
  /* ── Activity block ──────────────────────────────────────
1565
1565
  A run of tool calls between two pieces of assistant text. Folds at three
1566
1566
  levels — output, same-tool run, whole block — each driven by data-folded.
1567
- Anything containing an error carries .has-err and never folds. */
1567
+ A whole block always folds to its summary line at turn end (even on an
1568
+ error — the count says "· N errors" and the head is flagged .has-err); the
1569
+ errored output and run INSIDE it stay open, so expanding reveals the
1570
+ failure at once rather than hiding it. */
1568
1571
  .turn.activity { max-width: 82%; gap: 0; }
1569
1572
  .act-body, .run-body, .item-out { display: flex; flex-direction: column; }
1570
1573
  [data-folded="true"] > .act-body,
@@ -1611,7 +1614,8 @@
1611
1614
  /* Inside a run the tool name is already in the header — don't repeat it. */
1612
1615
  .act-run:not([data-count="1"]) .item-head .tool { display: none; }
1613
1616
  .item-head .err-flag { flex: none; color: var(--err); }
1614
- .has-err > .item-head, .has-err > .run-head { border-left-color: var(--err); }
1617
+ /* A folded block hides its runs, so flag the error on the summary line too. */
1618
+ .has-err > .item-head, .has-err > .run-head, .has-err > .act-head { border-left-color: var(--err); }
1615
1619
 
1616
1620
  /* Tool output. */
1617
1621
  .result-body {
@@ -7476,10 +7480,14 @@
7476
7480
  tab.act = null;
7477
7481
  }
7478
7482
 
7479
- /** Folds every block of the finished turn that saw no error. */
7483
+ /** Folds every block of the finished turn down to its one-line summary.
7484
+ An errored block folds too — the count line still reads "· N errors" and
7485
+ the head carries .has-err, so the failure is flagged, not hidden. Inside,
7486
+ its errored run and output stay unfolded (addToolLine / addResult), so
7487
+ expanding the block lands straight on what failed. */
7480
7488
  function sealTurn(tab) {
7481
7489
  for (const block of tab.turnBlocks || []) {
7482
- if (!block.el.classList.contains("has-err")) setFolded(block.el, true);
7490
+ setFolded(block.el, true);
7483
7491
  }
7484
7492
  tab.turnBlocks = [];
7485
7493
  tab.pendingCalls?.clear();