Conversation
## 概要 展示会やデジタルサイネージでの無人運用に便利な機能を追加 ## 主な機能 - **人感検知(Presence Detection)**: Webカメラで来場者を自動検知し挨拶を開始 - **アイドルモード(Idle Mode)**: 会話がない時間が続くと自動発話 - **デモ端末モード(Kiosk Mode)**: 設定画面へのアクセス制限、NGワードフィルター ## 変更ファイル - 新規: src/features/kiosk/, src/features/idle/, src/features/presence/ - 新規: src/hooks/useKioskMode.ts, useIdleMode.ts, usePresenceDetection.ts - 新規: src/components/presenceManager.tsx, idleManager.tsx - 更新: settings.ts, home.ts, index.tsx, menu.tsx, messageInput.tsx Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix React rules violation in presenceDebugPreview.tsx by using useMemo for boxStyle calculation instead of accessing refs during render - Fix test isolation in useFullscreen.test.ts by resetting handler in beforeEach - Fix Zustand mock in kioskSettings.test.tsx to handle function updaters - Fix dependency array issue in pages/index.tsx with useMemo for characterPresets - Replace deprecated substr with slice in idleTypes.ts - Fix immutability violation in idleSettings.tsx by creating new objects - Fix input validation in kioskSettings.tsx for empty input handling - Fix memoization in useDemoMode.ts by returning memoized object - Fix environment variable cleanup in demoMode.test.ts using afterEach - Add SettingsTabKey entries for presence, idle, kiosk tabs in menu store - Export setRestoringChatLog and setTargetLogFileName from home store
- images.test.ts: Zustand mock not correctly implementing store methods - useVoiceRecognition.test.ts: Timeout due to SpeechRecognition mock issues
fix: IdleManagerでのログ出力を開発環境のみに制限 refactor: useDemoModeフックをutilsからの関数を使用するように変更 fix: PasscodeDialogのボタン無効化条件を修正 fix: useKioskModeでの最大入力長のバリデーションを改善
Resolve conflicts in settings.ts (combined presence/idle/kiosk settings from HEAD with youtube/conversationContinuity/pngTuber/reasoning settings from develop) and package-lock.json. Added nijivoice type definitions and initial values that were present in HEAD but missing in develop. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- RealtimeAPI/AudioMode/ExternalLinkage/SlideMode ON時に アイドルモードと人感検知を自動OFFにする排他ルール4つを追加 - DisabledConditionsにidleModeEnabled/presenceDetectionEnabledを追加 - 設定UIのトグルにdisabled状態と警告メッセージを表示 - 設定UIのTextButtonをToggleSwitchに統一 - 排他ルール・カスケード・非排他・disabled条件のテストを追加 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- YouTubeモードとスライドモードの設定をOFF時でも表示・編集可能に変更 - スライドモードのフォルダリスト取得をOFF時でも実行するよう修正 - 「メモリ機能」を「長期記憶機能」に表記統一(全16言語対応) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…e phrases - Updated presence detection integration tests to handle new greeting phrases structure. - Modified presence manager to utilize new greeting and departure phrases, including speech functionality. - Enhanced idle settings to allow adding, editing, and deleting multiple greeting and departure phrases. - Refactored presence settings component to manage phrases with improved UI and functionality. - Updated settings store to migrate from single message format to array of phrases for greetings and departures. - Adjusted usePresenceDetection hook to randomly select greeting phrases based on detection threshold. - Added camera selection and detection threshold settings with appropriate error handling.
- startListening開始時にonendハンドラの再起動タイマーをクリアして競合を防止 - recognition.start()前にrecognitionActiveRefをチェックし、動作中ならonendを待機 - onerrorのno-speechハンドラで直接start()を呼ばず、onendハンドラに再起動を委譲 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 発話リスト/時間帯別挨拶/AI自動生成を1つのselectで選択式に統合 - 選択した発話ソースのサブ設定のみ表示されるように変更 - 時間帯別挨拶の感情を朝・昼・夕それぞれ個別に設定可能に変更 - 「デフォルト感情」を「挨拶の感情」に名称変更 - idleDefaultEmotion(共通感情)から時間帯別感情フィールドに移行 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- generateIdleAIPhrase()を新規作成し、設定画面のプロンプトテンプレートのみで LLMにセリフを生成させる(キャラプロンプトは不使用) - AI設定で選択したLLMサービスをファクトリー経由で自動利用 - 感情タグ付き応答([happy]テキスト形式)を解析しキャラクターの表情に反映 - AI生成セリフをchatLogにアシスタントメッセージとして追加 - 生成プロンプトのヒントテキストをより分かりやすい表現に更新 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- マルチタップ検知フック(useMultiTap)を追加し、タッチ端末でのパスコード入力画面表示に対応 - ロックアウト状態をlocalStorageに永続化し、ダイアログ再表示によるリセットを防止 - パスコード入力にバリデーションを追加(4桁以上の英数字、blur時にストア保存) - 設定画面の説明文を改善(NGワードの動作詳細、マルチタップ操作の説明追記) - 累計10回失敗時にリカバリーヒントを表示 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 12個のAPIにデモモードガード(isDemoMode+403応答)を追加 - convertSlide.tsにPOSTメソッドチェックを追加 - custom.tsのエラーハンドリングを詳細化(400/500の分類) - プリセット読み込み機能を新規実装(presetLoader+usePresetLoader) - .env.exampleにIdle/Kiosk/Demo関連の18環境変数を追加 - テスト15ファイル(約90ケース)を新規作成 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Vercelデプロイ時にNode.js 24.xが使用されるためenginesを24.xに固定 - 各言語のREADMEとCLAUDE.mdのバージョン表記を24.xに更新 - Volta設定を削除(未使用のため) - README_zh-TWのnpmバージョンも最新に修正 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- useExternalLinkage: useStateの値を直接変更せずスプレッド構文で新オブジェクトを作成 - Live2DComponent: initAppとloadLive2DModelの宣言をuseEffectの前に移動し、宣言前参照を解消 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 「デモモード」という名称が実態(機能制限モード)と合っていないため restrictedModeに統一リネーム - src/utils/demoMode.ts → src/utils/restrictedMode.ts - src/hooks/useDemoMode.ts → src/hooks/useRestrictedMode.ts - 関数名: isDemoMode → isRestrictedMode, createDemoModeErrorResponse → createRestrictedModeErrorResponse - 型名: DemoModeErrorResponse → RestrictedModeErrorResponse - エラーコード: feature_disabled_in_demo_mode → feature_disabled_in_restricted_mode - 環境変数: NEXT_PUBLIC_DEMO_MODE → NEXT_PUBLIC_RESTRICTED_MODE - APIルート12ファイル、ストア、テスト8ファイルのimport/参照を更新 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Live2D Cubism SDKのライセンス要件に対応するため、NEXT_PUBLIC_LIVE2D_ENABLED環境変数による制御を追加 - デフォルトではLive2D機能を無効化し、明示的にtrue設定時のみ利用可能に - restrictedModeパターンを踏襲したユーティリティとフックを新規作成 - settingsStoreの初期値とrehydration時にmodelTypeをvrmへフォールバック - get-live2d-list APIに403ガード、UI側にも条件付きレンダリングを追加 - ユーティリティとフックのテスト14件を追加 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- systemPromptConstants.tsを削除し、ハードコードされたSYSTEM_PROMPTを除去 - settingsStoreのcharacterPreset1~5の初期値を空文字列に変更 - usePresetLoaderがpreset1~5.txtから正しく読み込めるように修正 - preset1.txtに旧SYSTEM_PROMPTの内容をデフォルトプロンプトとして設定 - preset2.txtにニケちゃんのキャラクタープロンプトを追加 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…alysis documentation; streamline templates for design, requirements, and testing standards.
- /api/ai/vercel.ts, /api/ai/custom.ts のrestrictedModeガードを削除 (外部API呼び出しのみでファイルシステム非依存) - /api/tts-voicevox.ts, /api/tts-aivisspeech.ts のrestrictedModeガードを削除 (外部HTTPプロキシのみでファイルシステム非依存) - settingsStoreのrealtimeAPIMode/audioModeの強制OFF処理を削除 - tts-aivisspeechテストから不要になった403テストケースとモックを削除 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 7つのプロンプトプリセットファイルを public/presets/ に新規作成 (idle-ai-prompt-template, youtube-prompt-*, multimodal-ai-decision-prompt) - usePresetLoader を拡張し、起動時にストアが空の場合のみtxtファイルから読み込む - settings.ts のデフォルト値をTS定数/インライン文字列から空文字に変更 (環境変数サポートは維持、Mastra内部のfallbackはdefaultPrompts.tsに残置) - youtube.tsx のリセットボタンをasync化し、loadPreset経由でtxtファイルから復元 (fetch失敗時はトースト通知を表示) - レースコンディション対策: loadPreset完了後にストアを再チェックしてから反映 - public/presets/README.md を追加し各ファイルの用途を一覧化 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 6セクション構成に再設計(コア処理フロー、AI/TTS/キャラクター/STT、拡張モード、高度な機能) - PNGTuber(3つ目のキャラクターモデル)を追加 - 音声認識セクションを新規追加(ブラウザ/Whisper/Realtime API) - 拡張モードにデモ端末モード・アイドルモードを追加 - 高度な機能セクションを新規追加(Realtime API/オーディオ/Reasoning/RAG/人感検知) - AI・TTSは代表5件+バッジ表示に簡略化(全件列挙を廃止) - キャラクターモデルから技術名(Three.js等)を削除 - 英語版(architecture_en.svg)も同様に更新 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- next.config.js: config.resolve.fallbackのnullish coalescing対応 - Live2DComponent: useEffectクリーンアップのstale closure修正(appRef導入) - presenceSettings: forEachコールバックの暗黙的戻り値を修正 - usePresenceDetection.test: React型importの追加 - useIdleMode.test: setupSettingsMockにgetStateモックを追加 - kioskLockout: NaN/Infinity/負数のバリデーション強化、isLockedOut簡素化 - menu: キオスクロック時のSettings自動クローズ追加 - youtube: loadPresetの空文字判定を修正(content !== null) - idleSettings: フレーズ削除時のorder再採番 - kioskSettings: 空欄パスコードblur時の挙動改善 - preset2.txt: 未定義の感情タグ[troubled]を[sad]/[neutral]に修正 - presenceDebugPreview: ResizeObserverでレイアウト変更検知に対応 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- face-api.js (v0.22.2, 2020年以降メンテ停止) を @vladmandic/face-api (v1.7.14) に置換 - TensorFlow.js 1.7→4.x へのアップグレードにより互換性を改善 - PresenceManagerをdynamic import (ssr: false) に変更し、SSR時のtfjs-nodeエラーを解消 - テストのmock/requireMock対象を@vladmandic/face-apiに更新 - 移行計画ドキュメントにアーカイブ済みリスクと将来的な代替候補を追記 - バージョンをピン固定(リポジトリが2025-02-05にアーカイブ済みのため) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CI/Dockerが Node.js 20 を使用していた不整合を package.json/ドキュメントに合わせて 24 に統一 - .github/workflows/test.yml: setup-node@v3→v4、node-version を 24 に変更 - .github/workflows/lint-and-format.yml: node-version-file で .nvmrc 参照に変更、npm install→npm ci - Dockerfile: FROM node:20→node:24(コメントも更新) - .nvmrc を新規作成しバージョンを一元管理 - README.md に Docker Compose での起動手順を追記 - docs/issues/ に計画書を追加 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Viewerクラスにdispose()メソッドを追加し、アニメーションループ停止・ WebGLレンダラー破棄・OrbitControls破棄・リサイズリスナー削除を実装 - setup()に二重呼び出しガードを追加し、レンダラーリークを防止 - VrmViewerコンポーネントにアンマウント時のdispose()呼び出しを追加 - Live2DComponentでPIXI設定をWEBGL_LEGACYモードに変更し、 checkMaxIfStatementsInShaderエラーを回避 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit b3bdd6c.
This reverts commit 04c00a9.
- Added a centered title to README files for better visibility. - Updated feature descriptions to include new functionalities such as demo terminal mode, presence detection, and reasoning mode. - Removed outdated sections and added acknowledgments for the original project. - Improved instructions for setting up the environment and running with Docker. - Updated contributor images and added new contributors. - Added star history section to highlight project popularity.
- Updated Thai, Vietnamese, Simplified Chinese, and Traditional Chinese translation files to include new keys for presence detection settings, idle mode configurations, and kiosk mode functionalities. - Added phrases for greeting and departure messages, detection sensitivity settings, and camera permissions. - Enhanced user experience for automated interactions in exhibitions and digital signage.
…sk-presence Feature/realtime api split 4 kiosk presence
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @tegnike's task —— View job Pull Request Review: Develop => Main ✅Reviewed this major release introducing presence detection, idle mode, and kiosk mode features across 100 files. Review Tasks:
🟢 Overall Assessment: EXCELLENTThis is a high-quality, production-ready implementation with comprehensive testing, robust error handling, and thoughtful architecture. 🟢 StrengthsArchitecture & Design
Security & Validation
Test Coverage
Performance Considerations
Internationalization
🟡 Minor Areas for ConsiderationTest Quality Issues// Several tests marked as skipped due to useCallback timing with mocks
it.skip('onChatProcessStart相当のコールバックが呼ばれる', async () => {
// TODO: このテストはuseCallbackとモックのタイミング問題で失敗する。
// 実際の動作では正常にコールバックが呼ばれる。Recommendation: Consider refactoring tests to avoid timing dependencies or using more realistic mock implementations. Logging Practices
Minor Performance Optimizations
🟢 Notable Implementation QualityError Handling Excellence// Comprehensive camera error handling
const presenceError = {
code: 'CAMERA_PERMISSION_DENIED',
message: 'カメラへのアクセス許可が必要です',
}Smart State Management// Sophisticated exclusion rules prevent conflicting modes
{
id: 'realtimeAPI-on-disableIdlePresence',
description: 'realtimeAPIMode ON時にidleModeEnabled, presenceDetectionEnabledをOFFにする',
trigger: (_incoming, merged) => merged.realtimeAPIMode === true,
apply: () => ({ idleModeEnabled: false, presenceDetectionEnabled: false }),
}Proper Resource Cleanup// Excellent cleanup patterns throughout hooks
useEffect(() => {
return () => {
stopDetectionLoop()
releaseStream()
if (cooldownTimeoutRef.current) {
clearTimeout(cooldownTimeoutRef.current)
}
}
}, [stopDetectionLoop, releaseStream])📋 Recommendations for Post-Merge
✅ Final VerdictAPPROVED - This PR represents excellent software engineering practices with:
The implementation demonstrates production-ready quality with robust error handling, comprehensive testing, and excellent architectural decisions. The minor issues identified are non-blocking and can be addressed in future iterations. |
新機能
public/presets/にプリセットファイル(14ファイル)を追加し、ハードコードされていたSYSTEM_PROMPT定数を削除しました。presetLoader.ts/usePresetLoader.tsを新規作成し、起動時にプリセットファイルから動的に読み込む方式に変更しました。NEXT_PUBLIC_RESTRICTED_MODE)を導入しました。demoModeをrestrictedModeにリネームしました。NEXT_PUBLIC_LIVE2D_ENABLED=trueを設定しない限り、Live2Dビューア・設定画面のLive2D選択肢・APIルートが無効化されます。nijivoiceApiKey、nijivoiceActorId、nijivoiceSpeed、nijivoiceEmotionalLevel、nijivoiceSoundDurationの5項目を追加しました。バグ修正
requestAnimationFrameによる遅延初期化でReact StrictModeでのWebGLコンテキスト競合を防止しました。appRefを導入し、クリーンアップ時の適切なリソース解放を実装しました。no-speechエラー時のリスタート処理を簡素化し、onendハンドラに委譲する方式に変更しました。リファクタリング
exclusionEngine.ts)のcomputeDisabledConditionsにアイドル・人感検知の無効条件を追加しました。UI/UX改善
翻訳
テスト
ドキュメント
ビルド設定・環境
fsモジュールfallback(false)を追加しました。.nvmrc新規追加、Volta設定削除、Dockerfile・CI設定更新)。.env.exampleに新しい環境変数(NEXT_PUBLIC_RESTRICTED_MODE、NEXT_PUBLIC_LIVE2D_ENABLED、NijiVoice関連等)を追加しました。その他
.claude/と.kiro/の不要なファイル(旧エージェント設定、Kiroテンプレート等30ファイル以上)を削除しました。