mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Feat vscode startup (#7518)
Co-authored-by: OpenHands Bot <openhands@all-hands.dev>
This commit is contained in:
parent
9850f1767a
commit
b9af0188fe
@ -37,10 +37,10 @@ class VSCodePlugin(Plugin):
|
||||
f"su - {username} -s /bin/bash << 'EOF'\n"
|
||||
f'sudo chown -R {username}:{username} /openhands/.openvscode-server\n'
|
||||
'cd /workspace\n'
|
||||
f'exec /openhands/.openvscode-server/bin/openvscode-server --host 0.0.0.0 --connection-token {self.vscode_connection_token} --port {self.vscode_port}\n'
|
||||
f'exec /openhands/.openvscode-server/bin/openvscode-server --host 0.0.0.0 --connection-token {self.vscode_connection_token} --port {self.vscode_port} --disable-workspace-trust\n'
|
||||
'EOF'
|
||||
)
|
||||
print(cmd)
|
||||
|
||||
self.gateway_process = subprocess.Popen(
|
||||
cmd,
|
||||
stderr=subprocess.STDOUT,
|
||||
|
||||
4
openhands/runtime/plugins/vscode/settings.json
Normal file
4
openhands/runtime/plugins/vscode/settings.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"workbench.colorTheme": "Default Dark Modern",
|
||||
"workbench.startupEditor": "none"
|
||||
}
|
||||
@ -135,6 +135,9 @@ RUN \
|
||||
|
||||
COPY ./code/pyproject.toml ./code/poetry.lock /openhands/code/
|
||||
|
||||
COPY ./code/openhands/runtime/plugins/vscode/settings.json /workspace/.vscode/settings.json
|
||||
RUN chmod -R a+rwx /workspace/.vscode/settings.json
|
||||
|
||||
{{ install_dependencies() }}
|
||||
|
||||
# ================================================================
|
||||
@ -147,6 +150,10 @@ COPY ./code/pyproject.toml ./code/poetry.lock /openhands/code/
|
||||
# ================================================================
|
||||
RUN if [ -d /openhands/code/openhands ]; then rm -rf /openhands/code/openhands; fi
|
||||
COPY ./code/pyproject.toml ./code/poetry.lock /openhands/code/
|
||||
|
||||
COPY ./code/openhands/runtime/plugins/vscode/settings.json /workspace/.vscode/settings.json
|
||||
RUN chmod -R a+rwx /workspace/.vscode/settings.json
|
||||
|
||||
COPY ./code/openhands /openhands/code/openhands
|
||||
RUN chmod a+rwx /openhands/code/openhands/__init__.py
|
||||
|
||||
|
||||
@ -5,7 +5,14 @@ from openhands.core.config import AppConfig
|
||||
from openhands.core.logger import openhands_logger as logger
|
||||
from openhands.server.shared import config as shared_config
|
||||
|
||||
FILES_TO_IGNORE = ['.git/', '.DS_Store', 'node_modules/', '__pycache__/', 'lost+found/']
|
||||
FILES_TO_IGNORE = [
|
||||
'.git/',
|
||||
'.DS_Store',
|
||||
'node_modules/',
|
||||
'__pycache__/',
|
||||
'lost+found/',
|
||||
'.vscode/',
|
||||
]
|
||||
|
||||
|
||||
def sanitize_filename(filename):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user