Skip to content

Commit 4c16a4c

Browse files
authored
Merge pull request #746 from njhale/chore/pin-ui
2 parents f752bda + 04f42cd commit 4c16a4c

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

pkg/cli/gptscript.go

+3-13
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,9 @@ func (r *GPTScript) Run(cmd *cobra.Command, args []string) (retErr error) {
386386
// The UI must run in daemon mode.
387387
r.Daemon = true
388388
// Use the UI tool as the first argument.
389-
args = append([]string{uiTool()}, args...)
389+
args = append([]string{
390+
env.VarOrDefault("GPTSCRIPT_CHAT_UI_TOOL", "github.com/gptscript-ai/[email protected]"),
391+
}, args...)
390392
}
391393

392394
ctx := cmd.Context()
@@ -503,15 +505,3 @@ func (r *GPTScript) Run(cmd *cobra.Command, args []string) (retErr error) {
503505

504506
return r.PrintOutput(toolInput, s)
505507
}
506-
507-
// uiTool returns the versioned UI tool reference for the current GPTScript version.
508-
// For release versions, a reference with a matching release tag is returned.
509-
// For all other versions, a reference to main is returned.
510-
func uiTool() string {
511-
ref := "github.com/gptscript-ai/ui"
512-
if tag := version.Tag; !strings.Contains(tag, "v0.0.0-dev") {
513-
ref = fmt.Sprintf("%s@%s", ref, tag)
514-
}
515-
516-
return env.VarOrDefault("GPTSCRIPT_CHAT_UI_TOOL", ref)
517-
}

0 commit comments

Comments
 (0)