ticketlens 0.1.22 → 0.1.23

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": "ticketlens",
3
- "version": "0.1.22",
3
+ "version": "0.1.23",
4
4
  "description": "Jira CLI for developers — fetch ticket context, triage your queue, and stop tab-switching. Zero dependencies, all local.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -49,14 +49,16 @@ async function callAnthropic({ brief, apiKey, fetcher, timeoutMs, prompt, maxTok
49
49
  'anthropic-version': '2023-06-01',
50
50
  },
51
51
  body: JSON.stringify({
52
- model: 'claude-haiku-4-5-20251001',
52
+ model: 'claude-3-5-haiku-20241022',
53
53
  max_tokens: maxTokens,
54
54
  messages: [{ role: 'user', content: prompt + brief }],
55
55
  }),
56
56
  });
57
57
 
58
58
  if (!res.ok) {
59
- const err = new Error(`Anthropic API error ${res.status}`);
59
+ let detail = '';
60
+ try { detail = (await res.json()).error?.message || ''; } catch {}
61
+ const err = new Error(`Anthropic API error ${res.status}${detail ? ': ' + detail : ''}`);
60
62
  err.status = res.status;
61
63
  throw err;
62
64
  }
@@ -81,7 +83,9 @@ async function callOpenAi({ brief, apiKey, fetcher, timeoutMs, prompt, maxTokens
81
83
  });
82
84
 
83
85
  if (!res.ok) {
84
- const err = new Error(`OpenAI API error ${res.status}`);
86
+ let detail = '';
87
+ try { detail = (await res.json()).error?.message || ''; } catch {}
88
+ const err = new Error(`OpenAI API error ${res.status}${detail ? ': ' + detail : ''}`);
85
89
  err.status = res.status;
86
90
  throw err;
87
91
  }