Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ require (
github.com/hashicorp/go-version v1.9.0
github.com/iancoleman/strcase v0.3.0
github.com/joho/godotenv v1.5.1
github.com/muesli/reflow v0.3.0
github.com/pb33f/openapi-changes v0.0.63
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2
Expand All @@ -47,7 +48,7 @@ require (
github.com/speakeasy-api/huh v1.1.2
github.com/speakeasy-api/jq v0.13.0
github.com/speakeasy-api/openapi v1.25.0
github.com/speakeasy-api/openapi-generation/v2 v2.941.0
github.com/speakeasy-api/openapi-generation/v2 v2.943.0
github.com/speakeasy-api/sdk-gen-config v1.58.0
github.com/speakeasy-api/speakeasy-agent-mode-content v0.2.12
github.com/speakeasy-api/speakeasy-client-sdk-go/v3 v3.28.1
Expand Down Expand Up @@ -197,7 +198,6 @@ require (
github.com/moby/term v0.5.2 // indirect
github.com/muesli/ansi v0.0.0-20230316100256-276c6243b2f6 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
github.com/muesli/reflow v0.3.0 // indirect
github.com/muesli/termenv v0.16.0 // indirect
github.com/olekukonko/tablewriter v0.0.5 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,8 @@ github.com/speakeasy-api/libopenapi v0.21.10-fixhiddencomps-fixed h1:ZtuakKtG6x7
github.com/speakeasy-api/libopenapi v0.21.10-fixhiddencomps-fixed/go.mod h1:Gc8oQkjr2InxwumK0zOBtKN9gIlv9L2VmSVIUk2YxcU=
github.com/speakeasy-api/openapi v1.25.0 h1:xyJ5ZzW4YwStT2ICo0o7v9M890J7VpsR7AqhQSZnwl4=
github.com/speakeasy-api/openapi v1.25.0/go.mod h1:9gGkzi9jNspEbcB08zta+IjzAi5Zy4QgSEQfF/LSrbQ=
github.com/speakeasy-api/openapi-generation/v2 v2.941.0 h1:ugKtFsX/lMvKF8omR+C9zhU0zkV2J64IwyIG64Eji3E=
github.com/speakeasy-api/openapi-generation/v2 v2.941.0/go.mod h1:38+qTY7CB1YwaGT1VvwSTF23l3nHDx8wbjkBPig9S54=
github.com/speakeasy-api/openapi-generation/v2 v2.943.0 h1:iR1Kb/7/O66wavfzyCPqoEJ0ejIDmyWZ/gRMfclPi98=
github.com/speakeasy-api/openapi-generation/v2 v2.943.0/go.mod h1:38+qTY7CB1YwaGT1VvwSTF23l3nHDx8wbjkBPig9S54=
github.com/speakeasy-api/openapi/openapi/linter/customrules v0.0.0-20260206023826-2483fb8e98b4 h1:gV+lYeVNNJG9X3Sl9Su3cRh1iF/oNqzvb5Ijq2QR8jY=
github.com/speakeasy-api/openapi/openapi/linter/customrules v0.0.0-20260206023826-2483fb8e98b4/go.mod h1:1zQpVio7X6QJDtyNdUguCgZ+IC7CzKhhjvNgJdvGVF0=
github.com/speakeasy-api/sdk-gen-config v1.58.0 h1:JrDgDU3XBIidv+TXFqYBvIomfeGEQ0zN+OnHyUc+kNw=
Expand Down
6 changes: 3 additions & 3 deletions prompts/configs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ func TestTargetSpecificForms_Ruby_Quickstart(t *testing.T) {
tm := charmtest.ModelFromHuhGroup(t, groups...)
tm.AssertContains(t,
"┃ Choose a packageName",
"┃ The distribution name of the Ruby Package.",
"https://guides.rubygems.org/name-",
"your-gem/",
"┃ The distribution name of the Ruby Package. https://guides.rubygems.org/name-your-gem/ Use a lowercase",
"┃ name: a name that differs from its snake_case form only by case gets no gem-name entry file, so",
"┃ Bundler will not autoload it on case-sensitive filesystems.",
"┃ openapi",
)
tm.SendKeys(tea.KeyEnter)
Expand Down
9 changes: 5 additions & 4 deletions prompts/target_form_field.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"strings"

"github.com/iancoleman/strcase"
"github.com/muesli/reflow/wordwrap"
"github.com/speakeasy-api/huh"
config "github.com/speakeasy-api/sdk-gen-config"
"github.com/speakeasy-api/speakeasy/internal/charm"
Expand Down Expand Up @@ -215,9 +216,9 @@ func (f *TargetFormField) HuhField(targetFormFields TargetFormFields) huh.Field

if f.DescriptionFunc != nil {
fn := func() string {
return f.DescriptionFunc(*value)
return wordwrap.String(f.DescriptionFunc(*value), 100)
}
input = input.DescriptionFunc(fn, value).Inline(false).Prompt("")
input = input.Description(fn()).DescriptionFunc(fn, value).Inline(false).Prompt("")
}

if f.SuggestionsFunc != nil {
Expand Down Expand Up @@ -278,9 +279,9 @@ func (f *TargetFormField) HuhField(targetFormFields TargetFormFields) huh.Field

if f.DescriptionFunc != nil {
fn := func() string {
return f.DescriptionFunc(intValue)
return wordwrap.String(f.DescriptionFunc(intValue), 100)
}
input = input.DescriptionFunc(fn, &intValue).Inline(false).Prompt("")
input = input.Description(fn()).DescriptionFunc(fn, &intValue).Inline(false).Prompt("")
}

if f.SuggestionsFunc != nil {
Expand Down
Loading