Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,28 @@ You can also use the command `session-info` for more info on mounts for this pro

3. **Build properties**: `Directory.Build.props`

- Line 4: `<CopilotHereVersion>YYYY.MM.DD</CopilotHereVersion>`
- Reads `CopilotHereVersion` from the `VERSION` file automatically (no manual edit needed)

4. **Build info**: `app/Infrastructure/BuildInfo.cs`

- Line 13: `public const string BuildDate = "YYYY.MM.DD";`

5. **This file**: `.github/copilot-instructions.md`
- Update "Current version" below

### Verification Checklist

Before committing, verify all 5 locations have the EXACT SAME version:

```bash
# Quick check - all should show the same version
cat VERSION
grep "Version: " copilot_here.sh
grep "Version: " copilot_here.ps1
grep "COPILOT_HERE_VERSION=" copilot_here.sh
grep "CopilotHereVersion =" copilot_here.ps1
grep "CopilotHereVersion>" Directory.Build.props
grep "BuildDate = " app/Infrastructure/BuildInfo.cs
```
Comment thread
GordonBeeming marked this conversation as resolved.

Use `scripts/bump-version.sh YYYY.MM.DD` to update all locations at once.

### When to Update Version

- Any modification to shell function code
Expand Down
9 changes: 9 additions & 0 deletions docker/generated/Dockerfile.default
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ RUN ARCH=$(dpkg --print-architecture) \
&& rm /tmp/powershell.tar.gz; \
fi

# --- snippet: lsp-typescript ---
# Install TypeScript Language Server for code intelligence
RUN npm install -g typescript typescript-language-server

# Write LSP config fragment for TypeScript
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "typescript": { "command": "typescript-language-server", "args": ["--stdio"], "fileExtensions": { ".ts": "typescript", ".tsx": "typescriptreact", ".js": "javascript", ".jsx": "javascriptreact" } } } }' \
> /etc/copilot/lsp-config.d/typescript.json

# --- snippet: copilot-cli ---
# ARG for the Copilot CLI version - passed from build process
# This ensures cache invalidation when a new version is available
Expand Down
20 changes: 20 additions & 0 deletions docker/generated/Dockerfile.dotnet
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,26 @@ RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
fi \
&& rm dotnet-install.sh

# --- snippet: lsp-typescript ---
# Install TypeScript Language Server for code intelligence
RUN npm install -g typescript typescript-language-server

# Write LSP config fragment for TypeScript
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "typescript": { "command": "typescript-language-server", "args": ["--stdio"], "fileExtensions": { ".ts": "typescript", ".tsx": "typescriptreact", ".js": "javascript", ".jsx": "javascriptreact" } } } }' \
> /etc/copilot/lsp-config.d/typescript.json

# --- snippet: lsp-csharp ---
# Install C# Language Server for code intelligence
# Install globally as root, then symlink to a shared location so appuser can access it
RUN dotnet tool install -g csharp-ls \
&& ln -s /root/.dotnet/tools/csharp-ls /usr/local/bin/csharp-ls

# Write LSP config fragment for C#
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "csharp": { "command": "csharp-ls", "args": [], "fileExtensions": { ".cs": "csharp", ".csx": "csharp" } } } }' \
> /etc/copilot/lsp-config.d/csharp.json

# --- snippet: copilot-cli ---
# ARG for the Copilot CLI version - passed from build process
# This ensures cache invalidation when a new version is available
Expand Down
20 changes: 20 additions & 0 deletions docker/generated/Dockerfile.dotnet-10
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,26 @@ RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
fi \
&& rm dotnet-install.sh

# --- snippet: lsp-typescript ---
# Install TypeScript Language Server for code intelligence
RUN npm install -g typescript typescript-language-server

# Write LSP config fragment for TypeScript
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "typescript": { "command": "typescript-language-server", "args": ["--stdio"], "fileExtensions": { ".ts": "typescript", ".tsx": "typescriptreact", ".js": "javascript", ".jsx": "javascriptreact" } } } }' \
> /etc/copilot/lsp-config.d/typescript.json

# --- snippet: lsp-csharp ---
# Install C# Language Server for code intelligence
# Install globally as root, then symlink to a shared location so appuser can access it
RUN dotnet tool install -g csharp-ls \
&& ln -s /root/.dotnet/tools/csharp-ls /usr/local/bin/csharp-ls

# Write LSP config fragment for C#
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "csharp": { "command": "csharp-ls", "args": [], "fileExtensions": { ".cs": "csharp", ".csx": "csharp" } } } }' \
> /etc/copilot/lsp-config.d/csharp.json

# --- snippet: copilot-cli ---
# ARG for the Copilot CLI version - passed from build process
# This ensures cache invalidation when a new version is available
Expand Down
9 changes: 9 additions & 0 deletions docker/generated/Dockerfile.dotnet-8
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
fi \
&& rm dotnet-install.sh

# --- snippet: lsp-typescript ---
# Install TypeScript Language Server for code intelligence
RUN npm install -g typescript typescript-language-server

# Write LSP config fragment for TypeScript
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "typescript": { "command": "typescript-language-server", "args": ["--stdio"], "fileExtensions": { ".ts": "typescript", ".tsx": "typescriptreact", ".js": "javascript", ".jsx": "javascriptreact" } } } }' \
> /etc/copilot/lsp-config.d/typescript.json

# --- snippet: copilot-cli ---
# ARG for the Copilot CLI version - passed from build process
# This ensures cache invalidation when a new version is available
Expand Down
9 changes: 9 additions & 0 deletions docker/generated/Dockerfile.dotnet-9
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,15 @@ RUN wget https://dot.net/v1/dotnet-install.sh -O dotnet-install.sh \
fi \
&& rm dotnet-install.sh

# --- snippet: lsp-typescript ---
# Install TypeScript Language Server for code intelligence
RUN npm install -g typescript typescript-language-server

# Write LSP config fragment for TypeScript
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "typescript": { "command": "typescript-language-server", "args": ["--stdio"], "fileExtensions": { ".ts": "typescript", ".tsx": "typescriptreact", ".js": "javascript", ".jsx": "javascriptreact" } } } }' \
> /etc/copilot/lsp-config.d/typescript.json

# --- snippet: copilot-cli ---
# ARG for the Copilot CLI version - passed from build process
# This ensures cache invalidation when a new version is available
Expand Down
20 changes: 20 additions & 0 deletions docker/generated/Dockerfile.dotnet-playwright
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,26 @@ RUN npx playwright install --with-deps
# Make playwright browsers directory world-writable so any UID can access/update them
RUN chmod -R 777 /ms-playwright

# --- snippet: lsp-typescript ---
# Install TypeScript Language Server for code intelligence
RUN npm install -g typescript typescript-language-server

# Write LSP config fragment for TypeScript
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "typescript": { "command": "typescript-language-server", "args": ["--stdio"], "fileExtensions": { ".ts": "typescript", ".tsx": "typescriptreact", ".js": "javascript", ".jsx": "javascriptreact" } } } }' \
> /etc/copilot/lsp-config.d/typescript.json

# --- snippet: lsp-csharp ---
# Install C# Language Server for code intelligence
# Install globally as root, then symlink to a shared location so appuser can access it
RUN dotnet tool install -g csharp-ls \
&& ln -s /root/.dotnet/tools/csharp-ls /usr/local/bin/csharp-ls

# Write LSP config fragment for C#
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "csharp": { "command": "csharp-ls", "args": [], "fileExtensions": { ".cs": "csharp", ".csx": "csharp" } } } }' \
> /etc/copilot/lsp-config.d/csharp.json

# --- snippet: copilot-cli ---
# ARG for the Copilot CLI version - passed from build process
# This ensures cache invalidation when a new version is available
Expand Down
29 changes: 29 additions & 0 deletions docker/generated/Dockerfile.dotnet-rust
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,35 @@ RUN chmod -R a+rwX /usr/local/cargo
# Verify installation
RUN rustc --version && cargo --version

# --- snippet: lsp-typescript ---
# Install TypeScript Language Server for code intelligence
RUN npm install -g typescript typescript-language-server

# Write LSP config fragment for TypeScript
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "typescript": { "command": "typescript-language-server", "args": ["--stdio"], "fileExtensions": { ".ts": "typescript", ".tsx": "typescriptreact", ".js": "javascript", ".jsx": "javascriptreact" } } } }' \
> /etc/copilot/lsp-config.d/typescript.json

# --- snippet: lsp-csharp ---
# Install C# Language Server for code intelligence
# Install globally as root, then symlink to a shared location so appuser can access it
RUN dotnet tool install -g csharp-ls \
&& ln -s /root/.dotnet/tools/csharp-ls /usr/local/bin/csharp-ls

# Write LSP config fragment for C#
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "csharp": { "command": "csharp-ls", "args": [], "fileExtensions": { ".cs": "csharp", ".csx": "csharp" } } } }' \
> /etc/copilot/lsp-config.d/csharp.json

# --- snippet: lsp-rust ---
# Install Rust Analyzer for code intelligence
RUN rustup component add rust-analyzer

# Write LSP config fragment for Rust
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "rust": { "command": "rust-analyzer", "args": [], "fileExtensions": { ".rs": "rust" } } } }' \
> /etc/copilot/lsp-config.d/rust.json

# --- snippet: copilot-cli ---
# ARG for the Copilot CLI version - passed from build process
# This ensures cache invalidation when a new version is available
Expand Down
18 changes: 18 additions & 0 deletions docker/generated/Dockerfile.golang
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,24 @@ RUN mkdir -p ${GOPATH} \
# Verify installation
RUN go version

# --- snippet: lsp-typescript ---
# Install TypeScript Language Server for code intelligence
RUN npm install -g typescript typescript-language-server

# Write LSP config fragment for TypeScript
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "typescript": { "command": "typescript-language-server", "args": ["--stdio"], "fileExtensions": { ".ts": "typescript", ".tsx": "typescriptreact", ".js": "javascript", ".jsx": "javascriptreact" } } } }' \
> /etc/copilot/lsp-config.d/typescript.json

# --- snippet: lsp-golang ---
# Install gopls (Go Language Server) for code intelligence
RUN go install golang.org/x/tools/gopls@latest

# Write LSP config fragment for Go
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "go": { "command": "gopls", "args": ["serve"], "fileExtensions": { ".go": "go" } } } }' \
> /etc/copilot/lsp-config.d/golang.json

# --- snippet: copilot-cli ---
# ARG for the Copilot CLI version - passed from build process
# This ensures cache invalidation when a new version is available
Expand Down
9 changes: 9 additions & 0 deletions docker/generated/Dockerfile.playwright
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ RUN npx playwright install --with-deps
# Make playwright browsers directory world-writable so any UID can access/update them
RUN chmod -R 777 /ms-playwright

# --- snippet: lsp-typescript ---
# Install TypeScript Language Server for code intelligence
RUN npm install -g typescript typescript-language-server

# Write LSP config fragment for TypeScript
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "typescript": { "command": "typescript-language-server", "args": ["--stdio"], "fileExtensions": { ".ts": "typescript", ".tsx": "typescriptreact", ".js": "javascript", ".jsx": "javascriptreact" } } } }' \
> /etc/copilot/lsp-config.d/typescript.json

# --- snippet: copilot-cli ---
# ARG for the Copilot CLI version - passed from build process
# This ensures cache invalidation when a new version is available
Expand Down
18 changes: 18 additions & 0 deletions docker/generated/Dockerfile.rust
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,24 @@ RUN chmod -R a+rwX /usr/local/cargo
# Verify installation
RUN rustc --version && cargo --version

# --- snippet: lsp-typescript ---
# Install TypeScript Language Server for code intelligence
RUN npm install -g typescript typescript-language-server

# Write LSP config fragment for TypeScript
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "typescript": { "command": "typescript-language-server", "args": ["--stdio"], "fileExtensions": { ".ts": "typescript", ".tsx": "typescriptreact", ".js": "javascript", ".jsx": "javascriptreact" } } } }' \
> /etc/copilot/lsp-config.d/typescript.json

# --- snippet: lsp-rust ---
# Install Rust Analyzer for code intelligence
RUN rustup component add rust-analyzer

# Write LSP config fragment for Rust
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "rust": { "command": "rust-analyzer", "args": [], "fileExtensions": { ".rs": "rust" } } } }' \
> /etc/copilot/lsp-config.d/rust.json

# --- snippet: copilot-cli ---
# ARG for the Copilot CLI version - passed from build process
# This ensures cache invalidation when a new version is available
Expand Down
20 changes: 10 additions & 10 deletions docker/images.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,43 +2,43 @@
"images": {
"default": {
"base": "node:20-slim",
"snippets": ["system-packages", "powershell", "copilot-cli", "entrypoint"]
"snippets": ["system-packages", "powershell", "lsp-typescript", "copilot-cli", "entrypoint"]
},
"dotnet": {
"base": "node:20-slim",
"snippets": ["system-packages", "powershell", "dotnet-prereqs", "dotnet8", "dotnet9", "dotnet10", "copilot-cli", "entrypoint"]
"snippets": ["system-packages", "powershell", "dotnet-prereqs", "dotnet8", "dotnet9", "dotnet10", "lsp-typescript", "lsp-csharp", "copilot-cli", "entrypoint"]
},
"dotnet-8": {
"base": "node:20-slim",
"snippets": ["system-packages", "powershell", "dotnet-prereqs", "dotnet8", "copilot-cli", "entrypoint"]
"snippets": ["system-packages", "powershell", "dotnet-prereqs", "dotnet8", "lsp-typescript", "copilot-cli", "entrypoint"]
},
"dotnet-9": {
"base": "node:20-slim",
"snippets": ["system-packages", "powershell", "dotnet-prereqs", "dotnet9", "copilot-cli", "entrypoint"]
"snippets": ["system-packages", "powershell", "dotnet-prereqs", "dotnet9", "lsp-typescript", "copilot-cli", "entrypoint"]
},
"dotnet-10": {
"base": "node:20-slim",
"snippets": ["system-packages", "powershell", "dotnet-prereqs", "dotnet10", "copilot-cli", "entrypoint"]
"snippets": ["system-packages", "powershell", "dotnet-prereqs", "dotnet10", "lsp-typescript", "lsp-csharp", "copilot-cli", "entrypoint"]
},
"playwright": {
"base": "node:20-slim",
"snippets": ["system-packages", "powershell", "playwright", "copilot-cli", "entrypoint"]
"snippets": ["system-packages", "powershell", "playwright", "lsp-typescript", "copilot-cli", "entrypoint"]
},
"rust": {
"base": "node:20-slim",
"snippets": ["system-packages", "powershell", "rust", "copilot-cli", "entrypoint"]
"snippets": ["system-packages", "powershell", "rust", "lsp-typescript", "lsp-rust", "copilot-cli", "entrypoint"]
},
"golang": {
"base": "node:20-slim",
"snippets": ["system-packages", "powershell", "golang", "copilot-cli", "entrypoint"]
"snippets": ["system-packages", "powershell", "golang", "lsp-typescript", "lsp-golang", "copilot-cli", "entrypoint"]
},
"dotnet-playwright": {
"base": "node:20-slim",
"snippets": ["system-packages", "powershell", "dotnet-prereqs", "dotnet8", "dotnet9", "dotnet10", "playwright", "copilot-cli", "entrypoint"]
"snippets": ["system-packages", "powershell", "dotnet-prereqs", "dotnet8", "dotnet9", "dotnet10", "playwright", "lsp-typescript", "lsp-csharp", "copilot-cli", "entrypoint"]
},
"dotnet-rust": {
"base": "node:20-slim",
"snippets": ["system-packages", "powershell", "dotnet-prereqs", "dotnet8", "dotnet9", "dotnet10", "rust", "copilot-cli", "entrypoint"]
"snippets": ["system-packages", "powershell", "dotnet-prereqs", "dotnet8", "dotnet9", "dotnet10", "rust", "lsp-typescript", "lsp-csharp", "lsp-rust", "copilot-cli", "entrypoint"]
}
}
}
15 changes: 15 additions & 0 deletions docker/shared/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,20 @@ chown -R "$USER_ID:$GROUP_ID" /home/appuser/.npm

export HOME=/home/appuser

# Merge LSP config fragments into ~/.copilot/lsp-config.json (if not already provided by user)
if [ -d /etc/copilot/lsp-config.d ] && [ ! -f /home/appuser/.copilot/lsp-config.json ]; then
node -e "
const fs = require('fs'), path = require('path');
const dir = '/etc/copilot/lsp-config.d';
const servers = {};
fs.readdirSync(dir).filter(f => f.endsWith('.json')).sort().forEach(f => {
const cfg = JSON.parse(fs.readFileSync(path.join(dir, f), 'utf8'));
Object.assign(servers, cfg.lspServers || {});
Comment thread
GordonBeeming marked this conversation as resolved.
Outdated
});
fs.writeFileSync('/home/appuser/.copilot/lsp-config.json', JSON.stringify({ lspServers: servers }, null, 2));
"
chown "$USER_ID:$GROUP_ID" /home/appuser/.copilot/lsp-config.json
fi

# Switch to the user matching the host UID and execute the command passed to the script.
exec gosu appuser "$@"
9 changes: 9 additions & 0 deletions docker/snippets/lsp-csharp.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Install C# Language Server for code intelligence
# Install globally as root, then symlink to a shared location so appuser can access it
RUN dotnet tool install -g csharp-ls \
&& ln -s /root/.dotnet/tools/csharp-ls /usr/local/bin/csharp-ls

# Write LSP config fragment for C#
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "csharp": { "command": "csharp-ls", "args": [], "fileExtensions": { ".cs": "csharp", ".csx": "csharp" } } } }' \
> /etc/copilot/lsp-config.d/csharp.json
Comment thread
GordonBeeming marked this conversation as resolved.
Outdated
7 changes: 7 additions & 0 deletions docker/snippets/lsp-golang.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Install gopls (Go Language Server) for code intelligence
RUN go install golang.org/x/tools/gopls@latest
Comment thread
GordonBeeming marked this conversation as resolved.
Outdated

# Write LSP config fragment for Go
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "go": { "command": "gopls", "args": ["serve"], "fileExtensions": { ".go": "go" } } } }' \
> /etc/copilot/lsp-config.d/golang.json
7 changes: 7 additions & 0 deletions docker/snippets/lsp-rust.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Install Rust Analyzer for code intelligence
RUN rustup component add rust-analyzer

# Write LSP config fragment for Rust
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "rust": { "command": "rust-analyzer", "args": [], "fileExtensions": { ".rs": "rust" } } } }' \
> /etc/copilot/lsp-config.d/rust.json
7 changes: 7 additions & 0 deletions docker/snippets/lsp-typescript.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Install TypeScript Language Server for code intelligence
RUN npm install -g typescript typescript-language-server
Comment thread
GordonBeeming marked this conversation as resolved.
Outdated

# Write LSP config fragment for TypeScript
RUN mkdir -p /etc/copilot/lsp-config.d && \
echo '{ "lspServers": { "typescript": { "command": "typescript-language-server", "args": ["--stdio"], "fileExtensions": { ".ts": "typescript", ".tsx": "typescriptreact", ".js": "javascript", ".jsx": "javascriptreact" } } } }' \
> /etc/copilot/lsp-config.d/typescript.json
Loading