theme-tools icon indicating copy to clipboard operation
theme-tools copied to clipboard

Add LLM instructions file suggestion

Open madmath opened this issue 1 year ago β€’ 3 comments

What are you adding in this PR?

This PR introduces support for:

  • Suggesting the addition of an LLM instructions file in the repo if there isn't one
  • Suggesting the update of an LLM instructions file when it looks outdated
  • The "Shopify Magic" button in the top corner of the editor
  • The "Shopify Magic" refactoring button in the context menu when users select a piece of Liquid
  • The creation of the .cursorrules/copilot-instructions.md which works with multiple themes opened in the same workspace
  • The .cursorrules/copilot-instructions.md files are generated based on https://github.com/Shopify/theme-liquid-docs

Click here to check a demo of this feature.

What's next? Any follow-up issues?

After clicking on β€œQuick fix,” close the hover dialog automatically (so users may see the suggestions immediately) β€” I don't think that's possible, but I'm planning to revisit this when we get this work on main.

Before you deploy

  • [x] I included a minor bump changeset
  • [x] My feature is backward compatible

madmath avatar Dec 11 '24 20:12 madmath

I've created this PR for future reference so we can have a diff of the changes between the prototype and this version.

karreiro avatar Jan 28 '25 14:01 karreiro

πŸ‘‹ Hey @charlespwd @frandiox, this PR is ready for review now :)

karreiro avatar Jan 28 '25 18:01 karreiro

Thank you for the review, @frandiox!

I've applied the suggestions :) also, I've created this to handle scenario 1, slightly updated the prompt to prevent the scenario 2 (I couldn't get those "Keep <suggestion...>" anymore in my theme), and I've renamed sidefix to sideMagic to handle scenario 3 :)

Thanks again for the review! πŸ™Œ

karreiro avatar Jan 30 '25 12:01 karreiro

Closing this one for now.

graygilmore avatar Nov 05 '25 23:11 graygilmore