ask-pro 0.1.41 → 0.1.44

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.
@@ -655,7 +655,8 @@ async function verifyPromptCommitted(Runtime, prompt, timeoutMs, logger, baselin
655
655
  const isVisible = (node) => {
656
656
  if (!node || typeof node.getBoundingClientRect !== 'function') return false;
657
657
  const rect = node.getBoundingClientRect();
658
- return rect.width > 0 && rect.height > 0;
658
+ const style = window.getComputedStyle(node);
659
+ return rect.width > 0 && rect.height > 0 && style.visibility !== 'hidden' && style.display !== 'none';
659
660
  };
660
661
  const inputs = inputSelectors
661
662
  .map((selector) => document.querySelector(selector))
@@ -674,7 +675,7 @@ async function verifyPromptCommitted(Runtime, prompt, timeoutMs, logger, baselin
674
675
  (normalizedPromptPrefix.length > 30 && lastTurn.includes(normalizedPromptPrefix)));
675
676
  const baseline = ${baselineLiteral};
676
677
  const hasNewTurn = baseline < 0 ? false : normalizedTurns.length > baseline;
677
- const stopVisible = Boolean(document.querySelector(${stopSelectorLiteral}));
678
+ const stopVisible = isVisible(document.querySelector(${stopSelectorLiteral}));
678
679
  const assistantVisible = Boolean(
679
680
  document.querySelector(${assistantSelectorLiteral}) ||
680
681
  document.querySelector('[data-testid*="assistant"]'),
@@ -737,8 +738,7 @@ async function verifyPromptCommitted(Runtime, prompt, timeoutMs, logger, baselin
737
738
  return typeof turnsCount === "number" && Number.isFinite(turnsCount) ? turnsCount : null;
738
739
  }
739
740
  const fallbackCommit = info?.composerCleared &&
740
- Boolean(info?.hasNewTurn) &&
741
- ((info?.stopVisible ?? false) || info?.assistantVisible || info?.inConversation);
741
+ (info?.stopVisible || (info?.hasNewTurn && (info?.assistantVisible || info?.inConversation)));
742
742
  if (fallbackCommit) {
743
743
  return typeof turnsCount === "number" && Number.isFinite(turnsCount) ? turnsCount : null;
744
744
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ask-pro",
3
- "version": "0.1.41",
3
+ "version": "0.1.44",
4
4
  "description": "Browser-backed ChatGPT Pro escalation for hard engineering questions.",
5
5
  "keywords": [
6
6
  "agents",