Skip to content

Commit

Permalink
Provide a setting for default destination (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaresty authored Aug 11, 2024
1 parent 1c2e456 commit 9a38a8f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions GPT/gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,9 @@ def gpt_insert_response(
cursorless_destination: Any = None,
):
"""Insert a GPT result in a specified way"""

if method == "":
method = settings.get("user.model_default_destination")
match method:
case "above":
actions.key("left")
Expand Down
7 changes: 7 additions & 0 deletions lib/talonSettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ def modelSimplePrompt(matched_prompt) -> str:
desc="The temperature of the model. Higher values make the model more creative.",
)

mod.setting(
"model_default_destination",
type=str,
default="paste",
desc="The default insertion destination. This can be overridden contextually to provide application level defaults.",
)

mod.setting(
"model_endpoint",
type=str,
Expand Down

0 comments on commit 9a38a8f

Please sign in to comment.