vibego 0.2.56__py3-none-any.whl → 0.2.58__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.
bot.py CHANGED
@@ -880,8 +880,13 @@ def tmux_send_line(session: str, line: str):
880
880
  if idx < len(chunks) - 1:
881
881
  subprocess.check_call(_tmux_cmd(tmux, "send-keys", "-t", session, "C-j"))
882
882
  time.sleep(0.05)
883
- time.sleep(0.05)
883
+ is_claudecode = _is_claudecode_model()
884
+ time.sleep(0.2 if is_claudecode else 0.05)
884
885
  subprocess.check_call(_tmux_cmd(tmux, "send-keys", "-t", session, "C-m"))
886
+ if is_claudecode:
887
+ # Claude Code 会偶尔忽略首个 Enter,额外发送一次确保队列入列
888
+ time.sleep(0.1)
889
+ subprocess.check_call(_tmux_cmd(tmux, "send-keys", "-t", session, "C-m"))
885
890
 
886
891
 
887
892
  def resolve_path(path: Path | str) -> Path:
@@ -1344,6 +1349,36 @@ ATTACHMENT_USAGE_HINT = (
1344
1349
  _FS_SAFE_PATTERN = re.compile(r"[^A-Za-z0-9._-]")
1345
1350
 
1346
1351
 
1352
+ def _attachment_directory_prefix_for_display(relative_path: str) -> Optional[str]:
1353
+ """根据附件相对路径推导目录前缀,便于提示模型定位。"""
1354
+
1355
+ path_str = (relative_path or "").strip()
1356
+ if not path_str:
1357
+ return None
1358
+
1359
+ try:
1360
+ parent = Path(path_str).parent
1361
+ except Exception:
1362
+ return None
1363
+
1364
+ parent_str = parent.as_posix()
1365
+ if parent_str in {"", "."}:
1366
+ if path_str.startswith("./"):
1367
+ parent_str = "./"
1368
+ elif path_str.startswith("/"):
1369
+ parent_str = "/"
1370
+ else:
1371
+ return None
1372
+ else:
1373
+ if path_str.startswith("./") and not parent_str.startswith(("./", "/")):
1374
+ parent_str = f"./{parent_str}"
1375
+
1376
+ if not parent_str.endswith("/"):
1377
+ parent_str = f"{parent_str}/"
1378
+
1379
+ return parent_str
1380
+
1381
+
1347
1382
  def _sanitize_fs_component(value: str, fallback: str) -> str:
1348
1383
  """清理路径片段中的特殊字符,避免越权访问。"""
1349
1384
 
@@ -1628,7 +1663,15 @@ def _build_prompt_with_attachments(
1628
1663
  if base_text:
1629
1664
  sections.append(base_text)
1630
1665
  if attachments:
1631
- lines = ["附件列表(文件位于项目工作目录,可直接读取):"]
1666
+ directory_hint: Optional[str] = None
1667
+ for item in attachments:
1668
+ directory_hint = _attachment_directory_prefix_for_display(item.relative_path)
1669
+ if directory_hint:
1670
+ break
1671
+ if directory_hint:
1672
+ lines = [f"附件列表(文件位于项目工作目录({directory_hint}),可直接读取):"]
1673
+ else:
1674
+ lines = ["附件列表(文件位于项目工作目录,可直接读取):"]
1632
1675
  for idx, item in enumerate(attachments, 1):
1633
1676
  lines.append(
1634
1677
  f"{idx}. {item.display_name}({item.mime_type})→ {item.relative_path}"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: vibego
3
- Version: 0.2.56
3
+ Version: 0.2.58
4
4
  Summary: vibego CLI:用于初始化与管理 Telegram Master Bot 的工具
5
5
  Author: Hypha
6
6
  License-Expression: LicenseRef-Proprietary
@@ -1,4 +1,4 @@
1
- bot.py,sha256=61C8rX5QSAEW2k-uo07-1fsAkxzPHQU_pIK8sNv3Yno,290330
1
+ bot.py,sha256=LeIW6qALoSPlO38DgebRS5vNimxI89ihV4PtrBQzNy0,291820
2
2
  logging_setup.py,sha256=gvxHi8mUwK3IhXJrsGNTDo-DR6ngkyav1X-tvlBF_IE,4613
3
3
  master.py,sha256=Jwxf6I94jOADzb9Xio1wb-tWy5wgQ9PlmdpKW4mhQMg,117114
4
4
  project_repository.py,sha256=UcthtSGOJK0cTE5bQCneo3xkomRG-kyc1N1QVqxeHIs,17577
@@ -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=QFEe29DY2UJ5zPJ4ZaUjupZTUDyDW8bEYxjvErxtMr0,311
429
+ vibego_cli/__init__.py,sha256=Dq3Z2BpT6XWvQnGANbkzO3FY4VRtqY6CVwc_o3cjB1I,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.56.dist-info/METADATA,sha256=2jRuQcO_K3wbOi441F0MHDxuJKJ0GB3t4UM9BzpzDck,10519
436
- vibego-0.2.56.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
437
- vibego-0.2.56.dist-info/entry_points.txt,sha256=Lsy_zm-dlyxt8-9DL9blBReIwU2k22c8-kifr46ND1M,48
438
- vibego-0.2.56.dist-info/top_level.txt,sha256=R56CT3nW5H5v3ce0l3QDN4-C4qxTrNWzRTwrxnkDX4U,69
439
- vibego-0.2.56.dist-info/RECORD,,
435
+ vibego-0.2.58.dist-info/METADATA,sha256=eC-iJRkEcX9xYV5rYvrGPlOVaxXaDHsIXHzBFPpwtgE,10519
436
+ vibego-0.2.58.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
437
+ vibego-0.2.58.dist-info/entry_points.txt,sha256=Lsy_zm-dlyxt8-9DL9blBReIwU2k22c8-kifr46ND1M,48
438
+ vibego-0.2.58.dist-info/top_level.txt,sha256=R56CT3nW5H5v3ce0l3QDN4-C4qxTrNWzRTwrxnkDX4U,69
439
+ vibego-0.2.58.dist-info/RECORD,,
vibego_cli/__init__.py CHANGED
@@ -7,6 +7,6 @@ from __future__ import annotations
7
7
 
8
8
  __all__ = ["main", "__version__"]
9
9
 
10
- __version__ = "0.2.56"
10
+ __version__ = "0.2.58"
11
11
 
12
12
  from .main import main # noqa: E402