toggleWatch function exported

Last updated: 2026-03-05T23:41:41.564Z

Metrics

LOC: 12 Complexity: 3 Params: 0

Signature

toggleWatch(): : Promise<void>

Source Code

export async function toggleWatch(): Promise<void> {
  if (panelState.watcherActive) {
    await sendToPage({ type: "STOP_WATCHING" });
    panelState.watcherActive = false;
    addLog(t("logWatchDeactivated"), "info");
  } else {
    await sendToPage({ type: "START_WATCHING", payload: { autoRefill: true } });
    panelState.watcherActive = true;
    addLog(t("logWatchActivated"), "success");
  }
  renderActionsTab();
}

Dependencies (Outgoing)

graph LR toggleWatch["toggleWatch"] t["t"] sendToPage["sendToPage"] addLog["addLog"] renderTo["renderTo"] fillAll["fillAll"] fillContextualAI["fillContextualAI"] renderActionsTab["renderActionsTab"] fillOnlyEmpty["fillOnlyEmpty"] saveCurrentForm["saveCurrentForm"] detectFields["detectFields"] toggleWatch -->|uses| t toggleWatch -->|uses| sendToPage toggleWatch -->|uses| addLog toggleWatch -->|uses| renderTo toggleWatch -->|uses| fillAll toggleWatch -->|uses| fillContextualAI toggleWatch -->|calls| renderActionsTab toggleWatch -->|calls| fillOnlyEmpty toggleWatch -->|calls| fillContextualAI toggleWatch -->|calls| saveCurrentForm toggleWatch -->|calls| toggleWatch toggleWatch -->|calls| detectFields style toggleWatch fill:#dbeafe,stroke:#2563eb,stroke-width:2px click toggleWatch "5b1d47a07d7aa0c9.html" click t "8e8864a3c5cfd1e1.html" click sendToPage "c08387d99fb8cee4.html" click addLog "0260edfd6415154b.html" click renderTo "82b88bd90e760d1a.html" click fillAll "388f033c1be0f292.html" click fillContextualAI "854e1a4562eb49e4.html" click renderActionsTab "40e45c39675a3592.html" click fillOnlyEmpty "84fc64fe499c6732.html" click saveCurrentForm "030e069e36ab4a7e.html" click detectFields "2645a01d8f49e548.html"
TargetType
t uses
sendToPage uses
addLog uses
renderTo uses
fillAll uses
fillContextualAI uses
renderActionsTab calls
fillOnlyEmpty calls
fillContextualAI calls
saveCurrentForm calls
toggleWatch calls
detectFields calls

Impact (Incoming)

graph LR toggleWatch["toggleWatch"] toggleWatch -->|calls| toggleWatch style toggleWatch fill:#dbeafe,stroke:#2563eb,stroke-width:2px click toggleWatch "5b1d47a07d7aa0c9.html"
SourceType
toggleWatch calls