File tree Expand file tree Collapse file tree 1 file changed +12
-11
lines changed
Expand file tree Collapse file tree 1 file changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,7 @@ import { ContentBlockParam } from "@anthropic-ai/sdk/resources";
6060import { BetaContentBlock , BetaRawContentBlockDelta } from "@anthropic-ai/sdk/resources/beta.mjs" ;
6161import packageJson from "../package.json" with { type : "json" } ;
6262import { randomUUID } from "node:crypto" ;
63+ import { fileURLToPath } from "node:url" ;
6364
6465export const CLAUDE_CONFIG_DIR = process . env . CLAUDE ?? path . join ( os . homedir ( ) , ".claude" ) ;
6566
@@ -165,17 +166,17 @@ export class ClaudeAcpAgent implements Agent {
165166 } ;
166167
167168 // If client supports terminal-auth capability, use that instead.
168- // if (request.clientCapabilities?._meta?.["terminal-auth"] === true) {
169- // const cliPath = fileURLToPath(import.meta.resolve("@anthropic-ai/claude-agent-sdk/cli.js"));
170-
171- // authMethod._meta = {
172- // "terminal-auth": {
173- // command: "node",
174- // args: [cliPath, "/login"],
175- // label: "Claude Code Login",
176- // },
177- // };
178- // }
169+ if ( request . clientCapabilities ?. _meta ?. [ "terminal-auth" ] === true ) {
170+ const cliPath = fileURLToPath ( import . meta. resolve ( "@anthropic-ai/claude-agent-sdk/cli.js" ) ) ;
171+
172+ authMethod . _meta = {
173+ "terminal-auth" : {
174+ command : "node" ,
175+ args : [ cliPath , "/login" ] ,
176+ label : "Claude Code Login" ,
177+ } ,
178+ } ;
179+ }
179180
180181 return {
181182 protocolVersion : 1 ,
You can’t perform that action at this time.
0 commit comments