pi-sessions 0.17.0 → 0.18.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 CHANGED
@@ -293,7 +293,7 @@ To change auto-titling settings, edit `~/.pi/agent/settings.json`:
293
293
  "autoTitle": {
294
294
  "refreshTurns": 4,
295
295
  "timeoutSecs": 15,
296
- "tokenBudget": 64,
296
+ "tokenBudget": 512,
297
297
  "model": "anthropic/claude-haiku-4-5",
298
298
  "thinkingLevel": "off",
299
299
  "prompt": "Custom prompt that overrides the default.",
@@ -6,6 +6,7 @@ import {
6
6
  } from "@earendil-works/pi-coding-agent";
7
7
 
8
8
  export interface AutoTitleContext {
9
+ sessionId: string;
9
10
  cwd: string | undefined;
10
11
  currentTitle: string | undefined;
11
12
  conversationText: string;
@@ -16,7 +17,7 @@ export interface AutoTitleContext {
16
17
  export function buildAutoTitleContext(
17
18
  entries: SessionEntry[],
18
19
  leafId: string | null,
19
- options?: { cwd?: string; currentTitle?: string | undefined },
20
+ options: { sessionId: string; cwd: string | undefined; currentTitle: string | undefined },
20
21
  ): AutoTitleContext {
21
22
  const sessionContext = buildSessionContext(entries, leafId);
22
23
  const conversationText = serializeConversation(convertToLlm(sessionContext.messages));
@@ -32,8 +33,9 @@ export function buildAutoTitleContext(
32
33
  }
33
34
 
34
35
  return {
35
- cwd: options?.cwd,
36
- currentTitle: options?.currentTitle,
36
+ sessionId: options.sessionId,
37
+ cwd: options.cwd,
38
+ currentTitle: options.currentTitle,
37
39
  conversationText,
38
40
  userTurnCount,
39
41
  assistantTurnCount,
@@ -90,6 +90,7 @@ export async function generateAutoTitle(
90
90
  ...(thinkingLevel && thinkingLevel !== "off" ? { reasoning: thinkingLevel } : {}),
91
91
  signal: abortController.signal,
92
92
  cacheRetention: "none",
93
+ sessionId: context.sessionId,
93
94
  },
94
95
  )
95
96
  .result();
@@ -202,6 +202,7 @@ export async function runRetitlePlan(
202
202
  ctx.sessionManager.getEntries(),
203
203
  ctx.sessionManager.getLeafId(),
204
204
  {
205
+ sessionId: ctx.sessionManager.getSessionId(),
205
206
  cwd: ctx.cwd,
206
207
  currentTitle: plan.currentTitle,
207
208
  },
@@ -265,6 +266,7 @@ async function retitleStoredSession(
265
266
  sessionManager.getEntries(),
266
267
  sessionManager.getLeafId(),
267
268
  {
269
+ sessionId: sessionManager.getSessionId(),
268
270
  cwd: sessionManager.getCwd(),
269
271
  currentTitle,
270
272
  },
@@ -10,7 +10,7 @@ import { parseTypeBoxValue } from "./typebox.ts";
10
10
 
11
11
  export const DEFAULT_AUTO_TITLE_REFRESH_TURNS = 4;
12
12
  export const DEFAULT_AUTO_TITLE_TIMEOUT_SECONDS = 15;
13
- export const DEFAULT_AUTO_TITLE_TOKEN_BUDGET = 64;
13
+ export const DEFAULT_AUTO_TITLE_TOKEN_BUDGET = 512;
14
14
  export const DEFAULT_AUTO_TITLE_PROMPT = `Name this coding session (under 80 chars). Be specific to what is being discussed. Your exact output will be displayed to the user, so make sure that it contains ONLY the title itself and nothing else.`;
15
15
  const SESSION_FILE_SETTINGS_SCHEMA = Type.Object({
16
16
  messaging: Type.Optional(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-sessions",
3
- "version": "0.17.0",
3
+ "version": "0.18.1",
4
4
  "type": "module",
5
5
  "description": "Pi session search, ask, handoff, messaging, auto-titling, and indexing tools",
6
6
  "license": "MIT",
@@ -38,10 +38,10 @@
38
38
  },
39
39
  "devDependencies": {
40
40
  "@biomejs/biome": "^2.5.10",
41
- "@earendil-works/pi-agent-core": "^1.0.4",
42
- "@earendil-works/pi-ai": "^1.0.4",
43
- "@earendil-works/pi-coding-agent": "^1.0.4",
44
- "@earendil-works/pi-tui": "^1.0.4",
41
+ "@earendil-works/pi-agent-core": "^1.1.0",
42
+ "@earendil-works/pi-ai": "^1.1.0",
43
+ "@earendil-works/pi-coding-agent": "^1.1.0",
44
+ "@earendil-works/pi-tui": "^1.1.0",
45
45
  "@types/node": "^24.13.3",
46
46
  "strip-ansi": "^7.2.0",
47
47
  "typebox": "1.3.27",