Harden showButton, align engine with ddb50, update dependencies - #1
Merged
Merged
Conversation
- Guard against non-array or malformed args (e.g., from the Command Palette) instead of throwing on args.length - Treat an empty message as hideButton, so a silent failure doesn't show a button that sends an empty question to cs50.ai - Use await ddb50.activate() rather than ddb50!.exports, so the first click works before ddb50 has activated; report a missing ddb50 clearly - Log the offending value in error paths instead of a stale variable
- engines.vscode ^1.107.0 -> ^1.132.0 (same as ddb50.vsix); @types/vscode 1.134.0 - ESLint 10 with typescript-eslint (replaces @typescript-eslint/parser and eslint-plugin), TypeScript 6 (typescript-eslint does not yet support 7), @vscode/test-electron 3, @types/node 26 - tsconfig: list types explicitly, as TypeScript 6 no longer includes all @types - Add a lightbulb icon to the help50 terminal button and a description
rongxin-liu
added a commit
that referenced
this pull request
Sep 21, 2026
#1 set the range to ^1.132.0 in package.json after npm had recorded ^1.134.0 in the lockfile's root entry; the resolved version (1.134.0) is unchanged.
This was referenced Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prep for wiring the terminal into help50 via
command50 help50.showButton <ask|say> "<message>"(see cs50/cli#210 and the codespacehelp50-canarybranch).Main changes
showButtonno longer throws on bad input. It readargs.lengthbefore checkingargswas an array, so running it from the Command Palette (or with no args) crashed. It now validates the shape and logs the offending value, and an empty message is treated ashideButton: a command that fails silently should not produce a button that sends an empty question to cs50.ai.First click works before ddb50 has activated.
help50.ask/help50.sayreadddb50!.exportsdirectly, which isundefineduntil ddb50 activates. They nowawait ddb50.activate()(a no-op once active) and show a clear error if ddb50 is not installed.Engine aligned with ddb50.
engines.vscode^1.107.0->^1.132.0,@types/vscodepinned to 1.134.0 (the lowest published version satisfying that range, and what ddb50 resolves to).Smaller changes
typescript-eslint(replacing the two@typescript-eslint/*packages), TypeScript 6,@vscode/test-electron3,@types/node26. TypeScript 7 is held back becausetypescript-eslintdoes not support it yet (same as ddb50)tsconfig.jsonliststypesexplicitly; TypeScript 6 no longer includes every@types/*package by defaultTesting
npm run compileandnpm run lintpass;vsce packageproduceshelp50-0.0.1.vsix, the filename the codespace Dockerfile expects.