Skip to content

Resolve issue #96 where if "nothing" was first input then program not terminated#137

Open
bdtran2002 wants to merge 1 commit intoChicoState:mainfrom
bdtran2002:issue#96
Open

Resolve issue #96 where if "nothing" was first input then program not terminated#137
bdtran2002 wants to merge 1 commit intoChicoState:mainfrom
bdtran2002:issue#96

Conversation

@bdtran2002
Copy link
Copy Markdown

Resolves issue #96

Copilot AI review requested due to automatic review settings February 18, 2026 19:37
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Fixes issue #96 by ensuring the app quits when the first user input is nothing, preventing the extra “Let’s listen to more” + follow-up prompt seen in the bug report.

Changes:

  • Adds an early-exit check immediately after the first get_input_in_lowercase() call.
  • Minor formatting/line-ending adjustment near the end of the file.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread main.cpp
Comment on lines +27 to +29
if (input == "nothing"){
return 0;
}
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

This early return fixes the first-prompt case, but entering "nothing" on later prompts still prints a validation message (because the loop prints before the while (input != "nothing") check). To match issue #96 (“terminate without any more interaction”), check for "nothing" immediately after each get_input_in_lowercase() (inside the loop as well) and exit/break before picking/printing a response.

Copilot uses AI. Check for mistakes.
Comment thread main.cpp
Comment on lines +27 to +29
if (input == "nothing"){
return 0;
}
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

Indentation in this newly added block uses tabs/misaligned spacing, while the rest of the file uses consistent two-space indentation. Please reformat this block to match the surrounding style to avoid noisy diffs and keep formatting consistent.

Suggested change
if (input == "nothing"){
return 0;
}
if (input == "nothing"){
return 0;
}

Copilot uses AI. Check for mistakes.
@bdtran2002 bdtran2002 closed this Feb 18, 2026
@bdtran2002 bdtran2002 reopened this Feb 18, 2026
@bdtran2002
Copy link
Copy Markdown
Author

*accidentally closed this PR

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.

2 participants