21 ImGui::PushStyleColor(ImGuiCol_ChildBg, ImVec4(0.18f, 0.14f, 0.12f, 1.0f));
22 ImGui::BeginChild(
"RomSync", ImVec2(0, 130),
true);
28 if (!state.current_rom_hash.empty()) {
29 ImGui::Text(
"Hash: %s", state.current_rom_hash.substr(0, 16).c_str());
32 ImGui::SetClipboardText(state.current_rom_hash.c_str());
38 ImGui::TextDisabled(
"No ROM loaded");
41 if (state.last_sync_time != absl::InfinitePast()) {
42 ImGui::Text(
"Last Sync: %s",
43 absl::FormatTime(
"%H:%M:%S", state.last_sync_time,
44 absl::LocalTimeZone())
49 ImGui::Checkbox(
"Auto-sync ROM changes", &state.auto_sync_enabled);
51 if (state.auto_sync_enabled) {
52 ImGui::SliderInt(
"Sync Interval (seconds)", &state.sync_interval_seconds,
60 collab_state.active &&
64 ImGui::BeginDisabled();
69 if (diff_result.ok()) {
73 state.current_rom_hash = hash;
74 state.last_sync_time = absl::Now();
81 }
else if (toast_manager) {
83 diff_result.status().message()),
91 if (ImGui::IsItemHovered()) {
92 ImGui::SetTooltip(
"Connect to a network session to sync ROM");
97 if (!state.pending_syncs.empty()) {
100 state.pending_syncs.size());
103 ImGui::BeginChild(
"PendingSyncs", ImVec2(0, 80),
true);
104 for (
const auto& sync : state.pending_syncs) {
105 ImGui::BulletText(
"%s", sync.substr(0, 40).c_str());
111 ImGui::PopStyleColor();
Unified context for agent UI components.
RomSyncState & rom_sync_state()
CollaborationState & collaboration_state()