From f5fc6dbd145bb9f9e41b5845c1ad6a91c37f7cac Mon Sep 17 00:00:00 2001 From: Daniel Eder Date: Sun, 28 Sep 2025 10:37:34 +0200 Subject: [PATCH] refactor: renamed tool related env vars to TOOL --- README.md | 4 ++-- app.py | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ef7d0fa..f3b3cb9 100644 --- a/README.md +++ b/README.md @@ -53,8 +53,8 @@ All variables can be placed in the `.env` file (one `KEY=value` per line) or pro | `MISTLE_PASSWORD` | ❌ | Password sent after the username. Leave blank for manual entry. | | `MISTLE_LOGIN_PROMPT` | ❌ | Prompt string that signals the client to send credentials (e.g., `"Name:"`). When omitted, the client just waits for the initial banner. | | `MISTLE_EXIT_COMMAND` | ❌ | Command issued during graceful shutdown (after pressing `Ctrl-C`). Useful for `quit`/`save` macros. | -| `MISTLE_TOOL_MODE` | ❌ | Enable full-time tool thread when set to truthy values (`1`, `true`, `yes`, `on`). Defaults to interactive-only mode. (`MISTLE_AGENT_MODE` still works as a backwards-compatible alias.) | -| `MISTLE_TOOL` | ❌ | Select which tool class to instantiate when tool mode is active. Accepted values: `simple` (default), `explore`, `communication`, `movement`, `intelligent`/`intelligentcommunication` (LLM-backed), or custom spec `module:ClassName`. (`MISTLE_AGENT` remains as a legacy alias.) | +| `MISTLE_TOOL_MODE` | ❌ | Enable full-time tool thread when set to truthy values (`1`, `true`, `yes`, `on`). Defaults to interactive-only mode. | +| `MISTLE_TOOL` | ❌ | Select which tool class to instantiate when tool mode is active. Accepted values: `simple` (default), `explore`, `communication`, `movement`, `intelligent`/`intelligentcommunication` (LLM-backed), or custom spec `module:ClassName`. | | `MISTLE_LLM_MODEL` | ❌ | Override the `litellm` model used by the intelligent tool (defaults to `mistral/mistral-small-2407`). | | `MISTRAL_API_KEY` | ❌ | API key used by `IntelligentCommunicationTool` (via `litellm`) when calling the `mistral/mistral-small-2407` model. | diff --git a/app.py b/app.py index a6412a0..91e2822 100644 --- a/app.py +++ b/app.py @@ -326,14 +326,10 @@ def main() -> int: password = os.environ.get("MISTLE_PASSWORD", "") login_prompt = os.environ.get("MISTLE_LOGIN_PROMPT", "") exit_command = os.environ.get("MISTLE_EXIT_COMMAND", "") - tool_mode_env = os.environ.get("MISTLE_TOOL_MODE") - if tool_mode_env is None: - tool_mode_env = os.environ.get("MISTLE_AGENT_MODE", "") + tool_mode_env = os.environ.get("MISTLE_TOOL_MODE", "") tool_mode = tool_mode_env.lower() in {"1", "true", "yes", "on"} - tool_spec = os.environ.get("MISTLE_TOOL") - if tool_spec is None: - tool_spec = os.environ.get("MISTLE_AGENT", "") + tool_spec = os.environ.get("MISTLE_TOOL", "") state = SessionState() stop_event = Event()