feat: openclaw-style secrets (env.vars + \) and per-task model routing
- Replace python-dotenv with config.json env.vars block + \ substitution - Add models section for per-task model routing (heartbeat, subagent, default) - Heartbeat/subagent tasks can use different models/providers than main chat - Remove python-dotenv from dependencies - Update all docs to reflect new config approach - Reorganize docs into project/ and research/ subdirectories
This commit is contained in:
10
main.py
10
main.py
@@ -214,6 +214,15 @@ def ai_handler(msg: IncomingMessage) -> str:
|
||||
if cmd in ("sessions",):
|
||||
return _format_sessions()
|
||||
|
||||
# Reset session for this conversation
|
||||
if cmd in ("new", "reset"):
|
||||
cleared = _runtime.reset_session(msg.conversation_id)
|
||||
if _hook_mgr:
|
||||
_hook_mgr.trigger(HookEvent(type="command", action="new"))
|
||||
if cleared:
|
||||
return "🆕 Session cleared — next message starts a fresh conversation."
|
||||
return "🆕 No active session to clear — already starting fresh."
|
||||
|
||||
# Cron management commands
|
||||
if cmd.startswith("cron"):
|
||||
return _handle_cron_command(cmd)
|
||||
@@ -1606,6 +1615,7 @@ def _format_help() -> str:
|
||||
"• `help` — This help message\n"
|
||||
"• `time` — Server time\n"
|
||||
"• `sessions` — Active session count\n"
|
||||
"• `new` / `reset` — Start a fresh conversation (clears session)\n"
|
||||
"• `reload` — Reload config and skills\n"
|
||||
"\n"
|
||||
"*Runtime:*\n"
|
||||
|
||||
Reference in New Issue
Block a user