@yeaft/webchat-agent 0.1.249 → 0.1.250
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 +8 -9
- package/package.json +1 -1
package/crew/role-query.js
CHANGED
|
@@ -160,15 +160,14 @@ async function _createRoleQueryInner(session, roleName) {
|
|
|
160
160
|
...(effectiveDisallowed.length > 0 && { disallowedTools: effectiveDisallowed })
|
|
161
161
|
};
|
|
162
162
|
|
|
163
|
-
//
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
163
|
+
// Intercept AskUserQuestion for all roles — forward to Web UI for interactive answering.
|
|
164
|
+
// Without this, non-DM roles' AskCard buttons stay disabled (no askRequestId).
|
|
165
|
+
queryOptions.canCallTool = async (toolName, input, toolCtx) => {
|
|
166
|
+
if (toolName === 'AskUserQuestion') {
|
|
167
|
+
return await handleAskUserQuestion(session.id, input, toolCtx);
|
|
168
|
+
}
|
|
169
|
+
return input;
|
|
170
|
+
};
|
|
172
171
|
|
|
173
172
|
if (savedSessionId) {
|
|
174
173
|
queryOptions.resume = savedSessionId;
|