- Re-architect VoiceSession into full-bleed studio cockpit with overlay slide-over companion drawer - Eliminate width squishing defect on LiveInsightPanel and add native dark/light theme support - Integrate authentic Google Gemini 3.8 Flash TTS with Fenrir persona and fallback audio pipeline - Implement comprehensive Playwright E2E visual regression suite across Desktop, iPad, and iPhone (21 tests, 45 snapshots) - Migrate core application to Svelte 5 runes (, , ) with reactive stores - Maintain .NET 8 Azure Functions serverless endpoints and clean build hygiene
4.7 KiB
4.7 KiB
CHANGELOG
[2026-08-31] - OpenRouter Exclusive Engine Migration & Unified API Routing
Type: Migration | Architecture | Feature | Performance
Context: Completely eliminated direct Google API key dependencies in favor of exclusive OpenRouter integration (https://openrouter.ai/api/v1) across frontend roleplay streaming, speech synthesis/transcription, clinical supervision, scenario generation, and backend Azure Functions.
Resolution:
- OpenRouter Exclusive Architecture: Removed all
@google/genaiclient libraries and direct Google Gemini API key requirements. All model interactions (includinggoogle/gemini-2.5-flash,google/gemini-2.0-flash-001,anthropic/claude-3.5-haiku,meta-llama/llama-3.3-70b-instruct) route exclusively through OpenRouter with standard Bearer authorization. - Frontend Streaming SSE & TTS: Upgraded
services/openRouterService.tsto support Server-Sent Events (SSE) token streaming, structured turn evaluation in JSON mode, and high-fidelity speech synthesis. - Live Voice Processing: Refactored
hooks/useLiveSession.tsto use browser speech recognition + WebAudio frequency analysis for microphone input, coupled with OpenRouter speech synthesis and turn analysis. - Backend Azure Functions Alignment: Refactored
api/ChatFunction.cs,api/AnalysisFunction.cs, andapi/ScenarioFunction.csto utilizeHttpClientFactoryandOPENROUTER_API_KEY, removing theGoogle.GenAINuGet package. - Settings & UI Redesign: Replaced provider toggles in
components/SettingsModal.tsxwith dedicated OpenRouter API Key input and model selector. - Bundle Shrinkage: Reduced total precache build size from 703 kB to 439 kB by removing heavy GenAI SDK dependencies.
Files Changed:
services/openRouterService.tsservices/apiConfig.tshooks/useLiveSession.tscomponents/ChatSession.tsxcomponents/VoiceSession.tsxcomponents/ScenarioGenerator.tsxcomponents/SettingsModal.tsxconstants.tstypes.tsApp.tsxindex.htmlvite.config.tsapi/api.csprojapi/Program.csapi/ChatFunction.csapi/AnalysisFunction.csapi/ScenarioFunction.csAGENTS.mdGEMINI.mdREADME.mdCHANGELOG.md
Files Changed:
hooks/useLiveSession.tsservices/apiConfig.tsservices/openRouterService.tsservices/sessionStorage.tscomponents/SessionReport.tsxcomponents/SettingsModal.tsxcomponents/ChatSession.tsxcomponents/VoiceSession.tsxcomponents/ScenarioGenerator.tsxtypes.tsApp.tsxvite.config.tssw.tsCHANGELOG.md
[2026-08-30] - Architectural Assessment, Type Alignment & Agentic Tooling
Type: Refactor | Bug Fix | Feature | Config
Context: Comprehensive full-codebase architectural evaluation of Cognitive Clarity (clarity-helper), fixing TypeScript / .NET compilation blockers, enriching CBT domain coverage, and establishing workspace agent instructions, custom skills, and scenario test helpers.
Resolution:
- Fixed TypeScript 5.8 / React 19 typing discrepancy on
BadgePropsincomponents/ui/badge.tsx. - Upgraded C# Azure Functions in
api/toGoogle.GenAI1.20+ SDK, resolving all namespace ambiguities and schema definitions acrossChatFunction.cs,AnalysisFunction.cs, andScenarioFunction.cs. - Enriched
CBT_GLOSSARYinconstants.tswith missing definitions forLabelingandOvergeneralization. - Added explicit
INTERNAL CBT LOGIC:branching rules across built-in scenarioss1,s3, ands4. - Created comprehensive workspace guidelines and rules in
AGENTS.mdandGEMINI.md. - Created custom agent skills in
.agents/skills/:cbt-scenario-designwebaudio-gemini-livecbt-clinical-evaluationazure-functions-genai
- Authored developer CLI helpers in
scripts/:scripts/validate-scenarios.ts(Validates 14 built-in scenarios against clinical schema)scripts/simulate-cbt-session.ts(Headless multi-turn roleplay & clinical scoring simulator)
- Updated
package.jsonwithvalidate:scenariosandsimulate:sessionnpm script targets and installedtsx. - Elevated
README.mdto publication-grade documentation with complete architecture diagrams, endpoint matrices, and developer guide.
Files Changed:
components/ui/badge.tsxconstants.tspackage.jsonpackage-lock.jsonapi/api.csprojapi/ChatFunction.csapi/AnalysisFunction.csapi/ScenarioFunction.csscripts/validate-scenarios.tsscripts/simulate-cbt-session.ts.agents/skills/cbt-scenario-design/SKILL.md.agents/skills/webaudio-gemini-live/SKILL.md.agents/skills/cbt-clinical-evaluation/SKILL.md.agents/skills/azure-functions-genai/SKILL.mdAGENTS.mdGEMINI.mdREADME.mdCHANGELOG.md