adhdev 0.1.24 → 0.1.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +22 -23
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -996,9 +996,13 @@ var init_gemini_cli = __esm({
996
996
  if (this.ptyProcess) return;
997
997
  if (!pty) throw new Error("node-pty is not installed");
998
998
  const geminiBin = findGeminiBinary();
999
+ const isWin = os3.platform() === "win32";
999
1000
  console.log(`[GeminiAdapter] Spawning interactive session in ${this.workingDir}`);
1000
1001
  console.log(`[GeminiAdapter] Binary: ${geminiBin}`);
1001
- this.ptyProcess = pty.spawn(geminiBin, ["--yolo"], {
1002
+ const shell = isWin ? "cmd.exe" : process.env.SHELL || "/bin/zsh";
1003
+ const shellArgs = isWin ? ["/c", `${geminiBin} --yolo`] : ["-l", "-c", `"${geminiBin}" --yolo`];
1004
+ console.log(`[GeminiAdapter] Shell: ${shell} ${shellArgs.join(" ")}`);
1005
+ this.ptyProcess = pty.spawn(shell, shellArgs, {
1002
1006
  name: "xterm-256color",
1003
1007
  cols: 120,
1004
1008
  rows: 40,
@@ -3877,7 +3881,7 @@ var init_daemon_commands = __esm({
3877
3881
  const agentType = args?.agentType || args?.agent || this.agentStream.activeAgentType;
3878
3882
  const text = args?.text || args?.message;
3879
3883
  if (!agentType || !text) return { success: false, error: "agentType and text required" };
3880
- const ok = await this.agentStream.sendToAgent(this.getCdp(), agentType, text);
3884
+ const ok = await this.agentStream.sendToAgent(this.getCdp(), agentType, text, this._currentIdeType);
3881
3885
  return { success: ok };
3882
3886
  }
3883
3887
  async handleAgentStreamResolve(args) {
@@ -3885,14 +3889,14 @@ var init_daemon_commands = __esm({
3885
3889
  const agentType = args?.agentType || args?.agent || this.agentStream.activeAgentType;
3886
3890
  const action = args?.action || "approve";
3887
3891
  if (!agentType) return { success: false, error: "agentType required" };
3888
- const ok = await this.agentStream.resolveAgentAction(this.getCdp(), agentType, action);
3892
+ const ok = await this.agentStream.resolveAgentAction(this.getCdp(), agentType, action, this._currentIdeType);
3889
3893
  return { success: ok };
3890
3894
  }
3891
3895
  async handleAgentStreamNew(args) {
3892
3896
  if (!this.agentStream || !this.getCdp()) return { success: false, error: "AgentStream or CDP not available" };
3893
3897
  const agentType = args?.agentType || args?.agent || this.agentStream.activeAgentType;
3894
3898
  if (!agentType) return { success: false, error: "agentType required" };
3895
- const ok = await this.agentStream.newAgentSession(this.getCdp(), agentType);
3899
+ const ok = await this.agentStream.newAgentSession(this.getCdp(), agentType, this._currentIdeType);
3896
3900
  return { success: ok };
3897
3901
  }
3898
3902
  async handleAgentStreamListChats(args) {
@@ -3914,7 +3918,7 @@ var init_daemon_commands = __esm({
3914
3918
  if (!this.agentStream || !this.getCdp()) return { success: false, error: "AgentStream or CDP not available" };
3915
3919
  const agentType = args?.agentType || args?.agent || this.agentStream.activeAgentType;
3916
3920
  if (!agentType) return { success: false, error: "agentType required" };
3917
- await this.agentStream.ensureAgentPanelOpen(agentType);
3921
+ await this.agentStream.ensureAgentPanelOpen(agentType, this._currentIdeType);
3918
3922
  const ok = await this.agentStream.focusAgentEditor(this.getCdp(), agentType);
3919
3923
  return { success: ok };
3920
3924
  }
@@ -4203,13 +4207,13 @@ var init_manager = __esm({
4203
4207
  "roo-code": ["roo-cline.SidebarProvider.focus", "workbench.view.extension.roo-cline-ActivityBar"],
4204
4208
  "continue": ["continue.continueGUIView.focus", "workbench.view.extension.continue-ActivityBar"]
4205
4209
  };
4206
- async ensureAgentPanelOpen(agentType) {
4210
+ async ensureAgentPanelOpen(agentType, targetIdeType) {
4207
4211
  const cmds = _DaemonAgentStreamManager.FOCUS_COMMANDS[agentType];
4208
4212
  if (!cmds || !this.localServer || this.localServer.extensionCount === 0) return;
4209
4213
  for (const cmd of cmds) {
4210
4214
  try {
4211
- await this.localServer.executeVscodeCommand(cmd, []);
4212
- this.logFn(`[AgentStream] Panel focused: ${agentType} via ${cmd}`);
4215
+ await this.localServer.executeVscodeCommand(cmd, [], targetIdeType);
4216
+ this.logFn(`[AgentStream] Panel focused: ${agentType} via ${cmd} (target: ${targetIdeType || "first"})`);
4213
4217
  await new Promise((r) => setTimeout(r, 300));
4214
4218
  return;
4215
4219
  } catch {
@@ -4318,8 +4322,8 @@ var init_manager = __esm({
4318
4322
  }
4319
4323
  return results;
4320
4324
  }
4321
- async sendToAgent(cdp, agentType, text) {
4322
- await this.ensureAgentPanelOpen(agentType);
4325
+ async sendToAgent(cdp, agentType, text, targetIdeType) {
4326
+ await this.ensureAgentPanelOpen(agentType, targetIdeType);
4323
4327
  const agent = this.managed.get(agentType);
4324
4328
  if (!agent) return false;
4325
4329
  try {
@@ -4331,8 +4335,8 @@ var init_manager = __esm({
4331
4335
  return false;
4332
4336
  }
4333
4337
  }
4334
- async resolveAgentAction(cdp, agentType, action) {
4335
- await this.ensureAgentPanelOpen(agentType);
4338
+ async resolveAgentAction(cdp, agentType, action, targetIdeType) {
4339
+ await this.ensureAgentPanelOpen(agentType, targetIdeType);
4336
4340
  const agent = this.managed.get(agentType);
4337
4341
  if (!agent) return false;
4338
4342
  try {
@@ -4343,8 +4347,8 @@ var init_manager = __esm({
4343
4347
  return false;
4344
4348
  }
4345
4349
  }
4346
- async newAgentSession(cdp, agentType) {
4347
- await this.ensureAgentPanelOpen(agentType);
4350
+ async newAgentSession(cdp, agentType, targetIdeType) {
4351
+ await this.ensureAgentPanelOpen(agentType, targetIdeType);
4348
4352
  const agent = this.managed.get(agentType);
4349
4353
  if (!agent) return false;
4350
4354
  try {
@@ -4832,6 +4836,9 @@ var init_adhdev_daemon = __esm({
4832
4836
  }
4833
4837
  async handleCommand(msg, cmd, args) {
4834
4838
  console.log(import_chalk2.default.magenta(` \u2699 Command: ${cmd}`));
4839
+ if (cmd.startsWith("agent_stream") && args?._targetInstance) {
4840
+ console.log(import_chalk2.default.yellow(` \u{1F3AF} Target: ${args._targetType}:${args._targetInstance.split("_")[0]} agent=${args.agentType || ""}`));
4841
+ }
4835
4842
  try {
4836
4843
  switch (cmd) {
4837
4844
  case "launch_cli": {
@@ -5213,16 +5220,8 @@ var init_adhdev_daemon = __esm({
5213
5220
  ...Array.from(this.adapters.entries()).map(([k, a]) => ({ id: a.cliType, name: a.cliName, status: this.lastAgentStatus.get(k) || "idle" }))
5214
5221
  ],
5215
5222
  activeChat: managedClis[0]?.activeChat || managedIdes[0]?.activeChat || null,
5216
- // Legacy agentStreams: managedIdes의 agentStreams 통합 (이미 IDE별로 올바르게 구성됨)
5223
+ // Legacy agentStreams: managedIdes의 agentStreams 통합 (CLI는 managedClis로 별도 push)
5217
5224
  agentStreams: [
5218
- ...managedClis.map((c) => ({
5219
- agentType: c.cliType,
5220
- agentName: c.cliName,
5221
- extensionId: "cli-bridge",
5222
- status: c.status === "generating" ? "streaming" : "idle",
5223
- messages: c.activeChat?.messages || [],
5224
- inputContent: ""
5225
- })),
5226
5225
  ...managedIdes.flatMap((ide) => ide.agentStreams || [])
5227
5226
  ],
5228
5227
  connectedExtensions: extSummary.connectedIdes,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adhdev",
3
- "version": "0.1.24",
3
+ "version": "0.1.27",
4
4
  "description": "ADHDev CLI — Detect, install and configure your IDE + AI agent extensions",
5
5
  "main": "dist/index.js",
6
6
  "bin": {