Merged
Conversation
…ints - Extend retrieve_chunks with exclude_notebook_id and source_id filters - writing-context: use retrieve_chunks + notebook ownership (404) - related-knowledge: hybrid RAG; 404 if notebook not owned - source suggestions: semantic retrieve within source; owner-scoped source query - summarize fallback: order chunks by created_at desc instead of random - send_message: parallel graph_augmented_context; global conv uses global_search RAG Made-with: Cursor
- Unit: compose_answer prepends extra_graph_context into reference message (mock llm.chat) - HTTP: writing-context / related-knowledge 404 + short-text path (PostgreSQL only; skip on SQLite JSONB) - Integration: send_message passes graph to compose; global conv uses global_search (PostgreSQL only) Made-with: Cursor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughSummary by CodeRabbit发布说明
高层概览该PR在系统中集成了Celery Beat定时任务调度器(文档、Docker配置、CLI更新),扩展了RAG检索功能以支持按笔记本/数据源过滤,为答案撰写添加了图谱增强上下文,改进了邮件投递状态追踪与错误详情记录,建立了后台任务的专用日志记录,并新增前端UI展示与双语本地化文本。 变更明细
时序交互图sequenceDiagram
participant User
participant ConvSvc as ConversationService
participant Retrieval as RAG Retrieval
participant GraphCtx as Graph Context
participant Composer as Composer
participant LLM
User->>ConvSvc: send_message(content, notebook_id)
par 并发检索
ConvSvc->>Retrieval: retrieve_chunks(content, user_id, notebook_id)
Retrieval-->>ConvSvc: chunks
and 并发获取图谱
ConvSvc->>GraphCtx: graph_augmented_context(content, notebook_id)
GraphCtx-->>ConvSvc: graph_ctx
end
ConvSvc->>Composer: compose_answer(content, chunks, [], extra_graph_context=graph_ctx)
Composer->>Composer: 前置图谱段落到上下文
Composer->>LLM: chat(messages_with_graph)
LLM-->>Composer: response
Composer-->>ConvSvc: answer
ConvSvc-->>User: message
sequenceDiagram
participant Scheduler as Task Scheduler
participant EmailProvider as Email Provider
participant DeliveryTracker as Delivery Tracker
participant DB as Database
participant UI as Frontend UI
Scheduler->>EmailProvider: send_email(config)
alt 发送成功
EmailProvider-->>Scheduler: EmailSendResult(ok=True)
Scheduler->>DeliveryTracker: delivery_status["email"]="sent"
else 发送失败
EmailProvider-->>Scheduler: EmailSendResult(ok=False, error="...")
Scheduler->>DeliveryTracker: delivery_status["email"]="failed"<br/>delivery_status["email_error"]="..."
end
Scheduler->>DeliveryTracker: summarize_delivery_outcome(delivery_status)
DeliveryTracker-->>Scheduler: (summary, issues)
Scheduler->>DB: save run.error_message=issues
UI->>DB: fetch task history
DB-->>UI: delivery_status
UI->>UI: getTaskDeliveryBadges(delivery_status)
UI-->>UI: render badges with tone & detail
代码审查工作量估计🎯 4 (复杂) | ⏱️ ~60 分钟 可能相关的PR
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of change
Related issue
Closes #
Changes
How to test
Screenshots (if applicable)
Checklist
./lyra lintand there are no type errorsfeat:,fix:, etc.)