mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-07-17 11:07:11 +08:00
feat(cli): show project path in cow status
This commit is contained in:
@@ -275,7 +275,7 @@ def update(ctx):
|
|||||||
def status():
|
def status():
|
||||||
"""Show CowAgent running status."""
|
"""Show CowAgent running status."""
|
||||||
from cli import __version__
|
from cli import __version__
|
||||||
from cli.utils import load_config_json, get_cli_language
|
from cli.utils import load_config_json, get_cli_language, get_project_root
|
||||||
|
|
||||||
# get_cli_language() calls ensure_sys_path(), which adds the project root
|
# get_cli_language() calls ensure_sys_path(), which adds the project root
|
||||||
# to sys.path. Import `common` only AFTER that, otherwise it fails with
|
# to sys.path. Import `common` only AFTER that, otherwise it fails with
|
||||||
@@ -292,6 +292,11 @@ def status():
|
|||||||
|
|
||||||
click.echo(_t(f" 版本: v{__version__}", f" Version: v{__version__}"))
|
click.echo(_t(f" 版本: v{__version__}", f" Version: v{__version__}"))
|
||||||
|
|
||||||
|
# Project path bound to this `cow` CLI — disambiguates which checkout the
|
||||||
|
# command actually controls when the user has multiple clones.
|
||||||
|
project_root = get_project_root()
|
||||||
|
click.echo(_t(f" 路径: {project_root}", f" Path: {project_root}"))
|
||||||
|
|
||||||
cfg = load_config_json()
|
cfg = load_config_json()
|
||||||
if cfg:
|
if cfg:
|
||||||
channel = cfg.get("channel_type", "unknown")
|
channel = cfg.get("channel_type", "unknown")
|
||||||
|
|||||||
Reference in New Issue
Block a user