Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AIChat refactor to support standalone and persistent conversations #24921

Merged
merged 32 commits into from
Sep 20, 2024

Commits on Sep 20, 2024

  1. AI Chat: Introduce AIChatService, ConversationHandler, and direct bin…

    …dings from UI
    
    Modified AIChat WebUI to directly bind to both AIChatService and ConversationHandler for most operations.
    Lays the groundwork for conversations to be independent of web content. In fact, most of this functionality is also within this PR. Conversation persistance (in-memory) is guarded behind a feature flag.
    
    Refactor print preview extractor to be passed to AIChatTabHelper directly
    Also removed max page content consideration since:
    1) Model can be changed after fetching the content
    2) Multiple callbacks could occur with different page content limits from different conversations
    3) We need to know the (reasonable) total content length to report the percentage of content that Leo has been sent.
    I did consider sending the requested page content maximum length for each GetContent call, but that does not solve all the issues. Since there is a maximum limit of 20 print preview pages, it seems it's ok.
    
    kAIChatHistory flag -> AIChatHistory
    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    5545b1a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b7d2662 View commit details
    Browse the repository at this point in the history
  3. test fix

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    976e6a2 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c1100a8 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7ec5efa View commit details
    Browse the repository at this point in the history
  6. fix for android build

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    657f79e View commit details
    Browse the repository at this point in the history
  7. fix same-document back/forward navigation by considering page title c…

    …hanges during navigation
    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    101364c View commit details
    Browse the repository at this point in the history
  8. ios refactor

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    f906c8b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    51f1357 View commit details
    Browse the repository at this point in the history
  10. Fix crashes on iOS. Fix logic so AIChat on iOS works correctly. Fix m…

    …odels list conversion to iOS.
    Brandon-T authored and petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    86abbe2 View commit details
    Browse the repository at this point in the history
  11. fix ConversationHandler::GenerateQuestions, refactor non-conversation…

    … rewriting out of ConversationHandler, test ConversationHandler::GetState
    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    9d2e1e7 View commit details
    Browse the repository at this point in the history
  12. feedback

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    e70fe47 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    474284f View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    a3e4367 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    e07ff52 View commit details
    Browse the repository at this point in the history
  16. feedback

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    d173540 View commit details
    Browse the repository at this point in the history
  17. android HandleVoiceRecognition now optionally passes ConversationId t…

    …o target a specific conversation
    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    313781e View commit details
    Browse the repository at this point in the history
  18. feedback

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    c505f43 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    197b5cf View commit details
    Browse the repository at this point in the history
  20. feedback

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    a47c7ed View commit details
    Browse the repository at this point in the history
  21. format

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    288fa5d View commit details
    Browse the repository at this point in the history
  22. rebase fixes

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    de3761e View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    67b9ff1 View commit details
    Browse the repository at this point in the history
  24. fix android compile

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    498af7a View commit details
    Browse the repository at this point in the history
  25. fix android again

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    19f155c View commit details
    Browse the repository at this point in the history
  26. no channel_info new string

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    d156c64 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    c40131f View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    95eac52 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    c8588e9 View commit details
    Browse the repository at this point in the history
  30. Configuration menu
    Copy the full SHA
    e1bac5c View commit details
    Browse the repository at this point in the history
  31. fix android again?

    petemill committed Sep 20, 2024
    Configuration menu
    Copy the full SHA
    23b728d View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    5f89085 View commit details
    Browse the repository at this point in the history