Skip to content

feat: only output error message if LLM returns no actionable command#53

Open
corneliusroemer wants to merge 1 commit intoTNG:mainfrom
corneliusroemer:better-error
Open

feat: only output error message if LLM returns no actionable command#53
corneliusroemer wants to merge 1 commit intoTNG:mainfrom
corneliusroemer:better-error

Conversation

@corneliusroemer
Copy link
Copy Markdown
Contributor

The script now checks immediately if the returned command matches the designated failure message before proceeding with further actions like explanation or option printing.

This modification ensures that if the input prompt is unclear, the script directly outputs a clear error message and exits without executing additional unnecessary steps, aligning better with user expectations and reducing confusion.

This change improves user experience by providing immediate feedback on input validity and makes the script's flow more logical and efficient.

Resolves #52

Signed-off-by: Cornelius Roemer cornelius.roemer@gmail.com

The script now checks immediately if the returned command matches the designated failure message before proceeding with further actions like explanation or option printing.

This modification ensures that if the input prompt is unclear, the script directly outputs a clear error message and exits without executing additional unnecessary steps, aligning better with user expectations and reducing confusion.

This change improves user experience by providing immediate feedback on input validity and makes the script's flow more logical and efficient.

Resolves TNG#52

Signed-off-by: Cornelius Roemer <cornelius.roemer@gmail.com>
Comment thread please.sh
get_command

if test "${command}" = "${fail_msg}"; then
exit 1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

On my system this seems to result in no error message being shown at all.

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.

Confusing output: command: echo 'I do not know. Please rephrase your question.'

2 participants