Skip to content

Increase AI chat expiration time to 30 days#1698

Merged
rmn-snpk merged 1 commit intomainfrom
feat/increase-ai-chat-expiration-time
Dec 1, 2025
Merged

Increase AI chat expiration time to 30 days#1698
rmn-snpk merged 1 commit intomainfrom
feat/increase-ai-chat-expiration-time

Conversation

@rmn-snpk
Copy link
Copy Markdown

@rmn-snpk rmn-snpk commented Dec 1, 2025

Fixes OPS-3159.

@linear
Copy link
Copy Markdown

linear Bot commented Dec 1, 2025

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 1, 2025

Important

Review skipped

Auto reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/increase-ai-chat-expiration-time

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Dec 1, 2025

@rmn-snpk rmn-snpk marked this pull request as ready for review December 1, 2025 08:54
Copilot AI review requested due to automatic review settings December 1, 2025 08:54
Copy link
Copy Markdown
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 increases the expiration time for AI chat sessions from 24 hours to 30 days by updating the default value of the LLM_CHAT_EXPIRE_TIME_SECONDS system property.

  • Updated LLM_CHAT_EXPIRE_TIME_SECONDS default value from 86400 seconds (24 hours) to 2592000 seconds (30 days)

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

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Dec 1, 2025

Greptile Overview

Greptile Summary

Increased AI chat session expiration time from 24 hours to 30 days by updating the LLM_CHAT_EXPIRE_TIME_SECONDS constant.

  • Extended cache TTL for chat context, history, and tool selections from 86400 to 2592000 seconds
  • Mathematical calculation is correct: 30 days × 24 hours × 60 minutes × 60 seconds = 2,592,000 seconds
  • Comment accurately reflects the new duration
  • Impacts all AI chat sessions stored in Redis/cache, allowing longer conversation persistence

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • Simple constant change with correct math, accurate comment, and no logical issues. The change only affects cache expiration time for AI chat sessions, extending user session persistence from 1 day to 30 days.
  • No files require special attention

Important Files Changed

File Analysis

Filename Score Overview
packages/server/shared/src/lib/system/system.ts 5/5 Increased LLM_CHAT_EXPIRE_TIME_SECONDS from 86400 (24 hours) to 2592000 (30 days) - simple constant change

Sequence Diagram

sequenceDiagram
    participant User
    participant AIChatService
    participant System
    participant Cache

    User->>AIChatService: Create/Update Chat
    AIChatService->>System: getNumberOrThrow(LLM_CHAT_EXPIRE_TIME_SECONDS)
    System-->>AIChatService: Returns 2592000 (30 days)
    AIChatService->>Cache: setSerializedObject(key, data, 2592000)
    Cache-->>AIChatService: Chat data stored with 30-day TTL
    AIChatService-->>User: Chat session active
    
    Note over Cache: Data expires after 30 days<br/>(previously 24 hours)
Loading

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@rmn-snpk rmn-snpk merged commit 9825637 into main Dec 1, 2025
24 checks passed
@rmn-snpk rmn-snpk deleted the feat/increase-ai-chat-expiration-time branch December 1, 2025 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants