@fusion.dev/helix-cli 0.205.1 → 0.205.2

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/package.json +6 -6
  2. package/visual/driver.mjs +13 -4
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fusion.dev/helix-cli",
3
3
  "description": "The Helix command line, for a workspace that reaches it through npm, and the visual tests it runs.",
4
- "version": "0.205.1",
4
+ "version": "0.205.2",
5
5
  "license": "MIT",
6
6
  "author": "Ross Sheppard <ross.sheppard@fusion.dev>",
7
7
  "repository": {
@@ -41,11 +41,11 @@
41
41
  "visual-regression"
42
42
  ],
43
43
  "optionalDependencies": {
44
- "@fusion.dev/helix-cli-darwin-arm64": "0.205.1",
45
- "@fusion.dev/helix-cli-darwin-x64": "0.205.1",
46
- "@fusion.dev/helix-cli-linux-arm64": "0.205.1",
47
- "@fusion.dev/helix-cli-linux-x64": "0.205.1",
48
- "@fusion.dev/helix-cli-win32-x64": "0.205.1"
44
+ "@fusion.dev/helix-cli-darwin-arm64": "0.205.2",
45
+ "@fusion.dev/helix-cli-darwin-x64": "0.205.2",
46
+ "@fusion.dev/helix-cli-linux-arm64": "0.205.2",
47
+ "@fusion.dev/helix-cli-linux-x64": "0.205.2",
48
+ "@fusion.dev/helix-cli-win32-x64": "0.205.2"
49
49
  },
50
50
  "peerDependencies": {
51
51
  "@anthropic-ai/sdk": ">=0.132",
package/visual/driver.mjs CHANGED
@@ -814,10 +814,19 @@ const handlers = {
814
814
  continue
815
815
  }
816
816
  try {
817
- const answer =
818
- provider === 'anthropic'
819
- ? await askClaude(client, settings, group)
820
- : await askOllama(settings, group)
817
+ const ask = () =>
818
+ provider === 'anthropic' ? askClaude(client, settings, group) : askOllama(settings, group)
819
+ let answer = await ask()
820
+ /* A verdict with no reason is asked once more, and the second answer
821
+ is kept with the tokens of both. */
822
+ if (!answer.error && String(answer.explanation ?? '').trim() === '') {
823
+ const again = await ask()
824
+ answer = {
825
+ ...again,
826
+ input: answer.input + again.input,
827
+ output: answer.output + again.output,
828
+ }
829
+ }
821
830
  answers.push(answer)
822
831
  } catch (caught) {
823
832
  /* The API's own sentence when it gave one, without the request id