fix(tasks): prevent duplicate task comments by adding stable comment ID
- Introduced a stable comment ID format to ensure that comments are not duplicated when the completeTask function is called multiple times for the same task. - Updated the addTaskComment function to include the new ID format, which combines the completedTask ID and blockedTask ID. This change enhances the task management system by improving comment handling during task resolution.
This commit is contained in:
parent
7b13a4c398
commit
26e21251d0
1 changed files with 4 additions and 0 deletions
|
|
@ -278,7 +278,11 @@ function notifyUnblockedOwners(context, completedTask) {
|
|||
);
|
||||
}
|
||||
|
||||
// Stable comment ID prevents duplicates when completeTask is called
|
||||
// multiple times for the same task (e.g. agent retry). addTaskComment
|
||||
// in taskStore.js deduplicates by id (line 485).
|
||||
addTaskComment(context, blockedTask.id, {
|
||||
id: `dep-resolved-${completedTask.id}-${blockedTask.id}`,
|
||||
text: lines.join('\n'),
|
||||
from: 'system',
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue