[PR #17330] Add a snippets pane #31189

Open
opened 2026-01-31 09:45:41 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/17330

State: closed
Merged: Yes


This adds a snippets pane, which can be a static pane with all your snippets (sendInput actions) in it. (See #17329)

This pane has a treeview with these actions in it, that we can filter with a textbox at the top.

Play buttons next to entries make it quick to run the command you found.

Bound in the default actions with

        { "command": { "action": "splitPane", "type": "snippets" }, "id": "Terminal.OpenSnippetsPane", "name": { "key": "SnippetsPaneCommandName" } },

re: #1595


TODO, from 06-04 bug bash

  • Snippets pane doesn't display some "no snippets found" text if there aren't any yet
  • open snippets pane; find a "send input"; click the play button on it; input is sent to active pane; begin typing
  • I can open an infinite amount of suggestions panes
    • I'm closing this as by-design for now at least. Nothing stopping anyone from opening infinite of any kind of pane.
    • This would require kind of a lot of refactoring in this PR to mark a kind of pane as being a singleton or singleton-per-tab
    • Okay everyone hates infinite suggestions panes, so I got rid of that
  • Ctrl+Shift+W should still work in the snippets pane even if focus isn't in textbox
  • open snippets pane; click on text box; press TAB key;
    • If you press TAB again, I have no idea where focus went
  • some previews don't work. Like ^c ("input": "\u0003")
  • nested items just give you a bit of extra space for no reason and it looks a little awkward
  • UI Suggestion: add padding on the right side
  • [Accessibility] Narrator says "Clear buffer; Suggestions found 132" when you open the snippets pane
    • Note: this is probably Narrator reading out the command palette (since that's where I opened it from)
    • We should probably expect something like "Snippets", then (assuming focus is thrown into text box) "Type to filter snippets" or something like that
**Original Pull Request:** https://github.com/microsoft/terminal/pull/17330 **State:** closed **Merged:** Yes --- This adds a snippets pane, which can be a static pane with all your snippets (`sendInput` actions) in it. (See #17329) This pane has a treeview with these actions in it, that we can filter with a textbox at the top. Play buttons next to entries make it quick to run the command you found. Bound in the default actions with ```json { "command": { "action": "splitPane", "type": "snippets" }, "id": "Terminal.OpenSnippetsPane", "name": { "key": "SnippetsPaneCommandName" } }, ``` re: #1595 ---- TODO, from 06-04 bug bash * [x] Snippets pane doesn't display some "no snippets found" text if there aren't any yet * [x] open snippets pane; find a "send input"; click the play button on it; input is sent to active pane; begin typing * [x] I can open an infinite amount of suggestions panes * ~I'm closing this as by-design for now at least. Nothing stopping anyone from opening infinite of any kind of pane.~ * ~This would require kind of a lot of refactoring in this PR to mark a kind of pane as being a singleton or singleton-per-tab~ * Okay everyone hates infinite suggestions panes, so I got rid of that * [x] Ctrl+Shift+W should still work in the snippets pane even if focus isn't in textbox * [ ] open snippets pane; click on text box; press TAB key; * [ ] If you press TAB again, I have no idea where focus went * [x] some previews don't work. Like `^c` (`"input": "\u0003"`) * [x] nested items just give you a bit of extra space for no reason and it looks a little awkward * [x] UI Suggestion: add padding on the right side * [ ] [Accessibility] Narrator says "Clear buffer; Suggestions found 132" when you open the snippets pane - Note: this is probably Narrator reading out the command palette (since that's where I opened it from) - We should probably expect something like "Snippets", then (assuming focus is thrown into text box) "Type to filter snippets" or something like that
claunia added the pull-request label 2026-01-31 09:45:41 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31189