[251016] fix: VoicePanel STT
🕐 커밋 시간: 2025. 10. 16. 11:02:03 📊 변경 통계: • 총 파일: 8개 • 추가: +321줄 • 삭제: -7줄 📁 추가된 파일: + com.twin.app.shoptime/src/hooks/useSearchVoice.js 📝 수정된 파일: ~ com.twin.app.shoptime/src/App/App.js ~ com.twin.app.shoptime/src/actions/voiceActions.js ~ com.twin.app.shoptime/src/reducers/voiceReducer.js ~ com.twin.app.shoptime/src/views/SearchPanel/SearchPanel.jsx ~ com.twin.app.shoptime/src/views/SearchPanel/VoiceInputOverlay/VoiceInputOverlay.jsx ~ com.twin.app.shoptime/src/views/VoicePanel/VoicePanel.jsx ~ com.twin.app.shoptime/src/views/VoicePanel/VoicePanel.module.less 🔧 함수 변경 내용: 📄 com.twin.app.shoptime/src/App/App.js (javascript): 🔄 Modified: function() 📄 com.twin.app.shoptime/src/actions/voiceActions.js (javascript): 🔄 Modified: registerVoiceFramework() 🔧 주요 변경 내용: • 핵심 비즈니스 로직 개선
This commit is contained in:
@@ -302,14 +302,55 @@ function AppBase(props) {
|
||||
);
|
||||
|
||||
const handleRelaunchEvent = useCallback(() => {
|
||||
console.log('handleRelaunchEvent started');
|
||||
console.log('[App] handleRelaunchEvent triggered');
|
||||
|
||||
const launchParams = getLaunchParams();
|
||||
clearLaunchParams();
|
||||
|
||||
if (!launchParams) {
|
||||
if (introTermsAgreeRef.current) {
|
||||
initService(false);
|
||||
}
|
||||
if (typeof window === 'object' && window.PalmSystem) {
|
||||
window.PalmSystem.activate();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Voice Intent 처리 (최우선)
|
||||
if (launchParams.intent) {
|
||||
const { intent, intentParam, languageCode } = launchParams;
|
||||
console.log('[App] Voice Intent received:', { intent, intentParam, languageCode });
|
||||
|
||||
// SearchContent 또는 PlayContent intent 처리
|
||||
if (intent === 'SearchContent' || intent === 'PlayContent') {
|
||||
dispatch(
|
||||
pushPanel({
|
||||
name: Config.panel_names.SEARCH_PANEL,
|
||||
panelInfo: {
|
||||
voiceSearch: true, // 음성 검색 플래그
|
||||
searchVal: intentParam, // 검색어
|
||||
languageCode: languageCode,
|
||||
},
|
||||
})
|
||||
);
|
||||
|
||||
console.log(`[App] Opening SearchPanel with voice query: ${intentParam}`);
|
||||
if (typeof window === 'object' && window.PalmSystem) {
|
||||
window.PalmSystem.activate();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// 기존 로직 유지
|
||||
if (introTermsAgreeRef.current) {
|
||||
initService(false);
|
||||
}
|
||||
if (typeof window === 'object' && window.PalmSystem) {
|
||||
window.PalmSystem.activate();
|
||||
}
|
||||
}, [initService, introTermsAgreeRef]);
|
||||
}, [initService, introTermsAgreeRef, dispatch]);
|
||||
|
||||
const visibilityChanged = useCallback(() => {
|
||||
console.log('document is hidden', document.hidden);
|
||||
|
||||
Reference in New Issue
Block a user