@agfpd/iapeer 0.4.67 → 0.4.68
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 +1 -1
- package/src/tray/install.ts +4 -3
- package/src/tray/render.ts +6 -2
package/package.json
CHANGED
package/src/tray/install.ts
CHANGED
|
@@ -100,9 +100,10 @@ export function buildPluginShim(binPath: string): string {
|
|
|
100
100
|
'# <xbar.author>iapeer</xbar.author>',
|
|
101
101
|
'# <xbar.desc>iapeer multi-agent fleet — live peer dashboard over the daemon fleet API.</xbar.desc>',
|
|
102
102
|
'# <swiftbar.type>streamable</swiftbar.type>',
|
|
103
|
-
'
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
// NB: deliberately NOT hiding SwiftBar's own service items (Run-in-Terminal /
|
|
104
|
+
// Disable / Last-Updated / Preferences / Refresh). They are the right-click "do
|
|
105
|
+
// stuff" menu the owner expects; hiding them made the icon feel dead. Minimalism is
|
|
106
|
+
// for OUR content (status + peer rows), not SwiftBar's utility menu.
|
|
106
107
|
// The dashboard ONLY ever talks to the local daemon (unix socket / loopback), so it
|
|
107
108
|
// must never route through an HTTP proxy. Bun's fetch caches proxy config at process
|
|
108
109
|
// start and ignores NO_PROXY for loopback, so clearing the vars must happen in the
|
package/src/tray/render.ts
CHANGED
|
@@ -163,8 +163,11 @@ export function renderSwiftBar(snapshot: TraySnapshot, opts: RenderOptions): str
|
|
|
163
163
|
lines.push(...renderManage(peers, bin))
|
|
164
164
|
|
|
165
165
|
// ── footer ──
|
|
166
|
+
// No explicit "Refresh" item: the plugin is streamable + SSE-driven, so the menu is
|
|
167
|
+
// always current on open — a manual refresh gives the user nothing and (being a
|
|
168
|
+
// SwiftBar refresh) just closes the dropdown. The emergency "restart the plugin" lever
|
|
169
|
+
// lives in SwiftBar's own service menu (right-click → Refresh).
|
|
166
170
|
lines.push('---')
|
|
167
|
-
lines.push(line(0, 'Refresh', { refresh: true, sfimage: 'arrow.clockwise' }))
|
|
168
171
|
lines.push(line(0, `iapeer · fleet dashboard`, { color: COLOR.meta, size: 11 }))
|
|
169
172
|
return lines.join('\n') + '\n'
|
|
170
173
|
}
|
|
@@ -222,6 +225,8 @@ function renderManage(peers: TrayPeer[], bin: string): string[] {
|
|
|
222
225
|
for (const p of peers) {
|
|
223
226
|
out.push(line(1, p.personality))
|
|
224
227
|
for (const c of MANAGE_COMMANDS) {
|
|
228
|
+
// No refresh=true: the SSE stream reflects the command's lifecycle event on its
|
|
229
|
+
// own (streamable is always fresh); a refresh would only restart the stream.
|
|
225
230
|
out.push(
|
|
226
231
|
line(2, c.label, {
|
|
227
232
|
bash: bin,
|
|
@@ -230,7 +235,6 @@ function renderManage(peers: TrayPeer[], bin: string): string[] {
|
|
|
230
235
|
param3: c.cmd,
|
|
231
236
|
param4: p.personality,
|
|
232
237
|
terminal: false,
|
|
233
|
-
refresh: true,
|
|
234
238
|
}),
|
|
235
239
|
)
|
|
236
240
|
}
|