дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
feat(remote): Reload the environment and apply devcontainer settings on the remote server (#183)
The remote server read the login shell's PATH once and cached it, had no project-level environment, and changed environment variables only took effect after reinstalling or a manual restart.
- Every openidea-server start re-reads the remote login shell's full environment (`$SHELL -ilc env -0`), with the cached PATH only as a fallback when the shell doesn't answer.
- A project's `.devcontainer/devcontainer.json` (or `.devcontainer.json`) applies on remote hosts: `remoteEnv` (with `${localEnv|containerEnv|env:X[:default]}`, workspace variables and `null` to unset) reaches every child process through one environment overlay (terminals, run configurations, language servers, debuggers, build tools, git), and `postStartCommand` (string, array or parallel object) runs once per server start in the project root as a cancellable background task; a failure raises a notification with the exit code and the last output lines without blocking the project.
- Reload Environment (`remote.reloadEnvironment`, File menu and Find Action) re-resolves the login shell and `remoteEnv` without restarting the server, starting from the process's original environment so prepended PATH entries don't pile up; it lists the changed variables, notes that running processes keep their environment, and offers to restart language servers.
- The JSONC reader moves to `ide_core::jsonc` and is shared with ide-run.
Claude-Session: https://claude.ai/code/session_01Dq6jQQn8ZhRfkkyj3PRutA
Цей коміт міститься в:
1 джерело
b6a371559a
коміт
1f9be73174
28 files changed
+1527
-123
No files matched your search
@@ -165,6 +165,7 @@
|
||||
"menu.file.newProjectsSettings": "Settings for New Projects…",
|
||||
"menu.file.toggleReadOnly": "Make File Read-only / Writable",
|
||||
"menu.file.closeProject": "Close Project",
|
||||
"menu.remote.reloadEnvironment": "Reload Environment",
|
||||
"menu.file.new": "New…",
|
||||
"menu.file.newScratchFile": "New Scratch File…",
|
||||
"menu.file.openInNewWindow": "Open in New Window…",
|
||||
|
||||
@@ -4165,6 +4165,17 @@
|
||||
"Remote Development…": "远程开发…",
|
||||
"Opens a project folder on an SSH host; the IDE backend runs on that host.": "打开 SSH 主机上的项目文件夹;IDE 后端在该主机上运行。",
|
||||
"Disconnect from Remote Host": "断开与远程主机的连接",
|
||||
"Reload Environment": "重新加载环境",
|
||||
"Reads the login shell's environment (and devcontainer.json remoteEnv on a remote host) again for new terminals and processes.": "为新的终端和进程重新读取登录 shell 的环境(远程主机上还包括 devcontainer.json 的 remoteEnv)。",
|
||||
"No variables changed.": "没有变量发生变化。",
|
||||
"Changed: {names} and {more} more.": "已更改:{names},以及另外 {more} 个。",
|
||||
"Changed: {names}.": "已更改:{names}。",
|
||||
"Terminals and processes already running keep their old environment; new ones get the new one.": "已在运行的终端和进程保留原有环境;新启动的将使用新环境。",
|
||||
"Restart Language Servers": "重启语言服务器",
|
||||
"Could not reload the environment": "无法重新加载环境",
|
||||
"Environment reloaded": "环境已重新加载",
|
||||
"devcontainer.json was not applied": "未应用 devcontainer.json",
|
||||
"postStartCommand failed": "postStartCommand 失败",
|
||||
"Opens a terminal tab connected to an SSH configuration (`arg`: its id; otherwise a chooser).": "打开连接到 SSH 配置的终端标签页(`arg`:配置 id;否则显示选择器)。",
|
||||
"Connecting to the host…": "正在连接主机…",
|
||||
"Checking the IDE backend on the host…": "正在检查主机上的 IDE 后端…",
|
||||
|
||||
@@ -165,6 +165,7 @@
|
||||
"menu.file.newProjectsSettings": "新项目的设置…",
|
||||
"menu.file.toggleReadOnly": "将文件设为只读/可写",
|
||||
"menu.file.closeProject": "关闭项目",
|
||||
"menu.remote.reloadEnvironment": "重新加载环境",
|
||||
"menu.file.new": "新建…",
|
||||
"menu.file.newScratchFile": "新建临时文件…",
|
||||
"menu.file.openInNewWindow": "在新窗口中打开…",
|
||||
|
||||
Reference in new issue
Заблокувати користувача