Skip to content

Update raycast-language-tool extension - #30166

Open
pasqualesalza wants to merge 1 commit into
raycast:mainfrom
pasqualesalza:ext/raycast-language-tool
Open

Update raycast-language-tool extension#30166
pasqualesalza wants to merge 1 commit into
raycast:mainfrom
pasqualesalza:ext/raycast-language-tool

Conversation

@pasqualesalza

@pasqualesalza pasqualesalza commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Description

Premium accounts cannot be used at all: filling in Username/Email and API Key makes every check fail.

The credentials are sent to https://api.languagetool.org/v2/check, the free endpoint, which rejects any authenticated request:

$ curl -d "language=en-US" --data-urlencode "text=This is a test." \
       -d "username=…" -d "apiKey=…" https://api.languagetool.org/v2/check
HTTP 400
Error: Credentials provided, but server isn't configured to support this.

The same request against https://api.languagetoolplus.com/v2/check is accepted and authenticated instead — and that is the host the bundled src/languagetool-swagger.json already documents ("host": "api.languagetoolplus.com").

So checkTextWithAPI now picks the endpoint to match the request: only requests carrying credentials go to the Premium host. Without credentials nothing changes — same host, same behaviour, no regression risk for free users.

Verified with a real Premium account: before, every check failed with the 400 above; after, checks return results normally. Also checked that the free path still works with the credential fields left empty.

One note on the diff: raycast-env.d.ts shows up as deleted. It is generated and listed in this extension's .gitignore, so the publish CLI did not carry it over. Happy to restore it if you would rather keep it tracked.

Screencast

N/A

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: language-tool Issues related to the language-tool extension platform: macOS platform: Windows labels Aug 12, 2026
@raycastbot

Copy link
Copy Markdown
Collaborator

Thank you for your contribution! 🎉

🔔 @lucastaonline you might want to have a look.

You can use this guide to learn how to check out the Pull Request locally in order to test it.

📋 Quick checkout commands
BRANCH="ext/raycast-language-tool"
FORK_URL="https://github.com/pasqualesalza/raycast-extensions.git"
EXTENSION_NAME="language-tool"
REPO_NAME="raycast-extensions"

git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run dev

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 15 business days.

@pasqualesalza
pasqualesalza marked this pull request as ready for review August 12, 2026 14:18
@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR fixes Premium account checks by routing authenticated requests to LanguageTool’s Premium API while leaving unauthenticated requests on the free endpoint.

  • Adds Premium API host and endpoint constants.
  • Selects the check endpoint based on whether both credentials are configured.
  • Adds the contributor and corresponding changelog entry.
  • Removes the generated, gitignored Raycast preference declarations file.

Confidence Score: 5/5

The PR appears safe to merge with no actionable runtime, build, publishing, or security defects identified.

Authenticated checks now use the Premium API documented by the bundled specification, unauthenticated checks retain the existing endpoint, and the removed generated declaration is recreated by the standard Ray CLI workflow.

Important Files Changed

Filename Overview
extensions/language-tool/src/services/languagetool-api.ts Routes credential-bearing checks to the Premium host while preserving the existing free request path and request payload.
extensions/language-tool/src/config/api.ts Adds hard-coded HTTPS constants for the LanguageTool Premium API without changing existing free endpoints.
extensions/language-tool/raycast-env.d.ts Removes a generated file that the Ray CLI recreates and the extension already ignores.
extensions/language-tool/package.json Adds the PR author to the extension’s contributor metadata without changing runtime configuration.
extensions/language-tool/CHANGELOG.md Documents the Premium endpoint fix using the required merge-date placeholder and reverse-chronological placement.

Reviews (1): Last reviewed commit: "Send authenticated requests to the Langu..." | Re-trigger Greptile

@pernielsentikaer pernielsentikaer self-assigned this Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: language-tool Issues related to the language-tool extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants