import{t as e}from"./base-FY_XeKpj.js";import*as t from"node:path";import*as n from"node:fs";import*as r from"node:os";var i=class extends e{toolId=`claude`;executable=`claude`;buildCommandSpec(e){let t=[];if(e.continue?t.push(`-c`):e.resume&&t.push(`-r`),e.settings){let n=this.#e(e.settings);t.push(`--settings`,n)}return{executable:this.executable,baseArgs:t,yoloArgs:e.yolo?[`--dangerously-skip-permissions`]:void 0}}#e(e){if(e.trim().startsWith(`{`)||t.isAbsolute(e)||e.endsWith(`.json`))return e;let i=t.join(r.homedir(),`.claude`),a=t.join(i,`settings.${e}.json`);if(n.existsSync(a))return a;let o=t.join(i,`settings-${e}.json`);return n.existsSync(o)?o:a}};export{i as t};