auto-coder-web 0.1.56__py3-none-any.whl → 0.1.57__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.
Files changed (26) hide show
  1. auto_coder_web/expert_routers/history_router.py +1 -1
  2. auto_coder_web/routers/config_router.py +26 -0
  3. auto_coder_web/version.py +1 -1
  4. auto_coder_web/web/assets/{cssMode-B9D1QDVI.js → cssMode-CASSua2g.js} +1 -1
  5. auto_coder_web/web/assets/{freemarker2-Dicv7qV3.js → freemarker2-Cfge5bCe.js} +1 -1
  6. auto_coder_web/web/assets/{handlebars-ANEWa5nN.js → handlebars-DD9vaFGU.js} +1 -1
  7. auto_coder_web/web/assets/{html-CjLTxV7p.js → html-wMu7NWVV.js} +1 -1
  8. auto_coder_web/web/assets/{htmlMode-CPF-fncb.js → htmlMode-BJMZKVjn.js} +1 -1
  9. auto_coder_web/web/assets/{index-B6lJ3lzm.js → index-BB-izReD.js} +281 -280
  10. auto_coder_web/web/assets/{index-CmfrDHc1.css → index-dgy4j9V_.css} +1 -1
  11. auto_coder_web/web/assets/{javascript-De95hsfT.js → javascript-2ffNaYoE.js} +1 -1
  12. auto_coder_web/web/assets/{jsonMode-CiUFt_wa.js → jsonMode-C5X-fxen.js} +1 -1
  13. auto_coder_web/web/assets/{liquid-5eKYrWZN.js → liquid-C3uwo_9k.js} +1 -1
  14. auto_coder_web/web/assets/{mdx-Bq8_lQjD.js → mdx-CqGFZJJX.js} +1 -1
  15. auto_coder_web/web/assets/{python-DnVtHbtp.js → python-BvxzqvR4.js} +1 -1
  16. auto_coder_web/web/assets/{razor-DONQM8ne.js → razor-DFYpxRz5.js} +1 -1
  17. auto_coder_web/web/assets/{tsMode-TPLnL9z4.js → tsMode-DLkYryH0.js} +1 -1
  18. auto_coder_web/web/assets/{typescript-D_z80ey2.js → typescript-Dvi9C8gH.js} +1 -1
  19. auto_coder_web/web/assets/{xml-BoVQ-ITO.js → xml-DTJhoFj9.js} +1 -1
  20. auto_coder_web/web/assets/{yaml-fqI-KrvZ.js → yaml-CveCF9Jn.js} +1 -1
  21. auto_coder_web/web/index.html +2 -2
  22. {auto_coder_web-0.1.56.dist-info → auto_coder_web-0.1.57.dist-info}/METADATA +1 -1
  23. {auto_coder_web-0.1.56.dist-info → auto_coder_web-0.1.57.dist-info}/RECORD +26 -26
  24. {auto_coder_web-0.1.56.dist-info → auto_coder_web-0.1.57.dist-info}/WHEEL +0 -0
  25. {auto_coder_web-0.1.56.dist-info → auto_coder_web-0.1.57.dist-info}/entry_points.txt +0 -0
  26. {auto_coder_web-0.1.56.dist-info → auto_coder_web-0.1.57.dist-info}/top_level.txt +0 -0
@@ -111,7 +111,7 @@ async def validate_and_load_history(
111
111
  if len(lines) > 1:
112
112
  original_hash = lines[-1].strip()
113
113
  reverted_commits[original_hash] = True
114
- logger.info(f"找到撤销提交 {commit.hexsha[:7]} 撤销了 {original_hash[:7]}")
114
+ # logger.info(f"找到撤销提交 {commit.hexsha[:7]} 撤销了 {original_hash[:7]}")
115
115
  if commit_inter_count > 2*max_history_count:
116
116
  break
117
117
  commit_inter_count += 1
@@ -9,6 +9,7 @@ router = APIRouter()
9
9
 
10
10
  class UIConfig(BaseModel):
11
11
  mode: str = "agent" # agent/expert
12
+ preview_url: str = "http://127.0.0.1:3000"
12
13
 
13
14
  async def get_project_path(request: Request) -> str:
14
15
  """从FastAPI请求上下文中获取项目路径"""
@@ -64,3 +65,28 @@ async def update_ui_mode(
64
65
  await save_config(config, config_path)
65
66
 
66
67
  return {"mode": update.mode}
68
+
69
+ @router.get("/api/config/ui/preview-url")
70
+ async def get_preview_url(request: Request):
71
+ """获取预览URL"""
72
+ project_path = await get_project_path(request)
73
+ config_path = await get_config_path(project_path)
74
+ config = await load_config(config_path)
75
+ return {"preview_url": config.preview_url}
76
+
77
+ class PreviewUrlUpdate(BaseModel):
78
+ preview_url: str
79
+
80
+ @router.put("/api/config/ui/preview-url")
81
+ async def update_preview_url(
82
+ update: PreviewUrlUpdate,
83
+ request: Request
84
+ ):
85
+ """更新预览URL"""
86
+ project_path = await get_project_path(request)
87
+ config_path = await get_config_path(project_path)
88
+ config = await load_config(config_path)
89
+ config.preview_url = update.preview_url
90
+ await save_config(config, config_path)
91
+
92
+ return {"preview_url": update.preview_url}
auto_coder_web/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.1.56"
1
+ __version__ = "0.1.57"
@@ -1,4 +1,4 @@
1
- import{m as et}from"./index-B6lJ3lzm.js";/*!-----------------------------------------------------------------------------
1
+ import{m as et}from"./index-BB-izReD.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1,4 +1,4 @@
1
- import{m as f}from"./index-B6lJ3lzm.js";/*!-----------------------------------------------------------------------------
1
+ import{m as f}from"./index-BB-izReD.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1,4 +1,4 @@
1
- import{m as l}from"./index-B6lJ3lzm.js";/*!-----------------------------------------------------------------------------
1
+ import{m as l}from"./index-BB-izReD.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1,4 +1,4 @@
1
- import{m as s}from"./index-B6lJ3lzm.js";/*!-----------------------------------------------------------------------------
1
+ import{m as s}from"./index-BB-izReD.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license
@@ -1,4 +1,4 @@
1
- import{m as lt}from"./index-B6lJ3lzm.js";/*!-----------------------------------------------------------------------------
1
+ import{m as lt}from"./index-BB-izReD.js";/*!-----------------------------------------------------------------------------
2
2
  * Copyright (c) Microsoft Corporation. All rights reserved.
3
3
  * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
4
4
  * Released under the MIT license