Skip to content

perf: redis del#6115

Merged
c121914yu merged 2 commits intolabring:mainfrom
c121914yu:4.14.5-dev
Dec 18, 2025
Merged

perf: redis del#6115
c121914yu merged 2 commits intolabring:mainfrom
c121914yu:4.14.5-dev

Conversation

@c121914yu
Copy link
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings December 18, 2025 04:39
@gru-agent
Copy link
Contributor

gru-agent bot commented Dec 18, 2025

TestGru Assignment

Summary

Link CommitId Status Reason
Detail 2603091 🚫 Skipped No files need to be tested {"document/content/docs/upgrading/4-14/4145.mdx":"File path does not match include patterns.","document/data/doc-last-modified.json":"File path does not match include patterns.","packages/global/openapi/core/app/log/api.ts":"File path does not match include patterns.","packages/service/common/cache/index.ts":"File path does not match include patterns.","packages/service/core/chat/saveChat.ts":"File path does not match include patterns.","projects/app/next.config.js":"File path does not match include patterns.","projects/app/src/service/core/app/utils.ts":"Can not find valuable test target.\ngetScheduleTriggerApp: Out of scope - This file only contains a single exported async function, which orchestrates multiple asynchronous operations, database calls, and workflow executions. It does not define any classes or reusable functions with isolated logic. The function is highly integration-o…"}

History Assignment

Tip

You can @gru-agent and leave your feedback. TestGru will make adjustments based on your input

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

Preview sandbox Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_sandbox_80f30a9492ec9309bc4cde26c67ecb85f1beaf7e

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

Preview mcp_server Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_mcp_server_80f30a9492ec9309bc4cde26c67ecb85f1beaf7e

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

Docs Preview:


🚀 FastGPT Document Preview Ready!

🔗 👀 Click here to visit preview

@github-actions
Copy link

github-actions bot commented Dec 18, 2025

Preview fastgpt Image:

registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt-pr:fatsgpt_80f30a9492ec9309bc4cde26c67ecb85f1beaf7e

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes changes to chat persistence logic and API schema definitions. The main purpose appears to be improving data handling for chat logs, though the title "perf: redis del" suggests performance optimizations related to Redis that aren't directly visible in these changes.

Key changes:

  • Added createTime field to the MongoDB update operation in saveChat function
  • Updated API schema to make title and createTime fields nullable in chat log responses

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/service/core/chat/saveChat.ts Adds createTime field to the chat document update operation
packages/global/openapi/core/app/log/api.ts Updates schema validation to make title and createTime fields nullable for API responses

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +316 to 317
createTime: new Date(),
updateTime: new Date()
Copy link

Copilot AI Dec 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting createTime to a new date on every update will overwrite the original creation time when the chat already exists. Since this operation uses upsert: true, the createTime should only be set when the document is first created.

Consider using $setOnInsert instead of $set for the createTime field to preserve the original creation timestamp on subsequent updates.

Suggested change
createTime: new Date(),
updateTime: new Date()
updateTime: new Date()
},
$setOnInsert: {
createTime: new Date()

Copilot uses AI. Check for mistakes.
@c121914yu c121914yu merged commit 0d88761 into labring:main Dec 18, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant