agentgui 1.0.1004 → 1.0.1005

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.1004",
3
+ "version": "1.0.1005",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",
@@ -37,6 +37,13 @@
37
37
  <link rel="modulepreload" href="./js/backend.js">
38
38
  <link rel="modulepreload" href="./js/codec.js">
39
39
  <link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin>
40
+ <!-- Preconnect alone still leaves the marked/dompurify ESM fetch+parse as a
41
+ full round trip AFTER the kit loads, on the first chat markdown render
42
+ (escaped-text -> rendered-markdown swap). modulepreload starts that
43
+ fetch in parallel with everything else instead of waiting for
44
+ markdown.js to reach its dynamic import. -->
45
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/marked@15.0.12/+esm" crossorigin>
46
+ <link rel="modulepreload" href="https://cdn.jsdelivr.net/npm/dompurify@3.2.6/+esm" crossorigin>
40
47
  <!-- No design content lives here. Every agentgui application-surface style
41
48
  (pills, cwd bar, resume banner, health chips, settings grid, history
42
49
  empty state, boot splash, scrollbar theming, focus rings, print) now
@@ -3075,14 +3075,18 @@ function serverPanel() {
3075
3075
  const roots = Array.isArray(hh.allowRoots) ? hh.allowRoots : [];
3076
3076
  const upMs = hh.uptimeMs != null ? hh.uptimeMs : (hh.uptime != null ? hh.uptime * 1000 : null);
3077
3077
  const wsClients = hh.wsClients != null ? hh.wsClients : (hh.clients != null ? hh.clients : null);
3078
+ // The very first health probe is in flight (not yet failed, not yet
3079
+ // succeeded): 'checking…' reads as progress, 'unknown' reads as a
3080
+ // permanent fact about the server - only the first is true here.
3081
+ const fallback = (hh.status === 'unknown' && state.healthChecking) ? 'checking…' : 'unknown';
3078
3082
  return Panel({
3079
3083
  id: 'server',
3080
3084
  title: 'server',
3081
3085
  children: [
3082
- h('div', { key: 'sv', class: 'lede' }, 'version: ' + (hh.version ? 'v' + hh.version : 'unknown')),
3083
- h('div', { key: 'sup', class: 'lede' }, 'uptime: ' + (upMs != null ? fmtDuration(upMs) : 'unknown')),
3084
- h('div', { key: 'swc', class: 'lede' }, 'connected clients: ' + (wsClients != null ? wsClients : 'unknown')),
3085
- h('div', { key: 'spd', class: 'lede' }, 'projects folder: ' + (hh.projectsDir || 'unknown')),
3086
+ h('div', { key: 'sv', class: 'lede' }, 'version: ' + (hh.version ? 'v' + hh.version : fallback)),
3087
+ h('div', { key: 'sup', class: 'lede' }, 'uptime: ' + (upMs != null ? fmtDuration(upMs) : fallback)),
3088
+ h('div', { key: 'swc', class: 'lede' }, 'connected clients: ' + (wsClients != null ? wsClients : fallback)),
3089
+ h('div', { key: 'spd', class: 'lede' }, 'projects folder: ' + (hh.projectsDir || fallback)),
3086
3090
  roots.length
3087
3091
  ? SessionMeta({ key: 'sroots', items: roots.map((r, i) => ({ label: 'root ' + (i + 1), value: r, title: r, onCopy: () => copyText(r, 'root copied') })) })
3088
3092
  : (hh.status && hh.status !== 'unknown' ? h('div', { key: 'snoroots', class: 'lede' }, 'allowed roots: none configured') : null),
@@ -3163,9 +3167,14 @@ function acpStatusFor(agentId) {
3163
3167
  function agentsPanel() {
3164
3168
  const installed = state.agents.filter(a => a.available !== false);
3165
3169
  const hasAcp = (Array.isArray(state.health.acp) ? state.health.acp : []).length > 0;
3170
+ // '0/0 installed' during the initial fetch reads as "nothing works", not
3171
+ // "still loading" - show the loading word instead until the list lands.
3172
+ const title = (state.agentsLoading && !state.agents.length)
3173
+ ? 'agents · loading…'
3174
+ : 'agents · ' + installed.length + '/' + state.agents.length + ' installed';
3166
3175
  return Panel({
3167
3176
  id: 'agents',
3168
- title: 'agents · ' + installed.length + '/' + state.agents.length + ' installed',
3177
+ title,
3169
3178
  children: [
3170
3179
  // ACP agents (opencode/kilo/codex) are managed automatically: started
3171
3180
  // on-demand and restarted with backoff by the server, so there are no
@@ -3439,7 +3448,13 @@ function startHealthPolling() {
3439
3448
  }
3440
3449
  async function recheckHealth() {
3441
3450
  const wasOk = state.health.status === 'ok';
3451
+ // Distinguishes "never probed yet" (status stays 'unknown', server panel
3452
+ // shows literal 'unknown' fields with no affordance) from "probe in
3453
+ // flight" - the settings server panel reads this to show 'checking…'
3454
+ // instead of a wall of 'unknown' during the very first health probe.
3455
+ state.healthChecking = true;
3442
3456
  const r = await B.probeBackend(state.backend);
3457
+ state.healthChecking = false;
3443
3458
  if (r.ok) {
3444
3459
  state.health = { status: 'ok', ...r.info };
3445
3460
  stopHealthPolling();