@yeaft/webchat-agent 0.1.307 → 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.
package/crew/role-query.js
CHANGED
|
@@ -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
|
|
145
|
-
|
|
146
|
-
|
|
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 || [];
|