@ogulcancelik/pi-session-recall 1.0.2 → 1.0.3

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": "@ogulcancelik/pi-session-recall",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Search and query past pi sessions. Recall previous conversations on demand.",
5
5
  "type": "module",
6
6
  "keywords": [
package/session-recall.ts CHANGED
@@ -907,7 +907,10 @@ export default function sessionRecallExtension(pi: ExtensionAPI) {
907
907
  }
908
908
 
909
909
  try {
910
- const apiKey = await ctx.modelRegistry.getApiKey(queryModel);
910
+ const auth = await ctx.modelRegistry.getApiKeyAndHeaders(queryModel);
911
+ if (!auth.ok) {
912
+ return errorResult(`Error resolving model auth: ${auth.error}`);
913
+ }
911
914
 
912
915
  const contextNote = wasWindowed
913
916
  ? "\n\n**Note:** This is a large session. The conversation has been windowed to focus on sections most relevant to your question. Some messages were omitted (marked with [...])."
@@ -927,7 +930,7 @@ export default function sessionRecallExtension(pi: ExtensionAPI) {
927
930
  const response = await complete(
928
931
  queryModel,
929
932
  { systemPrompt: QUERY_SYSTEM_PROMPT, messages: [userMessage] },
930
- { apiKey, signal },
933
+ { apiKey: auth.apiKey, headers: auth.headers, signal },
931
934
  );
932
935
 
933
936
  if (response.stopReason === "aborted") {