Skip to content

Commit 7abe422

Browse files
fix: Add COPILOT_MODEL to install script args (#464)
Closes #462 ## Description <!-- Briefly describe what this PR does and why --> Fixes missing COPILOT_MODEL arg from install script ## Type of Change - [ ] New module - [X] Bug fix - [ ] Feature/enhancement - [ ] Documentation - [ ] Other ## Module Information <!-- Delete this section if not applicable --> **Path:** `registry/coder-labs/modules/copilot` **New version:** `v0.1.1` **Breaking change:** [ ] Yes [X] No ## Testing & Validation - [X] Tests pass (`bun test`) - [X] Code formatted (`bun run fmt`) - [X] Changes tested locally
1 parent db8217e commit 7abe422

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

registry/coder-labs/modules/copilot/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Run [GitHub Copilot CLI](https://docs.github.com/copilot/concepts/agents/about-c
1313
```tf
1414
module "copilot" {
1515
source = "registry.coder.com/coder-labs/copilot/coder"
16-
version = "0.1.0"
16+
version = "0.1.1"
1717
agent_id = coder_agent.example.id
1818
workdir = "/home/coder/projects"
1919
}
@@ -51,7 +51,7 @@ data "coder_parameter" "ai_prompt" {
5151
5252
module "copilot" {
5353
source = "registry.coder.com/coder-labs/copilot/coder"
54-
version = "0.1.0"
54+
version = "0.1.1"
5555
agent_id = coder_agent.example.id
5656
workdir = "/home/coder/projects"
5757
@@ -71,7 +71,7 @@ Customize tool permissions, MCP servers, and Copilot settings:
7171
```tf
7272
module "copilot" {
7373
source = "registry.coder.com/coder-labs/copilot/coder"
74-
version = "0.1.0"
74+
version = "0.1.1"
7575
agent_id = coder_agent.example.id
7676
workdir = "/home/coder/projects"
7777
@@ -142,7 +142,7 @@ variable "github_token" {
142142
143143
module "copilot" {
144144
source = "registry.coder.com/coder-labs/copilot/coder"
145-
version = "0.1.0"
145+
version = "0.1.1"
146146
agent_id = coder_agent.example.id
147147
workdir = "/home/coder/projects"
148148
github_token = var.github_token
@@ -156,7 +156,7 @@ Run Copilot as a command-line tool without task reporting or web interface. This
156156
```tf
157157
module "copilot" {
158158
source = "registry.coder.com/coder-labs/copilot/coder"
159-
version = "0.1.0"
159+
version = "0.1.1"
160160
agent_id = coder_agent.example.id
161161
workdir = "/home/coder"
162162
report_tasks = false

registry/coder-labs/modules/copilot/main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,7 @@ module "agentapi" {
295295
ARG_COPILOT_CONFIG='${base64encode(local.final_copilot_config)}' \
296296
ARG_EXTERNAL_AUTH_ID='${var.external_auth_id}' \
297297
ARG_COPILOT_VERSION='${var.copilot_version}' \
298+
ARG_COPILOT_MODEL='${var.copilot_model}' \
298299
/tmp/install.sh
299300
EOT
300301
}

registry/coder-labs/modules/copilot/scripts/install.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ARG_MCP_CONFIG=$(echo -n "${ARG_MCP_CONFIG:-}" | base64 -d 2> /dev/null || echo
1414
ARG_COPILOT_CONFIG=$(echo -n "${ARG_COPILOT_CONFIG:-}" | base64 -d 2> /dev/null || echo "")
1515
ARG_EXTERNAL_AUTH_ID=${ARG_EXTERNAL_AUTH_ID:-github}
1616
ARG_COPILOT_VERSION=${ARG_COPILOT_VERSION:-0.0.334}
17+
ARG_COPILOT_MODEL=${ARG_COPILOT_MODEL:-claude-sonnet-4.5}
1718

1819
validate_prerequisites() {
1920
if ! command_exists node; then
@@ -84,15 +85,15 @@ setup_copilot_configurations() {
8485

8586
local module_path="$HOME/.copilot-module"
8687
mkdir -p "$module_path"
87-
mkdir -p "$HOME/.config"
8888

8989
setup_copilot_config
9090

9191
echo "$ARG_WORKDIR" > "$module_path/trusted_directories"
9292
}
9393

9494
setup_copilot_config() {
95-
local copilot_config_dir="$HOME/.copilot"
95+
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
96+
local copilot_config_dir="$XDG_CONFIG_HOME/.copilot"
9697
local copilot_config_file="$copilot_config_dir/config.json"
9798
local mcp_config_file="$copilot_config_dir/mcp-config.json"
9899

registry/coder-labs/modules/copilot/scripts/start.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ check_existing_session() {
8282
}
8383

8484
setup_github_authentication() {
85+
export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}"
8586
echo "Setting up GitHub authentication..."
8687

8788
if [ -n "${GITHUB_TOKEN:-}" ]; then

0 commit comments

Comments
 (0)