Preserve isolated local drafts across navigation and reload

This commit is contained in:
aiagent
2026-10-19 22:47:17 -07:00
parent 9d69629bc8
commit 6a36a49290
16 changed files with 174 additions and 38 deletions
+5
View File
@@ -231,6 +231,11 @@ class Handler(BaseHTTPRequestHandler):
state['primary_session_id'] = self.server.primary_session_id
state['metrics'] = self.server.metrics.snapshot()
state['eta_clock'] = dict(self.server.eta_clock.status)
try:
entry = re.search(r'<script\b[^>]*\bsrc="(/assets/[^"/]+\.js)"', (self.server.web_root/'index.html').read_text(encoding='utf-8'))
state['frontend_entrypoint'] = entry.group(1) if entry else None
except OSError:
state['frontend_entrypoint'] = None
self.output(200, state)
elif parts.path == '/api/decision-bridge-bindings' and not parts.query:
self.output(200,self.server.store.decision_bindings())