[Features] Updated dependencies, fully translatable and localisable, added progress indicator, and fixed build packaging#6
Open
gusbemacbe wants to merge 8 commits intobernabedev:masterfrom
Conversation
…e/vsce» dev dependency.
…formatting This commit introduces several improvements to the localisation (l10n) files to enhance the consistency, clarity, and correctness across different languages. The yey changes include: - Renaming `package.nls.pt.json` to `package.nls.pt-pt.json` to use a more specific and standard locale code for Portuguese (Portugal). - The italics in Markdown from the extension description in the French, Italian, and Portuguese localisation files for a cleaner presentation. - The backticks has been added around `package.json` and `GEMINI_API_KEY` in the configuration descriptions (English and Spanish) to format them as code, improving the readability. - The minor grammatical corrections has been made to command the titles in the Spanish localisation file.
…translations This commit introduces a comprehensive internationalisation (i18n) support, making the entire user interface localisable. The core changes involve dynamically loading the appropriate localisation bundle at the extension activation based on the user’s VSCode language setting. All the hardcoded UI strings in the `extension.ts` file have been replaced with the keys from the `l10n` bundles. The key changes include: - The dynamic `l10n` bundle loading has been added in the `extension.ts` file; - All UI elements, including the webview commit editor, error messages, information popups, input prompts, and placeholders have been localised; - Numerous new translation keys and their corresponding translations to all `bundle.l10n.*.json` files have been added; - The Portuguese localisation file from `pt.json` to `pt-pt.json` for the correct locale identification has been renamed.
…`keytar` dependencies from the source.
…the dependencies This commit replaces the TypeScript compiler (`tsc`) with `esbuild` for bundling the extension’s with the importation of missing dependencies, that can not be imported by `tsc`. The `package.json` has been updated to: - add `esbuild` as a new dev dependency; - replace the `compile` and `watch` scripts with `esbuild` commands; - inntroduce a new `build` script as the primary bundling command. - configure `pnpm` to build `esbuild` from the source by adding it to `onlyBuiltDependencies`.
…tion This commit enhances the user experience by introducing a progress notification while a detailed commit message is being generated. The entire generation process, including fetching the staged diff and calling the generative AI, is now wrapped within `vscode.window.withProgress`. This displays a notification to the user, providing feedback that the extension is working on the request and has not stalled, which is particularly useful for the potentially long-running AI operations.
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.
¡Hello/hola, @bernabedev!
This pull request introduces the following key improvements to enhance the extension’s developer and user experience and stability.
1. Updated dependencies:
@vscode/vscehas been added, so we could run thepnpm vsce package --no-dependencies;@vscode/l10n-dev,@vscode/test-cliand@vscode/test-electronhave been updated;@google/generative-aihas been updated to obtain the latest capabilities, improvements, and performance improvement;@vscode/l10nanddotenvhas been updated to obtain the latest solved bugs, and the latest features.2. Fully translatable and localisable:
packahe.nls.*.jsonfiles:package.nls.pt.jsonfile has been renamed topackage.nls.pt-pt.jsonto use a more specific and standard locale code for Portuguese (Portugal).package.jsonandGEMINI_API_KEYin the configuration descriptions (English and Spanish) to format them as code, improving the readability.l10nbundle loading has been added in theextension.tsfile;bundle.l10n.*.jsonfiles have been added;pt.jsontopt-pt.jsonfor the correct locale identification has been renamed.3. The addition of the progress indicator for the detailed commit message:
When a user clicked the icon to generate a detailed commit message, there was no visual feedback to indicate that the extension was working. This could make the application feel unresponsive, especially if the AI response was slow.
Hence, the logic for the
gemcommit.detailedCommitMessagecommand insrc/extension.tshas been wrapped in avscode.window.withProgresscall. It will now display a “Generating the detailed commit message…” notification, providing the immediate feedback to the user and creating a more consistent and polished experience, matching the behaviour of the simple commit command.4. The migration of the build process to
esbuildto fix the runtime errors:When packaging the extension using
pnpm vsce package --no-dependencies, the runtime dependencies (like@google/generative-aianddotenv) were not being included in the final.vsixfile. It caused the extension to fail on the activation with aCannot find moduleerror.Hence, respecting your preference for
pnpm, I have migrated the extension’s build system from usingtscalone to usingesbuild. Thepackage.jsonscripts has been updated to useesbuildto bundle all the necessary TypeScript code and itsnode_modulesdependencies into a single, self-containedout/extension.jsfile.The benefits of
esbuild:Cannot find moduleruntime error, ensuring the extension activates correctly for all users.node_modulesfolder, which is a VSCode best practice.