-
Notifications
You must be signed in to change notification settings - Fork 555
Add default value support for all primitive types in elicitation schemas (SEP-1034) #924
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
Merged
eiriktsarpalis
merged 8 commits into
main
from
copilot/support-default-values-schema-types
Oct 31, 2025
Merged
Add default value support for all primitive types in elicitation schemas (SEP-1034) #924
eiriktsarpalis
merged 8 commits into
main
from
copilot/support-default-values-schema-types
Oct 31, 2025
+468
−3
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: eiriktsarpalis <[email protected]>
Copilot
AI
changed the title
[WIP] Add support for default values in elicitation schemas
Add default value support for all primitive types in elicitation schemas (SEP-1034)
Oct 30, 2025
Copilot finished work on behalf of
eiriktsarpalis
October 30, 2025 13:27
…mapping tests Co-authored-by: eiriktsarpalis <[email protected]>
Copilot stopped work on behalf of
eiriktsarpalis due to an error
October 30, 2025 13:53
stephentoub
reviewed
Oct 30, 2025
Co-authored-by: eiriktsarpalis <[email protected]>
Copilot finished work on behalf of
eiriktsarpalis
October 30, 2025 14:16
Co-authored-by: eiriktsarpalis <[email protected]>
…m AttributeProvider Co-authored-by: eiriktsarpalis <[email protected]>
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot stopped work on behalf of
eiriktsarpalis due to an error
October 30, 2025 14:43
…cord Removed the manual default value extraction code from BuildRequestSchema and SetDefaultValue helper as this should be handled by AIJsonUtilities. Updated FormWithDefaults to be a positional record with optional parameters. Test is now skipped until AIJsonUtilities supports extracting defaults from optional parameters. Co-authored-by: eiriktsarpalis <[email protected]>
stephentoub
approved these changes
Oct 30, 2025
Co-authored-by: eiriktsarpalis <[email protected]>
Copilot stopped work on behalf of
eiriktsarpalis due to an error
October 30, 2025 16:31
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
SEP-1034: Support default values for all primitive types in elicitation schemas
This PR implements SEP-1034 to add default value support for all primitive types in elicitation schemas.
Changes Made
Defaultproperty toStringSchemaclassDefaultproperty toNumberSchemaclassDefaultproperty toEnumSchemaclassConverter.Readmethod to deserialize default values for all types using a switch statementConverter.Writemethod to serialize default values for all typestrue/falsevalues for boolean defaults in converteris not nullpattern consistently for all nullable checksSummary
All primitive schema types (StringSchema, NumberSchema, EnumSchema, BooleanSchema) now support default values as specified in SEP-1034. The converter correctly handles serialization and deserialization of these default values based on the JSON token type using a switch statement with literal boolean values.
Default values can be set programmatically when creating schemas, and will be properly serialized/deserialized through the JSON converter.
Example
Future: Automatic Default Value Extraction
A test has been added (currently skipped) that demonstrates automatic extraction of default values from optional parameters in positional records when using
ElicitAsync<T>(). This will work onceAIJsonUtilitiesis updated to support extracting default values from optional parameters. The test uses a positional recordFormWithDefaultswith optional parameters likestring Name = "John Doe"and verifies that defaults are included in the generated elicitation schema.Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.