@hienlh/ppm 0.8.1 → 0.8.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.8.2] - 2026-03-23
4
+
5
+ ### Fixed
6
+ - **Heartbeat during SDK connection**: Keep "Connecting... (Xs)" indicator alive until real content arrives — previously stopped by `account_info` event, causing misleading "thinking" state during 3-minute SDK failures
7
+ - **Unknown API error hint**: "API error: unknown" now shows actionable guidance (check connectivity, re-add account, new session)
8
+
3
9
  ## [0.8.1] - 2026-03-23
4
10
 
5
11
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hienlh/ppm",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "Personal Project Manager — mobile-first web IDE with AI assistance",
5
5
  "author": "hienlh",
6
6
  "license": "MIT",
@@ -797,6 +797,7 @@ export class ClaudeAgentSdkProvider implements AIProvider {
797
797
  rate_limit: "Rate limited by the API. Please wait and try again.",
798
798
  invalid_request: "Invalid request sent to the API.",
799
799
  server_error: "Anthropic API server error. Try again shortly.",
800
+ unknown: "API connection failed. Possible causes: network unreachable, expired OAuth token, or API outage. Try: 1) Check connectivity (`curl -s https://api.anthropic.com`), 2) Re-add account in Settings, 3) Create a new chat session.",
800
801
  };
801
802
  const hint = errorHints[assistantError] ?? `API error: ${assistantError}`;
802
803
  console.error(`[sdk] session=${sessionId} assistant error: ${assistantError}`);
@@ -146,8 +146,12 @@ async function runStreamLoop(sessionId: string, providerId: string, content: str
146
146
  const ev = event as any;
147
147
  const evType = ev.type ?? "unknown";
148
148
 
149
- // First event received — stop heartbeat, switch to streaming status
150
- if (!firstEventReceived) {
149
+ // First content event — stop heartbeat, switch to streaming status.
150
+ // Skip metadata events (account_info, streaming_status) that arrive before
151
+ // the SDK subprocess actually produces output — keeps heartbeat + "connecting"
152
+ // indicator alive until real content flows.
153
+ const isMetadataEvent = evType === "account_info" || evType === "streaming_status";
154
+ if (!firstEventReceived && !isMetadataEvent) {
151
155
  firstEventReceived = true;
152
156
  const waitMs = Date.now() - startTime;
153
157
  console.log(`[chat] session=${sessionId} first SDK event after ${waitMs}ms: type=${evType}`);