pi-smart-sessions 1.0.0 → 1.0.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.
- package/README.md +2 -0
- package/extensions/smart-sessions.ts +0 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# pi-smart-sessions
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/pi-smart-sessions)
|
|
4
|
+
|
|
3
5
|
A [Pi](https://github.com/badlogic/pi) extension that automatically names your sessions with AI-generated summaries. No more scrolling through a wall of skill tags in your session list.
|
|
4
6
|
|
|
5
7
|
## Before
|
|
@@ -6,7 +6,6 @@ const skillPattern = /^\/skill:(\S+)\s*([\s\S]*)/;
|
|
|
6
6
|
const SUMMARY_PROMPT =
|
|
7
7
|
"Summarize the user's request in 5-10 words max. Output ONLY the summary, nothing else. No quotes, no punctuation at the end.";
|
|
8
8
|
|
|
9
|
-
const CODEX_MODEL_ID = "gpt-5.1-codex-mini";
|
|
10
9
|
const HAIKU_MODEL_ID = "claude-haiku-4-5";
|
|
11
10
|
|
|
12
11
|
async function pickCheapModel(ctx: {
|
|
@@ -16,11 +15,6 @@ async function pickCheapModel(ctx: {
|
|
|
16
15
|
getApiKey: (m: Model<Api>) => Promise<string | undefined>;
|
|
17
16
|
};
|
|
18
17
|
}): Promise<{ model: Model<Api>; apiKey: string } | null> {
|
|
19
|
-
const codex = ctx.modelRegistry.find("openai-codex", CODEX_MODEL_ID);
|
|
20
|
-
if (codex) {
|
|
21
|
-
const key = await ctx.modelRegistry.getApiKey(codex);
|
|
22
|
-
if (key) return { model: codex, apiKey: key };
|
|
23
|
-
}
|
|
24
18
|
const haiku = ctx.modelRegistry.find("anthropic", HAIKU_MODEL_ID);
|
|
25
19
|
if (haiku) {
|
|
26
20
|
const key = await ctx.modelRegistry.getApiKey(haiku);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-smart-sessions",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Auto-names Pi sessions with AI-generated summaries — no more cryptic skill tags in your session list",
|
|
5
5
|
"keywords": ["pi-package", "pi-extension", "sessions", "skills"],
|
|
6
6
|
"license": "MIT",
|