Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
```

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
11 changes: 11 additions & 0 deletions docker/generated/Dockerfile.default
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ RUN ARCH=$(dpkg --print-architecture) \
&& rm /tmp/powershell.tar.gz; \
fi

# --- snippet: lsp-typescript ---
# Install TypeScript Language Server for code intelligence
ARG TYPESCRIPT_VERSION=latest
ARG TYPESCRIPT_LANGUAGE_SERVER_VERSION=latest
RUN npm install -g typescript@${TYPESCRIPT_VERSION} typescript-language-server@${TYPESCRIPT_LANGUAGE_SERVER_VERSION}

# 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
22 changes: 22 additions & 0 deletions docker/generated/Dockerfile.dotnet
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,28 @@ 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
ARG TYPESCRIPT_VERSION=latest
ARG TYPESCRIPT_LANGUAGE_SERVER_VERSION=latest
RUN npm install -g typescript@${TYPESCRIPT_VERSION} typescript-language-server@${TYPESCRIPT_LANGUAGE_SERVER_VERSION}

# 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 directly to a shared location so appuser can access it
ARG CSHARP_LS_VERSION=latest
RUN dotnet tool install csharp-ls --tool-path /usr/local/bin --version ${CSHARP_LS_VERSION}

# 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
22 changes: 22 additions & 0 deletions docker/generated/Dockerfile.dotnet-10
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,28 @@ 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
ARG TYPESCRIPT_VERSION=latest
ARG TYPESCRIPT_LANGUAGE_SERVER_VERSION=latest
RUN npm install -g typescript@${TYPESCRIPT_VERSION} typescript-language-server@${TYPESCRIPT_LANGUAGE_SERVER_VERSION}

# 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 directly to a shared location so appuser can access it
ARG CSHARP_LS_VERSION=latest
RUN dotnet tool install csharp-ls --tool-path /usr/local/bin --version ${CSHARP_LS_VERSION}

# 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
11 changes: 11 additions & 0 deletions docker/generated/Dockerfile.dotnet-8
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ 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
ARG TYPESCRIPT_VERSION=latest
ARG TYPESCRIPT_LANGUAGE_SERVER_VERSION=latest
RUN npm install -g typescript@${TYPESCRIPT_VERSION} typescript-language-server@${TYPESCRIPT_LANGUAGE_SERVER_VERSION}

# 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
11 changes: 11 additions & 0 deletions docker/generated/Dockerfile.dotnet-9
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,17 @@ 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
ARG TYPESCRIPT_VERSION=latest
ARG TYPESCRIPT_LANGUAGE_SERVER_VERSION=latest
RUN npm install -g typescript@${TYPESCRIPT_VERSION} typescript-language-server@${TYPESCRIPT_LANGUAGE_SERVER_VERSION}

# 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
22 changes: 22 additions & 0 deletions docker/generated/Dockerfile.dotnet-playwright
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,28 @@ 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
ARG TYPESCRIPT_VERSION=latest
ARG TYPESCRIPT_LANGUAGE_SERVER_VERSION=latest
RUN npm install -g typescript@${TYPESCRIPT_VERSION} typescript-language-server@${TYPESCRIPT_LANGUAGE_SERVER_VERSION}

# 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 directly to a shared location so appuser can access it
ARG CSHARP_LS_VERSION=latest
RUN dotnet tool install csharp-ls --tool-path /usr/local/bin --version ${CSHARP_LS_VERSION}

# 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
31 changes: 31 additions & 0 deletions docker/generated/Dockerfile.dotnet-rust
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,37 @@ 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
ARG TYPESCRIPT_VERSION=latest
ARG TYPESCRIPT_LANGUAGE_SERVER_VERSION=latest
RUN npm install -g typescript@${TYPESCRIPT_VERSION} typescript-language-server@${TYPESCRIPT_LANGUAGE_SERVER_VERSION}

# 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 directly to a shared location so appuser can access it
ARG CSHARP_LS_VERSION=latest
RUN dotnet tool install csharp-ls --tool-path /usr/local/bin --version ${CSHARP_LS_VERSION}

# 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
21 changes: 21 additions & 0 deletions docker/generated/Dockerfile.golang
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,27 @@ RUN mkdir -p ${GOPATH} \
# Verify installation
RUN go version

# --- snippet: lsp-typescript ---
# Install TypeScript Language Server for code intelligence
ARG TYPESCRIPT_VERSION=latest
ARG TYPESCRIPT_LANGUAGE_SERVER_VERSION=latest
RUN npm install -g typescript@${TYPESCRIPT_VERSION} typescript-language-server@${TYPESCRIPT_LANGUAGE_SERVER_VERSION}

# 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
ARG GOPLS_VERSION=latest
RUN go install golang.org/x/tools/gopls@${GOPLS_VERSION}

# 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
11 changes: 11 additions & 0 deletions docker/generated/Dockerfile.playwright
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,17 @@ 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
ARG TYPESCRIPT_VERSION=latest
ARG TYPESCRIPT_LANGUAGE_SERVER_VERSION=latest
RUN npm install -g typescript@${TYPESCRIPT_VERSION} typescript-language-server@${TYPESCRIPT_LANGUAGE_SERVER_VERSION}

# 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.rust
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,26 @@ 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
ARG TYPESCRIPT_VERSION=latest
ARG TYPESCRIPT_LANGUAGE_SERVER_VERSION=latest
RUN npm install -g typescript@${TYPESCRIPT_VERSION} typescript-language-server@${TYPESCRIPT_LANGUAGE_SERVER_VERSION}

# 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"]
}
}
}
21 changes: 21 additions & 0 deletions docker/shared/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,26 @@ 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 fullPath = path.join(dir, f);
try {
const contents = fs.readFileSync(fullPath, 'utf8');
const cfg = JSON.parse(contents);
Object.assign(servers, cfg.lspServers || {});
} catch (err) {
console.error('Warning: failed to load LSP config fragment ' + fullPath + ': ' + err.message);
}
});
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 directly to a shared location so appuser can access it
ARG CSHARP_LS_VERSION=latest
RUN dotnet tool install csharp-ls --tool-path /usr/local/bin --version ${CSHARP_LS_VERSION}

# 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
8 changes: 8 additions & 0 deletions docker/snippets/lsp-golang.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Install gopls (Go Language Server) for code intelligence
ARG GOPLS_VERSION=latest
RUN go install golang.org/x/tools/gopls@${GOPLS_VERSION}

# 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
Loading
Loading