Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"name": "agent-radar",
"source": "plugins/agent-radar",
"description": "See a live map of the Copilot agents on your computer, their sub-agents, their commands, and where their data goes.",
"version": "1.0.0"
"version": "1.0.1"
},
{
"name": "agentcouncil",
Expand Down
25 changes: 23 additions & 2 deletions extensions/agent-radar/graph.test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ function graph(width = 1000, height = 500, panels = false) {
vm.createContext(sandbox);
vm.runInContext((panels ? panelSource : source) + `
reduceMotion = true;
globalThis.graph = { build, draw, pick, toggleSelect, nodeInfo, label, nodes, focusedNodes, messagePoint, drawMessages,
globalThis.graph = { build, draw, pick, toggleSelect, nodeInfo, label, nodes, focusedNodes, messagePoint, drawMessages, spawnParticles,
setReducedMotion(value) { reduceMotion = value; },
get messagePulses() { return messagePulses; },
get messagePulses() { return messagePulses; }, get particles() { return particles; },
get links() { return links; }, get selected() { return selected; },
get size() { return [W, H]; } };
`, sandbox);
Expand Down Expand Up @@ -105,6 +105,27 @@ test("idle filtering keeps node identities and data flow attribution", () => {
assert.equal(api.links.find((l) => l.kind === "flow").a, "s:one");
});

test("in-flight particles follow rebuilt links and drop with removed links", () => {
const { api, elements } = graph();
const idle = session("two");
idle.busy = false;
const s = session("one", 1);
api.setReducedMotion(false);
api.build(snapshot(s, idle));
api.spawnParticles(1000);
assert.ok(api.particles.some((p) => p.l.b === "a:one:child-0"));
elements.get("showIdle").checked = true;
api.build(snapshot(s, idle));
assert.ok(api.particles.length > 0);
for (const p of api.particles) assert.ok(api.links.includes(p.l));
elements.get("showIdle").checked = false;
s.subagents[0].running = false;
api.build(snapshot(s, idle));
assert.ok(api.particles.length > 0);
assert.ok(!api.particles.some((p) => p.l.b === "a:one:child-0"));
for (const p of api.particles) assert.ok(api.links.includes(p.l));
});

test("drawing shows diamond, name, status and task with pixel-bounded labels", () => {
const { api, labels, paths } = graph(900);
const s = session("one", 1);
Expand Down
3 changes: 3 additions & 0 deletions extensions/agent-radar/ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,9 @@ <h1>Agent Radar</h1>
}
for (const [id, n] of nodes) if (!n.seen) nodes.delete(id);
links = links.filter((l) => nodes.has(l.a) && nodes.has(l.b));
// Move in-flight particles onto the rebuilt links so they follow re-laid-out paths.
const linkByEnds = new Map(links.map((l) => [l.a + "→" + l.b, l]));
particles = particles.filter((p) => (p.l = linkByEnds.get(p.l.a + "→" + p.l.b)));
observeMessages(snap);
if (selected && !nodes.has(selected.id)) selected = null;
if (hover && !nodes.has(hover.id)) { hover = null; tip.style.display = "none"; cv.style.cursor = "default"; }
Expand Down
2 changes: 1 addition & 1 deletion plugins/agent-radar/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
"name": "agent-radar",
"description": "See a live map of the Copilot agents on your computer, their sub-agents, their commands, and where their data goes.",
"version": "1.0.0",
"version": "1.0.1",
"author": {
"name": "Annika Wickert",
"url": "https://github.com/awlx"
Expand Down
Loading