mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-16 08:12:24 +00:00
Merge PR #1299 with current main for validation
This commit is contained in:
commit
aeee3652ce
39 files changed
+5274
-111
No files matched your search
@@ -44,6 +44,7 @@ export function initialVoiceCardState() {
|
||||
visible: false,
|
||||
dismissed: false,
|
||||
user: null,
|
||||
userAttribution: null,
|
||||
pointer: null,
|
||||
assistant: null,
|
||||
assistantResponse: null,
|
||||
@@ -69,6 +70,7 @@ function newTurn(state) {
|
||||
visible: true,
|
||||
dismissed: false,
|
||||
user: '',
|
||||
userAttribution: null,
|
||||
pointer: null,
|
||||
assistant: null,
|
||||
assistantResponse: null,
|
||||
@@ -143,7 +145,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 =
|
||||
@@ -287,6 +296,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 || '…',
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user