feat(report): add AI stream session summaries#55
Conversation
|
Warning Review limit reached
Next review available in: 34 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthrough为串流战报新增 AI 复盘总结能力: Changes战报 AI 复盘总结
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
330b365 to
109946c
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@entry/src/main/ets/pages/StreamPage.ets`:
- Around line 96-100: `buildCurrentStreamReport()` is freezing the report input,
but `enrichStreamReportWithAi()` still reads `this.viewModel.streamConfig`
later, so the AI prompt can diverge from the captured report snapshot. Update
the report snapshot model in `BuiltStreamReport` and
`buildCurrentStreamReport()` to also capture `streamConfig` at freeze time, then
make `enrichStreamReportWithAi()` consume that snapshot instead of reading from
`this.viewModel`. Keep the prompt/content generation aligned with the same
frozen data used for `report.data.configLine`, and adjust any related
report-building helpers that reference the live config.
In `@entry/src/main/ets/service/StreamReportAiService.ets`:
- Around line 70-94: The prompt builder in buildReportPrompt should normalize
and guard stats values before formatting them, because direct toFixed() calls on
fields like globalAvgFps, networkLatency, packetLoss, and the other
latency/frames metrics can throw when the input is undefined or NaN. Update
buildReportPrompt to sanitize these values first (or add a safe formatting
helper used there) so the prompt always renders even when
buildStreamReportData() passes imperfect stats. Keep the existing output
structure intact while using the normalized values for the “原始stats” section.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 7c24868b-bc2d-43e8-b208-f5e6d8c7e6a6
📒 Files selected for processing (3)
entry/src/main/ets/components/StreamSessionReport.etsentry/src/main/ets/pages/StreamPage.etsentry/src/main/ets/service/StreamReportAiService.ets
109946c to
d2561ac
Compare
d2561ac to
7407366
Compare
改了啥呀
StreamReportAiService,复用 Sunshine 的/ai/completions生成更活一点的标题、总结、时长吐槽和调参建议。为啥要改
本地规则战报数据和话术都比较固定,接了 LLM 后可以让复盘更像真的看过这局数据,同时不阻塞断开流程。
验证
git diff --checkDEVECO_SDK_HOME=/Applications/DevEco-Studio.app/Contents/sdk bash hvigorw assembleHap --no-daemon --stacktrace进入构建流程,但被既有 native 依赖挡住:nativelib/src/main/cpp/aubio/src/fvec.c缺失,nativelib:default@BuildNativeWithCmake失败。entry 侧 PreBuild / metadata / syscap / profile 任务已通过。Summary by CodeRabbit
新功能
改进