Skip to content

fix(update): install LS via install-ls sources#192

Merged
dwgx merged 2 commits into
dwgx:masterfrom
andya1lan:fix/install-ls-from-release-repo
Jun 5, 2026
Merged

fix(update): install LS via install-ls sources#192
dwgx merged 2 commits into
dwgx:masterfrom
andya1lan:fix/install-ls-from-release-repo

Conversation

@andya1lan

Copy link
Copy Markdown
Contributor

改了什么 / What changed

  • Route update.sh language-server updates through install-ls.sh instead of a stale hardcoded WindsurfAPI release URL.
  • Align install/update copy with the current fallback chain: WindsurfAPI release → Windsurf desktop LS release → Exafunction fallback.
  • Add regression coverage for the release-source fallback and macOS-compatible .env parsing.

为什么 / Why

update.sh still downloaded language_server_linux_x64 from the old dwgx/WindsurfAPI release asset directly, while install-ls.sh had already been updated to use the fresh third-party Windsurf desktop LS release fallback. This made one-click updates miss the newer LS source and bypass the atomic install path.

The .env parser in update.sh also used GNU-only grep -P, which fails on macOS BSD grep during local debugging.

测试 / Testing

  • bash -n update.sh install-ls.sh
  • node --test test/update-script-ls-source.test.js test/install-ls-atomic-rename.test.js test/platform-ls-paths.test.js test/langserver-binary-update.test.js test/check-i18n.test.js

Checklist

  • 代码风格和现有文件一致 / Code style matches existing files
  • 没有引入 npm 依赖 / No new npm dependencies (project is zero-dep)
  • 涉及 LS binary 协议改动时 在 PR 描述里注明字段号来源 / If touching LS protocol, document field-number source in the PR description (N/A: no LS protocol fields changed)
  • 涉及 dashboard UI 用 App.confirm / App.prompt 不用浏览器原生 alert/confirm / Uses App.confirm / App.prompt, not native dialogs (if dashboard) (N/A: copy only, no dashboard dialog flow changed)

Copilot AI review requested due to automatic review settings June 4, 2026 18:04

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the update.sh language-server (LS) update mechanism to delegate downloads/selection logic to install-ls.sh, and adds guards/tests/documentation to prevent drifting back to a stale hardcoded LS release URL.

Changes:

  • Replace update.sh’s hardcoded LS download logic with a call to install-ls.sh (using LS_INSTALL_PATH).
  • Swap GNU grep -P parsing of .env for an awk-based approach for better macOS compatibility.
  • Add a Node test to enforce delegation and avoid reintroducing the stale WindsurfAPI asset URL; update UI strings and docs to reflect new fallback sources.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
update.sh Delegates LS updates to install-ls.sh and replaces .env parsing implementation
test/update-script-ls-source.test.js Adds regression tests to prevent hardcoded LS URL / GNU grep-only usage
src/dashboard/i18n/zh-CN.json Updates LS update description text to reflect additional sources
src/dashboard/i18n/en.json Updates LS update description text to reflect additional sources
src/dashboard/api.js Updates inline comment describing LS source fallback chain
install-ls.sh Updates usage/docs and clarifies fallback chain comment
README.md Documents that update.sh now updates LS via install-ls.sh
README.en.md Documents that update.sh now updates LS via install-ls.sh

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

Comment thread update.sh
Comment thread update.sh Outdated
Comment thread test/update-script-ls-source.test.js
@andya1lan

Copy link
Copy Markdown
Contributor Author

Fixed problems raised by copilot.

@dwgx dwgx merged commit 3e133bb into dwgx:master Jun 5, 2026
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.

3 participants