feat(rpg): dynamically display parallel coder instance count (x2, x3) on active dev desk
This commit is contained in:
+12
-3
@@ -722,6 +722,7 @@
|
||||
agents[key].state = agentData.state;
|
||||
agents[key].currentTask = agentData.currentTask;
|
||||
agents[key].lastAction = agentData.lastAction;
|
||||
agents[key].parallelCount = agentData.parallelCount || 0;
|
||||
if (agentData.liveLog && agentData.liveLog.length > 0) {
|
||||
agents[key].liveLog = agentData.liveLog;
|
||||
}
|
||||
@@ -1416,15 +1417,23 @@
|
||||
ctx.fillText("💾 DELEGATE", x - 6, y + 3 + bounce);
|
||||
|
||||
} else if (agent.state === 'WORKING') {
|
||||
const count = agent.parallelCount || 1;
|
||||
const bubbleW = (count > 1) ? 54 : 40;
|
||||
ctx.fillStyle = "#064e3b";
|
||||
ctx.fillRect(x - 10, y - 10, 40, 20);
|
||||
ctx.strokeStyle = "#34d399";
|
||||
ctx.fillRect(x - 10, y - 10, bubbleW, 20);
|
||||
ctx.strokeStyle = (count > 1) ? "#facc15" : "#34d399";
|
||||
ctx.lineWidth = 1.5;
|
||||
ctx.strokeRect(x - 10, y - 10, 40, 20);
|
||||
ctx.strokeRect(x - 10, y - 10, bubbleW, 20);
|
||||
ctx.font = "10px 'Press Start 2P'";
|
||||
ctx.fillStyle = "#34d399";
|
||||
ctx.fillText("</>", x - 4, y + 4);
|
||||
|
||||
if (count > 1) {
|
||||
ctx.font = "10px 'Press Start 2P'";
|
||||
ctx.fillStyle = "#facc15";
|
||||
ctx.fillText(`x${count}`, x + 24, y + 4);
|
||||
}
|
||||
|
||||
} else if (agent.state === 'THINKING') {
|
||||
const bob = Math.sin(time * 0.01) * 2;
|
||||
ctx.fillStyle = "#713f12";
|
||||
|
||||
Reference in New Issue
Block a user