Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf4e06c6

Browse files
committed
Configure LLM agent URL
1 parent32f6eb9 commitf4e06c6

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

‎cli/exp_mcp.go‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ func (r *RootCmd) mcpConfigureClaudeCode() *serpent.Command {
126126
coderPromptstring
127127
appStatusSlugstring
128128
testBinaryNamestring
129+
llmAgentURL url.URL
129130

130131
deprecatedCoderMCPClaudeAPIKeystring
131132
)
@@ -164,6 +165,9 @@ func (r *RootCmd) mcpConfigureClaudeCode() *serpent.Command {
164165
ifappStatusSlug!="" {
165166
configureClaudeEnv[envAppStatusSlug]=appStatusSlug
166167
}
168+
ifllmAgentURL.String()!="" {
169+
configureClaudeEnv[envLLMAgentURL]=llmAgentURL.String()
170+
}
167171
ifdeprecatedSystemPromptEnv,ok:=os.LookupEnv("SYSTEM_PROMPT");ok {
168172
cliui.Warnf(inv.Stderr,"SYSTEM_PROMPT is deprecated, use CODER_MCP_CLAUDE_SYSTEM_PROMPT instead")
169173
systemPrompt=deprecatedSystemPromptEnv
@@ -262,6 +266,12 @@ func (r *RootCmd) mcpConfigureClaudeCode() *serpent.Command {
262266
Flag:"claude-app-status-slug",
263267
Value:serpent.StringOf(&appStatusSlug),
264268
},
269+
{
270+
Flag:"llm-agent-url",
271+
Description:"The URL of the LLM agent API, used to listen for status updates.",
272+
Env:envLLMAgentURL,
273+
Value:serpent.URLOf(&llmAgentURL),
274+
},
265275
{
266276
Name:"test-binary-name",
267277
Description:"Only used for testing.",
@@ -446,7 +456,9 @@ func (r *RootCmd) mcpServer() *serpent.Command {
446456
defersrv.queue.Close()
447457

448458
cliui.Infof(inv.Stderr,"Failed to watch screen events")
449-
// Start the reporter, watcher, and server.
459+
// Start the reporter, watcher, and server. These are all tied to the
460+
// lifetime of the MCP server, which is itself tied to the lifetime of the
461+
// LLM agent.
450462
ifsrv.agentClient!=nil&&appStatusSlug!="" {
451463
srv.startReporter(ctx,inv)
452464
ifsrv.llmClient!=nil {

‎cli/exp_mcp_test.go‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,8 @@ test-system-prompt
365365
"env": {
366366
"CODER_AGENT_URL": "%s",
367367
"CODER_AGENT_TOKEN": "test-agent-token",
368-
"CODER_MCP_APP_STATUS_SLUG": "some-app-name"
368+
"CODER_MCP_APP_STATUS_SLUG": "some-app-name",
369+
"CODER_MCP_LLM_AGENT_URL": "http://localhost:3284"
369370
}
370371
}
371372
}
@@ -390,6 +391,7 @@ test-system-prompt
390391
"--claude-test-binary-name=pathtothecoderbinary",
391392
"--agent-url",client.URL.String(),
392393
"--agent-token","test-agent-token",
394+
"--llm-agent-url","http://localhost:3284",
393395
)
394396
clitest.SetupConfig(t,client,root)
395397

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp