(server) fix "generate library" and "finish conversation hook"#78
(server) fix "generate library" and "finish conversation hook"#78
Conversation
WalkthroughThis pull request updates the project and conversation handling logic in the backend. In the task functions, the project query has been modified to target the "project" collection using a revised filter, and a new flag ( Changes
Sequence Diagram(s)sequenceDiagram
participant W as Worker
participant T as task_create_project_library
participant DB as Database
participant L as Logger
W->>T: Invoke task_create_project_library(project_id)
T->>DB: Query "project" with filter {"id": {"_eq": project_id}}
alt Successful retrieval
DB-->>T: Return project data
T->>T: Set is_insights_enabled based on project data
else Exception thrown
T->>L: Log exception message
end
sequenceDiagram
participant W as Worker
participant C as task_finish_conversation_hook
participant S as Summarizer
participant CON as Conversation DB
participant L as Logger
W->>C: Invoke task_finish_conversation_hook(transcript)
alt Transcript is non-null and not empty
C->>S: Generate conversation summary
S-->>C: Return summary
C->>CON: Update conversation with summary
else Transcript is empty
C->>L: Log empty transcript message
end
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🧰 Additional context used🧬 Code Definitions (1)echo/server/dembrane/tasks.py (1)
🔇 Additional comments (4)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit