Skip to content

Conversation

@StLyn4
Copy link

@StLyn4 StLyn4 commented Oct 19, 2025

Related GitHub Issue

Closes: #8731

Description

This PR adds privacy controls for time related information in AI request context by introducing two user-configurable settings: includeCurrentTime (default: true) and includeTimezone (default: false).

Key implementation details:

  • UI: Implemented dependent checkbox pattern in Context Management settings - timezone checkbox is disabled when time inclusion is off
  • Backend: Modified getEnvironmentDetails() to conditionally build time section based on settings flags

Design choice: Timezone disabled by default (privacy improvement) while keeping time enabled (maintains AI time-awareness). This balances privacy with functionality.

Test Procedure

Manual testing performed:

  1. Settings UI verification:

    • Open Settings → Context Management
    • Verify two new checkboxes appear under diagnostics section
    • Uncheck "Include current time" → verify "Include timezone" becomes disabled
    • Re-check "Include current time" → verify "Include timezone" becomes enabled
  2. Context behavior testing:

    • Scenario A (default): Time enabled, timezone disabled

      • Start new chat, check environment details in context
      • ✅ Should see: # Current Time\nCurrent time in ISO 8601 UTC format: [timestamp]
      • ✅ Should NOT see: User time zone: line
    • Scenario B: Both disabled

      • Disable both settings, save, start new chat
      • ✅ Should NOT see # Current Time section at all
    • Scenario C: Both enabled

      • Enable both settings, save, start new chat
      • ✅ Should see full time section with timezone info

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Testing: New and/or updated tests have been added to cover my changes (if applicable).
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

изображение изображение

Documentation Updates

Does this PR necessitate updates to user-facing documentation?

  • No documentation updates are required.
  • Yes, documentation updates are required. (Please describe what needs to be updated or link to a PR in the docs repository).

Additional Notes

UI translations are available in all languages, but they're generated by Claude 4.5 Sonnet. I'm sure native speakers will be able to correct errors, if any.

Get in Touch

Sorry, but I don't have a Discord account and would prefer to communicate only on Github.
I will be happy to answer all questions and make corrections if necessary 😄


Important

Adds privacy controls for time and timezone in AI request context with new settings and UI updates.

  • Behavior:
    • Adds includeCurrentTime and includeTimezone settings to control time and timezone inclusion in AI request context.
    • Default: includeCurrentTime is true, includeTimezone is false.
    • UI: Timezone checkbox disabled if includeCurrentTime is off.
    • Backend: getEnvironmentDetails() modified to conditionally include time and timezone.
  • UI Changes:
    • Adds checkboxes for includeCurrentTime and includeTimezone in ContextManagementSettings.tsx.
    • Updates SettingsView.tsx to handle new settings.
  • Backend Changes:
    • Modifies getEnvironmentDetails() in getEnvironmentDetails.ts to include time and timezone based on settings.
    • Updates ClineProvider.ts to handle new settings.
  • Testing:
    • Manual tests for different combinations of settings to verify correct behavior.
  • Misc:
    • Updates translations in multiple language files for new settings.

This description was created by Ellipsis for 30deca3. You can customize this summary. It will automatically update as commits are pushed.

@StLyn4 StLyn4 requested review from cte, jr and mrubens as code owners October 19, 2025 14:09
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 19, 2025
@roomote
Copy link

roomote bot commented Oct 19, 2025

Code Review Summary

I've completed a comprehensive review of this pull request. The implementation adds privacy controls for time and timezone information in AI request context with two new user-configurable settings.

Review Result: ✅ No Issues Found

The code quality is excellent:

  • Type definitions are consistent and properly integrated throughout the stack
  • Conditional logic correctly implements the cascading dependency (timezone only shown when time is enabled)
  • UI implementation uses a good dependent checkbox pattern
  • All translation files include the new settings
  • Test fixtures have been properly updated with correct default values
  • State management follows existing patterns

Next Steps

This PR is approved and ready to merge. Great work on implementing a privacy-focused feature with proper UX considerations! 🎉

@dosubot dosubot bot added enhancement New feature or request UI/UX UI/UX related or focused labels Oct 19, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Add privacy settings for current time and timezone in context

2 participants