23 ImVec4(0.18f, 0.14f, 0.12f, 1.0f));
24 ImGui::BeginChild(
"RomSync", ImVec2(0, 130),
true);
30 if (!state.current_rom_hash.empty()) {
31 ImGui::Text(
"Hash: %s", state.current_rom_hash.substr(0, 16).c_str());
34 ImGui::SetClipboardText(state.current_rom_hash.c_str());
40 ImGui::TextDisabled(
"No ROM loaded");
43 if (state.last_sync_time != absl::InfinitePast()) {
44 ImGui::Text(
"Last Sync: %s",
45 absl::FormatTime(
"%H:%M:%S", state.last_sync_time,
46 absl::LocalTimeZone())
51 ImGui::Checkbox(
"Auto-sync ROM changes", &state.auto_sync_enabled);
53 if (state.auto_sync_enabled) {
54 ImGui::SliderInt(
"Sync Interval (seconds)", &state.sync_interval_seconds,
62 collab_state.active &&
66 ImGui::BeginDisabled();
71 if (diff_result.ok()) {
75 state.current_rom_hash = hash;
76 state.last_sync_time = absl::Now();
83 }
else if (toast_manager) {
85 diff_result.status().message()),
93 if (ImGui::IsItemHovered()) {
94 ImGui::SetTooltip(
"Connect to a network session to sync ROM");
99 if (!state.pending_syncs.empty()) {
102 state.pending_syncs.size());
105 ImGui::BeginChild(
"PendingSyncs", ImVec2(0, 80),
true);
106 for (
const auto& sync : state.pending_syncs) {
107 ImGui::BulletText(
"%s", sync.substr(0, 40).c_str());
Unified context for agent UI components.
RomSyncState & rom_sync_state()
CollaborationState & collaboration_state()