evolclaw 2.0.5 → 2.0.7
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/README.md +6 -6
- package/dist/core/session-manager.js +6 -1
- package/dist/utils/platform.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -71,7 +71,7 @@ MessageProcessor.processMessage()
|
|
|
71
71
|
|
|
72
72
|
### 环境要求
|
|
73
73
|
|
|
74
|
-
- **操作系统**:macOS / Linux
|
|
74
|
+
- **操作系统**:macOS / Linux / Windows
|
|
75
75
|
- **Node.js** >= 22(需要 node:sqlite 内置模块支持)
|
|
76
76
|
- **Claude Code** >= 2.1.32(`npm install -g @anthropic-ai/claude-code`)
|
|
77
77
|
|
|
@@ -83,6 +83,8 @@ MessageProcessor.processMessage()
|
|
|
83
83
|
npm install -g evolclaw
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
+
> **Windows 用户**:首次运行前可能需要执行 `Set-ExecutionPolicy RemoteSigned -Scope CurrentUser`
|
|
87
|
+
|
|
86
88
|
**从源码安装**:
|
|
87
89
|
|
|
88
90
|
```bash
|
|
@@ -111,7 +113,7 @@ evolclaw init wechat
|
|
|
111
113
|
- 渠道选择(飞书/微信)并扫码登录
|
|
112
114
|
- 默认项目路径
|
|
113
115
|
- 模型选择(sonnet/opus/haiku)
|
|
114
|
-
- 自动写入 `EVOLCLAW_HOME` 到 shell profile
|
|
116
|
+
- 自动写入 `EVOLCLAW_HOME` 到 shell profile(Unix)或用户环境变量(Windows)
|
|
115
117
|
|
|
116
118
|
配置文件生成在 `{EVOLCLAW_HOME}/data/evolclaw.json`(默认 `~/.evolclaw/data/evolclaw.json`)。
|
|
117
119
|
|
|
@@ -159,8 +161,6 @@ npm test
|
|
|
159
161
|
|
|
160
162
|
```
|
|
161
163
|
evolclaw/
|
|
162
|
-
├── bin/
|
|
163
|
-
│ └── evolclaw # CLI 入口(npm link)
|
|
164
164
|
├── src/
|
|
165
165
|
│ ├── core/
|
|
166
166
|
│ │ ├── command-handler.ts # 斜杠命令处理
|
|
@@ -225,8 +225,8 @@ evolclaw/
|
|
|
225
225
|
|
|
226
226
|
## TODO
|
|
227
227
|
|
|
228
|
-
- [
|
|
229
|
-
- [
|
|
228
|
+
- [x] Windows 系统 CLI 命令支持
|
|
229
|
+
- [x] 微信插件支持图片/文件的收发
|
|
230
230
|
- [ ] 自动授权可配置(自动放行/自动拒绝)
|
|
231
231
|
- [ ] 手动授权支持(飞书卡片/文本回复)
|
|
232
232
|
- [ ] ACP 协议支持(接入 Codex / Gemini CLI)
|
|
@@ -486,7 +486,12 @@ export class SessionManager {
|
|
|
486
486
|
for (const line of lines) {
|
|
487
487
|
const event = JSON.parse(line);
|
|
488
488
|
if (event.type === 'user' && event.message?.role === 'user') {
|
|
489
|
-
|
|
489
|
+
// Only count real user input, skip auto-generated tool_result messages
|
|
490
|
+
const content = event.message.content;
|
|
491
|
+
const isToolResult = Array.isArray(content) && content.every((c) => c.type === 'tool_result');
|
|
492
|
+
if (!isToolResult) {
|
|
493
|
+
turns++;
|
|
494
|
+
}
|
|
490
495
|
}
|
|
491
496
|
// 提取会话标题(从 session 元数据中)
|
|
492
497
|
if (event.title && !title) {
|
package/dist/utils/platform.js
CHANGED
|
@@ -9,10 +9,10 @@ export const isWindows = process.platform === 'win32';
|
|
|
9
9
|
* Encode project path as directory name (Claude SDK convention).
|
|
10
10
|
* Replace all path separators with '-'.
|
|
11
11
|
* e.g. /home/user/project -> -home-user-project
|
|
12
|
-
* C:\Users\project -> C
|
|
12
|
+
* C:\Users\project -> C--Users-project
|
|
13
13
|
*/
|
|
14
14
|
export function encodePath(projectPath) {
|
|
15
|
-
return projectPath.replace(/[
|
|
15
|
+
return projectPath.replace(/[/\\:]/g, '-');
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
18
|
* Cross-platform process liveness check.
|
package/package.json
CHANGED