chore: implement coderabbit suggestions
This commit is contained in:
@@ -193,6 +193,18 @@ function parseUpdatedTaskFromText(text, expectedTaskId, logFn, isMCP) {
|
|||||||
// Preprocess the task to ensure subtasks have proper structure
|
// Preprocess the task to ensure subtasks have proper structure
|
||||||
const preprocessedTask = {
|
const preprocessedTask = {
|
||||||
...parsedTask,
|
...parsedTask,
|
||||||
|
status: parsedTask.status || 'pending',
|
||||||
|
dependencies: Array.isArray(parsedTask.dependencies)
|
||||||
|
? parsedTask.dependencies
|
||||||
|
: [],
|
||||||
|
details:
|
||||||
|
typeof parsedTask.details === 'string'
|
||||||
|
? parsedTask.details
|
||||||
|
: String(parsedTask.details || ''),
|
||||||
|
testStrategy:
|
||||||
|
typeof parsedTask.testStrategy === 'string'
|
||||||
|
? parsedTask.testStrategy
|
||||||
|
: String(parsedTask.testStrategy || ''),
|
||||||
// Ensure subtasks is an array and each subtask has required fields
|
// Ensure subtasks is an array and each subtask has required fields
|
||||||
subtasks: Array.isArray(parsedTask.subtasks)
|
subtasks: Array.isArray(parsedTask.subtasks)
|
||||||
? parsedTask.subtasks.map((subtask) => ({
|
? parsedTask.subtasks.map((subtask) => ({
|
||||||
|
|||||||
Reference in New Issue
Block a user