pi-auto-save-session-to-markdown 0.10.0 → 0.10.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.
Files changed (2) hide show
  1. package/index.ts +6 -2
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -933,8 +933,12 @@ export default function (pi: ExtensionAPI) {
933
933
  if (e.message.role === "user") {
934
934
  // Title derivation reads the plain typed message — every known
935
935
  // injected block (see markdown.ts) is stripped, mirroring how the
936
- // client strips the same blocks for its own session titles.
937
- return stripInjectedBlocks(userText(e.message.content)) || undefined;
936
+ // client strips the same blocks for its own session titles. A first
937
+ // message that is only injected blocks (an attachment with no typed
938
+ // text) is skipped, so a later message's typed text still titles the
939
+ // session instead of everything falling back to "untitled".
940
+ const text = stripInjectedBlocks(userText(e.message.content));
941
+ if (text) return text;
938
942
  }
939
943
  }
940
944
  return undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-auto-save-session-to-markdown",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "Pi extension that automatically saves each completed conversation turn as a markdown file with YAML frontmatter, one file per session-tree branch.",
5
5
  "type": "module",
6
6
  "license": "MIT",