MCPcopy Index your code
hub / github.com/github/copilot-sdk / assertElicitation

Method assertElicitation

go/session.go:1109–1115  ·  view source on GitHub ↗

assertElicitation checks that the host supports elicitation and returns an error if not.

()

Source from the content-addressed store, hash-verified

1107
1108// assertElicitation checks that the host supports elicitation and returns an error if not.
1109func (s *Session) assertElicitation() error {
1110 caps := s.Capabilities()
1111 if caps.UI == nil || !caps.UI.Elicitation {
1112 return fmt.Errorf("elicitation is not supported by the host; check session.Capabilities().UI.Elicitation before calling UI methods")
1113 }
1114 return nil
1115}
1116
1117// Elicitation shows a generic elicitation dialog with a custom schema.
1118func (ui *SessionUI) Elicitation(ctx context.Context, message string, requestedSchema ElicitationSchema) (*ElicitationResult, error) {

Callers 5

ElicitationMethod · 0.45
ConfirmMethod · 0.45
SelectMethod · 0.45
InputMethod · 0.45

Calls 1

CapabilitiesMethod · 0.95

Tested by 1