vibego 0.2.46__py3-none-any.whl → 0.2.48__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.
Potentially problematic release.
This version of vibego might be problematic. Click here for more details.
- master.py +33 -0
- {vibego-0.2.46.dist-info → vibego-0.2.48.dist-info}/METADATA +1 -1
- {vibego-0.2.46.dist-info → vibego-0.2.48.dist-info}/RECORD +7 -7
- vibego_cli/__init__.py +1 -1
- {vibego-0.2.46.dist-info → vibego-0.2.48.dist-info}/WHEEL +0 -0
- {vibego-0.2.46.dist-info → vibego-0.2.48.dist-info}/entry_points.txt +0 -0
- {vibego-0.2.46.dist-info → vibego-0.2.48.dist-info}/top_level.txt +0 -0
master.py
CHANGED
|
@@ -2334,6 +2334,18 @@ async def on_project_action(callback: CallbackQuery, state: FSMContext) -> None:
|
|
|
2334
2334
|
await manager.stop_all(update_state=True)
|
|
2335
2335
|
log.info("按钮操作成功: user=%s 停止全部项目", user_id)
|
|
2336
2336
|
elif action == "start_all":
|
|
2337
|
+
# 为所有项目自动记录启动者的 chat_id
|
|
2338
|
+
if callback.message and callback.message.chat:
|
|
2339
|
+
for project_cfg in manager.configs:
|
|
2340
|
+
current_state = manager.state_store.data.get(project_cfg.project_slug)
|
|
2341
|
+
if not current_state or not current_state.chat_id:
|
|
2342
|
+
manager.update_chat_id(project_cfg.project_slug, callback.message.chat.id)
|
|
2343
|
+
log.info(
|
|
2344
|
+
"自动记录 chat_id: project=%s, chat_id=%s",
|
|
2345
|
+
project_cfg.project_slug,
|
|
2346
|
+
callback.message.chat.id,
|
|
2347
|
+
extra={"project": project_cfg.project_slug, "chat_id": callback.message.chat.id},
|
|
2348
|
+
)
|
|
2337
2349
|
await manager.run_all()
|
|
2338
2350
|
log.info("按钮操作成功: user=%s 启动全部项目", user_id)
|
|
2339
2351
|
await callback.answer("全部项目已启动,正在刷新列表…")
|
|
@@ -2350,6 +2362,17 @@ async def on_project_action(callback: CallbackQuery, state: FSMContext) -> None:
|
|
|
2350
2362
|
log.info("按钮操作成功: user=%s 重启 master", user_id)
|
|
2351
2363
|
return # 重启后不刷新项目列表,避免产生额外噪音
|
|
2352
2364
|
elif action == "run":
|
|
2365
|
+
# 自动记录启动者的 chat_id
|
|
2366
|
+
if callback.message and callback.message.chat:
|
|
2367
|
+
current_state = manager.state_store.data.get(cfg.project_slug)
|
|
2368
|
+
if not current_state or not current_state.chat_id:
|
|
2369
|
+
manager.update_chat_id(cfg.project_slug, callback.message.chat.id)
|
|
2370
|
+
log.info(
|
|
2371
|
+
"自动记录 chat_id: project=%s, chat_id=%s",
|
|
2372
|
+
cfg.project_slug,
|
|
2373
|
+
callback.message.chat.id,
|
|
2374
|
+
extra={"project": cfg.project_slug, "chat_id": callback.message.chat.id},
|
|
2375
|
+
)
|
|
2353
2376
|
chosen = await manager.run_worker(cfg)
|
|
2354
2377
|
log.info(
|
|
2355
2378
|
"按钮操作成功: user=%s 启动 %s (model=%s)",
|
|
@@ -2413,6 +2436,16 @@ async def on_project_action(callback: CallbackQuery, state: FSMContext) -> None:
|
|
|
2413
2436
|
state = manager.state_store.data.get(cfg.project_slug)
|
|
2414
2437
|
previous_model = state.model if state else cfg.default_model
|
|
2415
2438
|
was_running = bool(state and state.status == "running")
|
|
2439
|
+
# 自动记录 chat_id(如果还没有的话)
|
|
2440
|
+
if callback.message and callback.message.chat:
|
|
2441
|
+
if not state or not state.chat_id:
|
|
2442
|
+
manager.update_chat_id(cfg.project_slug, callback.message.chat.id)
|
|
2443
|
+
log.info(
|
|
2444
|
+
"模型切换时自动记录 chat_id: project=%s, chat_id=%s",
|
|
2445
|
+
cfg.project_slug,
|
|
2446
|
+
callback.message.chat.id,
|
|
2447
|
+
extra={"project": cfg.project_slug, "chat_id": callback.message.chat.id},
|
|
2448
|
+
)
|
|
2416
2449
|
try:
|
|
2417
2450
|
if was_running:
|
|
2418
2451
|
await manager.stop_worker(cfg, update_state=True)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
bot.py,sha256=TthqY_Rvndzd3pgLH6lvPcsDXQbwkuMfB4W9qt_Li8I,273832
|
|
2
2
|
logging_setup.py,sha256=gvxHi8mUwK3IhXJrsGNTDo-DR6ngkyav1X-tvlBF_IE,4613
|
|
3
|
-
master.py,sha256=
|
|
3
|
+
master.py,sha256=Jwxf6I94jOADzb9Xio1wb-tWy5wgQ9PlmdpKW4mhQMg,117114
|
|
4
4
|
project_repository.py,sha256=UcthtSGOJK0cTE5bQCneo3xkomRG-kyc1N1QVqxeHIs,17577
|
|
5
5
|
scripts/__init__.py,sha256=LVrXUkvWKoc6Sb47X5G0gbIxu5aJ2ARW-qJ14vwi5vM,65
|
|
6
6
|
scripts/bump_version.sh,sha256=a4uB8V8Y5LPsoqTCdzQKsEE8HhwpBmqRaQInG52LDig,4089
|
|
@@ -426,14 +426,14 @@ tasks/constants.py,sha256=tS1kZxBIUm3JJUMHm25XI-KHNUZl5NhbbuzjzL_rF-c,299
|
|
|
426
426
|
tasks/fsm.py,sha256=rKXXLEieQQU4r2z_CZUvn1_70FXiZXBBugF40gpe_tQ,1476
|
|
427
427
|
tasks/models.py,sha256=N_qqRBo9xMSV0vbn4k6bLBXT8C_dp_oTFUxvdx16ZQM,2459
|
|
428
428
|
tasks/service.py,sha256=w_S_aWiVqRXzXEpimLDsuCCCX2lB5uDkff9aKThBw9c,41916
|
|
429
|
-
vibego_cli/__init__.py,sha256=
|
|
429
|
+
vibego_cli/__init__.py,sha256=DGfiqkdMTlgH2-8lPQOmWEuGr8wZ6SIRF-liUWFJBAY,311
|
|
430
430
|
vibego_cli/__main__.py,sha256=qqTrYmRRLe4361fMzbI3-CqpZ7AhTofIHmfp4ykrrBY,158
|
|
431
431
|
vibego_cli/config.py,sha256=VxkPJMq01tA3h3cOkH-z_tiP7pMgfSGGicRvUnCWkhI,3054
|
|
432
432
|
vibego_cli/deps.py,sha256=1nRXI7Dd-S1hYE8DligzK5fIluQWETRUj4_OKL0DikQ,1419
|
|
433
433
|
vibego_cli/main.py,sha256=X__NXwZnIDIFbdKSTbNyZgZHKcPlN0DQz9sqTI1aQ9E,12158
|
|
434
434
|
vibego_cli/data/worker_requirements.txt,sha256=QSt30DSSSHtfucTFPpc7twk9kLS5rVLNTcvDiagxrZg,62
|
|
435
|
-
vibego-0.2.
|
|
436
|
-
vibego-0.2.
|
|
437
|
-
vibego-0.2.
|
|
438
|
-
vibego-0.2.
|
|
439
|
-
vibego-0.2.
|
|
435
|
+
vibego-0.2.48.dist-info/METADATA,sha256=zT_iactX1_Abyds5pg5gEg8uGpSqo9RCgidsfMTEdf0,10519
|
|
436
|
+
vibego-0.2.48.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
437
|
+
vibego-0.2.48.dist-info/entry_points.txt,sha256=Lsy_zm-dlyxt8-9DL9blBReIwU2k22c8-kifr46ND1M,48
|
|
438
|
+
vibego-0.2.48.dist-info/top_level.txt,sha256=R56CT3nW5H5v3ce0l3QDN4-C4qxTrNWzRTwrxnkDX4U,69
|
|
439
|
+
vibego-0.2.48.dist-info/RECORD,,
|
vibego_cli/__init__.py
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|