Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b839669

Browse files
westey-mCopilot
andauthored
Add Devcontainers to allow easy use of the AF repo from github codespaces (#1224)
* Add dev containers * Add workspace folder and cs dev extension * Try other workspace folder format * Add default solution. * Move default solution to settings.json * Fix repo open * Remove duplicate python codespace and rename folder * Add recommended C# extensions and a default build task * Add vscode icons extension by default * Add python setup and customizations, plus ai studio for all * Add bash command * Try running devsetup from workspace folder * Remove echo and cd * Change workspace mount * Change dotnet workspace name * Revert workspacemount addition * Try workspace mount to root * remove trailing slash * Try workspacefolder with var * Revert to original approach * Modify dev containers to work in main repo. * Remove trailing comma * Apply suggestion from @Copilot Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 6285419 commit b839669

6 files changed

Lines changed: 70 additions & 0 deletions

File tree

.devcontainer/devcontainer.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "Python 3",
3+
"image": "mcr.microsoft.com/devcontainers/python:3.13-bullseye",
4+
"features": {
5+
"ghcr.io/va-h/devcontainers-features/uv:1": {}
6+
},
7+
"postCreateCommand": "bash ./devsetup.sh",
8+
"workspaceFolder": "/workspaces/agent-framework/python/",
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"ms-python.python",
13+
"ms-windows-ai-studio.windows-ai-studio",
14+
"littlefoxteam.vscode-python-test-adapter"
15+
]
16+
}
17+
}
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"name": "C# (.NET)",
3+
"image": "mcr.microsoft.com/devcontainers/dotnet:9.0",
4+
"features": {
5+
"ghcr.io/devcontainers/features/dotnet:2.4.0": {},
6+
"ghcr.io/devcontainers/features/powershell:1.5.1": {}
7+
},
8+
"workspaceFolder": "/workspaces/agent-framework/dotnet/",
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"ms-dotnettools.csdevkit",
13+
"vscode-icons-team.vscode-icons",
14+
"ms-windows-ai-studio.windows-ai-studio"
15+
]
16+
}
17+
}
18+
}

dotnet/.vscode/extensions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"recommendations": [
3+
"ms-dotnettools.csdevkit"
4+
]
5+
}

dotnet/.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"dotnet.defaultSolution": "agent-framework-dotnet.slnx",
3+
"git.openRepositoryInParentFolders": "always"
4+
}

dotnet/.vscode/tasks.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"type": "dotnet",
6+
"task": "build",
7+
"group": {
8+
"kind": "build",
9+
"isDefault": true
10+
},
11+
"problemMatcher": [],
12+
"label": "dotnet: build"
13+
}
14+
]
15+
}

python/devsetup.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
uv python install 3.10 3.11 3.12 3.13
2+
# Create a virtual environment with Python 3.10 (you can change this to 3.11, 3.12 or 3.13)
3+
PYTHON_VERSION="3.13"
4+
uv venv --python $PYTHON_VERSION
5+
# Install AF and all dependencies
6+
uv sync --dev
7+
# Install all the tools and dependencies
8+
uv run poe install
9+
# Install pre-commit hooks
10+
uv run poe pre-commit-install

0 commit comments

Comments
 (0)