mirror of
https://github.com/pacnpal/Roo-Code.git
synced 2025-12-20 20:31:37 -05:00
Return updated file content when user makes edits to cline's suggestions
This commit is contained in:
@@ -138,9 +138,13 @@ export class DiffViewProvider {
|
||||
}
|
||||
}
|
||||
|
||||
async saveChanges(): Promise<{ newProblemsMessage: string | undefined; userEdits: string | undefined }> {
|
||||
async saveChanges(): Promise<{
|
||||
newProblemsMessage: string | undefined
|
||||
userEdits: string | undefined
|
||||
finalContent: string | undefined
|
||||
}> {
|
||||
if (!this.relPath || !this.newContent || !this.activeDiffEditor) {
|
||||
return { newProblemsMessage: undefined, userEdits: undefined }
|
||||
return { newProblemsMessage: undefined, userEdits: undefined, finalContent: undefined }
|
||||
}
|
||||
const absolutePath = path.resolve(this.cwd, this.relPath)
|
||||
const updatedDocument = this.activeDiffEditor.document
|
||||
@@ -192,10 +196,10 @@ export class DiffViewProvider {
|
||||
normalizedNewContent,
|
||||
normalizedEditedContent
|
||||
)
|
||||
return { newProblemsMessage, userEdits }
|
||||
return { newProblemsMessage, userEdits, finalContent: normalizedEditedContent }
|
||||
} else {
|
||||
// no changes to cline's edits
|
||||
return { newProblemsMessage, userEdits: undefined }
|
||||
return { newProblemsMessage, userEdits: undefined, finalContent: normalizedEditedContent }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user