前后端next_chapter同步

This commit is contained in:
CakeCN
2025-12-11 21:25:23 +08:00
parent 140ece742e
commit fe1784fa20
2 changed files with 9 additions and 2 deletions

View File

@@ -35,6 +35,8 @@ def on_connect_to_ase(client, entry, init_data, **kwargs):
clear_user_session(init_data['asengine_url'], init_data['asengine_token'], init_data['room'])
restart = init_data.get("restart", False)
if restart: # 重启时,从-1章进入 0章
ase_client.chatmanager.next_chapter()
ase_client.chatmanager.load_now_chapter(load_code=restart)
print("load_now_chapter with restart:", restart)
if restart: