@oh-my-pi/pi-coding-agent 14.5.10 → 14.5.11

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.
@@ -964,6 +964,16 @@
964
964
  return html;
965
965
  }
966
966
 
967
+ function todoRoman(n) {
968
+ if (n <= 0) return '';
969
+ var pairs = [[1000,'M'],[900,'CM'],[500,'D'],[400,'CD'],[100,'C'],[90,'XC'],[50,'L'],[40,'XL'],[10,'X'],[9,'IX'],[5,'V'],[4,'IV'],[1,'I']];
970
+ var out = '', rem = n;
971
+ for (var i = 0; i < pairs.length; i++) {
972
+ while (rem >= pairs[i][0]) { out += pairs[i][1]; rem -= pairs[i][0]; }
973
+ }
974
+ return out;
975
+ }
976
+
967
977
  function renderTodoWrite(name, args, result, ctx) {
968
978
  let html = toolHead('todo_write');
969
979
  const ops = Array.isArray(args.ops) ? args.ops : null;
@@ -983,8 +993,10 @@
983
993
  const phases = result?.details?.phases;
984
994
  if (Array.isArray(phases)) {
985
995
  html += '<div class="todo-tree">';
986
- for (const phase of phases) {
987
- html += '<div class="todo-phase">' + escapeHtml(String(phase.name || '')) + '</div>';
996
+ for (var __i = 0; __i < phases.length; __i++) {
997
+ var phase = phases[__i];
998
+ var phaseLabel = todoRoman(__i + 1) + '. ' + String(phase.name || '');
999
+ html += '<div class="todo-phase">' + escapeHtml(phaseLabel) + '</div>';
988
1000
  if (Array.isArray(phase.tasks)) {
989
1001
  for (const task of phase.tasks) {
990
1002
  const status = task.status || 'pending';