Skip to content

feat: 为Remoter组件添加语音输入属性 - #537

Open
shenjunjian wants to merge 2 commits into
devfrom
shen/remoter-add-voice
Open

feat: 为Remoter组件添加语音输入属性#537
shenjunjian wants to merge 2 commits into
devfrom
shen/remoter-add-voice

Conversation

@shenjunjian

@shenjunjian shenjunjian commented Jul 31, 2026

Copy link
Copy Markdown
Collaborator

Pull Request (OpenTiny NEXT-SDKs)

allowSpeech 启用语言输入模式,默认值为 false

PR Gate 根据约定式标题判断类型(fix / feat / docs / …),并从本 PR 变更文件自动校验:Bug 须有复现测试,Feature 须同时有 Spec 与测试。
标签为兜底(与 auto-label 一致:bug / enhancement 等)。琐碎 Feature 可打 skip-spec(仅豁免 Spec);应急打 gate-bypass

Summary

What is the current behavior?

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

(可选。Issue 请用 GitHub 原生关联,无需手填路径。)

Summary by CodeRabbit

  • New Features
    • Added optional voice input to TinyRobotChat.
    • When enabled, users can send messages using a voice input button.
    • Voice input is disabled by default and can be enabled through the allowSpeech setting.
  • Documentation
    • Documented the new allowSpeech setting and its default value.

@github-actions github-actions Bot added the enhancement New feature or request label Jul 31, 2026
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

[ci-test-pass]

未改动测试相关源码(next-sdk / webmcp-cli),已跳过单元测试与浏览器 E2E。

  • Workflow: 查看日志
  • Commit: 3fce5c8f1b8b2a08b02a36ce7c9439f5262b635d
  • Unit: skipped
  • Browser: skipped

@coderabbitai

coderabbitai Bot commented Jul 31, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

TinyRobotChat now supports optional voice input through the allowSpeech prop. When enabled, it renders VoiceButton. The prop defaults to false, and the documentation describes this behavior.

Changes

Voice input support

Layer / File(s) Summary
Voice input prop and rendering
packages/next-remoter/src/components/TinyRobotChat.vue, docs/remoter/basic.md
TinyRobotChat imports and conditionally renders VoiceButton. The new allowSpeech prop defaults to false. The documentation describes the property.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: zzcr

Poem

A bunny taps a gentle key,
“Let voices hop in merrily!”
With allowSpeech set to true,
A voice button joins the queue.
With false, the chat stays still—
Neat and quiet by its will.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了为 Remoter 组件新增语音输入属性这一主要变更。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch shen/remoter-add-voice

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/remoter/basic.md`:
- Line 149: In the documentation entry for the `allowSpeech` parameter, update
the Chinese description text from "启用语言输入模式" to "启用语音输入功能" to correctly reflect
voice input functionality and align with the implementation terminology, while
keeping the default value and other parts of the description intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0bc69c26-7a37-4da9-9bdb-f633279a198f

📥 Commits

Reviewing files that changed from the base of the PR and between e78423d and 3fce5c8.

📒 Files selected for processing (2)
  • docs/remoter/basic.md
  • packages/next-remoter/src/components/TinyRobotChat.vue

Comment thread docs/remoter/basic.md
- `inBrowserExt` 设置组件运行于普通页面还是浏览器扩展,默认值为 `false`
- `genUiAble` 双向绑定是否启用生成式 UI 渲染,默认值为 `false`。输入框旁的「生成式 UI」开关是否显示由**当前模型配置**决定:仅当配置中同时包含 `baseURL` 和 `genuiUrl` 时才会显示
- `genUiComponents` 生成式 UI 已内置一批组件;如需支持额外组件,可通过该属性导入,例如:`shallowReactive({ TinyUser, TinyAlert })`
- `allowSpeech` 启用语言输入模式,默认值为 `false`

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use “语音输入” in the documentation.

allowSpeech enables voice input. Change 启用语言输入模式 to 启用语音输入功能 so the documentation matches the implementation and PR objective.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/remoter/basic.md` at line 149, In the documentation entry for the
`allowSpeech` parameter, update the Chinese description text from "启用语言输入模式" to
"启用语音输入功能" to correctly reflect voice input functionality and align with the
implementation terminology, while keeping the default value and other parts of
the description intact.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant