cliclaw 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cli.js +2 -2
- package/package.json +1 -1
- package/src/handlers/messages.ts +1 -1
package/bin/cli.js
CHANGED
|
@@ -284,11 +284,11 @@ function cmdUpdate() {
|
|
|
284
284
|
// directory during scanning). Try normally first; if EBUSY, fall back to
|
|
285
285
|
// pack + extract + copy-in-place (no directory rename needed).
|
|
286
286
|
try {
|
|
287
|
-
|
|
287
|
+
execSync('npm install -g cliclaw@latest', { stdio: 'pipe', encoding: 'utf8' })
|
|
288
288
|
updated = true
|
|
289
289
|
} catch (e) {
|
|
290
290
|
const msg = (e.stdout || '') + (e.stderr || '') + (e.message || '')
|
|
291
|
-
if (!msg.includes('EBUSY')) throw e
|
|
291
|
+
if (!msg.includes('EBUSY') && !String(e.status || '').includes('4082')) throw e
|
|
292
292
|
|
|
293
293
|
warn('EBUSY detected (Windows Defender lock) — using fallback install...')
|
|
294
294
|
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), 'cliclaw-upd-'))
|
package/package.json
CHANGED
package/src/handlers/messages.ts
CHANGED
|
@@ -106,7 +106,7 @@ export function registerMessageHandler(bot: Bot<Context>, storage: Storage, conf
|
|
|
106
106
|
result = await askCodex(session, text,
|
|
107
107
|
(id) => storage.setCodexThreadId(chatId, session!.id, id))
|
|
108
108
|
}
|
|
109
|
-
response = result.usage ? result.text + formatUsage(result.usage) : result.text
|
|
109
|
+
response = (isFirstMessage && result.usage) ? result.text + formatUsage(result.usage) : result.text
|
|
110
110
|
} catch (err: any) {
|
|
111
111
|
response = `\u274c ${lang === 'pt' ? 'Erro' : 'Error'}: ${err.message}`
|
|
112
112
|
} finally {
|