From cbfb4c0fc9918f26ea0cb81e7b497057520ac957 Mon Sep 17 00:00:00 2001 From: Schwa Aresty Date: Sun, 30 Jun 2024 19:51:08 -0700 Subject: [PATCH] Cleanup model blend cursorless grammar (#81) - Model blend to didn't specify a source; now it specifies the source as clipboard - Model blend was only implicitly dropping the 'this' --- GPT/beta-commands/beta-cursorless.talon | 11 +++-------- GPT/beta-commands/beta-gpt.talon | 2 +- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/GPT/beta-commands/beta-cursorless.talon b/GPT/beta-commands/beta-cursorless.talon index 63b09582..8be0b0fb 100644 --- a/GPT/beta-commands/beta-cursorless.talon +++ b/GPT/beta-commands/beta-cursorless.talon @@ -20,14 +20,9 @@ model blend to : result = user.gpt_blend_list(target_text, destination_text) user.cursorless_insert(default_destination, result) -model blend to : - target_text = edit.selected_text() +model blend clip to : + clipboard_text = clip.text() destination_text = user.cursorless_get_text(cursorless_target) default_destination = user.cursorless_create_destination(cursorless_target) - result = user.gpt_blend(target_text, destination_text) + result = user.gpt_blend(clipboard_text, destination_text) user.cursorless_insert(default_destination, result) - -model blend : - target_text = user.cursorless_get_text_list(cursorless_target) - result = user.gpt_blend_list(target_text, edit.selected_text()) - user.paste(result) diff --git a/GPT/beta-commands/beta-gpt.talon b/GPT/beta-commands/beta-gpt.talon index a388496f..f12e0007 100644 --- a/GPT/beta-commands/beta-gpt.talon +++ b/GPT/beta-commands/beta-gpt.talon @@ -6,7 +6,7 @@ tag: user.gpt_beta model find : user.gpt_find_talon_commands(user.text) # Using the context of the text on the clipboard, update the selected text -model blend clipboard: +model blend clip: clipboard_text = clip.text() destination_text = edit.selected_text() result = user.gpt_blend(clipboard_text, destination_text)