diff --git a/assistant.py b/assistant.py index 3fb812f..4ae15d3 100755 --- a/assistant.py +++ b/assistant.py @@ -67,6 +67,11 @@ def parse_commands(text): context_query = '\n\nThe following is context provided by the user:\n' context_query += get_string_from_clipboard() + '\n' return text.split('/clipboard ')[1] + context_query + case '/copy': + blocks = extract_code_block(history[-1]['content']) + if len(blocks): + copy_string_to_clipboard(blocks[0]) + return True case '/exit': exit() return False