Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

修复远程设备弱网超时风暴

DavidShenc733dc74f8e5
diff --git a/apps/desktop/src/renderer/features/cc-agent/RemoteSessionBanner.tsx b/apps/desktop/src/renderer/features/cc-agent/RemoteSessionBanner.tsx
index cbac082188..99451adadb 100644
--- a/apps/desktop/src/renderer/features/cc-agent/RemoteSessionBanner.tsx
+++ b/apps/desktop/src/renderer/features/cc-agent/RemoteSessionBanner.tsx
@@ -1,11 +1,8 @@
/**
* RemoteSessionBanner —— 控制端打开的远程会话状态提示条。
*
- * 让"连接 / 同步有问题"可见而非静默卡住,在会话视图顶部显示一条 strip。
- * 连接类状态(reconnecting / host-offline / degraded)的恢复全自动(重连 / presence /
- * 熔断探测 + 恢复后自动 resync),不提供手动按钮(2026-08 弱网实测反馈:重连必须全自动);
- * 只有 suspect-stall 保留「重新同步」「结束本轮」——那是自动机制无法核实的卡死回合,
- * 需要用户裁决。四种 status:
+ * 让"连接 / 同步有问题"可见而非静默卡住,在会话视图顶部显示一条 strip,带「重新同步」按钮
+ * (经隧道以被控端为准重拉对账)。四种 status:
* - reconnecting : 本机断链重连中。
* - host-offline : 被控设备离线。
* - degraded : 两端 presence 均在线但被控端连续超时被熔断判定无响应(弱网 / 对端
@@ -74,16 +71,14 @@ export function RemoteSessionBanner({ status, issue, onResync, onFinalize }: Pro
{t('ccAgent.remoteSession.finalizeStuck')}
</button>
)}
- {status === 'suspect-stall' && (
- <button
- type="button"
- onClick={onResync}
- className="flex shrink-0 items-center gap-1 rounded-full px-2 py-0.5 text-[12px] text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]"
- >
- <RotateCw size={12} />
- {t('ccAgent.remoteSession.resync')}
- </button>
- )}
+ <button
+ type="button"
+ onClick={onResync}
+ className="flex shrink-0 items-center gap-1 rounded-full px-2 py-0.5 text-[12px] text-[var(--text-secondary)] transition-colors hover:text-[var(--text-primary)]"
+ >
+ <RotateCw size={12} />
+ {t('ccAgent.remoteSession.resync')}
+ </button>
</div>
);
}