File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
registry/coder/modules/claude-code Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -286,4 +286,25 @@ describe("claude-code", async () => {
286286 ] ) ;
287287 expect ( startLog . stdout ) . toContain ( `--dangerously-skip-permissions` ) ;
288288 } ) ;
289+
290+ test ( "subdomain-false" , async ( ) => {
291+ const { id } = await setup ( {
292+ skipAgentAPIMock : true ,
293+ moduleVariables : {
294+ subdomain : "false" ,
295+ post_install_script : dedent `
296+ #!/bin/bash
297+ env | grep AGENTAPI_CHAT_BASE_PATH || echo "AGENTAPI_CHAT_BASE_PATH not found"
298+ `
299+ } ,
300+ } ) ;
301+
302+ await execModuleScript ( id ) ;
303+ const startLog = await execContainer ( id , [
304+ "bash" ,
305+ "-c" ,
306+ "cat /home/coder/.claude-module/post_install.log" ,
307+ ] ) ;
308+ expect ( startLog . stdout ) . toContain ( "ARG_AGENTAPI_CHAT_BASE_PATH=/@default/default.foo/apps/ccw/chat" ) ;
309+ } ) ;
289310} ) ;
Original file line number Diff line number Diff line change @@ -95,6 +95,12 @@ variable "ai_prompt" {
9595 default = " "
9696}
9797
98+ variable "subdomain" {
99+ type = bool
100+ description = " Whether to use a subdomain for AgentAPI."
101+ default = true
102+ }
103+
98104# ---------------------------------------------------------------
99105
100106variable "install_claude_code" {
@@ -214,6 +220,7 @@ module "agentapi" {
214220 cli_app = var. cli_app
215221 cli_app_slug = var. cli_app ? " ${ local . app_slug } -cli" : null
216222 cli_app_display_name = var. cli_app ? var. cli_app_display_name : null
223+ agentapi_subdomain = var. subdomain
217224 module_dir_name = local. module_dir_name
218225 install_agentapi = var. install_agentapi
219226 agentapi_version = var. agentapi_version
You can’t perform that action at this time.
0 commit comments