';
+ if (loop.active) {
+ html += `
🔄 Loop Active`;
+ if (loop.completionPhrase) {
+ html += ` - waiting for: ${this.escapeHtml(loop.completionPhrase)}`;
+ }
+ html += '
';
+ if (loop.elapsedHours !== null) {
+ html += `
Elapsed: ${loop.elapsedHours.toFixed(2)} hours
`;
+ }
+ if (loop.cycleCount > 0) {
+ html += `
Cycle: #${loop.cycleCount}
`;
+ }
+ } else if (loop.completionPhrase) {
+ html += `
✓ Completed: ${this.escapeHtml(loop.completionPhrase)}
`;
+ }
+ html += '
';
+ }
+
+ // Todo list
+ if (state?.todos?.length > 0) {
+ const completed = state.todos.filter(t => t.status === 'completed').length;
+ const total = state.todos.length;
+
+ html += '