Skip to content

Don't show the help50 button when a helper already gave advice - #198

Merged
rongxin-liu merged 1 commit into
canaryfrom
help50-inline-only
Sep 21, 2026
Merged

rongxin-liu merged 1 commit into
canaryfrom
help50-inline-only

Conversation

@rongxin-liu

Copy link
Copy Markdown
Contributor

Feedback from testing on canary: for a recognized mistake like 1s, the inline hint ("Did you mean to run ls...") already answers the question, so the button only added a click to have the duck repeat it.

_helpful now prints the advice and nothing else. The button is reserved for _helpless, where no local helper matched and the duck can ask cs50.ai to explain the output. A recognized failure also clears any button still showing, like a success or a quiet failure does, so the button always refers to the last command.

The say action in help50.vsix and requestDuckSay in ddb50 stay in place; nothing calls them from the shell now, but they are useful hooks to keep.

Verified under a pty with a fake command50: 1s -> advice, no call; cat nothere -> showButton ask; 1s -> advice, hideButton; tests/smoke.sh passes.

The advice is already on screen, so the button only added a click. Reserve
it for failures no helper recognized, where the duck can ask cs50.ai. A
recognized failure now clears any stale button like other outcomes do.
@rongxin-liu
rongxin-liu merged commit 7c75ab5 into canary Sep 21, 2026
1 check passed
@rongxin-liu
rongxin-liu deleted the help50-inline-only branch September 21, 2026 06:36
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.

1 participant