@ssweens/pi-handoff 1.3.0 → 1.3.1

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.
@@ -188,7 +188,9 @@ async function generateHandoffPrompt(
188
188
  loader.onAbort = () => done(null);
189
189
 
190
190
  const run = async () => {
191
- const apiKey = await ctx.modelRegistry.getApiKey(ctx.model!);
191
+ const auth = await ctx.modelRegistry.getApiKeyAndHeaders(ctx.model!);
192
+ if (!auth.ok) throw new Error(auth.error);
193
+ const apiKey = auth.apiKey;
192
194
 
193
195
  const userMessage: Message = {
194
196
  role: "user",
@@ -171,7 +171,9 @@ export default function (pi: ExtensionAPI) {
171
171
  }
172
172
 
173
173
  try {
174
- const apiKey = await ctx.modelRegistry.getApiKey(ctx.model);
174
+ const auth = await ctx.modelRegistry.getApiKeyAndHeaders(ctx.model);
175
+ if (!auth.ok) return errorResult(`Auth error: ${auth.error}`);
176
+ const apiKey = auth.apiKey;
175
177
 
176
178
  const userMessage: Message = {
177
179
  role: "user",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssweens/pi-handoff",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "scripts": {
5
5
  "test": "bun test tests/",
6
6
  "test:watch": "bun test --watch tests/"