ask-pro 0.1.51 → 0.1.53
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/README.md
CHANGED
|
@@ -71,7 +71,8 @@ Ask for a recoverable repo consult:
|
|
|
71
71
|
ask-pro --no-temporary --prompt-file question.md --files src --files tests
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
ask-pro selects `Latest`
|
|
74
|
+
ask-pro selects `Latest` when available, otherwise the highest numbered available
|
|
75
|
+
GPT model, with `Pro` intelligence. It has no repo or conversation
|
|
75
76
|
context unless you provide it, so keep the prompt and file bundle focused.
|
|
76
77
|
|
|
77
78
|
Request generated files only when needed; treat them as data and never execute
|
|
@@ -269,7 +269,7 @@ function buildModelSelectionExpression(targetModel, strategy) {
|
|
|
269
269
|
return { status: 'already-selected', label };
|
|
270
270
|
}
|
|
271
271
|
const buttonMatchesTarget = () => {
|
|
272
|
-
// The
|
|
272
|
+
// The composer pill cannot prove that the newest available model is selected.
|
|
273
273
|
if (normalizedTarget === 'latest') return false;
|
|
274
274
|
const normalizedLabel = normalize(getButtonLabel());
|
|
275
275
|
if (!normalizedLabel) return false;
|
|
@@ -446,14 +446,24 @@ function buildModelSelectionExpression(targetModel, strategy) {
|
|
|
446
446
|
testid.toLowerCase().includes('submenu') ||
|
|
447
447
|
option.getAttribute('data-has-submenu') !== null ||
|
|
448
448
|
option.getAttribute('aria-haspopup') === 'menu';
|
|
449
|
-
|
|
449
|
+
if (normalizedTarget === 'latest') {
|
|
450
|
+
const rect = option.getBoundingClientRect();
|
|
451
|
+
if (isSubmenu || rect.width <= 0 || rect.height <= 0 ||
|
|
452
|
+
option.getAttribute('aria-disabled') === 'true' || option.hasAttribute('disabled')) continue;
|
|
453
|
+
}
|
|
454
|
+
// Read the raw label: normalization removes decimal separators.
|
|
455
|
+
const modelVersion = normalizedTarget === 'latest'
|
|
456
|
+
? text.trim().match(/^gpt[-\\s]+(\\d+(?:\\.\\d+)*)(?![.\\d])/i)?.[1] ?? ''
|
|
457
|
+
: '';
|
|
458
|
+
const baseScore = modelVersion ? 500 : scoreOption(normalizedText, testid);
|
|
450
459
|
if (baseScore <= 0) {
|
|
451
460
|
continue;
|
|
452
461
|
}
|
|
453
462
|
const score = baseScore + (isSubmenu ? 0 : 1);
|
|
454
463
|
const label = getOptionLabel(option);
|
|
455
|
-
if (!bestMatch || score > bestMatch.score
|
|
456
|
-
|
|
464
|
+
if (!bestMatch || score > bestMatch.score ||
|
|
465
|
+
(score === bestMatch.score && modelVersion.localeCompare(bestMatch.modelVersion, 'en', { numeric: true }) > 0)) {
|
|
466
|
+
bestMatch = { node: option, label, score, testid, normalizedText, isSubmenu, modelVersion };
|
|
457
467
|
}
|
|
458
468
|
}
|
|
459
469
|
}
|
package/package.json
CHANGED
package/skills/ask-pro/SKILL.md
CHANGED
|
@@ -58,7 +58,8 @@ When invoked:
|
|
|
58
58
|
`harvest` command when that is the next action.
|
|
59
59
|
8. Treat the answer as advisory; turn it into your own plan before editing code.
|
|
60
60
|
|
|
61
|
-
`ask-pro` selects `Latest
|
|
61
|
+
`ask-pro` selects `Latest` when available, otherwise the highest numbered available
|
|
62
|
+
GPT model, then `Pro` intelligence. Do not require a
|
|
62
63
|
different dated model label or a separate thinking-effort control in the prompt
|
|
63
64
|
or workflow.
|
|
64
65
|
|