Conversation
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
|
Thanks for opening this, but we'd appreciate a little more information. Could you update it with more details? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
Multi-chunk Twilio dispatch prompt
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
| } | ||
|
|
||
| [Test] | ||
| public async Task pre_warm_prompt_async_should_not_throw_for_multi_chunk_text() |
There was a problem hiding this comment.
.NET naming convention violation occurs because the test methods pre_warm_prompt_async_should_not_throw_for_multi_chunk_text and append_prompt_async_should_emit_a_play_per_chunk_for_multi_chunk_text use snake_case. Rename these methods to use PascalCase to comply with C# standards.
Kody rule violation: Use proper naming conventions
[Test]
public async Task PreWarmPromptAsyncShouldNotThrowForMultiChunkText()
[Test]
public async Task AppendPromptAsyncShouldEmitAPlayPerChunkForMultiChunkText()Prompt for LLM
File Tests/Resgrid.Tests/Web/Services/TwilioVoiceResponseServiceTests.cs:
Line 137:
Violates rule 'Use proper naming conventions': the two new test methods use snake_case names (pre_warm_prompt_async_should_not_throw_for_multi_chunk_text and append_prompt_async_should_emit_a_play_per_chunk_for_multi_chunk_text) instead of PascalCase as required by the .NET naming convention for methods.
Suggested Code:
[Test]
public async Task PreWarmPromptAsyncShouldNotThrowForMultiChunkText()
[Test]
public async Task AppendPromptAsyncShouldEmitAPlayPerChunkForMultiChunkText()
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
|
Approve |
Description
This PR fixes bugs in the voice dispatch TTS (text-to-speech) path where long dispatch text exceeding the TTS chunk limit would cause
ArgumentExceptionfailures, breaking voice dispatch playback (Sentry: RESGRID-API-78).Changes
Pre-warm path (
PreWarmPromptAsync): Previously threwArgumentExceptionfor any input spanning more than one TTS chunk. It now iterates over all chunks and pre-warms each individually, so long dispatch text no longer faults the pre-warm/redirect flow.Playback path (
TryAppendDispatchPlaybackAsyncinTwilioController): Switched fromGetPromptUrlAsync(single-chunk only) to the multi-chunk-awareAppendPromptAsync, which emits one<Play>element per chunk. This prevents failures when dispatch text (e.g., long notes or addresses) exceeds the chunk limit.Tests: Added two regression tests verifying that
PreWarmPromptAsyncno longer throws for multi-chunk text and thatAppendPromptAsyncproduces a<Play>per chunk for multi-chunk input.