Skip to content

Add Incognito Mode#182

Open
lk340 wants to merge 2 commits intomainfrom
incognito-mode
Open

Add Incognito Mode#182
lk340 wants to merge 2 commits intomainfrom
incognito-mode

Conversation

@lk340
Copy link
Collaborator

@lk340 lk340 commented Apr 7, 2025

Task

  • Add an “incognito mode” feature that allows users to have auto-context-and-history-exempt conversations.

Notes

  • Add a incognito_mode_enabled event for PostHog.

@lk340 lk340 requested a review from timlenardo April 7, 2025 19:14
@lk340 lk340 self-assigned this Apr 7, 2025
Copy link
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.

PR Summary

This PR introduces incognito mode, adding support across icons, accessibility, chat persistence, and UI components with conditional behavior based on the incognito flag.

  • Assets: New incognito icons in /macos/Onit/Assets.xcassets/Icons/incog-off.imageset/Contents.json and /macos/Onit/Assets.xcassets/Icons/incog-on.imageset/Contents.json lack filenames for 2x/3x scales; verify if intentional.
  • Accessibility: AccessibilityNotificationsManager.swift now bypasses context and text processing when incognito is enabled.
  • Chat & Input: Model+Chat.swift and Model+Input.swift prevent saving auto-context and history; ensure PostHog “incognito_mode_enabled” event is logged.
  • UI Updates: ChatView.swift, IncognitoDismissable.swift, HistoryRowView.swift, ContextPickerView.swift, and PaperclipButton.swift correctly adapt to incognito mode.
  • Shortcuts & Toolbar: KeyboardShortcutsManager.swift and Toolbar.swift include incognito conditions and toggle logic to clear context and start a new chat.

13 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile

Comment on lines 247 to 260

var incognitoMode: some View {
Button {
incognitoModeEnabled.toggle()
if incognitoModeEnabled { model.clearAutoContext() }
model.newChat()
} label: {
Image(incognitoModeEnabled ? .incogOn : .incogOff)
.renderingMode(.template)
.padding(4)
.foregroundColor(incognitoModeEnabled ? .blue400 : .gray200)
}
.tooltip(prompt: "Incognito mode (auto-context off)")
}
Copy link
Contributor

Choose a reason for hiding this comment

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

logic: Check if calling model.newChat() on every toggle is the intended behavior. Ensure that resetting the conversation upon enabling or disabling incognito mode meets the UX requirements.

Copy link
Contributor

@timlenardo timlenardo left a comment

Choose a reason for hiding this comment

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

LGTM- one small copy update but otherwise great!

.padding(4)
.foregroundColor(incognitoModeEnabled ? .blue400 : .gray200)
}
.tooltip(prompt: "Incognito mode (auto-context off)")
Copy link
Contributor

Choose a reason for hiding this comment

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

This shouldn't say "auto-context off" since incognito just means it doesn't get added to history

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.

2 participants