Sublime Forum

Pieces For Sublime Text (on-device AI coding assistant that boosts developer productivity)

#1

The Pieces Team is super excited to announce a significant addition for our Pieces for Sublime Text.

What is Pieces?

Pieces is an innovative, free on-device AI coding assistant designed to supercharge your productivity. Imagine having a powerful AI copilot right at your fingertips, seamlessly integrating with your workflow. Whether you’re leveraging the capabilities of ChatGPT, Claude, Gemini, and many others local or on-cloud LLM models, Pieces has got you covered

But that’s not all! Pieces also excels in snippet management, making it incredibly easy to organize, retrieve, and utilize code snippets. This means less time searching and more time coding. With Pieces, you can focus on what you do best—creating amazing software—while it takes care of the rest.

In essence, Pieces is your ultimate coding companion, combining advanced AI capabilities with practical tools to make your development process smoother, faster, and more enjoyable. Give it a try and experience the future of coding today!

Pieces Features

  1. :mag: Search
    • Quickly find your saved snippets and resources with on-device machine learning models.
  2. :outbox_tray: Share
    • Easily share code snippets and their context with teammates.
  3. :page_facing_up: Extract
    • Extract useful information from your code and resources.
  4. :star2: Enrich
    • Enhance your snippets with additional context and metadata.
  5. :gear: Generate
    • Automatically generate useful code snippets and documentation.
  6. :books: Reference
    • Keep track of important code snippets and resources for future reference.
  7. :robot: Ask Copilot
    • Get assistance with commenting, fixing bugs, or adding docstrings by selecting code snippets or entire repositories and choosing “Pieces > Ask Copilot.”
  8. :speech_balloon: Copilot conversation
    • Have a Copilot conversation with context-aware 100% for free.

Links

1 Like

#2

Some other useful links:

0 Likes

#3

@bishoy-at-pieces I will also provide here my feedback similar to what I sent on Discord so other people can see it too.

  • #1 Sublime views can have their own settings. I suggest you auto enable word-wrap, remove the gutter and remove the minimap.
  • #2 Sublime supports multi-tab selection. While putting the conversation in a two-column layout is nice,
    some people have their own custom way (such as 2x2 layout). Putting the conversation in a normal tab
    will allow the user to decide how to handle it. It also provides better UX in my opinion (closing the conversation leaves an empty column).
  • #3 Exploit the View. While Sublime has rudimentary HTML support which is fine, many awesome plugins use the Buffer/View as the UI.
    I suggest you take a look at GitSavvy package. It represents its UI in the view itself and can be navigated
    via keyboard shortcuts. Think of ST as somehow similar to neovim.
  • #4 Additionally from above, Sublime-heavy users use keyboard shortcuts most of the time.
    Make sure that commands are discoverable in the command palette, especially the features you want to focus on
    such as the ones in the context menu items (“Save to Pieces”, “Start conver…”)
  • #5 Saving highlighted code snippets to Pieces should always use the snippets current syntax.
    I have tried saving something basic like console.log in a typescript file and it either detects it as a “note” or coffeescript
  • #6 What does export material do? I tried clicking save and nothing seem to happen.
  • #7 I like the idea that you can import your sublime snippets but I am pretty sure no one will manually pick their snippets.
    I do not have custom snippets but Sublime already has hundreds of snippets already from default packages. I suggest that the
    command should import all snippets (tag it with “Sublime Text”) and should just import all existing and future new snippets.
    This will allow the user to utilize the natural language auto completion which is definitely a plus!
  • #8 Putting multiple input handlers for search feels unnatural. Try doing the similar thing with “Goto Anything (ctrl+p)” shortcuts.
    You can use “neural search” as default and enable “full-text” when the user query starts with “@”.
    Think of your search feature as Sublime’s “Goto Anything”. The input-to-feedback ratio should be balanced enough for the user to really use it.
1 Like

#5

Appreciate your feedback, Thank you.
The team will be work on this stuff

For #6 export material converts a Pieces Material to sublime snippet
You can change the tab-trigger of the snippet the description or the scope

0 Likes

#6

Yeah, I got to that part but how would I edit/change things? I tried clicking around but nothing seems to work.

Here’s the log in case you need it.

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text\Lib\python38\sublime_plugin.py", line 1647, in run_
    return self.run(**args)
  File "C:\Users\lupi\AppData\Roaming\Sublime Text\Installed Packages\Pieces.sublime-package\assets/export_command.py", line 146, in run
  File "C:\Users\lupi\AppData\Roaming\Sublime Text\Installed Packages\Pieces.sublime-package\assets/export_command.py", line 104, in get_instance
  File "C:\Users\lupi\AppData\Roaming\Sublime Text\Installed Packages\Pieces.sublime-package\assets/export_command.py", line 104, in <listcomp>
  File "C:\Users\lupi\AppData\Roaming\Sublime Text\Installed Packages\Pieces.sublime-package\assets/export_command.py", line 100, in __str__
AttributeError: 'PiecesExportAssetToSublimeCommand' object has no attribute 'sheet'
0 Likes

#7

seems a bug gonna fix it next release

0 Likes

#8

A new patch release is out 1.3.4:

  • Fix the export command
  • Fix some Copilot issues (First role in the prompt can be deleted and it is included in the copilot prompt that is sent)
  • Fix “Start a new conversation about the current section” in the context menu
  • Fix inconsistent naming in the command palette
  • Fix can’t connect to the WebSocket bad family: connect() on some devices
  • Fix the ask command (code comments, ask for bug fix, modifying code) always does not have context

Links

1 Like