logancyang / obsidian-copilot

THE Copilot in Obsidian

Home Page:https://www.obsidiancopilot.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Options in command palette aren't available when focus is outside open note ("Custom prompt" options specifically, but others too)

hb-man opened this issue · comments

commented

The problem:

Custom prompt has 5 possible actions: "add", "edit", "apply", "delete" and "apply ad-hoc"
Depending on the where the focus inside obsidian windows is, 3 of 5 actions aren't available.

All 5 actions available only, as far as I see, when the focus is inside an open note.

If the focus is inside chat window (or in the tag pane, or anywhere else but open note, for example in a "New tab", only "Edit custom prompt" and "Delete custom prompt" are available.
You can see users already being confused by this, for example in issue #458

Some other options for the plugin also aren't available when focus is outside the note too.

Reproduction steps

  1. Open new tab and focus on it by clicking the mouse anywhere on it.
  2. Open command palette, start typing "custom prompt". You'll see only two available options "Edit custom prompt" and "Delete custom prompt".
  3. Open any note, for example click "Create new note" in the new tab from step 1, focus on this note by clicking anywhere inside it.
  4. Open command palette, start typing "custom prompt". You'll see all 5 options for custom prompt.

Expected behavior

Options that don't require selection in the note should be available independent of the focus in the Obsidian window.
Adding custom prompt, applying it or applying ad-hoc custom prompt don't require selection, specifically because two latter might be configured to take folder path or tag as input.

When solving the issue, I advice to look through other Obsidian-Copilot options in command paletter and check whether the option requires selection as input or no, and reconfigure their availability independent of the focus.

Screenshots

Screen.Recording.2024-07-29.at.11.11.44.mov