Skip to content
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

chat: prototype of choices API for response stream #238011

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

connor4312
Copy link
Member

@connor4312 connor4312 commented Jan 15, 2025

This is an API similar to buttons in notifications and is a bit more flexible than the current confirmation API. It could supplant confirmation, but I left confirmation as-is for the moment. Marking this PR initially as a draft pending some discussion about awaitable choices

25-01-9af75035-5922-4948-aeff-12ee0eb2374b.mp4

This is an API similar to buttons in notifications and is a bit more flexible than the current confirmation API. It could supplant confirmation, but I left confirmation as-is for the moment. Marking this PR initially as a draft pending some discussion about awaitable choices
@connor4312 connor4312 self-assigned this Jan 15, 2025
@connor4312 connor4312 requested a review from jrieken January 15, 2025 23:40
@connor4312 connor4312 marked this pull request as ready for review January 16, 2025 16:52
@vs-code-engineering vs-code-engineering bot added this to the January 2025 milestone Jan 16, 2025
if (isResponseVM(element)) {
const prompt = `${e.label}: "${choices.title}"`;
const options: IChatSendRequestOptions = {
choiceData: [e.data],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having trouble to understand why this is an array and not just "the item", also how is the related to madeChoice. From the usage they seem equal'ish but from the API choiceData suggests to be all data and the latter seems to be the actual choice made?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was following the pattern of confirmations, but I'm good making it a single object if you think it makes more sense

@jrieken
Copy link
Member

jrieken commented Jan 17, 2025

Generally looking good, have some trouble understanding what IChatSendRequestOptions#madeChoice vs IChatSendRequestOptions#madeChoice means

Also cc @roblourens for changes in the UI/model/etc

@connor4312
Copy link
Member Author

what IChatSendRequestOptions#madeChoice vs IChatSendRequestOptions#madeChoice means

These are the same thing 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants