Skip to content

Commit 13f90b7

Browse files
committed
fix patch applying
1 parent 6e71790 commit 13f90b7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

cycode/cli/commands/ai_remediation/ai_remediation_command.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def _apply_fix(context: click.Context, diff: str, is_fix_available: bool) -> Non
2626
printer.print_result(CliResult(success=False, message='Fix is not available for this violation'))
2727
return
2828

29-
patch = fromstring(diff)
29+
patch = fromstring(diff.encode('UTF-8'))
3030
if patch is False:
3131
printer.print_result(CliResult(success=False, message='Failed to parse fix diff'))
3232
return

cycode/cyclient/scan_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,9 @@ def get_ai_remediation(self, detection_id: str, *, fix: bool = False) -> str:
215215

216216
data = {
217217
'resolving_parameters': {
218-
'git_diff': True,
218+
'get_diff': True,
219219
'use_code_snippet': True,
220+
'add_diff_header': True,
220221
}
221222
}
222223
if not fix:

0 commit comments

Comments
 (0)