@yeaft/webchat-agent 0.1.33 → 0.1.34

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.
@@ -23,6 +23,17 @@ export async function processRoleOutput(session, roleName, roleQuery, roleState)
23
23
  if (message.type === 'system' && message.subtype === 'init') {
24
24
  roleState.claudeSessionId = message.session_id;
25
25
  console.log(`[Crew] ${roleName} session: ${message.session_id}`);
26
+
27
+ // Decision maker 的 system init 中捕获 slash_commands,发给前端用于 autocomplete
28
+ const roleConfig = session.roles.get(roleName);
29
+ if (roleConfig?.isDecisionMaker && message.slash_commands?.length > 0) {
30
+ console.log(`[Crew] ${roleName} slash commands: ${message.slash_commands.join(', ')}`);
31
+ sendCrewMessage({
32
+ type: 'slash_commands_update',
33
+ conversationId: session.id,
34
+ slashCommands: message.slash_commands
35
+ });
36
+ }
26
37
  continue;
27
38
  }
28
39
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.1.33",
3
+ "version": "0.1.34",
4
4
  "description": "Remote agent for Yeaft WebChat — connects worker machines to the central server",
5
5
  "main": "index.js",
6
6
  "type": "module",