-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathremote_control_command.hpp
More file actions
34 lines (26 loc) · 1.08 KB
/
Copy pathremote_control_command.hpp
File metadata and controls
34 lines (26 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#pragma once
// /remote-control(别名 /rc)命令:把当前 TUI 会话托管给外部 channel
// (openspec add-remote-control)。运行时操作委托给 rc::remote_control_service();
// 文案构造抽到 format_remote_control_display() 以便单测覆盖。
#include "commands/command_registry.hpp"
#include <cstdint>
#include <string>
namespace acecode {
struct RemoteControlDisplaySnapshot {
bool running = false;
int port = 0; // running 时为实际监听端口,否则为配置端口
std::string token;
std::string outbound_url;
std::string default_channel;
std::string active_channel;
std::uint64_t inbound_accepted = 0;
std::uint64_t inbound_rejected = 0;
std::uint64_t outbound_sent = 0;
std::uint64_t outbound_failed = 0;
std::uint64_t outbound_dropped = 0;
};
std::string format_remote_control_display(const RemoteControlDisplaySnapshot& snap);
std::string format_remote_control_stop_message(
const std::string& deactivate_warning);
void register_remote_control_command(CommandRegistry& registry);
} // namespace acecode