You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`[Roo-Debug] readApiMessages: Found OLD API conversation history file (claude_messages.json), but it's empty (parsed as []). TaskId: ${taskId}, Path: ${oldPath}`,
50
43
)
51
44
}
52
45
awaitfs.unlink(oldPath)
53
46
returnparsedData
54
-
}catch(error){
47
+
}catch(oldError: any){
48
+
if(oldError.code==="ENOENT"){
49
+
// If we reach here, neither the new nor the old history file was found.
50
+
console.error(
51
+
`[Roo-Debug] readApiMessages: API conversation history file not found for taskId: ${taskId}. Expected at: ${filePath}`,
52
+
)
53
+
return[]
54
+
}
55
+
56
+
// For any other error with the old file, log and rethrow
55
57
console.error(
56
-
`[Roo-Debug] readApiMessages: Error parsing OLD API conversation history file (claude_messages.json). TaskId: ${taskId}, Path: ${oldPath}, Error: ${error}`,
58
+
`[Roo-Debug] readApiMessages: Error reading OLD API conversation history file (claude_messages.json). TaskId: ${taskId}, Path: ${oldPath}, Error: ${oldError}`,
57
59
)
58
-
// DO NOT unlink oldPath if parsing failed, throw error instead.
59
-
throwerror
60
+
throwoldError
60
61
}
62
+
}else{
63
+
// For any other error with the main file, log and rethrow
64
+
console.error(
65
+
`[Roo-Debug] readApiMessages: Error reading API conversation history file. TaskId: ${taskId}, Path: ${filePath}, Error: ${error}`,
66
+
)
67
+
throwerror
61
68
}
62
69
}
63
-
64
-
// If we reach here, neither the new nor the old history file was found.
65
-
console.error(
66
-
`[Roo-Debug] readApiMessages: API conversation history file not found for taskId: ${taskId}. Expected at: ${filePath}`,
0 commit comments