refactor: reemplazar ackParts por ackLines y usar codeId en mensajes

Co-authored-by: aider (openrouter/openai/gpt-5) <aider@aider.chat>
pull/1/head
borja 2 months ago
parent b4f6d525e1
commit 60ed92970b

@ -788,14 +788,14 @@ export class CommandService {
const ownerPart = assignmentUserIds.length === 0 const ownerPart = assignmentUserIds.length === 0
? `${ICONS.unassigned} sin responsable${groupName ? ` (${groupName})` : ''}` ? `${ICONS.unassigned} sin responsable${groupName ? ` (${groupName})` : ''}`
: `${assignmentUserIds.length > 1 ? '👥' : '👤'} ${assignedDisplayNames.join(', ')}`; : `${assignmentUserIds.length > 1 ? '👥' : '👤'} ${assignedDisplayNames.join(', ')}`;
const ackParts = [ const ackLines = [
`${ICONS.create} ${taskId} _${description || '(sin descripción)'}_`, `${ICONS.create} ${codeId(taskId)} _${description || '(sin descripción)'}_`,
dueFmt ? `${ICONS.date} ${dueFmt}` : null, dueFmt ? `${ICONS.date} ${dueFmt}` : null,
ownerPart ownerPart
].filter(Boolean); ].filter(Boolean);
responses.push({ responses.push({
recipient: createdBy, recipient: createdBy,
message: ackParts.join(' — '), message: ackLines.join('\n'),
mentions: mentionsForSending.length > 0 ? mentionsForSending : undefined mentions: mentionsForSending.length > 0 ? mentionsForSending : undefined
}); });

@ -309,8 +309,8 @@ describe('CommandService', () => {
expect(responses.length).toBe(1); expect(responses.length).toBe(1);
expect(responses[0].recipient).toBe('1234567890'); expect(responses[0].recipient).toBe('1234567890');
// Debe empezar con "📝 <id> " // Debe empezar con "📝 `0001` "
expect(responses[0].message).toMatch(/^📝 \d+ /); expect(responses[0].message).toMatch(/^📝 `\d{4}` /);
// Debe contener la descripción en cursiva compacta // Debe contener la descripción en cursiva compacta
expect(responses[0].message).toContain('_Test task_'); expect(responses[0].message).toContain('_Test task_');
// No debe usar el texto antiguo "Tarea <id> creada" // No debe usar el texto antiguo "Tarea <id> creada"

Loading…
Cancel
Save