From b4f6d525e17eba05c66cd636be45947c6c79429a Mon Sep 17 00:00:00 2001 From: borja Date: Mon, 8 Sep 2025 20:48:08 +0200 Subject: [PATCH] fix: usar id directo y formatear con ) en listado de tareas Co-authored-by: aider (openrouter/openai/gpt-5) --- src/services/command.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/services/command.ts b/src/services/command.ts index 7e7118f..e548ae3 100644 --- a/src/services/command.ts +++ b/src/services/command.ts @@ -239,7 +239,7 @@ export class CommandService { const rendered = items.map((t) => { const isOverdue = t.due_date ? t.due_date < todayYMD : false; const datePart = t.due_date ? ` — ${isOverdue ? `${ICONS.warn} ` : ''}${ICONS.date} ${formatDDMM(t.due_date)}` : ''; - return `- ${codeId(t.id)} _${t.description || '(sin descripción)'}_${datePart} — ${ICONS.unassigned} sin responsable`; + return `- ${t.id}) _${t.description || '(sin descripción)'}_${datePart} — ${ICONS.unassigned} sin responsable`; }); const total = TaskService.countGroupUnassigned(context.groupId); @@ -288,7 +288,7 @@ export class CommandService { : `${t.assignees!.length > 1 ? '👥' : '👤'} ${names.join(', ')}`; const isOverdue = t.due_date ? t.due_date < todayYMD : false; const datePart = t.due_date ? ` — ${isOverdue ? `${ICONS.warn} ` : ''}${ICONS.date} ${formatDDMM(t.due_date)}` : ''; - return `- ${codeId(t.id)} _${t.description || '(sin descripción)'}_${datePart} — ${owner}`; + return `- ${t.id}) _${t.description || '(sin descripción)'}_${datePart} — ${owner}`; })); sections.push(...rendered); } @@ -313,7 +313,7 @@ export class CommandService { const renderedUnassigned = unassigned.map((t) => { const isOverdue = t.due_date ? t.due_date < todayYMD : false; const datePart = t.due_date ? ` — ${isOverdue ? `${ICONS.warn} ` : ''}${ICONS.date} ${formatDDMM(t.due_date)}` : ''; - return `- ${codeId(t.id)} _${t.description || '(sin descripción)'}_${datePart} — ${ICONS.unassigned} sin responsable`; + return `- ${t.id}) _${t.description || '(sin descripción)'}_${datePart} — ${ICONS.unassigned} sin responsable`; }); sections.push(...renderedUnassigned); @@ -341,7 +341,7 @@ export class CommandService { const renderedUnassigned = unassigned.map((t) => { const isOverdue = t.due_date ? t.due_date < todayYMD : false; const datePart = t.due_date ? ` — ${isOverdue ? `${ICONS.warn} ` : ''}${ICONS.date} ${formatDDMM(t.due_date)}` : ''; - return `- ${codeId(t.id)} _${t.description || '(sin descripción)'}_${datePart} — ${ICONS.unassigned} sin responsable`; + return `- ${t.id}) _${t.description || '(sin descripción)'}_${datePart} — ${ICONS.unassigned} sin responsable`; }); sections.push(...renderedUnassigned); @@ -407,7 +407,7 @@ export class CommandService { : `${t.assignees!.length > 1 ? '👥' : '👤'} ${names.join(', ')}`; const isOverdue = t.due_date ? t.due_date < todayYMD : false; const datePart = t.due_date ? ` — ${isOverdue ? `${ICONS.warn} ` : ''}${ICONS.date} ${formatDDMM(t.due_date)}` : ''; - return `- ${codeId(t.id)} _${t.description || '(sin descripción)'}_${datePart} — ${owner}`; + return `- ${t.id}) _${t.description || '(sin descripción)'}_${datePart} — ${owner}`; })); const total = TaskService.countGroupPending(context.groupId); @@ -458,7 +458,7 @@ export class CommandService { : `${t.assignees!.length > 1 ? '👥' : '👤'} ${names.join(', ')}`; const isOverdue = t.due_date ? t.due_date < todayYMD : false; const datePart = t.due_date ? ` — ${isOverdue ? `${ICONS.warn} ` : ''}${ICONS.date} ${formatDDMM(t.due_date)}` : ''; - return `- ${codeId(t.id)} _${t.description || '(sin descripción)'}_${datePart} — ${owner}`; + return `- ${t.id}) _${t.description || '(sin descripción)'}_${datePart} — ${owner}`; })); sections.push(...rendered); } @@ -518,7 +518,7 @@ export class CommandService { const due = res.task?.due_date ? ` — ${ICONS.date} ${formatDDMM(res.task?.due_date)}` : ''; return [{ recipient: context.sender, - message: `${ICONS.complete} ${codeId(id)} completada — _${res.task?.description || '(sin descripción)'}_${due}` + message: `${ICONS.complete} ${id} completada — _${res.task?.description || '(sin descripción)'}_${due}` }]; } @@ -789,7 +789,7 @@ export class CommandService { ? `${ICONS.unassigned} sin responsable${groupName ? ` (${groupName})` : ''}` : `${assignmentUserIds.length > 1 ? '👥' : '👤'} ${assignedDisplayNames.join(', ')}`; const ackParts = [ - `${ICONS.create} ${codeId(taskId)} _${description || '(sin descripción)'}_`, + `${ICONS.create} ${taskId} _${description || '(sin descripción)'}_`, dueFmt ? `${ICONS.date} ${dueFmt}` : null, ownerPart ].filter(Boolean);