Split runtime settings slices - #30
Conversation
Reviewer's GuideSplits runtime-related settings into ASR and LLM slices in the app settings module, updates ASR transcription and polish flow to depend on these narrower interfaces, and adds tests to ensure normalization of full settings into the new runtime slices while preserving storage behavior. File-Level Changes
Assessment against linked issues
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Warning Review limit reached
More reviews will be available in 46 minutes and 9 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request refactors settings management by splitting the monolithic Settings type and its normalization logic into two smaller, independent runtime slices: AsrRunSettings and LlmRunSettings. This allows hooks and utilities to depend only on the specific configurations they require. The feedback suggests narrowing the parameter type of hasAsrApiKey to AsrRunSettings to fully align with this decoupled design, and adding defensive optional chaining in the normalization functions to prevent potential runtime TypeError crashes when handling partially missing configuration fields.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
Bot review 跟进:
已重新验证:
|
变更
asr-transcription继续导出normalizeAsrRunSettings,保持现有调用方兼容,但实现回到设置 Module。usePolishFlow的 settings Interface 收窄为 LLM 运行设置切片,不再消费完整 Settings。为什么
#22 的目标是保留设置持久化 Module 的 Locality,同时避免 ASR/LLM 运行调用者继承完整 Settings Interface。这个 PR 把运行所需设置切片集中在设置 Module 中,让后续转录运行和润色运行重构可以依赖更窄的 Interface。
验证
npm test -- --run tests/unit/utils.test.ts tests/unit/asr-transcription.test.ts tests/unit/settings-persistence.test.ts tests/unit/polish-stream.test.tsnpm testnpm run buildCloses #22
Summary by Sourcery
Split ASR and LLM runtime settings normalization into dedicated slices while keeping storage normalization centralized in the settings module.
New Features:
Enhancements:
Tests: