@yeaft/webchat-agent 0.1.32 → 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
 
@@ -110,7 +110,6 @@ export async function createRoleQuery(session, roleName) {
110
110
 
111
111
  const queryOptions = {
112
112
  cwd: roleCwd,
113
- projectDir: session.projectDir,
114
113
  permissionMode: 'bypassPermissions',
115
114
  abort: abortController.signal,
116
115
  model: role.model || undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yeaft/webchat-agent",
3
- "version": "0.1.32",
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",
package/sdk/query.js CHANGED
@@ -272,7 +272,6 @@ export function query(config) {
272
272
  appendSystemPrompt,
273
273
  customSystemPrompt,
274
274
  cwd,
275
- projectDir,
276
275
  disallowedTools = [],
277
276
  maxTurns,
278
277
  permissionMode = 'default',
@@ -302,7 +301,6 @@ export function query(config) {
302
301
  if (allowedTools.length > 0) args.push('--allowedTools', ...allowedTools);
303
302
  if (disallowedTools.length > 0) args.push('--disallowedTools', ...disallowedTools);
304
303
  if (permissionMode) args.push('--permission-mode', permissionMode);
305
- if (projectDir) args.push('--project', projectDir);
306
304
 
307
305
  // Handle prompt input
308
306
  if (typeof prompt === 'string') {