fix: keep remote heartbeat UI side effect free

This commit is contained in:
2026-09-20 23:25:46 +08:00
parent 1d5c472e88
commit 15b0477b44
3 changed files with 35 additions and 12 deletions
@@ -14,6 +14,7 @@ public interface IAgentBackend
Task<object> StatusAsync(CancellationToken cancellationToken);
Task<object> DiagnoseAsync(CancellationToken cancellationToken) => StatusAsync(cancellationToken);
Task<IReadOnlyList<AccountInfo>> AccountsAsync(CancellationToken cancellationToken) => Task.FromResult<IReadOnlyList<AccountInfo>>([]);
Task<IReadOnlyList<AccountInfo>> AccountsAsync(CancellationToken cancellationToken, bool refreshUiIdentity) => AccountsAsync(cancellationToken);
Task<IReadOnlyList<UiTargetInfo>> UiTargetsAsync(CancellationToken cancellationToken) => Task.FromResult<IReadOnlyList<UiTargetInfo>>([]);
Task<AccountBinding> BindAccountAsync(string accountId, string targetId, CancellationToken cancellationToken) => throw new ServiceException("Unsupported", 501, "Account binding is not available.");
Task UnbindAccountAsync(string accountId, CancellationToken cancellationToken) => throw new ServiceException("Unsupported", 501, "Account binding is not available.");