From e0a0d8b123faa4311aa8f8911e146a4fe3ee7127 Mon Sep 17 00:00:00 2001 From: DevelopmentCats Date: Tue, 7 Oct 2025 11:03:45 -0500 Subject: [PATCH 1/5] fix: add COPILOT_MODEL to install args --- registry/coder-labs/modules/copilot/main.tf | 1 + registry/coder-labs/modules/copilot/scripts/install.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/registry/coder-labs/modules/copilot/main.tf b/registry/coder-labs/modules/copilot/main.tf index fd93b048f..c6436f3e3 100644 --- a/registry/coder-labs/modules/copilot/main.tf +++ b/registry/coder-labs/modules/copilot/main.tf @@ -295,6 +295,7 @@ module "agentapi" { ARG_COPILOT_CONFIG='${base64encode(local.final_copilot_config)}' \ ARG_EXTERNAL_AUTH_ID='${var.external_auth_id}' \ ARG_COPILOT_VERSION='${var.copilot_version}' \ + ARG_COPILOT_MODEL='${var.copilot_model}' \ /tmp/install.sh EOT } \ No newline at end of file diff --git a/registry/coder-labs/modules/copilot/scripts/install.sh b/registry/coder-labs/modules/copilot/scripts/install.sh index f44d50873..8eb0e6b52 100644 --- a/registry/coder-labs/modules/copilot/scripts/install.sh +++ b/registry/coder-labs/modules/copilot/scripts/install.sh @@ -14,6 +14,7 @@ ARG_MCP_CONFIG=$(echo -n "${ARG_MCP_CONFIG:-}" | base64 -d 2> /dev/null || echo ARG_COPILOT_CONFIG=$(echo -n "${ARG_COPILOT_CONFIG:-}" | base64 -d 2> /dev/null || echo "") ARG_EXTERNAL_AUTH_ID=${ARG_EXTERNAL_AUTH_ID:-github} ARG_COPILOT_VERSION=${ARG_COPILOT_VERSION:-0.0.334} +ARG_COPILOT_MODEL=${ARG_COPILOT_MODEL:-claude-sonnet-4.5} validate_prerequisites() { if ! command_exists node; then From 66ba5b3bb05aed81d80bd67a9edc6513e03b8d21 Mon Sep 17 00:00:00 2001 From: DevelopmentCats Date: Tue, 7 Oct 2025 11:20:28 -0500 Subject: [PATCH 2/5] fix(copilot): remove unnecessary config directory creation in install script --- registry/coder-labs/modules/copilot/scripts/install.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/registry/coder-labs/modules/copilot/scripts/install.sh b/registry/coder-labs/modules/copilot/scripts/install.sh index 8eb0e6b52..40813566e 100644 --- a/registry/coder-labs/modules/copilot/scripts/install.sh +++ b/registry/coder-labs/modules/copilot/scripts/install.sh @@ -85,7 +85,6 @@ setup_copilot_configurations() { local module_path="$HOME/.copilot-module" mkdir -p "$module_path" - mkdir -p "$HOME/.config" setup_copilot_config From ba70ecc9a6fc5166caabf6fb187e355818be65e7 Mon Sep 17 00:00:00 2001 From: DevelopmentCats Date: Tue, 7 Oct 2025 11:23:25 -0500 Subject: [PATCH 3/5] chore: patch version bump --- registry/coder-labs/modules/copilot/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/registry/coder-labs/modules/copilot/README.md b/registry/coder-labs/modules/copilot/README.md index c6e8dea26..85732d495 100644 --- a/registry/coder-labs/modules/copilot/README.md +++ b/registry/coder-labs/modules/copilot/README.md @@ -13,7 +13,7 @@ Run [GitHub Copilot CLI](https://docs.github.com/copilot/concepts/agents/about-c ```tf module "copilot" { source = "registry.coder.com/coder-labs/copilot/coder" - version = "0.1.0" + version = "0.1.1" agent_id = coder_agent.example.id workdir = "/home/coder/projects" } @@ -51,7 +51,7 @@ data "coder_parameter" "ai_prompt" { module "copilot" { source = "registry.coder.com/coder-labs/copilot/coder" - version = "0.1.0" + version = "0.1.1" agent_id = coder_agent.example.id workdir = "/home/coder/projects" @@ -71,7 +71,7 @@ Customize tool permissions, MCP servers, and Copilot settings: ```tf module "copilot" { source = "registry.coder.com/coder-labs/copilot/coder" - version = "0.1.0" + version = "0.1.1" agent_id = coder_agent.example.id workdir = "/home/coder/projects" @@ -142,7 +142,7 @@ variable "github_token" { module "copilot" { source = "registry.coder.com/coder-labs/copilot/coder" - version = "0.1.0" + version = "0.1.1" agent_id = coder_agent.example.id workdir = "/home/coder/projects" github_token = var.github_token @@ -156,7 +156,7 @@ Run Copilot as a command-line tool without task reporting or web interface. This ```tf module "copilot" { source = "registry.coder.com/coder-labs/copilot/coder" - version = "0.1.0" + version = "0.1.1" agent_id = coder_agent.example.id workdir = "/home/coder" report_tasks = false From a9d5818fc4ff6f1b390807e7219ad1fe2e5c81b5 Mon Sep 17 00:00:00 2001 From: DevelopmentCats Date: Tue, 7 Oct 2025 11:40:58 -0500 Subject: [PATCH 4/5] fix: update configuration paths to use XDG base directory specification and set to /.config/.copilot for consistency --- registry/coder-labs/modules/copilot/scripts/install.sh | 3 ++- registry/coder-labs/modules/copilot/scripts/start.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/registry/coder-labs/modules/copilot/scripts/install.sh b/registry/coder-labs/modules/copilot/scripts/install.sh index 40813566e..0aabd7614 100644 --- a/registry/coder-labs/modules/copilot/scripts/install.sh +++ b/registry/coder-labs/modules/copilot/scripts/install.sh @@ -92,7 +92,8 @@ setup_copilot_configurations() { } setup_copilot_config() { - local copilot_config_dir="$HOME/.copilot" + export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" + local copilot_config_dir="$XDG_CONFIG_HOME/.copilot" local copilot_config_file="$copilot_config_dir/config.json" local mcp_config_file="$copilot_config_dir/mcp-config.json" diff --git a/registry/coder-labs/modules/copilot/scripts/start.sh b/registry/coder-labs/modules/copilot/scripts/start.sh index 91a404094..895a47d60 100644 --- a/registry/coder-labs/modules/copilot/scripts/start.sh +++ b/registry/coder-labs/modules/copilot/scripts/start.sh @@ -71,7 +71,7 @@ build_copilot_args() { check_existing_session() { if [ "$ARG_RESUME_SESSION" = "true" ]; then if copilot --help > /dev/null 2>&1; then - local session_dir="$HOME/.copilot/history-session-state" + local session_dir="$XDG_CONFIG_HOME/.copilot/history-session-state" if [ -d "$session_dir" ] && [ -n "$(ls "$session_dir"/session_*_*.json 2> /dev/null)" ]; then echo "Found existing Copilot session. Will continue latest session." >&2 return 0 @@ -82,6 +82,7 @@ check_existing_session() { } setup_github_authentication() { + export XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-$HOME/.config}" echo "Setting up GitHub authentication..." if [ -n "${GITHUB_TOKEN:-}" ]; then From 3438611e7fb4f82263a7b64226e555af7de580c0 Mon Sep 17 00:00:00 2001 From: DevelopmentCats Date: Tue, 7 Oct 2025 11:56:44 -0500 Subject: [PATCH 5/5] fix: update session directory path to use HOME instead of XDG_CONFIG_HOME since it is not respecting the env --- registry/coder-labs/modules/copilot/scripts/start.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/registry/coder-labs/modules/copilot/scripts/start.sh b/registry/coder-labs/modules/copilot/scripts/start.sh index 895a47d60..2653d593f 100644 --- a/registry/coder-labs/modules/copilot/scripts/start.sh +++ b/registry/coder-labs/modules/copilot/scripts/start.sh @@ -71,7 +71,7 @@ build_copilot_args() { check_existing_session() { if [ "$ARG_RESUME_SESSION" = "true" ]; then if copilot --help > /dev/null 2>&1; then - local session_dir="$XDG_CONFIG_HOME/.copilot/history-session-state" + local session_dir="$HOME/.copilot/history-session-state" if [ -d "$session_dir" ] && [ -n "$(ls "$session_dir"/session_*_*.json 2> /dev/null)" ]; then echo "Found existing Copilot session. Will continue latest session." >&2 return 0