From a2544708754961ef6ac82110892d89579d904c21 Mon Sep 17 00:00:00 2001 From: Tariq Said Date: Wed, 17 Jun 2026 09:57:20 +0400 Subject: [PATCH 1/2] test: align WPCodeSpace chat agent hover copy --- .../browser/promptSyntax/languageProviders/promptHovers.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/chat/test/browser/promptSyntax/languageProviders/promptHovers.test.ts b/src/vs/workbench/contrib/chat/test/browser/promptSyntax/languageProviders/promptHovers.test.ts index f8042fe069e539..6f2a25d8ce3f65 100644 --- a/src/vs/workbench/contrib/chat/test/browser/promptSyntax/languageProviders/promptHovers.test.ts +++ b/src/vs/workbench/contrib/chat/test/browser/promptSyntax/languageProviders/promptHovers.test.ts @@ -405,7 +405,7 @@ suite('PromptHoverProvider', () => { 'The agent to use when running this prompt.', '', '**Built-in agents:**', - '- `agent`: Describe what to build next', + '- `agent`: Describe what to build', '- `ask`: Explore and understand your code', '- `edit`: Edit or refactor selected code', '', From fb184becb46fa2a4bf8b1c22b587ad2ebcc510fd Mon Sep 17 00:00:00 2001 From: Tariq Said Date: Wed, 17 Jun 2026 13:11:00 +0400 Subject: [PATCH 2/2] ci: publish WPCodeSpace OpenVSCode image to GHCR --- .../workflows/wpcodespace-ghcr-publish.yml | 283 ++++++++++++++++++ 1 file changed, 283 insertions(+) create mode 100644 .github/workflows/wpcodespace-ghcr-publish.yml diff --git a/.github/workflows/wpcodespace-ghcr-publish.yml b/.github/workflows/wpcodespace-ghcr-publish.yml new file mode 100644 index 00000000000000..2a17dede51f33c --- /dev/null +++ b/.github/workflows/wpcodespace-ghcr-publish.yml @@ -0,0 +1,283 @@ +name: WPCodeSpace OpenVSCode GHCR Publish + +on: + workflow_dispatch: + push: + branches: + - main + paths: + - .github/workflows/wpcodespace-ghcr-publish.yml + - src/vs/workbench/contrib/chat/** + - package.json + - package-lock.json + - .nvmrc + +permissions: + contents: read + packages: write + +jobs: + publish-image: + name: Publish OpenVSCode image to GHCR + if: ${{ github.repository == 'DXBMARK/openvscode-server' && (github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/main') }} + runs-on: ubuntu-24.04 + timeout-minutes: 90 + + env: + VSCODE_ARCH: x64 + IMAGE_NAME: ghcr.io/dxbmark/wpcodespace-openvscode + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Read Node version + id: node-version + shell: bash + run: | + echo "version=$(cat .nvmrc)" >> "$GITHUB_OUTPUT" + cat .nvmrc + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ steps.node-version.outputs.version }} + cache: npm + + - name: Install Linux native build dependencies + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y \ + build-essential \ + python3 \ + make \ + g++ \ + pkg-config \ + libkrb5-dev \ + libx11-dev \ + libxkbfile-dev + + - name: Show environment + shell: bash + run: | + node -v + npm -v + python3 --version + gcc --version + g++ --version + docker --version + uname -a + git rev-parse HEAD + echo "VSCODE_ARCH=$VSCODE_ARCH" + echo "IMAGE_NAME=$IMAGE_NAME" + echo "SHA_TAG=$IMAGE_NAME:sha-${GITHUB_SHA}" + echo "SHORT_SHA_TAG=$IMAGE_NAME:${GITHUB_SHA::12}" + + - name: Install dependencies + shell: bash + run: npm ci + + - name: Prepare build metadata + shell: bash + run: | + mkdir -p out-build + date -u +"%Y-%m-%dT%H:%M:%SZ" > out-build/date + echo "out-build/date=$(cat out-build/date)" + + - name: Build Linux web server output + shell: bash + run: | + npm run server:init + npm run compile-web + npm run gulp vscode-reh-web-linux-${VSCODE_ARCH}-min-ci + + - name: Validate server output path + shell: bash + run: | + SERVER_OUTPUT="../vscode-reh-web-linux-${VSCODE_ARCH}" + + if [ ! -d "$SERVER_OUTPUT" ]; then + echo "Missing server output directory: $SERVER_OUTPUT" + ls -la .. + exit 1 + fi + + if [ ! -x "$SERVER_OUTPUT/bin/openvscode-server" ]; then + echo "Missing executable: $SERVER_OUTPUT/bin/openvscode-server" + find "$SERVER_OUTPUT/bin" -maxdepth 2 -type f -print + exit 1 + fi + + if [ ! -x "$SERVER_OUTPUT/node" ]; then + echo "Missing executable: $SERVER_OUTPUT/node" + find "$SERVER_OUTPUT" -maxdepth 2 -type f -name node -print + exit 1 + fi + + if [ ! -f "$SERVER_OUTPUT/out/server-main.js" ]; then + echo "Packaged output is missing runtime entrypoint: $SERVER_OUTPUT/out/server-main.js" + echo "Attempting to assemble runtime from repository out/ directory" + + if [ ! -f "out/server-main.js" ]; then + echo "Missing built runtime entrypoint: out/server-main.js" + echo "Repository out/ files:" + find out -maxdepth 4 -type f | sort | sed -n '1,240p' || true + echo "Packaged output files:" + find "$SERVER_OUTPUT" -maxdepth 4 -type f | sort | sed -n '1,240p' + exit 1 + fi + + mkdir -p "$SERVER_OUTPUT/out" + cp -a out/. "$SERVER_OUTPUT/out/" + fi + + if [ ! -f "$SERVER_OUTPUT/out/server-main.js" ]; then + echo "Missing runtime entrypoint after assembly: $SERVER_OUTPUT/out/server-main.js" + exit 1 + fi + + echo "Found runtime entrypoint: $SERVER_OUTPUT/out/server-main.js" + echo "Found server output: $SERVER_OUTPUT" + du -sh "$SERVER_OUTPUT" + find "$SERVER_OUTPUT" -maxdepth 3 -type f | sort | sed -n '1,160p' + + - name: Create Docker build context + shell: bash + run: | + SERVER_OUTPUT="../vscode-reh-web-linux-${VSCODE_ARCH}" + IMAGE_CONTEXT="/tmp/wpcodespace-openvscode-image" + + rm -rf "$IMAGE_CONTEXT" + mkdir -p "$IMAGE_CONTEXT/openvscode-server" + + cp -a "$SERVER_OUTPUT/." "$IMAGE_CONTEXT/openvscode-server/" + + python3 - "$IMAGE_CONTEXT/Dockerfile" <<'PYTHON' + from pathlib import Path + import textwrap + import sys + + dockerfile = textwrap.dedent(r''' + FROM ubuntu:24.04 + + RUN apt-get update && apt-get install -y --no-install-recommends \ + ca-certificates \ + git \ + libatomic1 \ + libkrb5-3 \ + libsecret-1-0 \ + libx11-6 \ + libxkbfile1 \ + locales \ + openssh-client \ + procps \ + && rm -rf /var/lib/apt/lists/* + + RUN useradd -m -u 10001 openvscode + + COPY openvscode-server/ /opt/openvscode-server/ + + RUN chmod +x \ + /opt/openvscode-server/bin/openvscode-server \ + /opt/openvscode-server/node \ + && chown -R openvscode:openvscode /opt/openvscode-server /home/openvscode + + USER openvscode + WORKDIR /home/openvscode + + EXPOSE 3000 + + CMD ["/opt/openvscode-server/bin/openvscode-server", "--host", "0.0.0.0", "--port", "3000", "--without-connection-token"] + ''').lstrip() + + Path(sys.argv[1]).write_text(dockerfile + "\n", encoding="utf-8") + PYTHON + + head -n 1 "$IMAGE_CONTEXT/Dockerfile" + test "$(head -n 1 "$IMAGE_CONTEXT/Dockerfile")" = "FROM ubuntu:24.04" + grep -nE '^[[:space:]]+(FROM|RUN|COPY|USER|WORKDIR|EXPOSE|CMD)\b' "$IMAGE_CONTEXT/Dockerfile" && exit 1 || true + + echo "=== Docker context ===" + find "$IMAGE_CONTEXT" -maxdepth 3 -type f | sort | sed -n '1,160p' + du -sh "$IMAGE_CONTEXT" + + - name: Build publish image + shell: bash + run: | + SHA_TAG="$IMAGE_NAME:sha-${GITHUB_SHA}" + SHORT_SHA_TAG="$IMAGE_NAME:${GITHUB_SHA::12}" + + docker build \ + --pull \ + -t "$SHA_TAG" \ + -t "$SHORT_SHA_TAG" \ + /tmp/wpcodespace-openvscode-image + + docker image inspect "$SHA_TAG" \ + --format 'image={{.Id}} size={{.Size}} created={{.Created}}' + + - name: Run container smoke test + shell: bash + run: | + SHA_TAG="$IMAGE_NAME:sha-${GITHUB_SHA}" + + docker rm -f wpcodespace-openvscode-smoke 2>/dev/null || true + + docker run -d \ + --name wpcodespace-openvscode-smoke \ + -p 3000:3000 \ + "$SHA_TAG" + + for i in $(seq 1 60); do + if curl -fsS http://127.0.0.1:3000/ >/tmp/openvscode-smoke-response.html; then + echo "OpenVSCode responded on attempt $i" + head -40 /tmp/openvscode-smoke-response.html + docker logs wpcodespace-openvscode-smoke --tail 120 + docker rm -f wpcodespace-openvscode-smoke + exit 0 + fi + + echo "Waiting for OpenVSCode to respond... attempt $i" + docker logs wpcodespace-openvscode-smoke --tail 80 || true + sleep 2 + done + + echo "OpenVSCode did not respond in time" + docker ps -a + docker logs wpcodespace-openvscode-smoke || true + docker rm -f wpcodespace-openvscode-smoke + exit 1 + + - name: Verify no manual generated bundle patch is required + shell: bash + run: | + GENERATED_BUNDLE_CHANGES="$(git diff --name-only -- ':(glob)**/workbench.js' ':(glob)**/nls.messages*')" + + if [ -n "$GENERATED_BUNDLE_CHANGES" ]; then + echo "Generated runtime bundle files changed unexpectedly." + echo "$GENERATED_BUNDLE_CHANGES" + exit 1 + fi + + echo "OK: no tracked generated workbench.js or nls.messages changes" + + - name: Log in to GHCR + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Push immutable image tags + shell: bash + run: | + SHA_TAG="$IMAGE_NAME:sha-${GITHUB_SHA}" + SHORT_SHA_TAG="$IMAGE_NAME:${GITHUB_SHA::12}" + + docker push "$SHA_TAG" + docker push "$SHORT_SHA_TAG" + + echo "Published image references:" + echo "$SHA_TAG" + echo "$SHORT_SHA_TAG"