Skip to content

Commit

Permalink
Merge pull request #669 from ibuildthecloud/main
Browse files Browse the repository at this point in the history
chore: bump tui
  • Loading branch information
ibuildthecloud authored Jul 28, 2024
2 parents 9ffbf0a + 36c961c commit 2584308
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 14 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ require (
github.com/gptscript-ai/broadcaster v0.0.0-20240625175512-c43682019b86
github.com/gptscript-ai/chat-completion-client v0.0.0-20240531200700-af8e7ecf0379
github.com/gptscript-ai/cmd v0.0.0-20240625175447-4250b42feb7d
github.com/gptscript-ai/tui v0.0.0-20240722014329-d50b5ac5db74
github.com/gptscript-ai/go-gptscript v0.9.3-0.20240728044543-20d868b5baa6
github.com/gptscript-ai/tui v0.0.0-20240728045051-19ba83cd96c1
github.com/hexops/autogold/v2 v2.2.1
github.com/hexops/valast v1.4.4
github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056
Expand Down Expand Up @@ -63,7 +64,6 @@ require (
github.com/google/go-cmp v0.6.0 // indirect
github.com/gookit/color v1.5.4 // indirect
github.com/gorilla/css v1.0.0 // indirect
github.com/gptscript-ai/go-gptscript v0.9.3-0.20240722014125-d757d09f606b // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hexops/autogold v1.3.1 // indirect
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ github.com/gptscript-ai/chat-completion-client v0.0.0-20240531200700-af8e7ecf037
github.com/gptscript-ai/chat-completion-client v0.0.0-20240531200700-af8e7ecf0379/go.mod h1:7P/o6/IWa1KqsntVf68hSnLKuu3+xuqm6lYhch1w4jo=
github.com/gptscript-ai/cmd v0.0.0-20240625175447-4250b42feb7d h1:sKf7T7twhGXs6AVbvD9pKDVewykkwSAPwEpmIEQIR/4=
github.com/gptscript-ai/cmd v0.0.0-20240625175447-4250b42feb7d/go.mod h1:DJAo1xTht1LDkNYFNydVjTHd576TC7MlpsVRl3oloVw=
github.com/gptscript-ai/go-gptscript v0.9.3-0.20240722014125-d757d09f606b h1:Hxu8oPE43uQ2sZ7P+9yGSX9bXh0RoJfOgvY/SlCwFlM=
github.com/gptscript-ai/go-gptscript v0.9.3-0.20240722014125-d757d09f606b/go.mod h1:Dh6vYRAiVcyC3ElZIGzTvNF1FxtYwA07BHfSiFKQY7s=
github.com/gptscript-ai/tui v0.0.0-20240722014329-d50b5ac5db74 h1:69BENZCN2y4BCxmPjMRp+ZQ47ay4i5gRgREKZatu5oE=
github.com/gptscript-ai/tui v0.0.0-20240722014329-d50b5ac5db74/go.mod h1:sP/9g7+nLq65aGef5F30AEG+Cuu4BwlglUYv1Pzps4Y=
github.com/gptscript-ai/go-gptscript v0.9.3-0.20240728044543-20d868b5baa6 h1:hF9Q8KdQhuoXSGKVh4ywRvwn5RJt9rbPraigpXqbGYU=
github.com/gptscript-ai/go-gptscript v0.9.3-0.20240728044543-20d868b5baa6/go.mod h1:Dh6vYRAiVcyC3ElZIGzTvNF1FxtYwA07BHfSiFKQY7s=
github.com/gptscript-ai/tui v0.0.0-20240728045051-19ba83cd96c1 h1:gJXswjjwoiWdOS+s73mliWbN9dyJpiUkb3T+EiV7EFc=
github.com/gptscript-ai/tui v0.0.0-20240728045051-19ba83cd96c1/go.mod h1:Llh3vi87gyry6j/sgJxhkHHvgv9uQRzEiMWuQtmpW1w=
github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA=
github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4=
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
Expand Down
9 changes: 6 additions & 3 deletions pkg/cli/gptscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (

"github.com/fatih/color"
"github.com/gptscript-ai/cmd"
gptscript2 "github.com/gptscript-ai/go-gptscript"
"github.com/gptscript-ai/gptscript/pkg/assemble"
"github.com/gptscript-ai/gptscript/pkg/auth"
"github.com/gptscript-ai/gptscript/pkg/builtin"
Expand Down Expand Up @@ -464,9 +465,11 @@ func (r *GPTScript) Run(cmd *cobra.Command, args []string) (retErr error) {
if !r.DisableTUI && !r.Debug && !r.DebugMessages && !r.NoTrunc {
// Don't use cmd.Context() because then sigint will cancel everything
return tui.Run(context.Background(), args[0], tui.RunOptions{
OpenAIAPIKey: r.OpenAIOptions.APIKey,
OpenAIBaseURL: r.OpenAIOptions.BaseURL,
DefaultModel: r.DefaultModel,
ClientOpts: &gptscript2.GlobalOptions{
OpenAIAPIKey: r.OpenAIOptions.APIKey,
OpenAIBaseURL: r.OpenAIOptions.BaseURL,
DefaultModel: r.DefaultModel,
},
TrustedRepoPrefixes: []string{"github.com/gptscript-ai"},
DisableCache: r.DisableCache,
CredentialOverrides: r.CredentialOverride,
Expand Down
10 changes: 5 additions & 5 deletions pkg/parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,23 +101,23 @@ func isParam(line string, tool *types.Tool) (_ bool, err error) {
return false, err
}
tool.Parameters.Chat = v
case "export", "exporttool", "exports", "exporttools", "sharetool", "sharetools":
case "export", "exporttool", "exports", "exporttools", "sharetool", "sharetools", "sharedtool", "sharedtools":
tool.Parameters.Export = append(tool.Parameters.Export, csv(value)...)
case "tool", "tools":
tool.Parameters.Tools = append(tool.Parameters.Tools, csv(value)...)
case "inputfilter", "inputfilters":
tool.Parameters.InputFilters = append(tool.Parameters.InputFilters, csv(value)...)
case "shareinputfilter", "shareinputfilters":
case "shareinputfilter", "shareinputfilters", "sharedinputfilter", "sharedinputfilters":
tool.Parameters.ExportInputFilters = append(tool.Parameters.ExportInputFilters, csv(value)...)
case "outputfilter", "outputfilters":
tool.Parameters.OutputFilters = append(tool.Parameters.OutputFilters, csv(value)...)
case "shareoutputfilter", "shareoutputfilters":
case "shareoutputfilter", "shareoutputfilters", "sharedoutputfilter", "sharedoutputfilters":
tool.Parameters.ExportOutputFilters = append(tool.Parameters.ExportOutputFilters, csv(value)...)
case "agent", "agents":
tool.Parameters.Agents = append(tool.Parameters.Agents, csv(value)...)
case "globaltool", "globaltools":
tool.Parameters.GlobalTools = append(tool.Parameters.GlobalTools, csv(value)...)
case "exportcontext", "exportcontexts", "sharecontext", "sharecontexts":
case "exportcontext", "exportcontexts", "sharecontext", "sharecontexts", "sharedcontext", "sharedcontexts":
tool.Parameters.ExportContext = append(tool.Parameters.ExportContext, csv(value)...)
case "context":
tool.Parameters.Context = append(tool.Parameters.Context, csv(value)...)
Expand Down Expand Up @@ -148,7 +148,7 @@ func isParam(line string, tool *types.Tool) (_ bool, err error) {
}
case "credentials", "creds", "credential", "cred":
tool.Parameters.Credentials = append(tool.Parameters.Credentials, value)
case "sharecredentials", "sharecreds", "sharecredential", "sharecred":
case "sharecredentials", "sharecreds", "sharecredential", "sharecred", "sharedcredentials", "sharedcreds", "sharedcredential", "sharedcred":
tool.Parameters.ExportCredentials = append(tool.Parameters.ExportCredentials, value)
default:
return false, nil
Expand Down

0 comments on commit 2584308

Please sign in to comment.