repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

fix(agent): use setStatus for progress feedback

32a29eb26c8d75c4e1ba563f90a340637f5e031a

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Simpler approach than widget. Shows status bar while debate runs.

Changed files (1)

pi/agent/extensions/devil/index.ts

Modified
237 237 ? `\n\n**Focus:** Challenge specifically from ${stakeholder} perspective.`
240 - // Show progress widget
241 - ctx.ui?.setWidget("devil", [
242 - "🗡️ Devil's Advocate",
243 - `Idea: ${idea.slice(0, 50)}${idea.length > 50 ? "..." : ""}`,
244 - `Rounds: ${maxRounds} | Model: ${model.id}`,
245 - "Status: Starting...",
246 - ]);
240 + // Show progress via status
241 + ctx.ui?.setStatus("devil", `🗡️ Devil: ${idea.slice(0, 40)}... (${maxRounds}r)`);
249 244 const rounds_data: string[] = [];
277 272 rounds_data.push(`### Round ${i}\n\n**Challenge:**\n${devilOutput}\n\n**Your Response:**\n${proposerOutput}`);
279 - // Update progress widget
280 - ctx.ui?.setWidget("devil", [
281 - "🗡️ Devil's Advocate",
282 - `Round ${i}/${maxRounds}: Challenge raised`,
283 - `Blocking issues: ${roundBlockingCount}`,
284 - "Awaiting synthesis...",
285 - ]);
274 + // Update progress
275 + ctx.ui?.setStatus("devil", `🗡️ Devil: Round ${i}/${maxRounds} - ${roundBlockingCount} blocking`);
287 277 // Check stopping conditions
288 278 const resolvedCount = (proposerOutput.match(/\*\*status\*\*:\s*resolved|status:\s*resolved/gi) || []).length;
335 325 ? `## Full Debate\n\n${rounds_data.join("\n\n---\n\n")}\n\n---\n\n## Summary\n\n${synthesisOutput}${blockingNote}\n\n**Debate:** ${rounds_data.length} rounds | **Blocking issues:** ${blockingIssuesFound}`
336 326 : `${synthesisOutput}${blockingNote}\n\n*Debate: ${rounds_data.length} rounds | Blocking: ${blockingIssuesFound}*`;
338 - // Clear widget on complete
339 - ctx.ui?.setWidget("devil", undefined);
328 + // Clear status on complete
329 + ctx.ui?.setStatus("devil", undefined);
341 331 return {
342 332 content: [{ type: "text", text: outputText }],
345 335 } catch (error) {
346 336 const message = error instanceof Error ? error.message : String(error);
347 - // Clear widget on error
348 - ctx.ui?.setWidget("devil", undefined);
337 + // Clear status on error
338 + ctx.ui?.setStatus("devil", undefined);
349 339 return {
350 340 content: [{ type: "text", text: `## Debate Failed\n\nError: ${message}` }],
351 341 details: { error: message },