Skip to content

Handle workspace-local TypeScript LSP & repair#58

Merged
BunsDev merged 6 commits into
mainfrom
feat/cast-agent-round-trip
May 19, 2026
Merged

Handle workspace-local TypeScript LSP & repair#58
BunsDev merged 6 commits into
mainfrom
feat/cast-agent-round-trip

Conversation

@BunsDev
Copy link
Copy Markdown
Member

@BunsDev BunsDev commented May 18, 2026

Add workspace-local detection and selection for typescript-language-server and surface an actionable repair flow in the UI. Introduces a custom_binary_config on LspServerConfig and implements resolution order (user-configured, workspace-local, managed, then PATH) via resolve_lsp_binary_config; includes helper types and tests. The TypeScript candidate now looks for workspace wrappers (node_modules/.bin) and package entrypoints, verifying them with node before selecting them. UI changes show an "Install/repair" button and custom status text when the TypeScript LSP fails with a repairable error, and ensure reinstall removal is triggered when installing. Also improve macOS run script to wait for and tail the correct log file per channel.

BunsDev added 3 commits May 18, 2026 04:43
Add workspace-local detection and selection for typescript-language-server and surface an actionable repair flow in the UI. Introduces a custom_binary_config on LspServerConfig and implements resolution order (user-configured, workspace-local, managed, then PATH) via resolve_lsp_binary_config; includes helper types and tests. The TypeScript candidate now looks for workspace wrappers (node_modules/.bin) and package entrypoints, verifying them with node before selecting them. UI changes show an "Install/repair" button and custom status text when the TypeScript LSP fails with a repairable error, and ensure reinstall removal is triggered when installing. Also improve macOS run script to wait for and tail the correct log file per channel.
Replace the old "Endpoints used" section with a comprehensive concept model and API contract for cast_agent. Adds definitions for Session, Conversation, Run, Message, and Substrate; documents existing endpoints (health, messages, sessions, WS streaming), proposes a Runs surface (start/list/get/events/cancel/artifacts), and outlines Substrate wire format and producer responsibilities. Includes error/degraded-mode behavior, implemented vs proposed status table, API gaps and a prioritized minimal rollout, and small updates to Comux/feature-gating notes.
Copilot AI review requested due to automatic review settings May 18, 2026 10:11
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds workspace-aware TypeScript LSP binary resolution and a repair-oriented settings UI, plus updates macOS launch logging and Cast Agent documentation.

Changes:

  • Adds LSP binary source resolution with workspace-local TypeScript detection before managed/PATH fallback.
  • Adds TypeScript LSP install/repair UI behavior for repairable startup failures.
  • Updates macOS run log tailing and expands Cast Agent gateway/API documentation.

Reviewed changes

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

Show a summary per file
File Description
script/macos/run Selects channel-specific log paths and waits before tailing logs.
crates/lsp/src/supported_servers.rs Adds binary source resolution types, actionable missing-binary messages, and tests.
crates/lsp/src/servers/typescript_language_server.rs Detects workspace-local TypeScript LSP wrappers and package entrypoints.
crates/lsp/src/config.rs Applies new binary resolution order when building LSP commands.
crates/cast_agent/src/gateway.rs Updates gateway module docs around substrate handling.
CAST-AGENT.md Expands Cast Agent concept/API documentation and proposed run/substrate contracts.
app/src/settings_view/code_page.rs Adds TypeScript LSP repair status text and install/repair action.
Comments suppressed due to low confidence (1)

app/src/settings_view/code_page.rs:2103

  • The repair button visibility is determined by matching a duplicated display string in the error. That makes the action disappear if the LSP error wording changes; use a shared constant or typed repairable-error signal instead of parsing UI-facing text.
                matches!(
                    model.as_ref(app).state(),
                    LspState::Failed { error } if error.contains(TYPESCRIPT_LSP_REPAIR_LABEL)
                )

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

Comment thread crates/lsp/src/config.rs
Comment thread crates/lsp/src/supported_servers.rs Outdated
Comment thread app/src/settings_view/code_page.rs Outdated
BunsDev and others added 2 commits May 18, 2026 05:17
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@BunsDev
Copy link
Copy Markdown
Member Author

BunsDev commented May 18, 2026

@copilot apply changes based on the comments in this thread

@BunsDev BunsDev self-assigned this May 18, 2026
@BunsDev
Copy link
Copy Markdown
Member Author

BunsDev commented May 18, 2026

@copilot resolve the merge conflicts in this pull request

# Conflicts:
#	app/src/settings_view/code_page.rs
#	crates/lsp/src/config.rs
#	crates/lsp/src/supported_servers.rs
@BunsDev BunsDev merged commit 2e8bbe2 into main May 19, 2026
9 checks passed
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.

2 participants