logancyang / obsidian-copilot

THE Copilot in Obsidian
https://www.obsidiancopilot.com/
GNU Affero General Public License v3.0
2.95k stars 204 forks source link

Alternative behavior options for adhoc/custom prompts #589

Open pedramamini opened 1 month ago

pedramamini commented 1 month ago

The current behavior of applying a custom/adhoc prompt is to process the results into the CoPilot chat window. Would be great to provide some options to users in addition to this default behavior:

logancyang commented 1 month ago

I'm actually adding "insert at cursor" button to all AI responses in chat.

Also considering adding a new feature where you directly write templates into chat without any command, so no need to trigger adhoc custom prompt.

Basically another way to apply custom prompts with "/prompts" triggering the list of custom prompts, where

Let me know what you think! I'm thinking of adding a bunch of slash commands soon.

pedramamini commented 1 month ago

Interesting options. One negative of the slash command is that it can't take a selective input. If one could simple select some text to transform via a prompt, that would be an ideal pattern:

  1. Select text in a regular note
  2. Command pallete or hotkey to adhoc/custom prompt
  3. Run and replace selected text

If no text is selected, then the output of the prompt would simply appear at the cursor in the current note.

logancyang commented 1 month ago

Got it. This seems to mean that we need to distinguish the prompts that are the "text transform" kind, cuz replacing original text is only applicable for those. In general I'm wary of letting AI replace my writing, if I'm not satisfied with the output it's a lot of back and forth to edit the note. It's the biggest reason I prefer the chat pane in most cases. I'll think more about this.

For slash commands I believe I can make selection work the same way as the current custom prompts. My idea is that people can choose to use the command palette or the slash command, both are going to do the same thing.

pedramamini commented 1 month ago

Yes, that would be optimal. To have three actions:

On Wed, Sep 04, 2024 at 10:10 AM, Logan Yang < @.*** > wrote:

Got it. This seems to mean that we need to distinguish the prompts that are the "text transform" kind, cuz replacing original text is only applicable for those. In general I'm wary of letting AI replace my writing, if I'm not satisfied with the output it's a lot of back and forth to edit the note. It's the biggest reason I prefer the chat pane in most cases. I'll think more about this.

For slash commands I believe I can make selection work the same way as the current custom prompts. My idea is that people can choose to use the command palette or the slash command, both are going to do the same thing.

— Reply to this email directly, view it on GitHub ( https://github.com/logancyang/obsidian-copilot/issues/589#issuecomment-2329331921 ) , or unsubscribe ( https://github.com/notifications/unsubscribe-auth/AAJSBRKW6QXDJUYUCOME5Q3ZU4PFPAVCNFSM6AAAAABNTODQL6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRZGMZTCOJSGE ). You are receiving this because you authored the thread. Message ID: <logancyang/obsidian-copilot/issues/589/2329331921 @ github. com>

pedramamini commented 1 month ago

Just noticed that #468 is a subset of this request.