-
Notifications
You must be signed in to change notification settings - Fork 751
feat(chat): support multi file write with reject and open diff #6955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
| fullWidth = true | ||
| padding = false | ||
| // eslint-disable-next-line unicorn/no-null | ||
| codeBlockActions = { 'insert-to-cursor': null, copy: null } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is null needed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
undefined doesn't work because it defaults to having insert to cursor and copy buttons
|
|
||
| const diff = getDiffMarkdown(changes, language) | ||
| updates.write(diff) | ||
| // Write an empty string because FsWrite should only show a chat message with header |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't fully follow here, why do we need an empty string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just to make sure we create a chat message for this tool so that we can add a header to it
| oldContent = '' | ||
| isNew = true | ||
| } | ||
| return { filePath: sanitizedPath, content: oldContent, isNew } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the logic here that for backups that don't exist (i.e. writing to a new file) we return empty content and a flag to say it doesn't exist? Is this the easiest way to handle this case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we need some way to differentiate if the backup was a new file creation or the file existed but was empty. I think a flag works best here
Problem
Support workflows with multiple file writes without confirmation
Solution
requiresAcceptancetofalsefor all FsWrite executionsfeature/xbranches will not be squash-merged at release time.