auto-coder-web 0.1.93__py3-none-any.whl → 0.1.94__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,6 +14,7 @@ from autocoder.events import event_content as EventContentCreator
14
14
  from autocoder.events.event_types import EventType
15
15
  from byzerllm.utils.langutil import asyncfy_with_semaphore
16
16
  from autocoder.common.global_cancel import global_cancel, CancelRequestedException
17
+ from autocoder.common.file_checkpoint.manager import FileChangeManager
17
18
  from loguru import logger
18
19
  import byzerllm
19
20
  # 导入聊天会话和聊天列表管理器
@@ -384,6 +385,16 @@ async def cancel_task(request: CancelTaskRequest, project_path: str = Depends(ge
384
385
  event_file = get_event_file_path(file_id=event_file_id, project_path=project_path)
385
386
  global_cancel.set(token=event_file)
386
387
  event_manager = get_event_manager(event_file)
388
+ file_change_manager = FileChangeManager(project_dir=project_path,
389
+ backup_dir=os.path.join(project_path,".auto-coder","checkpoint"),
390
+ store_dir=os.path.join(project_path,".auto-coder","checkpoint_store"),
391
+ max_history=50)
392
+ undo_result = file_change_manager.undo_change_group(group_id=event_file)
393
+ if not undo_result.success:
394
+ logger.error(f"Error in undo change group: {undo_result.errors}")
395
+ raise Exception(f"Error in undo change group: {undo_result.errors}")
396
+ else:
397
+ logger.info(f"Undo change group {event_file} successfully {undo_result.restored_files}")
387
398
 
388
399
  # 向事件流写入取消事件
389
400
  event_manager.write_error(
auto_coder_web/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.93"
1
+ __version__ = "0.1.94"
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: auto_coder_web
3
- Version: 0.1.93
3
+ Version: 0.1.94
4
4
  Summary: auto-coder.web: A Python Project
5
5
  Author: allwefantasy
6
6
  Classifier: Programming Language :: Python :: 3.10
7
7
  Classifier: Programming Language :: Python :: 3.11
8
8
  Classifier: Programming Language :: Python :: 3.12
9
9
  Description-Content-Type: text/markdown
10
- Requires-Dist: auto-coder >=0.1.362
10
+ Requires-Dist: auto-coder >=0.1.364
11
11
  Requires-Dist: aiofiles
12
12
  Requires-Dist: psutil
13
13
  Requires-Dist: watchdog
@@ -7,7 +7,7 @@ auto_coder_web/lang.py,sha256=cXypkDesnMwZ0U6D_CZtxhDTAOp__hoJzYTulQ_8xPc,1108
7
7
  auto_coder_web/proxy.py,sha256=if9-XT7bxD8dP_ddqQFuxTECr2XZmcmL94m1VrMlpTg,11878
8
8
  auto_coder_web/terminal.py,sha256=jtAH7FaC573cgxc7FnI_mOZ3D2dSCO3PrZN0OehtbNQ,9521
9
9
  auto_coder_web/types.py,sha256=TT-0UruUi67wz7w1DpjFyYeaCnkdKYviJvlpSnrdtD4,1435
10
- auto_coder_web/version.py,sha256=9ZJPYemtF-vnUzZtNNDjmi0UnkkMXYvPkfRASPJ5iWc,23
10
+ auto_coder_web/version.py,sha256=YJaeoilNevm281b3tlZQRLkSCSQKbjzG2Ja5MMOEaaY,23
11
11
  auto_coder_web/common_router/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  auto_coder_web/common_router/active_context_router.py,sha256=wbwG-J2iS5uBorN20q2PVoyJCVueECBR66xYjtIEWhM,6228
13
13
  auto_coder_web/common_router/auto_coder_conf_router.py,sha256=oIRZE5OqeSfp-TYkGtX1M1Qd54iBYxftQtDbivdRj1o,1059
@@ -23,7 +23,7 @@ auto_coder_web/common_router/model_router.py,sha256=w-t6d6FkfF8sDo_8ZHfclHb50y7p
23
23
  auto_coder_web/expert_routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  auto_coder_web/expert_routers/history_router.py,sha256=9NUPlDQJJY5xhGepj38ej3qXAlbaquJDVaSniNhFpqw,12471
25
25
  auto_coder_web/routers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- auto_coder_web/routers/auto_router.py,sha256=IzBR_IbslmVUj83eyhVAWUTwd-Rh3QAMo6DethvT3yc,16552
26
+ auto_coder_web/routers/auto_router.py,sha256=Uo7fbVUjxx5yrgUc_9eiuwtbzMtK3aoTyS__L-qjoU4,17305
27
27
  auto_coder_web/routers/chat_panels_router.py,sha256=3I4M746NCORdpcyk-SuAmBJAKuQeG4FtX7m3FEXrnWM,5417
28
28
  auto_coder_web/routers/chat_router.py,sha256=Zxt8lUdLF1EJY1IMHdcS9tvw9ayec8jA-EKloYV3Bqk,16980
29
29
  auto_coder_web/routers/code_editor_tabs_router.py,sha256=ogCQUp7YoIYIkphDqCLKdfBGq-HdrfKQvZA8UkArrrc,6168
@@ -241,8 +241,8 @@ auto_coder_web/web/monaco-editor/min/vs/language/typescript/tsWorker.js,sha256=_
241
241
  auto_coder_web/web/sounds/ding-dong.wav,sha256=BveDrGCyt_YMHaJwFJ80L5NfbUF5cl5QjzR-SRehxTk,35324
242
242
  auto_coder_web/web/sounds/gentle-notification.wav,sha256=bzd0MwECdrjmNz7mbqv_y03S7WwD3G6agbIh1rWJ9cQ,72124
243
243
  auto_coder_web/web/sounds/soft-chime.wav,sha256=Akpw7_rHLnX3rE13dRYpyZbmQFLGtp8P53LCdAkT9sA,40364
244
- auto_coder_web-0.1.93.dist-info/METADATA,sha256=OFvZ7kkbyQglKhbE1zhh82Cza_KsJn4X438ZWh5l4W8,1435
245
- auto_coder_web-0.1.93.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
246
- auto_coder_web-0.1.93.dist-info/entry_points.txt,sha256=oh8kd1ZecWDgdv-bIj_ru3phvl4scuxwXl9DK0Khltg,61
247
- auto_coder_web-0.1.93.dist-info/top_level.txt,sha256=UCzEw494Im0KvR-FTYf2jh-okqHvLsC_0JLOrQZoSpg,15
248
- auto_coder_web-0.1.93.dist-info/RECORD,,
244
+ auto_coder_web-0.1.94.dist-info/METADATA,sha256=WOGgo1meJam1x7EmdEpy8xvbKznokKiRL78-U_a232k,1435
245
+ auto_coder_web-0.1.94.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
246
+ auto_coder_web-0.1.94.dist-info/entry_points.txt,sha256=oh8kd1ZecWDgdv-bIj_ru3phvl4scuxwXl9DK0Khltg,61
247
+ auto_coder_web-0.1.94.dist-info/top_level.txt,sha256=UCzEw494Im0KvR-FTYf2jh-okqHvLsC_0JLOrQZoSpg,15
248
+ auto_coder_web-0.1.94.dist-info/RECORD,,