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" + ] + } + } +} 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 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: 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",