In general I like to have a short comment and example before the spoken definition of any comment. I would like to add this for model blend since it isn't super clear without it given the functions it calls are all wrappers.
i.e.
model blend takes a X and a Y and returns a Z, where Z is a blend of X and Y
Example `model blend block this to block next`
|
# Blend the target with the destination in order to update the destination |
|
model blend <user.cursorless_target> to <user.cursorless_target>: |
|
target_text = user.cursorless_get_text_list(cursorless_target_1) |
|
destination_text = user.cursorless_get_text(cursorless_target_2) |
|
default_destination = user.cursorless_create_destination(cursorless_target_2) |
|
result = user.gpt_blend_list(target_text, destination_text) |
|
user.cursorless_insert(default_destination, result) |
|
|
|
model blend to <user.cursorless_target>: |
|
target_text = edit.selected_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) |
|
user.cursorless_insert(default_destination, result) |
|
|
Since this is using a hard coded 0
can't this just be changed to user.paste
?
|
user.cursorless_or_paste_helper(0, result) |