fix: status command now respects workspace from config
The status command was ignoring the workspace setting from the configuration file and always displaying the default path (~/.nanobot/workspace). This fix loads the config first and uses config.workspace_path when available, falling back to the default only when no config exists. This brings the status command in line with other commands that correctly use config.workspace_path.
This commit is contained in:
parent
30d6e4b4b6
commit
cd20252072
@ -611,15 +611,21 @@ def status():
|
|||||||
from nanobot.utils.helpers import get_workspace_path
|
from nanobot.utils.helpers import get_workspace_path
|
||||||
|
|
||||||
config_path = get_config_path()
|
config_path = get_config_path()
|
||||||
workspace = get_workspace_path()
|
|
||||||
|
# Load config first to get the correct workspace path
|
||||||
|
if config_path.exists():
|
||||||
|
config = load_config()
|
||||||
|
workspace = config.workspace_path
|
||||||
|
else:
|
||||||
|
config = None
|
||||||
|
workspace = get_workspace_path()
|
||||||
|
|
||||||
console.print(f"{__logo__} nanobot Status\n")
|
console.print(f"{__logo__} nanobot Status\n")
|
||||||
|
|
||||||
console.print(f"Config: {config_path} {'[green]✓[/green]' if config_path.exists() else '[red]✗[/red]'}")
|
console.print(f"Config: {config_path} {'[green]✓[/green]' if config_path.exists() else '[red]✗[/red]'}")
|
||||||
console.print(f"Workspace: {workspace} {'[green]✓[/green]' if workspace.exists() else '[red]✗[/red]'}")
|
console.print(f"Workspace: {workspace} {'[green]✓[/green]' if workspace.exists() else '[red]✗[/red]'}")
|
||||||
|
|
||||||
if config_path.exists():
|
if config is not None:
|
||||||
config = load_config()
|
|
||||||
console.print(f"Model: {config.agents.defaults.model}")
|
console.print(f"Model: {config.agents.defaults.model}")
|
||||||
|
|
||||||
# Check API keys
|
# Check API keys
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user