@ryan_nookpi/pi-extension-claude-hooks-bridge 0.2.2 → 0.2.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.
Files changed (2) hide show
  1. package/index.ts +2 -2
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -265,7 +265,7 @@ function getLastAssistantMessage(ctx: ExtensionContext): string | undefined {
265
265
  const entries = ctx.sessionManager.getEntries();
266
266
  for (let i = entries.length - 1; i >= 0; i -= 1) {
267
267
  const entry = entries[i];
268
- if (!entry || entry.type !== "message") continue;
268
+ if (entry?.type !== "message") continue;
269
269
  if (entry.message.role !== "assistant") continue;
270
270
  const text = extractTextFromBlocks(entry.message.content);
271
271
  if (text) return text;
@@ -340,7 +340,7 @@ function toClaudeTranscriptLines(ctx: ExtensionContext): string[] {
340
340
  const entries = ctx.sessionManager.getEntries();
341
341
 
342
342
  for (const entry of entries) {
343
- if (!entry || entry.type !== "message") continue;
343
+ if (entry?.type !== "message") continue;
344
344
  const line = mapTranscriptLine(entry.message as { role: string; content: unknown; toolCallId?: string });
345
345
  if (line) lines.push(line);
346
346
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ryan_nookpi/pi-extension-claude-hooks-bridge",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Bridge Claude Code hooks (.claude/settings.json) into pi extension lifecycle events.",
5
5
  "license": "MIT",
6
6
  "repository": {