Skip to content

Commit 8b6de1c

Browse files
Copilotrajbos
andauthored
Merge main into fix-codespace-boot-issue branch
- Resolved conflict in .devcontainer/devcontainer.json - Removed Windows-specific mounts and initializeCommand for Codespaces compatibility - Kept updateContentCommand instead of postCreateCommand to prevent timeout issues - Created devcontainer-local.json for Windows users who want host mounts - Updated CONTRIBUTING.md to document both configurations The original issue was that the devcontainer config from main included Windows-specific PowerShell scripts and %APPDATA% mounts that don't work in GitHub Codespaces (Linux). This caused immediate boot failures as the initializeCommand would fail. The solution: - Default devcontainer.json now works on all platforms (Codespaces, Linux, macOS, Windows) - devcontainer-local.json provides Windows-specific mount features for local development - Both use updateContentCommand for more reliable npm ci execution Co-authored-by: rajbos <6085745+rajbos@users.noreply.github.com>
2 parents dab2dfa + 01fe11b commit 8b6de1c

File tree

333 files changed

+228521
-13548
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

333 files changed

+228521
-13548
lines changed

.claude/settings.local.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"permissions": {
3+
"allow": [
4+
"Bash(xargs grep:*)"
5+
]
6+
}
7+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"name": "Copilot Token Tracker Extension (Local with Mounts)",
3+
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-22-bookworm",
4+
"features": {
5+
"ghcr.io/devcontainers/features/git:1": {},
6+
"ghcr.io/devcontainers/features/powershell:1": {}
7+
},
8+
"customizations": {
9+
"vscode": {
10+
"extensions": [
11+
"dbaeumer.vscode-eslint",
12+
"esbenp.prettier-vscode",
13+
"ms-vscode.extension-test-runner",
14+
"amodio.tsc-problem-matcher",
15+
"github.copilot",
16+
"github.copilot-chat"
17+
],
18+
"settings": {
19+
"editor.formatOnSave": true,
20+
"editor.defaultFormatter": "esbenp.prettier-vscode",
21+
"eslint.enable": true,
22+
"typescript.tsdk": "node_modules/typescript/lib",
23+
"chat.tools.autoApprove": true
24+
}
25+
}
26+
},
27+
"initializeCommand": "powershell -ExecutionPolicy Bypass -File .devcontainer/init-mounts.ps1",
28+
"mounts": [
29+
"source=${localEnv:APPDATA}/Code/User,target=/home/node/.config/Code/User,type=bind,readonly=true",
30+
"source=${localEnv:APPDATA}/Code - Insiders/User,target=/home/node/.config/Code - Insiders/User,type=bind,readonly=true",
31+
"source=github-copilot-token-usage-nodemodules,target=/workspaces/github-copilot-token-usage/node_modules,type=volume"
32+
],
33+
"containerEnv": {
34+
"NODE_OPTIONS": "--max-old-space-size=4096"
35+
},
36+
"updateContentCommand": "npm ci",
37+
"remoteUser": "node"
38+
}

.devcontainer/devcontainer.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,14 @@
1919
"editor.formatOnSave": true,
2020
"editor.defaultFormatter": "esbenp.prettier-vscode",
2121
"eslint.enable": true,
22-
"typescript.tsdk": "node_modules/typescript/lib"
22+
"typescript.tsdk": "node_modules/typescript/lib",
23+
"chat.tools.autoApprove": true
2324
}
2425
}
2526
},
27+
"containerEnv": {
28+
"NODE_OPTIONS": "--max-old-space-size=4096"
29+
},
2630
"updateContentCommand": "npm ci",
2731
"remoteUser": "node"
2832
}

.devcontainer/init-mounts.ps1

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Ensures host directories used as devcontainer bind mounts exist before Docker tries to mount them.
2+
# If "Code - Insiders" is not installed, we create an empty directory so the mount succeeds;
3+
# the extension then falls back to the always-present "Code" (stable) data automatically.
4+
5+
# ── Detect which VS Code edition launched this devcontainer ──────────────────
6+
$launchedFrom = "Unknown"
7+
8+
# $env:VSCODE_PID is set by VS Code in its integrated terminal / task runner.
9+
# Use it to look up the executable path of the launching process.
10+
if ($env:VSCODE_PID) {
11+
try {
12+
$vsProc = Get-Process -Id $env:VSCODE_PID -ErrorAction Stop
13+
$exePath = $vsProc.MainModule.FileName
14+
if ($exePath -match 'Insiders') {
15+
$launchedFrom = "Code - Insiders"
16+
} else {
17+
$launchedFrom = "Code"
18+
}
19+
Write-Host "Detected VS Code edition from PID $($env:VSCODE_PID): $launchedFrom ($exePath)"
20+
} catch {
21+
Write-Host "Could not resolve VSCODE_PID $($env:VSCODE_PID): $_"
22+
}
23+
}
24+
25+
# Fallback: scan running processes for Code/Code-Insiders executables
26+
if ($launchedFrom -eq "Unknown") {
27+
$insidersRunning = Get-Process -ErrorAction SilentlyContinue |
28+
Where-Object { try { $_.MainModule.FileName -match 'Code.*Insiders' } catch { $false } } |
29+
Select-Object -First 1
30+
31+
$stableRunning = Get-Process -ErrorAction SilentlyContinue |
32+
Where-Object { try { $_.MainModule.FileName -match '\\Code\\' } catch { $false } } |
33+
Select-Object -First 1
34+
35+
if ($insidersRunning) {
36+
$launchedFrom = "Code - Insiders (detected from running process)"
37+
} elseif ($stableRunning) {
38+
$launchedFrom = "Code (detected from running process)"
39+
} else {
40+
$launchedFrom = "Could not detect (no Code process found; defaulting to stable)"
41+
}
42+
Write-Host "VS Code edition (fallback detection): $launchedFrom"
43+
}
44+
45+
$activeSubPath = if ($launchedFrom -match 'Insiders') { "Code - Insiders\User" } else { "Code\User" }
46+
$activePath = Join-Path $env:APPDATA $activeSubPath
47+
Write-Host "Active VS Code session data: $activePath"
48+
49+
# ── Ensure both mount source directories exist ───────────────────────────────
50+
$stablePath = Join-Path $env:APPDATA "Code\User"
51+
$insidersPath = Join-Path $env:APPDATA "Code - Insiders\User"
52+
53+
foreach ($entry in @(
54+
@{ Path = $stablePath; Label = "Code (stable)" },
55+
@{ Path = $insidersPath; Label = "Code - Insiders" }
56+
)) {
57+
if (-not (Test-Path $entry.Path)) {
58+
Write-Host "$($entry.Label) not found at '$($entry.Path)'. Creating empty directory so the bind mount does not fail."
59+
New-Item -ItemType Directory -Force $entry.Path | Out-Null
60+
} else {
61+
$marker = if ($entry.Path -eq $activePath) { " ← active" } else { "" }
62+
Write-Host "$($entry.Label) found at '$($entry.Path)'.$marker"
63+
}
64+
}

.github/ISSUE_TEMPLATE/bug-cli.yml

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Bug report — CLI
2+
description: Report a bug in the AI Engineering Fluency CLI tool (@rajbos/ai-engineering-fluency)
3+
title: "[BUG][cli] "
4+
labels:
5+
- bug
6+
- cli
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thank you for taking the time to report a bug in the **AI Engineering Fluency CLI** tool.
12+
Please fill in as much detail as possible so we can reproduce and fix the issue quickly.
13+
14+
- type: textarea
15+
id: description
16+
attributes:
17+
label: Describe the bug
18+
description: A clear and concise description of what the bug is.
19+
validations:
20+
required: true
21+
22+
- type: textarea
23+
id: reproduce
24+
attributes:
25+
label: Steps to reproduce
26+
description: Steps to reproduce the behavior.
27+
placeholder: |
28+
1. Run `ai-engineering-fluency ...`
29+
2. See error
30+
validations:
31+
required: true
32+
33+
- type: textarea
34+
id: expected
35+
attributes:
36+
label: Expected behavior
37+
description: What did you expect to happen?
38+
validations:
39+
required: true
40+
41+
- type: textarea
42+
id: actual
43+
attributes:
44+
label: Actual behavior
45+
description: What actually happened? Include any error messages or stack traces.
46+
validations:
47+
required: true
48+
49+
- type: dropdown
50+
id: os
51+
attributes:
52+
label: Operating system
53+
options:
54+
- Windows
55+
- macOS
56+
- Linux
57+
validations:
58+
required: true
59+
60+
- type: input
61+
id: node-version
62+
attributes:
63+
label: Node.js version
64+
description: Run `node --version` to find this.
65+
placeholder: "e.g. v20.11.0"
66+
validations:
67+
required: true
68+
69+
- type: input
70+
id: cli-version
71+
attributes:
72+
label: CLI version
73+
description: Run `ai-engineering-fluency --version` to find this.
74+
placeholder: "e.g. 0.0.3"
75+
validations:
76+
required: true
77+
78+
- type: input
79+
id: install-method
80+
attributes:
81+
label: Installation method
82+
description: How did you install the CLI?
83+
placeholder: "e.g. npm install -g @rajbos/ai-engineering-fluency, or standalone exe"
84+
85+
- type: textarea
86+
id: additional
87+
attributes:
88+
label: Additional context
89+
description: Any other context, logs, or screenshots that may help.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: Bug report — Visual Studio Extension
2+
description: Report a bug in the Copilot Token Tracker Visual Studio extension
3+
title: "[BUG][visualstudio] "
4+
labels:
5+
- bug
6+
- visual-studio-extension
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thank you for taking the time to report a bug in the **Copilot Token Tracker Visual Studio extension**.
12+
Please fill in as much detail as possible so we can reproduce and fix the issue quickly.
13+
> **Note:** This extension currently targets **Windows only** with Visual Studio 2022+.
14+
15+
- type: textarea
16+
id: description
17+
attributes:
18+
label: Describe the bug
19+
description: A clear and concise description of what the bug is.
20+
validations:
21+
required: true
22+
23+
- type: textarea
24+
id: reproduce
25+
attributes:
26+
label: Steps to reproduce
27+
description: Steps to reproduce the behavior.
28+
placeholder: |
29+
1. Open Visual Studio
30+
2. ...
31+
3. See error
32+
validations:
33+
required: true
34+
35+
- type: textarea
36+
id: expected
37+
attributes:
38+
label: Expected behavior
39+
description: What did you expect to happen?
40+
validations:
41+
required: true
42+
43+
- type: textarea
44+
id: actual
45+
attributes:
46+
label: Actual behavior
47+
description: What actually happened? Include any error messages or output from the Activity Log.
48+
validations:
49+
required: true
50+
51+
- type: input
52+
id: vs-version
53+
attributes:
54+
label: Visual Studio version
55+
description: "Full version string from Help > About Microsoft Visual Studio."
56+
placeholder: "e.g. Visual Studio 2022 17.10.0"
57+
validations:
58+
required: true
59+
60+
- type: input
61+
id: extension-version
62+
attributes:
63+
label: Extension version
64+
description: "Found in Extensions > Manage Extensions."
65+
placeholder: "e.g. 0.0.1"
66+
validations:
67+
required: true
68+
69+
- type: input
70+
id: os-version
71+
attributes:
72+
label: Windows version
73+
description: "e.g. Windows 11 24H2"
74+
placeholder: "e.g. Windows 11 23H2"
75+
validations:
76+
required: true
77+
78+
- type: textarea
79+
id: activity-log
80+
attributes:
81+
label: Activity Log (if applicable)
82+
description: |
83+
If Visual Studio shows unexpected behavior, share the relevant portion of the Activity Log:
84+
Help > Open Visual Studio Activity Log (`ActivityLog.xml`)
85+
render: xml
86+
87+
- type: textarea
88+
id: additional
89+
attributes:
90+
label: Additional context
91+
description: Any other context, screenshots, or information that may help.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
2-
name: Bug report
3-
about: Create a report to help us improve the Copilot Token Tracker extension
4-
title: '[BUG] '
5-
labels: bug
2+
name: Bug report — VS Code Extension
3+
about: Report a bug in the Copilot Token Tracker VS Code extension
4+
title: '[BUG][vscode] '
5+
labels: "bug, vscode-extension"
66
assignees: ''
77

88
---

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: VS Code Extension — Marketplace
4+
url: https://marketplace.visualstudio.com/items?itemName=RobBos.copilot-token-tracker
5+
about: View the Copilot Token Tracker VS Code extension on the Marketplace
6+
- name: CLI — npm package
7+
url: https://www.npmjs.com/package/@rajbos/ai-engineering-fluency
8+
about: View the AI Engineering Fluency CLI on npm
9+
- name: Discussions — Questions & Ideas
10+
url: https://github.com/rajbos/github-copilot-token-usage/discussions
11+
about: Ask questions or share ideas in GitHub Discussions before opening an issue
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Feature request — CLI
2+
description: Suggest a new feature or improvement for the AI Engineering Fluency CLI tool (@rajbos/ai-engineering-fluency)
3+
title: "[FEATURE][cli] "
4+
labels:
5+
- enhancement
6+
- cli
7+
body:
8+
- type: markdown
9+
attributes:
10+
value: |
11+
Thank you for suggesting an improvement to the **AI Engineering Fluency CLI** tool.
12+
Please provide as much detail as possible to help us understand the request.
13+
14+
- type: textarea
15+
id: problem
16+
attributes:
17+
label: Problem statement
18+
description: Is your feature request related to a problem? Describe it clearly.
19+
placeholder: "I'm always frustrated when I try to..."
20+
21+
- type: textarea
22+
id: solution
23+
attributes:
24+
label: Desired solution
25+
description: A clear and concise description of what you want to happen.
26+
validations:
27+
required: true
28+
29+
- type: textarea
30+
id: alternatives
31+
attributes:
32+
label: Alternatives considered
33+
description: Describe any alternative solutions or workarounds you have tried.
34+
35+
- type: textarea
36+
id: use-case
37+
attributes:
38+
label: Use case
39+
description: Who benefits from this feature, and in what workflow?
40+
validations:
41+
required: true
42+
43+
- type: dropdown
44+
id: priority
45+
attributes:
46+
label: Priority
47+
options:
48+
- Critical — I cannot use the CLI effectively without this
49+
- High — This would significantly improve my experience
50+
- Medium — Nice to have
51+
- Low — Just a suggestion
52+
53+
- type: textarea
54+
id: additional
55+
attributes:
56+
label: Additional context
57+
description: Any other context, links to similar tools, examples, or screenshots.

0 commit comments

Comments
 (0)