feat(voice): reconcile preview and settings with main

add the shared Voice Preview and Settings panel with browser-local preview
and inactivity preferences, keyboard controls and responsive positioning

preserve main’s Rotation and Context behavior, clarify panel routing and
refresh schema pins within the unchanged prompt limit
This commit is contained in:
manjunath committed 2026-10-24 15:20:15 +05:30
1 parent 9d3548c27c
commit 5c3b66c263
39 files changed
+5274 -111

No files matched your search

+12 -1
View File
@@ -39,6 +39,7 @@ export function initialVoiceCardState() {
visible: false,
dismissed: false,
user: null,
userAttribution: null,
pointer: null,
assistant: null,
assistantResponse: null,
@@ -64,6 +65,7 @@ function newTurn(state) {
visible: true,
dismissed: false,
user: '',
userAttribution: null,
pointer: null,
assistant: null,
assistantResponse: null,
@@ -138,7 +140,14 @@ export function reduceVoiceCard(state, event) {
case 'transcript': {
const text = event.text || '';
if (event.role === 'user') {
return text ? reveal({ ...state, user: caption(text) }) : state;
return text
? reveal({
...state,
user: caption(text),
userAttribution:
event.attribution === 'unverified' ? 'unverified' : null,
})
: state;
}
if (event.role !== 'assistant' || !text) return state;
const sameResponse =
@@ -282,6 +291,8 @@ export function voiceCardView(state) {
busy: running,
phase: running ? t('WORKING') : state.steps.length ? t('DONE') : '',
user: {
label:
state.userAttribution === 'unverified' ? t('Recent speech') : t('YOU'),
visible: state.user !== null,
text: state.user || '…',
},