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
23 changes: 13 additions & 10 deletions packages/web-shell/client/components/ChatEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ export type ComposerToolbarAction =
| 'model'
| 'commands'
| 'files'
| 'widthMode';
| 'widthMode'
| 'voice';

interface ChatEditorProps {
onSubmit: (
Expand Down Expand Up @@ -1535,15 +1536,17 @@ export const ChatEditor = memo(
</span>
</button>
)}
<VoiceButton
disabled={disabled}
onInsert={(text) => {
const existing = core.getText();
const sep = existing && !/\s$/.test(existing) ? ' ' : '';
core.insertText(`${sep}${text} `);
core.focus();
}}
/>
{showToolbarAction('voice') && (

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

[Suggestion] Silent behavior change for embedders with an explicit composerToolbarActions allowlist. Before this PR, VoiceButton rendered unconditionally — 'voice' wasn't in the union, so no consumer could include it in their allowlist. After this change, any embedder passing an explicit list (e.g., ['approvalMode', 'model', 'commands', 'files', 'widthMode']) silently loses the voice button on upgrade — no TypeScript error, no runtime warning.

The PR describes this as "fully backward compatible," which is true for the default path (no prop → all actions show), but not for explicit allowlist consumers. Consider adding a CHANGELOG entry or migration note flagging this behavioral shift, so integrators know to add 'voice' to their existing arrays.

— qwen3.7-max via Qwen Code /review

<VoiceButton
disabled={disabled}
onInsert={(text) => {
const existing = core.getText();
const sep = existing && !/\s$/.test(existing) ? ' ' : '';
core.insertText(`${sep}${text} `);
core.focus();
}}
/>
)}
<button
className={
isRunning
Expand Down
Loading