herdr-remote 0.2.14 → 0.2.15
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/dist/tui.mjs +1 -1
- package/herdr-plugin.toml +1 -1
- package/package.json +1 -1
- package/src/agent-status.js +14 -6
package/dist/tui.mjs
CHANGED
|
@@ -4064,7 +4064,7 @@ function About({ ctx }) {
|
|
|
4064
4064
|
children: updateLabel
|
|
4065
4065
|
}
|
|
4066
4066
|
) }),
|
|
4067
|
-
/* @__PURE__ */ jsx10(Row, { label: t("about.version"), children: /* @__PURE__ */ jsx10(Text9, { color: theme.muted, children: "0.2.
|
|
4067
|
+
/* @__PURE__ */ jsx10(Row, { label: t("about.version"), children: /* @__PURE__ */ jsx10(Text9, { color: theme.muted, children: "0.2.15" }) }),
|
|
4068
4068
|
/* @__PURE__ */ jsx10(Row, { label: t("about.configPath"), children: /* @__PURE__ */ jsx10(Text9, { color: theme.muted, children: (0, import_config.configPath)() }) }),
|
|
4069
4069
|
/* @__PURE__ */ jsx10(Row, { label: t("about.statePath"), children: /* @__PURE__ */ jsx10(Text9, { color: theme.muted, children: (0, import_config.stateDir)() }) }),
|
|
4070
4070
|
/* @__PURE__ */ jsx10(Box9, { marginTop: 1, children: /* @__PURE__ */ jsx10(Text9, { color: theme.muted, children: t("about.docs") }) }),
|
package/herdr-plugin.toml
CHANGED
package/package.json
CHANGED
package/src/agent-status.js
CHANGED
|
@@ -56,13 +56,21 @@ function emptyCounts() {
|
|
|
56
56
|
*/
|
|
57
57
|
function summarizeAgents(snapshot) {
|
|
58
58
|
const entries = Array.isArray(snapshot?.agents) ? snapshot.agents : [];
|
|
59
|
-
const
|
|
60
|
-
const
|
|
61
|
-
? snapshot.
|
|
62
|
-
: null;
|
|
63
|
-
const focusedAgentEntry = focusedPaneId
|
|
64
|
-
? entries.find((entry) => entry?.pane_id === focusedPaneId)
|
|
59
|
+
const panes = Array.isArray(snapshot?.panes) ? snapshot.panes : [];
|
|
60
|
+
const reportedFocusId = typeof snapshot?.focused_pane_id === 'string' && snapshot.focused_pane_id
|
|
61
|
+
? snapshot.focused_pane_id
|
|
65
62
|
: null;
|
|
63
|
+
// `focused_pane_id` is the primary signal in Herdr snapshots. The focused
|
|
64
|
+
// flags are a fallback for snapshots where that top-level field is absent.
|
|
65
|
+
const focusedPane = (reportedFocusId
|
|
66
|
+
? panes.find((pane) => pane?.pane_id === reportedFocusId)
|
|
67
|
+
: panes.find((pane) => pane?.focused === true)) || null;
|
|
68
|
+
const focusedAgentEntry = (reportedFocusId
|
|
69
|
+
? entries.find((entry) => entry?.pane_id === reportedFocusId)
|
|
70
|
+
: entries.find((entry) => entry?.focused === true)) || null;
|
|
71
|
+
const focusedPaneId = reportedFocusId
|
|
72
|
+
|| (typeof focusedPane?.pane_id === 'string' ? focusedPane.pane_id : null)
|
|
73
|
+
|| (typeof focusedAgentEntry?.pane_id === 'string' ? focusedAgentEntry.pane_id : null);
|
|
66
74
|
const focusedAgent = typeof focusedPane?.agent === 'string'
|
|
67
75
|
? focusedPane.agent
|
|
68
76
|
: typeof focusedAgentEntry?.agent === 'string'
|