From 09bbdf4eb488315ca7f55370cb3e84192e101b71 Mon Sep 17 00:00:00 2001 From: Alexandre Bourget Date: Thu, 12 Sep 2024 17:44:58 -0400 Subject: [PATCH] Add support for selecting a default value on a Confirm() box. --- cmd/substreams/init.go | 3 + .../conversation/v1/conversation.pb.go | 244 +++++++++++------- .../conversation/v1/conversation.proto | 2 +- 3 files changed, 160 insertions(+), 89 deletions(-) diff --git a/cmd/substreams/init.go b/cmd/substreams/init.go index 2cf25982..03d70649 100644 --- a/cmd/substreams/init.go +++ b/cmd/substreams/init.go @@ -387,6 +387,9 @@ func runSubstreamsInitE(cmd *cobra.Command, args []string) error { input := msg.Confirm var returnValue bool + if msg.Confirm.DefaultButton == pbconvo.SystemOutput_Confirm_CONFIRM { + returnValue = true + } inputField := huh.NewConfirm(). Title(input.Prompt). Affirmative(input.AcceptButtonLabel). diff --git a/pb/sf/codegen/conversation/v1/conversation.pb.go b/pb/sf/codegen/conversation/v1/conversation.pb.go index 17390832..f5a71aef 100644 --- a/pb/sf/codegen/conversation/v1/conversation.pb.go +++ b/pb/sf/codegen/conversation/v1/conversation.pb.go @@ -66,6 +66,55 @@ func (SystemOutput_ListSelect_SelectType) EnumDescriptor() ([]byte, []int) { return file_sf_codegen_conversation_v1_conversation_proto_rawDescGZIP(), []int{2, 2, 0} } +type SystemOutput_Confirm_Button int32 + +const ( + SystemOutput_Confirm_UNSET SystemOutput_Confirm_Button = 0 + SystemOutput_Confirm_CONFIRM SystemOutput_Confirm_Button = 1 + SystemOutput_Confirm_DECLINE SystemOutput_Confirm_Button = 2 +) + +// Enum value maps for SystemOutput_Confirm_Button. +var ( + SystemOutput_Confirm_Button_name = map[int32]string{ + 0: "UNSET", + 1: "CONFIRM", + 2: "DECLINE", + } + SystemOutput_Confirm_Button_value = map[string]int32{ + "UNSET": 0, + "CONFIRM": 1, + "DECLINE": 2, + } +) + +func (x SystemOutput_Confirm_Button) Enum() *SystemOutput_Confirm_Button { + p := new(SystemOutput_Confirm_Button) + *p = x + return p +} + +func (x SystemOutput_Confirm_Button) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (SystemOutput_Confirm_Button) Descriptor() protoreflect.EnumDescriptor { + return file_sf_codegen_conversation_v1_conversation_proto_enumTypes[1].Descriptor() +} + +func (SystemOutput_Confirm_Button) Type() protoreflect.EnumType { + return &file_sf_codegen_conversation_v1_conversation_proto_enumTypes[1] +} + +func (x SystemOutput_Confirm_Button) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use SystemOutput_Confirm_Button.Descriptor instead. +func (SystemOutput_Confirm_Button) EnumDescriptor() ([]byte, []int) { + return file_sf_codegen_conversation_v1_conversation_proto_rawDescGZIP(), []int{2, 7, 0} +} + type Empty struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1441,10 +1490,11 @@ type SystemOutput_Confirm struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Prompt string `protobuf:"bytes,1,opt,name=prompt,proto3" json:"prompt,omitempty"` - Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` - AcceptButtonLabel string `protobuf:"bytes,2,opt,name=accept_button_label,json=acceptButtonLabel,proto3" json:"accept_button_label,omitempty"` - DeclineButtonLabel string `protobuf:"bytes,3,opt,name=decline_button_label,json=declineButtonLabel,proto3" json:"decline_button_label,omitempty"` + Prompt string `protobuf:"bytes,1,opt,name=prompt,proto3" json:"prompt,omitempty"` + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + AcceptButtonLabel string `protobuf:"bytes,2,opt,name=accept_button_label,json=acceptButtonLabel,proto3" json:"accept_button_label,omitempty"` + DeclineButtonLabel string `protobuf:"bytes,3,opt,name=decline_button_label,json=declineButtonLabel,proto3" json:"decline_button_label,omitempty"` + DefaultButton SystemOutput_Confirm_Button `protobuf:"varint,5,opt,name=default_button,json=defaultButton,proto3,enum=sf.codegen.conversation.v1.SystemOutput_Confirm_Button" json:"default_button,omitempty"` } func (x *SystemOutput_Confirm) Reset() { @@ -1507,6 +1557,13 @@ func (x *SystemOutput_Confirm) GetDeclineButtonLabel() string { return "" } +func (x *SystemOutput_Confirm) GetDefaultButton() SystemOutput_Confirm_Button { + if x != nil { + return x.DefaultButton + } + return SystemOutput_Confirm_UNSET +} + type DiscoveryResponse_Generator struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1666,7 +1723,7 @@ var file_sf_codegen_conversation_v1_conversation_proto_rawDesc = []byte{ 0x61, 0x66, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x76, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x61, 0x66, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x76, 0x65, 0x1a, 0x11, 0x0a, 0x0f, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x65, 0x64, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0xa4, 0x10, 0x0a, 0x0c, 0x53, + 0x73, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0xb3, 0x11, 0x0a, 0x0c, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x15, 0x0a, 0x06, 0x6d, 0x73, 0x67, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x05, 0x6d, 0x73, 0x67, 0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0b, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x6d, 0x73, 0x67, 0x5f, 0x69, @@ -1786,7 +1843,7 @@ var file_sf_codegen_conversation_v1_conversation_proto_rawDesc = []byte{ 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x1a, 0xa5, 0x01, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, + 0x1a, 0xb4, 0x02, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x70, 0x72, 0x6f, 0x6d, 0x70, 0x74, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, @@ -1796,41 +1853,50 @@ var file_sf_codegen_conversation_v1_conversation_proto_rawDesc = []byte{ 0x6e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x30, 0x0a, 0x14, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x63, 0x6c, 0x69, 0x6e, 0x65, 0x42, 0x75, 0x74, - 0x74, 0x6f, 0x6e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, - 0x79, 0x22, 0x35, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, - 0x74, 0x65, 0x72, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x61, - 0x72, 0x63, 0x68, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x22, 0xf9, 0x01, 0x0a, 0x11, 0x44, 0x69, 0x73, - 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, - 0x0a, 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x73, 0x66, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x2e, - 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, - 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x67, 0x65, 0x6e, - 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x1a, 0x8a, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, - 0x72, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, - 0x08, 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x69, 0x63, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x32, 0xdf, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x08, - 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x65, 0x12, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x63, 0x6f, - 0x64, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x1a, - 0x28, 0x2e, 0x73, 0x66, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, - 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x73, - 0x74, 0x65, 0x6d, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x67, 0x0a, - 0x08, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x73, 0x66, 0x2e, 0x63, - 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x66, 0x2e, 0x63, 0x6f, 0x64, + 0x74, 0x6f, 0x6e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x5e, 0x0a, 0x0e, 0x64, 0x65, 0x66, 0x61, + 0x75, 0x6c, 0x74, 0x5f, 0x62, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x37, 0x2e, 0x73, 0x66, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x63, 0x6f, + 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, + 0x73, 0x74, 0x65, 0x6d, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x6d, 0x2e, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x52, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, + 0x6c, 0x74, 0x42, 0x75, 0x74, 0x74, 0x6f, 0x6e, 0x22, 0x2d, 0x0a, 0x06, 0x42, 0x75, 0x74, 0x74, + 0x6f, 0x6e, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x4e, 0x53, 0x45, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, + 0x07, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x44, 0x45, + 0x43, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x02, 0x42, 0x07, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x72, 0x79, + 0x22, 0x35, 0x0a, 0x10, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x74, + 0x65, 0x72, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x61, 0x72, + 0x63, 0x68, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x22, 0xf9, 0x01, 0x0a, 0x11, 0x44, 0x69, 0x73, 0x63, + 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, + 0x0a, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x37, 0x2e, 0x73, 0x66, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x63, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, + 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x0a, 0x67, 0x65, 0x6e, 0x65, + 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x1a, 0x8a, 0x01, 0x0a, 0x09, 0x47, 0x65, 0x6e, 0x65, 0x72, + 0x61, 0x74, 0x6f, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, + 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x19, 0x0a, 0x08, + 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x69, 0x63, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x32, 0xdf, 0x01, 0x0a, 0x13, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5f, 0x0a, 0x08, 0x43, + 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x65, 0x12, 0x25, 0x2e, 0x73, 0x66, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x1a, 0x28, + 0x2e, 0x73, 0x66, 0x2e, 0x63, 0x6f, 0x64, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x76, + 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x73, 0x74, + 0x65, 0x6d, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x28, 0x01, 0x30, 0x01, 0x12, 0x67, 0x0a, 0x08, + 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x12, 0x2c, 0x2e, 0x73, 0x66, 0x2e, 0x63, 0x6f, + 0x64, 0x65, 0x67, 0x65, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x73, 0x66, 0x2e, 0x63, 0x6f, 0x64, 0x65, + 0x67, 0x65, 0x6e, 0x2e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1845,59 +1911,61 @@ func file_sf_codegen_conversation_v1_conversation_proto_rawDescGZIP() []byte { return file_sf_codegen_conversation_v1_conversation_proto_rawDescData } -var file_sf_codegen_conversation_v1_conversation_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_sf_codegen_conversation_v1_conversation_proto_enumTypes = make([]protoimpl.EnumInfo, 2) var file_sf_codegen_conversation_v1_conversation_proto_msgTypes = make([]protoimpl.MessageInfo, 21) var file_sf_codegen_conversation_v1_conversation_proto_goTypes = []interface{}{ (SystemOutput_ListSelect_SelectType)(0), // 0: sf.codegen.conversation.v1.SystemOutput.ListSelect.SelectType - (*Empty)(nil), // 1: sf.codegen.conversation.v1.Empty - (*UserInput)(nil), // 2: sf.codegen.conversation.v1.UserInput - (*SystemOutput)(nil), // 3: sf.codegen.conversation.v1.SystemOutput - (*DiscoveryRequest)(nil), // 4: sf.codegen.conversation.v1.DiscoveryRequest - (*DiscoveryResponse)(nil), // 5: sf.codegen.conversation.v1.DiscoveryResponse - (*UserInput_TextInput)(nil), // 6: sf.codegen.conversation.v1.UserInput.TextInput - (*UserInput_Start)(nil), // 7: sf.codegen.conversation.v1.UserInput.Start - (*UserInput_Hydrate)(nil), // 8: sf.codegen.conversation.v1.UserInput.Hydrate - (*UserInput_Upload)(nil), // 9: sf.codegen.conversation.v1.UserInput.Upload - (*UserInput_Selection)(nil), // 10: sf.codegen.conversation.v1.UserInput.Selection - (*UserInput_Confirmation)(nil), // 11: sf.codegen.conversation.v1.UserInput.Confirmation - (*UserInput_DownloadedFiles)(nil), // 12: sf.codegen.conversation.v1.UserInput.DownloadedFiles - (*SystemOutput_Message)(nil), // 13: sf.codegen.conversation.v1.SystemOutput.Message - (*SystemOutput_ImageWithText)(nil), // 14: sf.codegen.conversation.v1.SystemOutput.ImageWithText - (*SystemOutput_ListSelect)(nil), // 15: sf.codegen.conversation.v1.SystemOutput.ListSelect - (*SystemOutput_TextInput)(nil), // 16: sf.codegen.conversation.v1.SystemOutput.TextInput - (*SystemOutput_Loading)(nil), // 17: sf.codegen.conversation.v1.SystemOutput.Loading - (*SystemOutput_DownloadFiles)(nil), // 18: sf.codegen.conversation.v1.SystemOutput.DownloadFiles - (*SystemOutput_DownloadFile)(nil), // 19: sf.codegen.conversation.v1.SystemOutput.DownloadFile - (*SystemOutput_Confirm)(nil), // 20: sf.codegen.conversation.v1.SystemOutput.Confirm - (*DiscoveryResponse_Generator)(nil), // 21: sf.codegen.conversation.v1.DiscoveryResponse.Generator + (SystemOutput_Confirm_Button)(0), // 1: sf.codegen.conversation.v1.SystemOutput.Confirm.Button + (*Empty)(nil), // 2: sf.codegen.conversation.v1.Empty + (*UserInput)(nil), // 3: sf.codegen.conversation.v1.UserInput + (*SystemOutput)(nil), // 4: sf.codegen.conversation.v1.SystemOutput + (*DiscoveryRequest)(nil), // 5: sf.codegen.conversation.v1.DiscoveryRequest + (*DiscoveryResponse)(nil), // 6: sf.codegen.conversation.v1.DiscoveryResponse + (*UserInput_TextInput)(nil), // 7: sf.codegen.conversation.v1.UserInput.TextInput + (*UserInput_Start)(nil), // 8: sf.codegen.conversation.v1.UserInput.Start + (*UserInput_Hydrate)(nil), // 9: sf.codegen.conversation.v1.UserInput.Hydrate + (*UserInput_Upload)(nil), // 10: sf.codegen.conversation.v1.UserInput.Upload + (*UserInput_Selection)(nil), // 11: sf.codegen.conversation.v1.UserInput.Selection + (*UserInput_Confirmation)(nil), // 12: sf.codegen.conversation.v1.UserInput.Confirmation + (*UserInput_DownloadedFiles)(nil), // 13: sf.codegen.conversation.v1.UserInput.DownloadedFiles + (*SystemOutput_Message)(nil), // 14: sf.codegen.conversation.v1.SystemOutput.Message + (*SystemOutput_ImageWithText)(nil), // 15: sf.codegen.conversation.v1.SystemOutput.ImageWithText + (*SystemOutput_ListSelect)(nil), // 16: sf.codegen.conversation.v1.SystemOutput.ListSelect + (*SystemOutput_TextInput)(nil), // 17: sf.codegen.conversation.v1.SystemOutput.TextInput + (*SystemOutput_Loading)(nil), // 18: sf.codegen.conversation.v1.SystemOutput.Loading + (*SystemOutput_DownloadFiles)(nil), // 19: sf.codegen.conversation.v1.SystemOutput.DownloadFiles + (*SystemOutput_DownloadFile)(nil), // 20: sf.codegen.conversation.v1.SystemOutput.DownloadFile + (*SystemOutput_Confirm)(nil), // 21: sf.codegen.conversation.v1.SystemOutput.Confirm + (*DiscoveryResponse_Generator)(nil), // 22: sf.codegen.conversation.v1.DiscoveryResponse.Generator } var file_sf_codegen_conversation_v1_conversation_proto_depIdxs = []int32{ - 7, // 0: sf.codegen.conversation.v1.UserInput.start:type_name -> sf.codegen.conversation.v1.UserInput.Start - 6, // 1: sf.codegen.conversation.v1.UserInput.text_input:type_name -> sf.codegen.conversation.v1.UserInput.TextInput - 10, // 2: sf.codegen.conversation.v1.UserInput.selection:type_name -> sf.codegen.conversation.v1.UserInput.Selection - 11, // 3: sf.codegen.conversation.v1.UserInput.confirmation:type_name -> sf.codegen.conversation.v1.UserInput.Confirmation - 9, // 4: sf.codegen.conversation.v1.UserInput.file:type_name -> sf.codegen.conversation.v1.UserInput.Upload - 12, // 5: sf.codegen.conversation.v1.UserInput.downloaded_files:type_name -> sf.codegen.conversation.v1.UserInput.DownloadedFiles - 13, // 6: sf.codegen.conversation.v1.SystemOutput.message:type_name -> sf.codegen.conversation.v1.SystemOutput.Message - 14, // 7: sf.codegen.conversation.v1.SystemOutput.image_with_text:type_name -> sf.codegen.conversation.v1.SystemOutput.ImageWithText - 15, // 8: sf.codegen.conversation.v1.SystemOutput.list_select:type_name -> sf.codegen.conversation.v1.SystemOutput.ListSelect - 16, // 9: sf.codegen.conversation.v1.SystemOutput.text_input:type_name -> sf.codegen.conversation.v1.SystemOutput.TextInput - 20, // 10: sf.codegen.conversation.v1.SystemOutput.confirm:type_name -> sf.codegen.conversation.v1.SystemOutput.Confirm - 17, // 11: sf.codegen.conversation.v1.SystemOutput.loading:type_name -> sf.codegen.conversation.v1.SystemOutput.Loading - 18, // 12: sf.codegen.conversation.v1.SystemOutput.download_files:type_name -> sf.codegen.conversation.v1.SystemOutput.DownloadFiles - 21, // 13: sf.codegen.conversation.v1.DiscoveryResponse.generators:type_name -> sf.codegen.conversation.v1.DiscoveryResponse.Generator - 8, // 14: sf.codegen.conversation.v1.UserInput.Start.hydrate:type_name -> sf.codegen.conversation.v1.UserInput.Hydrate + 8, // 0: sf.codegen.conversation.v1.UserInput.start:type_name -> sf.codegen.conversation.v1.UserInput.Start + 7, // 1: sf.codegen.conversation.v1.UserInput.text_input:type_name -> sf.codegen.conversation.v1.UserInput.TextInput + 11, // 2: sf.codegen.conversation.v1.UserInput.selection:type_name -> sf.codegen.conversation.v1.UserInput.Selection + 12, // 3: sf.codegen.conversation.v1.UserInput.confirmation:type_name -> sf.codegen.conversation.v1.UserInput.Confirmation + 10, // 4: sf.codegen.conversation.v1.UserInput.file:type_name -> sf.codegen.conversation.v1.UserInput.Upload + 13, // 5: sf.codegen.conversation.v1.UserInput.downloaded_files:type_name -> sf.codegen.conversation.v1.UserInput.DownloadedFiles + 14, // 6: sf.codegen.conversation.v1.SystemOutput.message:type_name -> sf.codegen.conversation.v1.SystemOutput.Message + 15, // 7: sf.codegen.conversation.v1.SystemOutput.image_with_text:type_name -> sf.codegen.conversation.v1.SystemOutput.ImageWithText + 16, // 8: sf.codegen.conversation.v1.SystemOutput.list_select:type_name -> sf.codegen.conversation.v1.SystemOutput.ListSelect + 17, // 9: sf.codegen.conversation.v1.SystemOutput.text_input:type_name -> sf.codegen.conversation.v1.SystemOutput.TextInput + 21, // 10: sf.codegen.conversation.v1.SystemOutput.confirm:type_name -> sf.codegen.conversation.v1.SystemOutput.Confirm + 18, // 11: sf.codegen.conversation.v1.SystemOutput.loading:type_name -> sf.codegen.conversation.v1.SystemOutput.Loading + 19, // 12: sf.codegen.conversation.v1.SystemOutput.download_files:type_name -> sf.codegen.conversation.v1.SystemOutput.DownloadFiles + 22, // 13: sf.codegen.conversation.v1.DiscoveryResponse.generators:type_name -> sf.codegen.conversation.v1.DiscoveryResponse.Generator + 9, // 14: sf.codegen.conversation.v1.UserInput.Start.hydrate:type_name -> sf.codegen.conversation.v1.UserInput.Hydrate 0, // 15: sf.codegen.conversation.v1.SystemOutput.ListSelect.select_type:type_name -> sf.codegen.conversation.v1.SystemOutput.ListSelect.SelectType - 19, // 16: sf.codegen.conversation.v1.SystemOutput.DownloadFiles.files:type_name -> sf.codegen.conversation.v1.SystemOutput.DownloadFile - 2, // 17: sf.codegen.conversation.v1.ConversationService.Converse:input_type -> sf.codegen.conversation.v1.UserInput - 4, // 18: sf.codegen.conversation.v1.ConversationService.Discover:input_type -> sf.codegen.conversation.v1.DiscoveryRequest - 3, // 19: sf.codegen.conversation.v1.ConversationService.Converse:output_type -> sf.codegen.conversation.v1.SystemOutput - 5, // 20: sf.codegen.conversation.v1.ConversationService.Discover:output_type -> sf.codegen.conversation.v1.DiscoveryResponse - 19, // [19:21] is the sub-list for method output_type - 17, // [17:19] is the sub-list for method input_type - 17, // [17:17] is the sub-list for extension type_name - 17, // [17:17] is the sub-list for extension extendee - 0, // [0:17] is the sub-list for field type_name + 20, // 16: sf.codegen.conversation.v1.SystemOutput.DownloadFiles.files:type_name -> sf.codegen.conversation.v1.SystemOutput.DownloadFile + 1, // 17: sf.codegen.conversation.v1.SystemOutput.Confirm.default_button:type_name -> sf.codegen.conversation.v1.SystemOutput.Confirm.Button + 3, // 18: sf.codegen.conversation.v1.ConversationService.Converse:input_type -> sf.codegen.conversation.v1.UserInput + 5, // 19: sf.codegen.conversation.v1.ConversationService.Discover:input_type -> sf.codegen.conversation.v1.DiscoveryRequest + 4, // 20: sf.codegen.conversation.v1.ConversationService.Converse:output_type -> sf.codegen.conversation.v1.SystemOutput + 6, // 21: sf.codegen.conversation.v1.ConversationService.Discover:output_type -> sf.codegen.conversation.v1.DiscoveryResponse + 20, // [20:22] is the sub-list for method output_type + 18, // [18:20] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_sf_codegen_conversation_v1_conversation_proto_init() } @@ -2181,7 +2249,7 @@ func file_sf_codegen_conversation_v1_conversation_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_sf_codegen_conversation_v1_conversation_proto_rawDesc, - NumEnums: 1, + NumEnums: 2, NumMessages: 21, NumExtensions: 0, NumServices: 1, diff --git a/proto/sf/codegen/conversation/v1/conversation.proto b/proto/sf/codegen/conversation/v1/conversation.proto index d27ee2a4..7e947c0d 120000 --- a/proto/sf/codegen/conversation/v1/conversation.proto +++ b/proto/sf/codegen/conversation/v1/conversation.proto @@ -1 +1 @@ -/Users/eduardvoiculescu/git/streamingFast/substreams-dev/proto/sf/codegen/conversation/v1/conversation.proto \ No newline at end of file +/Users/abourget/sf/substreams-codegen/proto/sf/codegen/conversation/v1/conversation.proto \ No newline at end of file