[feat] add MCP file browsing and cancellable transfers

This commit is contained in:
dijunkun
2026-11-06 20:36:48 +08:00
parent 0aed57ed4d
commit 6bfcd5cf3d
20 changed files with 537 additions and 23 deletions
@@ -70,3 +70,11 @@ uint64_t ControllerSession::Clipboard(bool write, const std::string &text) {
return id;
}
} // namespace crossdesk
namespace crossdesk {
nlohmann::json ControllerSession::Files(const nlohmann::json &request) {
if (!Connected()) throw std::invalid_argument("NOT_READY");
if (!files_) throw std::invalid_argument("FILES_UNSUPPORTED");
return files_->Command(request);
}
} // namespace crossdesk