-
Notifications
You must be signed in to change notification settings - Fork 30k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[prompt instructions]: initial implementation #237604
base: main
Are you sure you want to change the base?
Conversation
|
main |
Maybe the lightbulb icon on the widget should be yellow? |
When I remove the instructions attachment, I see
|
src/vs/workbench/contrib/chat/browser/chatAttachmentModel/chatInstructionsAttachment.ts
Show resolved
Hide resolved
/** | ||
* Default prompt instructions source folder paths. | ||
*/ | ||
const PROMPT_FILES_DEFAULT_LOCATION = ['.copilot/prompts']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wondering about the name, in the UI it says "Instructions", but then the file is a "prompt"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not a file name but a folder where prompt instruction files (any .md
file) are searched for.
We decided to use this path since it is short and more generic hence allows for different prompt file types to be stored here (e.g., instructions, snippets, etc.). This is all transient though, so I bet it will change couple of times in the nearest future 🤷
text-decoration: none; | ||
} | ||
.chat-attached-context .chat-prompt-instructions-attachment .chat-implicit-hint { | ||
opacity: 0.7; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is meant to look like the implicit widget, would it make sense to share the styles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah shared styles is what I had in the beginning but then decided that having separate ones is safer, so CSS changes a bit more isolated between components. Ideally we would have a set of common base styles shared between all similar components, but I didn't dare to do that refactoring in this PR reduce the PR scope 🤗
} | ||
.chat-attached-context .chat-prompt-instructions-attachment.disabled { | ||
border-style: dashed; | ||
opacity: 0.75; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this get a lower opacity when disabled when the implicit widget doesn't? I might have avoided doing that in the implicit widget for color contrast accessibility reasons.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought it is a good idea to have a dimmed reference if it is disabled since it is a common UI language users are used to and to reduce visual noise 🤔
The 0.75
value is larger than some of the elements in the "normal" mode (e.g., the .chat-implicit-hint
above) so the element remains prominent enough to not cause significant issues 🔍 Will keep it for now but will hold my ear to the ground for more feedback 👂
.../workbench/contrib/chat/browser/attachments/instructionsAttachment/instructionAttachments.ts
Show resolved
Hide resolved
Just a few questions, however none of my comments are blocking. Feel free to check it in! Looks nice |
… from the picker dialog
…ng specified prompt instruction file locations
…S styles, fix the infinite dispose loop issue
db5e776
to
e7c89ed
Compare
Yeah noticed the issue couple of times, but not sure what's causing this, will keep my eyes peeled 🔍
Yes, I great idea! Made it yellow ✅
Fixed 💃 |
For #5292