Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 4 additions & 16 deletions packages/extension-tools/src/plugins/group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@
schema = z.object({
userIds: z
.array(z.string())
.describe(

Check warning on line 60 in packages/extension-tools/src/plugins/group.ts

View check run for this annotation

codefactor.io / CodeFactor

packages/extension-tools/src/plugins/group.ts#L60

Replace `⏎················'User·IDs·to·mute·or·unmute,·one·or·more.'⏎············` with `'User·IDs·to·mute·or·unmute,·one·or·more.'` (prettier/prettier)

Check failure on line 60 in packages/extension-tools/src/plugins/group.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `⏎················'User·IDs·to·mute·or·unmute,·one·or·more.'⏎············` with `'User·IDs·to·mute·or·unmute,·one·or·more.'`
'The user ID(s) to mute. Can be one or multiple user IDs.'
'User IDs to mute or unmute, one or more.'
),
muteTime: z

Check warning on line 63 in packages/extension-tools/src/plugins/group.ts

View check run for this annotation

codefactor.io / CodeFactor

packages/extension-tools/src/plugins/group.ts#L63

Replace `⏎············.number()⏎············.describe(⏎················'Duration·in·seconds.·Use·0·to·unmute.'⏎············` with `.number().describe('Duration·in·seconds.·Use·0·to·unmute.'` (prettier/prettier)

Check failure on line 63 in packages/extension-tools/src/plugins/group.ts

View workflow job for this annotation

GitHub Actions / lint

Replace `⏎············.number()⏎············.describe(⏎················'Duration·in·seconds.·Use·0·to·unmute.'⏎············` with `.number().describe('Duration·in·seconds.·Use·0·to·unmute.'`
.number()
.describe(
'Mute duration in seconds, minimum 1 seconds, 0 to unmute'
'Duration in seconds. Use 0 to unmute.'
Comment thread
dingyi222666 marked this conversation as resolved.
),
operatorUserId: z
.string()
.optional()
.describe(
'The ID of the operator who initiated the action. Use 0 for model-initiated actions, -1 for unknown'
'The ID of the person who asked for this mute action. Use "0" when you decide to mute on your own. Use the actual user ID when a user explicitly asks you to mute someone else. If a user asks you to mute themselves, also use "0". Use "-1" only when the requester is unclear. If the tool says a user does not have permission, it means this requester does not have permission to ask for the mute.'
Comment thread
dingyi222666 marked this conversation as resolved.
)
})

Expand Down Expand Up @@ -141,17 +141,5 @@
return results.join('\n')
}

description = `Mutes or unmutes one or multiple users in the current group chat. This tool controls user speech permissions in the group.

Parameters:
- userIds: An array of user IDs to mute/unmute (e.g. ["123456", "789012"]). Can contain one or multiple IDs.
- muteTime: Duration in seconds. Use 0 to unmute, minimum 1 second for muting. Examples: 60 (1min), 300 (5min), 3600 (1hour)
- operatorUserId: IMPORTANT - The ID of who initiated this action:
* Set to "0" when YOU (the AI model) decide to mute based on your own judgment, system prompts, or content moderation rules
* Set to actual user ID when a user explicitly commands you to mute someone
* Set to "-1" if unknown/unclear who initiated the action

CRITICAL: When you autonomously decide to mute someone (e.g., for spam, inappropriate content, rule violations), you MUST set operatorUserId to "0". Only use actual user IDs when the user explicitly requested the mute action.

Returns: Per-user result messages (success or error), one per line.`
description = `Mute or unmute one or more users in the current group chat. Returns one result line per target user.`
}
Loading