Files
clawpanel/src-tauri/src
晴天 30691c68cb fix(hermes): make hermes_venv_python aware of uv-tool default install path
hermes_venv_python() only looked at \HERMES_PYTHON\ and \~/.hermes-venv\
(the uv-pip layout), but ClawPanel's default \install_hermes\ runs
\uv tool install\ and lands the Python at
\<uv tool dir>/hermes-agent/{Scripts,bin}/python\. Result: any code path
that funnels through \
un_venv_python_json\ — most importantly the
'可选依赖管理 / Optional Dependencies' page (hermes_lazy_deps_*) — refused
to start with 'Hermes venv 未找到(~/.hermes-venv 不存在)。请先安装 Hermes。',
even on machines where Hermes was already installed and Profile / Channels /
Dashboard pages worked fine.

Refactor:
  - Extract \hermes_uv_tool_root()\ (resolves \<uv tool dir>/hermes-agent\).
  - Add \hermes_uv_tool_python()\ (returns Scripts/python.exe on Windows,
    bin/python on Unix).
  - Reuse \hermes_uv_tool_root()\ from the existing
    \locate_hermes_cli_package_dir()\ so the two helpers share one source
    of truth.
  - \hermes_venv_python()\ now falls through to the uv-tool path after
    \HERMES_PYTHON\ and \~/.hermes-venv\. Error message updated to list
    every probed location so users on truly-uninstalled machines still get
    actionable feedback.

Verified end-to-end: the actual installed venv at
\%APPDATA%/uv/tools/hermes-agent/Scripts/python.exe\ runs
\rom tools.lazy_deps import LAZY_DEPS\ cleanly and reports 25 features.
2026-05-28 09:16:58 +08:00
..
2026-04-11 04:45:58 +08:00
2026-05-22 20:42:16 +08:00