v1.5.2: Fix PowerShell CLI + Enforce QwenClaw as Always-ON Agent
This commit is contained in:
22
bin/qwenclaw.cmd
Normal file
22
bin/qwenclaw.cmd
Normal file
@@ -0,0 +1,22 @@
|
||||
@echo off
|
||||
REM QwenClaw CLI Command Wrapper for Windows
|
||||
REM Usage: qwenclaw [command] [options]
|
||||
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
REM Get script directory
|
||||
set "SCRIPT_DIR=%~dp0"
|
||||
set "QWENCLAW_DIR=%SCRIPT_DIR%.."
|
||||
|
||||
REM Check if bun is available
|
||||
where bun >nul 2>nul
|
||||
if %errorlevel% neq 0 (
|
||||
echo [ERROR] bun is not installed or not in PATH
|
||||
echo Install bun from: https://bun.sh/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
REM Execute qwenclaw CLI
|
||||
bun run "%QWENCLAW_DIR%\bin\qwenclaw.js" %*
|
||||
|
||||
endlocal
|
||||
@@ -20,7 +20,8 @@ import { fileURLToPath } from "url";
|
||||
import { existsSync, readFileSync } from "fs";
|
||||
|
||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||
const QWENCLAW_DIR = join(__dirname, "..");
|
||||
// Use absolute path to qwenclaw installation
|
||||
const QWENCLAW_DIR = process.env.QWENCLAW_DIR || join(__dirname, "..");
|
||||
const QWENCLAW_START = join(QWENCLAW_DIR, "src", "index.ts");
|
||||
|
||||
// Colors for terminal output
|
||||
|
||||
Reference in New Issue
Block a user