typebulb 0.62.2 → 0.62.3

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.
@@ -23,6 +23,12 @@
23
23
  // the one thing they cannot see for themselves.
24
24
  const say = text => { if (el.isConnected) why.textContent = text }
25
25
  let retried = false
26
+ const refetch = src => setTimeout(() => {
27
+ const again = document.createElement('script')
28
+ again.type = 'module'
29
+ again.src = src.split('?')[0] + '?retry=' + Date.now() // past a cached bad response
30
+ document.body.appendChild(again)
31
+ }, 1000)
26
32
  // A module script's FETCH failure fires on the element and never bubbles to window, hence capture.
27
33
  // Untreated it is invisible: the page shimmers on over a bundle that is never coming.
28
34
  addEventListener('error', e => {
@@ -33,12 +39,12 @@
33
39
  // re-appending the script rather than reloading the page cannot loop and cannot cost the page.
34
40
  if (retried) { say("The agent mirror didn't finish loading. Reload to retry."); return }
35
41
  retried = true
36
- setTimeout(() => {
37
- const again = document.createElement('script')
38
- again.type = 'module'
39
- again.src = script.src.split('?')[0] + '?retry=' + Date.now() // past a cached bad response
40
- document.body.appendChild(again)
41
- }, 1000)
42
+ refetch(script.src)
43
+ } else if (e.error instanceof SyntaxError && el.isConnected && !retried) {
44
+ // A bundle fetched mid-rewrite parses as half a file: the same transient, so the same one retry.
45
+ const bundle = document.querySelector('script[type=module][src]')
46
+ if (bundle) { retried = true; refetch(bundle.src); return }
47
+ say('The agent mirror stopped: ' + e.message)
42
48
  } else if (e.message) {
43
49
  say('The agent mirror stopped: ' + e.message)
44
50
  }
@@ -1891,9 +1891,14 @@ a.agent-name:hover { text-decoration: underline; }
1891
1891
  --warn amber. */
1892
1892
  .cs-header { padding: 1.2rem 0 .2rem; }
1893
1893
  .cs-title { font-size: 1.25rem; font-weight: 600; line-height: 1.3; }
1894
- .cs-subtitle { color: var(--muted); margin-top: .2rem; }
1894
+ /* The header's facts as tiles: flat and square-cornered, so they never read as the rows' outcome pills. */
1895
+ .cs-subtitle { color: var(--muted); margin-top: .5rem; display: flex; flex-wrap: wrap; align-items: stretch; gap: .5rem; }
1896
+ .cs-tile { display: flex; align-items: center; gap: .6rem; padding: .35rem .75rem; border-radius: 6px; background: var(--veil); }
1897
+ .cs-tile-rule { align-self: stretch; width: 1px; background: var(--border); }
1895
1898
  /* The agents menu's state dot, in front of the state it colours. */
1896
- .cs-subtitle .children-dot { display: inline-block; vertical-align: middle; margin-right: .45rem; }
1899
+ .cs-subtitle .children-dot { display: inline-block; }
1900
+ /* Tools over model, a two-line stack beside the active time it splits. */
1901
+ .cs-time { display: flex; flex-direction: column; align-items: center; line-height: 1.2; }
1897
1902
  /* The groups' spacing is the container's gap alone: a section margin on top of .messages' gap doubled it. */
1898
1903
  .child-status { gap: 1.25rem; }
1899
1904
  .cs-h { font-weight: 600; margin-bottom: .4rem; }
@@ -1916,19 +1921,25 @@ a.agent-name:hover { text-decoration: underline; }
1916
1921
  .cs-item:hover { background: var(--veil); }
1917
1922
  .cs-item-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
1918
1923
  .cs-item-main > .cs-mono { flex: 1 1 20rem; min-width: 0; overflow-wrap: anywhere; }
1919
- .cs-item-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .5rem; }
1924
+ .cs-item-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .5rem; font-size: .85rem; }
1920
1925
  .cs-item-sub { margin-top: .2rem; padding-left: 1rem; color: var(--muted); overflow-wrap: anywhere; }
1921
1926
  /* File tables, written and read: one compact line a file and no rule between rows; a written file's
1922
1927
  who-else line still sits beneath it. */
1923
1928
  .cs-files { border-top: none; }
1924
- .cs-files .cs-item { padding: .15rem .4rem; border-bottom: none; }
1925
- .cs-mono { font: .9rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
1929
+ .cs-files .cs-item { padding: .05rem .4rem; border-bottom: none; }
1930
+ /* A path is set as the diff pill's are (UI font, .85rem), and cuts from the left so the filename stays
1931
+ in view; the title and the link keep the whole path. */
1932
+ .cs-files .cs-item-main { flex-wrap: nowrap; }
1933
+ .cs-path { flex: 1 1 20rem; min-width: 0; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }
1934
+ .cs-files .cs-item-meta { flex-shrink: 0; flex-wrap: nowrap; }
1935
+ /* Monospace sets larger than the UI font, so .82rem sits level with the paths' .85rem. */
1936
+ .cs-mono { font: .82rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
1926
1937
  .cs-dim { color: var(--muted); }
1927
1938
  .cs-bad { color: var(--warn); }
1928
1939
  /* A command or open call cites its call, and a file opens in the editor: text that lights on hover. */
1929
1940
  .cs-link { cursor: pointer; color: inherit; }
1930
1941
  .cs-link:hover { color: var(--accent); text-decoration: underline; }
1931
- .cs-pill { display: inline-block; padding: 0 .5rem; border-radius: 999px; font-size: .9rem; line-height: 1.5; white-space: nowrap; background: var(--veil); color: var(--muted); }
1942
+ .cs-pill { display: inline-block; padding: 0 .5rem; border-radius: 999px; font-size: .8rem; line-height: 1.3; white-space: nowrap; background: var(--veil); color: var(--muted); }
1932
1943
  .cs-pill.ok { color: var(--diff-add); background: color-mix(in srgb, var(--diff-add) 14%, transparent); }
1933
1944
  .cs-pill.bad { color: var(--err); background: color-mix(in srgb, var(--err) 14%, transparent); }
1934
1945
  .cs-pill.run { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }