From e33f58ba859c99a07fd68f69a0204f3b16fabfca Mon Sep 17 00:00:00 2001 From: Dan Barr Date: Wed, 19 Feb 2025 19:18:40 +0000 Subject: [PATCH 1/4] Add devcontainer config --- .devcontainer/devcontainer.json | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..232e2ce --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,18 @@ +{ + "name": "Docusaurus", + "image": "mcr.microsoft.com/devcontainers/typescript-node:22-bookworm", + "features": {}, + "forwardPorts": [3000], + "postCreateCommand": "npm install", + "customizations": { + "vscode": { + "extensions": [ + "unifiedjs.vscode-mdx", + "esbenp.prettier-vscode", + "davidanson.vscode-markdownlint", + "redhat.vscode-yaml", + "yzhang.markdown-all-in-one" + ] + } + } +} From 793c3a1e1cc78c27b522d45cf44b58e4e1fe5612 Mon Sep 17 00:00:00 2001 From: Dan Barr Date: Wed, 19 Feb 2025 19:41:30 +0000 Subject: [PATCH 2/4] Update start command Doesn't bind properly inside a dev container without the host set --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0ca98f2..9835133 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "prettier": "prettier . --check", "prettier:fix": "prettier . --write", "serve": "docusaurus serve", - "start": "docusaurus start", + "start": "docusaurus start --host 0.0.0.0", "swizzle": "docusaurus swizzle", "typecheck": "tsc", "write-heading-ids": "docusaurus write-heading-ids", From 82893dad59b5109a16824ecd739eca0ac39ee700 Mon Sep 17 00:00:00 2001 From: Dan Barr Date: Wed, 19 Feb 2025 20:03:43 +0000 Subject: [PATCH 3/4] Update README --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 4731efc..840ff46 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # CodeGate docs +[![GitHub deployments](https://img.shields.io/github/deployments/stacklok/codegate-docs/Production?logo=vercel&style=flat&label=Vercel%20deployment)](https://github.com/stacklok/codegate-docs/deployments/Production) + This repository contains the public-facing docs for CodeGate, hosted at [https://docs.codegate.ai](https://docs.codegate.ai). @@ -20,6 +22,12 @@ formatting. ## Local development +You'll need Node.js available (v22 recommended) or VS Code with the +[Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) +extension and Docker. + +[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/stacklok/codegate-docs) + ```bash npm install npm run start From 8827f7da22719071f053cde7c99b5b4654053795 Mon Sep 17 00:00:00 2001 From: Dan Barr Date: Fri, 21 Feb 2025 18:56:02 +0000 Subject: [PATCH 4/4] Add troubleshooting for Copilot in dev container --- docs/integrations/copilot.mdx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/docs/integrations/copilot.mdx b/docs/integrations/copilot.mdx index fbf5664..616119e 100644 --- a/docs/integrations/copilot.mdx +++ b/docs/integrations/copilot.mdx @@ -276,6 +276,29 @@ Here is an example of how to use the `requests` package: ... ``` +## Troubleshooting + +
+ **Issue**: Copilot in VS Code does not work with Dev Containers + +**Details:** The Copilot extensions load within the Dev Container context by +default, but the container cannot reach the CodeGate proxy directly and does not +trust the CodeGate certificate. + +**Solution:** The simplest solution which doesn't require modifications to the +devcontainer configuration in your project is to force the Copilot extensions to +run in the UI context instead of remotely. Add the following to your **VS Code +User Settings** file: + +```json title="settings.json" + "remote.extensionKind": { + "GitHub.copilot": ["ui"], + "GitHub.copilot-chat": ["ui"] + } +``` + +
+ ## Next steps Learn more about CodeGate's features and how to use them: