linkshell-cli 0.5.22 → 0.5.23

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.
@@ -2045,7 +2045,16 @@ export class AgentWorkspaceProxy {
2045
2045
  existingConversation.id !== payload.conversationId) {
2046
2046
  existingConversation = this.adoptConversationId(existingConversation.id, payload.conversationId);
2047
2047
  }
2048
- if ((this.timelines.get(existingConversation.id) ?? []).length === 0 && existingConversation.status !== "running") {
2048
+ // Hydrate the transcript from disk when we have no timeline yet, UNLESS
2049
+ // LinkShell is itself driving a live turn for this conversation — in that
2050
+ // case the event stream is the source of truth and re-hydrating would be
2051
+ // redundant/racy. We key on currentTurnIds (LinkShell-driving), NOT on
2052
+ // status === "running": an EXTERNALLY-driven session also reports
2053
+ // "running" now (live-status feature) but has no event stream, so gating
2054
+ // on status would skip hydration and leave its timeline stuck empty
2055
+ // ("加载对话记录…" forever).
2056
+ if ((this.timelines.get(existingConversation.id) ?? []).length === 0 &&
2057
+ !this.currentTurnIds.has(existingConversation.id)) {
2049
2058
  try {
2050
2059
  const existingAgentSessionId = existingConversation.agentSessionId;
2051
2060
  let result;