refactor(tmwebdriver): remove legacy DOM bridge and guard HTTP origin
This commit is contained in:
1 parent
277c4859a4
commit
caa41dd08e
6 files changed
+4
-41
No files matched your search
@@ -31,12 +31,6 @@ mem_insight = os.path.join(mem_dir, 'global_mem_insight.txt')
|
||||
if not os.path.exists(mem_insight):
|
||||
t = os.path.join(script_dir, f'assets/global_mem_insight_template{lang_suffix}.txt')
|
||||
open(mem_insight, 'w', encoding='utf-8').write(open(t, encoding='utf-8').read() if os.path.exists(t) else '')
|
||||
cdp_cfg = os.path.join(script_dir, 'assets/tmwd_cdp_bridge/config.js')
|
||||
if not os.path.exists(cdp_cfg):
|
||||
try:
|
||||
os.makedirs(os.path.dirname(cdp_cfg), exist_ok=True)
|
||||
open(cdp_cfg, 'w', encoding='utf-8').write(f"const TID = '__ljq_{hex(random.randint(0, 99999999))[2:8]}';")
|
||||
except Exception as e: print(f'[WARN] CDP config init failed: {e} — advanced web features (tmwebdriver) will be unavailable.')
|
||||
|
||||
def get_system_prompt():
|
||||
with open(os.path.join(script_dir, f'assets/sys_prompt{lang_suffix}.txt'), 'r', encoding='utf-8') as f: prompt = f.read()
|
||||
|
||||
Reference in new issue
Block a user