Skip to content

Commit

Permalink
chore: set the run file env var when starting the ui
Browse files Browse the repository at this point in the history
Set the `GPTSCRIPT_CHAT_UI_RUN_FILE` env var before starting the UI tool
when a run file is provided; e.g. `gptscript --ui <run-file.gpt>`. This
tells the UI to use the file's run page as the landing page on start.

Signed-off-by: Nick Hale <4175918+njhale@users.noreply.github.com>
  • Loading branch information
njhale committed Jul 15, 2024
1 parent 9ca6e93 commit 0655cd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cli/gptscript.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ func (r *GPTScript) Run(cmd *cobra.Command, args []string) (retErr error) {
gptOpt.Env = append(gptOpt.Env, "GPTSCRIPT_SDKSERVER_CREDENTIAL_OVERRIDE="+strings.Join(r.CredentialOverride, ","))
}

args = append([]string{args[0]}, "--file="+file)
gptOpt.Env = append(gptOpt.Env, "GPTSCRIPT_CHAT_UI_RUN_FILE="+file)

if len(args) > 2 {
args = append(args, args[2:]...)
Expand Down

0 comments on commit 0655cd8

Please sign in to comment.