@yeaft/webchat-agent 0.1.308 → 0.1.309

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.
@@ -70,6 +70,10 @@ export async function handleMessage(msg) {
70
70
  await createConversation(msg);
71
71
  break;
72
72
 
73
+ case 'request_slash_commands':
74
+ preloadSlashCommands().catch(() => {});
75
+ break;
76
+
73
77
  case 'check_crew_context':
74
78
  handleCheckCrewContext(msg);
75
79
  break;
@@ -141,9 +141,11 @@ async function _createRoleQueryInner(session, roleName) {
141
141
  // 尝试加载之前保存的 sessionId
142
142
  const savedSessionId = await loadRoleSessionId(session.sharedDir, roleName);
143
143
 
144
- // cwd 设为角色目录(确保目录存在,否则 spawn() 会报误导性的 ENOENT)
145
- const roleCwd = join(session.sharedDir, 'roles', roleName);
146
- mkdirSync(roleCwd, { recursive: true });
144
+ // cwd 设为项目目录(确保 Claude CLI 能匹配项目级 MCP 配置)
145
+ // 角色的 CLAUDE.md 和工作路径已通过 appendSystemPrompt 注入
146
+ const roleCwd = session.projectDir || join(session.sharedDir, 'roles', roleName);
147
+ const roleDir = join(session.sharedDir, 'roles', roleName);
148
+ mkdirSync(roleDir, { recursive: true });
147
149
 
148
150
  // 继承全局 MCP disallowedTools,避免不必要的 tool schema token 消耗
149
151
  const globalDisallowed = ctx.CONFIG?.disallowedTools || [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.1.308",
3
+ "version": "0.1.309",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",