Skip to content

Commit

Permalink
fix code block copy and insert
Browse files Browse the repository at this point in the history
  • Loading branch information
TerminalFi committed Jul 2, 2024
1 parent 7431723 commit a8ebab8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/ui/chat.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,6 @@ def process_code_block(reply, inside_code_block, code_block_index):
+ "\n\n"
+ code_block_lines[0]
)
print(reply)
return reply, code_block_lines

transformed_conversation = []
Expand All @@ -278,8 +277,9 @@ def process_code_block(reply, inside_code_block, code_block_index):
self.conversation_manager.insert_code_block_index(
code_block_index, "".join(current_entry["code_block"])
)
current_entry["code_block"] = []
else:
current_entry["code_block"].extend(reply)
current_entry["code_block"].append(reply)
current_entry["messages"].append(reply)
else:
if current_entry:
Expand Down

0 comments on commit a8ebab8

Please sign in to comment.