chore(fleet): sync operator memory, hatch menu dialogs, and watchdog alerts
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
"""Data controls tab: model-improvement switch (read-only otherwise).
|
||||
|
||||
The switch row label is not yet pinned from recon, so resolution
|
||||
prefers the single switch on the tab and falls back to keyword
|
||||
match. Import/Delete rows are inventoried, never touched.
|
||||
The switch label is pinned from live recon; resolution prefers it
|
||||
and falls back to single-switch, then keyword match. Import/Delete
|
||||
rows are inventoried, never touched.
|
||||
"""
|
||||
from hatch_menu import controls, dialog
|
||||
|
||||
TAB = "Data controls"
|
||||
SWITCH_LABEL = "Help improve our AI models"
|
||||
_KEYWORDS = ("improv", "train", "model", "data", "usage")
|
||||
|
||||
|
||||
@@ -15,6 +16,11 @@ def _resolve(ws):
|
||||
if not dialog.goto_tab(ws, TAB):
|
||||
return None
|
||||
switches = controls.list_switches(ws)
|
||||
for s in switches:
|
||||
blob = ((s.get("label") or "") + " "
|
||||
+ (s.get("aria") or "")).lower()
|
||||
if SWITCH_LABEL.lower() in blob:
|
||||
return s
|
||||
if len(switches) == 1:
|
||||
return switches[0]
|
||||
for kw in _KEYWORDS:
|
||||
|
||||
Reference in New Issue
Block a user