You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
NES language server ignores RSTUDIO_POSIT_AI_PATH and system-wide installs #18597
paiLanguageServerPath() hardcodes the Posit Assistant install location instead of resolving it the way the rest of the assistant code does. As a result the NES language server ignores both RSTUDIO_POSIT_AI_PATH and the system-wide install location, while the chat backend honors both.
Everything else resolves the install through locatePositAssistantInstallation() (src/cpp/session/modules/chat/ChatInstallation.cpp:48), which checks three locations in order:
Two cases where completions silently diverge from chat:
RSTUDIO_POSIT_AI_PATH set to a dev build. Chat runs the dev build; NES runs whatever happens to be in <XDG_DATA>/pai/bin/dist/nes, or nothing at all. Mixing a dev chat backend with a stale language server is a confusing state to debug, since nothing reports the mismatch.
System-wide install only (/etc/rstudio/pai/bin, no per-user install). Chat works; completions never start. paiLanguageServerPath() returns an empty path and logs at debug level only, so the failure is invisible unless assistant logging is turned up.
Note that the adjacent copilotLanguageServerPath() does provide an override (RSTUDIO_COPILOT_JS_FOLDER, SessionAssistant.cpp:474), so the escape hatch exists for Copilot but not for Posit Assistant.
Suggested fix
Derive the NES directory from locatePositAssistantInstallation() and append dist/nes, so both halves of the assistant resolve to the same installation.
Reproduction
Install Posit Assistant normally so <XDG_DATA>/pai/bin exists.
Set RSTUDIO_POSIT_AI_PATH to a different valid install (containing dist/client/index.html and dist/server/main.js) and start a session.
The chat pane loads from the override path; the NES language server still loads from <XDG_DATA>/pai/bin/dist/nes.
Activity
Resolve the NES language server through the assistant installation lo…