Skip to content

fix: misc improvements related to creds and prompting #536

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 25, 2024

Conversation

g-linville
Copy link
Member

No description provided.

Comment on lines 78 to 83
if req.Message != "" && len(req.Fields) == 1 && strings.TrimSpace(req.Fields[0]) == "" {
_, _ = fmt.Fprintln(os.Stderr, req.Message)
_, _ = fmt.Fprintln(os.Stderr, "Press enter to continue...")
_, _ = fmt.Fscanln(os.Stdin)
return "", nil
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes the prompt look a little bit better if all we want to do is display a message to the user instead of getting information from the user.

@@ -681,7 +681,7 @@ func streamProgress(callCtx *engine.Context, monitor Monitor) (chan<- types.Comp
CallContext: callCtx.GetCallContext(),
Type: EventTypeCallProgress,
ChatCompletionID: status.CompletionID,
Content: message.String(),
Content: getEventContent(message.String(), *callCtx),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to prevent credential tool output from leaking to the terminal.

@g-linville g-linville marked this pull request as ready for review June 24, 2024 19:06
Signed-off-by: Grant Linville <[email protected]>
g-linville and others added 2 commits June 25, 2024 14:18
Co-authored-by: Donnie Adams <[email protected]>
Signed-off-by: Grant Linville <[email protected]>
Signed-off-by: Grant Linville <[email protected]>
@g-linville g-linville merged commit 13c07d6 into gptscript-ai:main Jun 25, 2024
8 checks passed
@g-linville g-linville deleted the fixes branch June 25, 2024 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants