mendeld commited on
Commit
482e09d
·
verified ·
1 Parent(s): 978a58d

Delete beta_frontend.py

Browse files
Files changed (1) hide show
  1. beta_frontend.py +0 -18
beta_frontend.py DELETED
@@ -1,18 +0,0 @@
1
- """Add the AC Beta controls to the existing stable fixed-height chat shell."""
2
- from pathlib import Path
3
-
4
- HERE=Path(__file__).parent
5
-
6
-
7
- def enhance_frontend(page: str, *, is_admin: bool) -> str:
8
- page=page.replace('</style>', '<style></style>\n</style>',1) if False else page
9
- css=(HERE/'beta_ui.css').read_text(encoding='utf-8')
10
- js=(HERE/'beta_ui.js').read_text(encoding='utf-8')
11
- page=page.replace('</head>', '<style>'+css+'</style></head>',1)
12
- page=page.replace('</body>', '<script>'+js+'</script></body>',1)
13
- # Separate Head Admin browser archives from public/guest archives on the
14
- # same origin. This must happen before any page script executes.
15
- if is_admin:
16
- for key in ('ac_archive','ac_current_history','ac_current_chat_id'):
17
- page=page.replace(key, key.replace('ac_', 'ac_admin_', 1))
18
- return page