mirror of
https://github.com/OpenHands/OpenHands.git
synced 2026-03-22 13:47:19 +08:00
Add VSCode Hello World extension (#6463)
Co-authored-by: openhands <openhands@all-hands.dev> Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
This commit is contained in:
@@ -63,7 +63,10 @@ RUN if [ -z "${RELEASE_TAG}" ]; then \
|
||||
tar -xzf ${RELEASE_TAG}-linux-${arch}.tar.gz && \
|
||||
mv -f ${RELEASE_TAG}-linux-${arch} ${OPENVSCODE_SERVER_ROOT} && \
|
||||
cp ${OPENVSCODE_SERVER_ROOT}/bin/remote-cli/openvscode-server ${OPENVSCODE_SERVER_ROOT}/bin/remote-cli/code && \
|
||||
rm -f ${RELEASE_TAG}-linux-${arch}.tar.gz
|
||||
rm -f ${RELEASE_TAG}-linux-${arch}.tar.gz && \
|
||||
# Install our custom extension
|
||||
mkdir -p ${OPENVSCODE_SERVER_ROOT}/extensions/openhands-hello-world && \
|
||||
cp -r /openhands/code/openhands/runtime/utils/vscode-extensions/hello-world/* ${OPENVSCODE_SERVER_ROOT}/extensions/openhands-hello-world/
|
||||
|
||||
{% endmacro %}
|
||||
|
||||
@@ -102,7 +105,6 @@ RUN \
|
||||
# rather than the current OpenHands release
|
||||
|
||||
{{ setup_base_system() }}
|
||||
{{ setup_vscode_server() }}
|
||||
|
||||
# Install micromamba
|
||||
RUN mkdir -p /openhands/micromamba/bin && \
|
||||
@@ -137,6 +139,8 @@ COPY ./code/pyproject.toml ./code/poetry.lock /openhands/code/
|
||||
COPY ./code/openhands /openhands/code/openhands
|
||||
RUN chmod a+rwx /openhands/code/openhands/__init__.py
|
||||
|
||||
{{ setup_vscode_server() }}
|
||||
|
||||
# ================================================================
|
||||
# END: Build from versioned image
|
||||
# ================================================================
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
const vscode = require('vscode');
|
||||
|
||||
function activate(context) {
|
||||
let disposable = vscode.commands.registerCommand('openhands-hello-world.helloWorld', function () {
|
||||
vscode.window.showInformationMessage('Hello from OpenHands!');
|
||||
});
|
||||
|
||||
context.subscriptions.push(disposable);
|
||||
}
|
||||
|
||||
function deactivate() {}
|
||||
|
||||
module.exports = {
|
||||
activate,
|
||||
deactivate
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"name": "openhands-hello-world",
|
||||
"displayName": "OpenHands Hello World",
|
||||
"description": "A simple hello world extension for OpenHands",
|
||||
"version": "0.0.1",
|
||||
"publisher": "openhands",
|
||||
"engines": {
|
||||
"vscode": "^1.94.0"
|
||||
},
|
||||
"categories": [
|
||||
"Other"
|
||||
],
|
||||
"activationEvents": [
|
||||
"onCommand:openhands-hello-world.helloWorld"
|
||||
],
|
||||
"main": "./extension.js",
|
||||
"contributes": {
|
||||
"commands": [{
|
||||
"command": "openhands-hello-world.helloWorld",
|
||||
"title": "Hello World from OpenHands"
|
||||
}]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user