ibm-granite / granite-code-ide

Lightweight IDE extension to support “Granite Development Engagement”
Apache License 2.0
17 stars 1 forks source link

Explain code with Grantite.Code Context Menu Item #2

Open bellds opened 1 month ago

bellds commented 1 month ago

Description: Make it easier for a person to get the editors current file (code) explained to them by providing a context menu.

Solution: The IBM Granite.Code should contribute a context menu to the File Editor that says something like Explain code with IBM Granite.Code. When a person clicks on this menu item a new Chat Session needs be started with an initial prompt having Granite.Code explain the code in the file.

Additionally, the Chat Session should be titled something like Explain @xyz.file

Context: The above solution is based upon the Ansible Lightspeed plugin. The Ansible Lightspeed IDE plugin contributes a context menu that says Explain the playbook with Ansible Lightspeed

Alternatives: A person can manually create a new chat session and then ask it to explain a file. However, not all files in a workspace show up in the prompt's type ahead.

alvkhtan commented 2 weeks ago

WCAST-I-173