@adhdev/daemon-core 0.9.82-rc.106 → 0.9.82-rc.108

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adhdev/daemon-core",
3
- "version": "0.9.82-rc.106",
3
+ "version": "0.9.82-rc.108",
4
4
  "description": "ADHDev daemon core — CDP, IDE detection, providers, command execution",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -12,6 +12,7 @@ import type { CliAdapter } from '../cli-adapter-types.js';
12
12
  import { flattenContent, normalizeInputEnvelope, type InputEnvelope, type ProviderModule, type ProviderScripts } from '../providers/contracts.js';
13
13
  import { assertProviderSupportsDeclaredInput, assertTextOnlyInput } from '../providers/provider-input-support.js';
14
14
  import { validateReadChatResultPayload } from '../providers/read-chat-contract.js';
15
+ import { pickApprovalButton } from '../providers/approval-utils.js';
15
16
  import type { ProviderInstance } from '../providers/provider-instance.js';
16
17
  import { isNativeSourceCanonicalHistory, readProviderChatHistory } from '../config/chat-history.js';
17
18
  import { LOG, getRecentLogs } from '../logging/logger.js';
@@ -2338,6 +2339,9 @@ export async function handleResolveAction(h: CommandHelpers, args: any): Promise
2338
2339
  if (buttonIndex < 0 && (action === 'always' || /always/i.test(button))) {
2339
2340
  buttonIndex = buttons.findIndex(b => /always/i.test(b));
2340
2341
  }
2342
+ if (buttonIndex < 0 && (action === 'approve' || action === 'accept')) {
2343
+ buttonIndex = pickApprovalButton(buttons, provider).index;
2344
+ }
2341
2345
  if (buttonIndex < 0) {
2342
2346
  return { success: false, error: 'Approval action did not match any visible button' };
2343
2347
  }