Skip to content

docs(extension-tools): clarify group mute operator hints#811

Open
CookSleep wants to merge 1 commit intoChatLunaLab:v1-devfrom
CookSleep:docs/group-mute-operator-hint
Open

docs(extension-tools): clarify group mute operator hints#811
CookSleep wants to merge 1 commit intoChatLunaLab:v1-devfrom
CookSleep:docs/group-mute-operator-hint

Conversation

@CookSleep
Copy link
Copy Markdown
Member

Summary

  • 收紧 GroupMuteTool 的描述文本,去掉过长的参数说明块
  • 明确 operatorUserId 的说明文案,补充模型自主操作、用户要求别人禁言、用户要求禁言自己等场景提示

Verification

  • 未运行额外构建,属于单文件说明文案调整

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 3, 2026

Warning

Rate limit exceeded

@CookSleep has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 11 minutes and 1 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 11 minutes and 1 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 48538072-7595-49fb-88a9-f58c6e335662

📥 Commits

Reviewing files that changed from the base of the PR and between 086a1f7 and cab921c.

📒 Files selected for processing (1)
  • packages/extension-tools/src/plugins/group.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the GroupMuteTool by refining the Zod schema descriptions for its parameters and simplifying the class-level description. The feedback highlights a discrepancy where the "minimum 1 second" constraint was removed from the documentation despite still being enforced in the code, and it suggests making the operatorUserId field mandatory or providing a default value to prevent potential runtime errors when the field is omitted.

.number()
.describe(
'Mute duration in seconds, minimum 1 seconds, 0 to unmute'
'Duration in seconds. Use 0 to unmute.'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

描述中删除了 “minimum 1 seconds” 的限制说明,但代码第 102 行的错误提示中仍然提到了这一限制。如果系统确实要求禁言时长至少为 1 秒(非 0 时),建议在提示词中保留此信息,以避免模型生成无效的参数值(例如 0.5)。

Suggested change
'Duration in seconds. Use 0 to unmute.'
'Duration in seconds. Use 0 to unmute, minimum 1 second for muting.'

.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.'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

更新后的描述非常详尽,有助于模型理解。不过,由于 operatorUserId 在第 70 行被定义为 .optional(),模型可能会选择不提供该参数。目前的逻辑(第 95-98 行)在处理 undefined 时会返回包含 “User undefined” 的错误信息。建议将该字段设为必填,或者在代码中为其提供默认值(如 '0'),以增强健壮性。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant