@ogulcancelik/pi-session-recall 1.0.1 → 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 +5 -4
- package/session-recall.ts +5 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ogulcancelik/pi-session-recall",
|
|
3
|
-
"version": "1.0.
|
|
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": [
|
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
"license": "MIT",
|
|
17
17
|
"repository": {
|
|
18
18
|
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/ogulcancelik/pi-
|
|
19
|
+
"url": "git+https://github.com/ogulcancelik/pi-extensions.git",
|
|
20
|
+
"directory": "packages/pi-session-recall"
|
|
20
21
|
},
|
|
21
22
|
"bugs": {
|
|
22
|
-
"url": "https://github.com/ogulcancelik/pi-
|
|
23
|
+
"url": "https://github.com/ogulcancelik/pi-extensions/issues"
|
|
23
24
|
},
|
|
24
|
-
"homepage": "https://github.com/ogulcancelik/pi-session-recall#readme",
|
|
25
|
+
"homepage": "https://github.com/ogulcancelik/pi-extensions/tree/main/packages/pi-session-recall#readme",
|
|
25
26
|
"engines": {
|
|
26
27
|
"node": ">=18.0.0"
|
|
27
28
|
},
|
package/session-recall.ts
CHANGED
|
@@ -907,7 +907,10 @@ export default function sessionRecallExtension(pi: ExtensionAPI) {
|
|
|
907
907
|
}
|
|
908
908
|
|
|
909
909
|
try {
|
|
910
|
-
const
|
|
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") {
|