Skip to content

Improved agentic search#1

Open
ajabhish wants to merge 37 commits intomainfrom
improved_agentic_search
Open

Improved agentic search#1
ajabhish wants to merge 37 commits intomainfrom
improved_agentic_search

Conversation

@ajabhish
Copy link
Copy Markdown
Owner

@ajabhish ajabhish commented Aug 1, 2024

User description

Description

[Provide a brief description of the changes in this PR]

How Has This Been Tested?

[Describe the tests you ran to verify your changes]

Accepted Risk

[Any know risks or failure modes to point out to reviewers]

Related Issue(s)

[If applicable, link to the issue(s) this PR addresses]

Checklist:

  • All of the automated tests pass
  • All PR comments are addressed and marked resolved
  • If there are migrations, they have been rebased to latest main
  • If there are new dependencies, they are added to the requirements
  • If there are new environment variables, they are added to all of the deployment methods
  • If there are new APIs that don't require auth, they are added to PUBLIC_ENDPOINT_SPECS
  • Docker images build and basic functionalities work
  • Author has done a final read through of the PR right before merge

PR Type

enhancement, bug fix, other


Description

  • Introduced DocumentRelevance and LLMEvaluationType for better relevance tracking and evaluation handling.
  • Enhanced search pipeline, query backend, and preprocessing with new evaluation types.
  • Improved mobile layout and resizing across multiple components.
  • Added mobile-specific handling for sidebars, popups, and input options.
  • Fixed relevance key handling in search results display.
  • Commented out welcome modal and instant SSR auto-refresh.

Changes walkthrough 📝

Relevant files
Enhancement
44 files
pipeline.py
Enhanced search pipeline with new evaluation types and relevance
tracking.

backend/danswer/search/pipeline.py

  • Introduced DocumentRelevance for better relevance tracking.
  • Added LLMEvaluationType to handle different evaluation types.
  • Refactored properties to use new evaluation logic.
  • +48/-31 
    answer_question.py
    Integrated LLMEvaluationType and updated response handling.

    backend/danswer/one_shot_answer/answer_question.py

  • Integrated LLMEvaluationType into the search tool.
  • Modified response handling to use DocumentRelevance.
  • +12/-14 
    search_tool.py
    Added LLMEvaluationType and updated context handling.       

    backend/danswer/tools/search/search_tool.py

  • Added LLMEvaluationType to the search tool.
  • Updated context section handling and pruning logic.
  • +20/-13 
    query_backend.py
    Integrated LLMEvaluationType into query backend.                 

    backend/ee/danswer/server/query_and_chat/query_backend.py

  • Integrated LLMEvaluationType into search request handling.
  • Updated document relevance index handling.
  • +19/-7   
    process_message.py
    Added LLMEvaluationType and updated relevance handling.   

    backend/danswer/chat/process_message.py

  • Added LLMEvaluationType to search tool initialization.
  • Updated relevance index handling.
  • +24/-10 
    postprocessing.py
    Added DocumentRelevance and integrated LLMEvaluationType.

    backend/danswer/search/postprocessing/postprocessing.py

  • Added DocumentRelevance for post-processing.
  • Integrated LLMEvaluationType into post-processing logic.
  • +12/-4   
    preprocessing.py
    Integrated LLMEvaluationType into retrieval preprocessing.

    backend/danswer/search/preprocessing/preprocessing.py

  • Integrated LLMEvaluationType into retrieval preprocessing.
  • Updated evaluation type handling.
  • +12/-7   
    models.py
    Added LLMEvaluationType to search models.                               

    backend/danswer/search/models.py

  • Added LLMEvaluationType to search request and query models.
  • Removed skip_llm_chunk_filter.
  • +3/-3     
    utils.py
    Added utility functions for relevance handling.                   

    backend/danswer/search/utils.py

    • Added utility functions for converting relevance to indices.
    +35/-0   
    agentic_evaluation.py
    Updated agentic evaluation to use DocumentRelevance.         

    backend/danswer/secondary_llm_flows/agentic_evaluation.py

    • Updated agentic evaluation to return DocumentRelevance.
    +8/-8     
    models.py
    Added LLMEvaluationType to DirectQARequest.                           

    backend/danswer/one_shot_answer/models.py

    • Added LLMEvaluationType to DirectQARequest.
    +3/-1     
    models.py
    Added LLMEvaluationType to DocumentSearchRequest.               

    backend/ee/danswer/server/query_and_chat/models.py

    • Added LLMEvaluationType to DocumentSearchRequest.
    +2/-1     
    enums.py
    Added LLMEvaluationType enum.                                                       

    backend/danswer/search/enums.py

    • Added LLMEvaluationType enum.
    +6/-0     
    chat.py
    Updated relevance summary handling in the database.           

    backend/danswer/db/chat.py

    • Updated relevance summary handling in the database.
    +1/-1     
    models.py
    Added DocumentRelevance model.                                                     

    backend/danswer/chat/models.py

    • Added DocumentRelevance model.
    +5/-0     
    ChatPage.tsx
    Improved mobile resizing and sidebar toggling.                     

    web/src/app/chat/ChatPage.tsx

  • Improved mobile resizing and sidebar toggling.
  • Updated scroll and layout handling.
  • +483/-470
    SearchSection.tsx
    Added mobile redirection and updated sidebar handling.     

    web/src/components/search/SearchSection.tsx

  • Added mobile redirection to chat.
  • Updated sidebar and search bar handling.
  • +97/-66 
    Popup.tsx
    Added mobile-specific positioning to Popup.                           

    web/src/components/popup/Popup.tsx

    • Added mobile-specific positioning and styles.
    +42/-7   
    FunctionalWrapper.tsx
    Added mobile-specific toggle handling.                                     

    web/src/app/chat/shared_chat_search/FunctionalWrapper.tsx

    • Added mobile-specific toggle handling.
    +18/-9   
    ChatInputBar.tsx
    Improved mobile input handling and layout.                             

    web/src/app/chat/input/ChatInputBar.tsx

    • Improved mobile input handling and layout.
    +20/-12 
    Header.tsx
    Added mobile-specific sidebar toggle.                                       

    web/src/components/chat_search/Header.tsx

    • Added mobile-specific sidebar toggle.
    +26/-10 
    Messages.tsx
    Improved mobile layout for messages.                                         

    web/src/app/chat/message/Messages.tsx

    • Improved mobile layout for messages.
    +10/-7   
    DocumentDisplay.tsx
    Improved mobile layout for document display.                         

    web/src/components/search/DocumentDisplay.tsx

    • Improved mobile layout for document display.
    +11/-5   
    DocumentSidebar.tsx
    Simplified document sidebar layout.                                           

    web/src/app/chat/documentSidebar/DocumentSidebar.tsx

    • Simplified document sidebar layout.
    +1/-39   
    SidebarWrapper.tsx
    Added mobile-specific sidebar handling.                                   

    web/src/app/assistants/SidebarWrapper.tsx

    • Added mobile-specific sidebar handling.
    +8/-6     
    HistorySidebar.tsx
    Added mobile-specific sidebar close handling.                       

    web/src/app/chat/sessionSidebar/HistorySidebar.tsx

    • Added mobile-specific sidebar close handling.
    +11/-3   
    hooks.ts
    Added mobile-specific sidebar visibility handling.             

    web/src/components/chat_search/hooks.ts

    • Added mobile-specific sidebar visibility handling.
    +21/-6   
    ChatSessionDisplay.tsx
    Added mobile-specific sidebar close on session select.     

    web/src/app/chat/sessionSidebar/ChatSessionDisplay.tsx

    • Added mobile-specific sidebar close on session select.
    +10/-1   
    layout.tsx
    Added viewport meta tag for mobile.                                           

    web/src/app/layout.tsx

    • Added viewport meta tag for mobile.
    +20/-9   
    SearchBar.tsx
    Improved mobile layout for search bar.                                     

    web/src/components/search/SearchBar.tsx

    • Improved mobile layout for search bar.
    +10/-3   
    ChatInputOption.tsx
    Made name optional for chat input option.                               

    web/src/app/chat/input/ChatInputOption.tsx

    • Made name optional for chat input option.
    +3/-3     
    PagesTab.tsx
    Added mobile-specific padding for pages tab.                         

    web/src/app/chat/sessionSidebar/PagesTab.tsx

    • Added mobile-specific padding for pages tab.
    +4/-1     
    UserDropdown.tsx
    Improved layout for user dropdown.                                             

    web/src/components/UserDropdown.tsx

    • Improved layout for user dropdown.
    +6/-5     
    FixedLogo.tsx
    Improved mobile layout for fixed logo.                                     

    web/src/app/chat/shared_chat_search/FixedLogo.tsx

    • Improved mobile layout for fixed logo.
    +3/-3     
    SettingsProvider.tsx
    Added mobile detection to settings provider.                         

    web/src/components/settings/SettingsProvider.tsx

    • Added mobile detection to settings provider.
    +14/-2   
    SkippedSearch.tsx
    Improved mobile layout for skipped search message.             

    web/src/app/chat/message/SkippedSearch.tsx

    • Improved mobile layout for skipped search message.
    +5/-2     
    AssistantsList.tsx
    Improved mobile layout for assistants list.                           

    web/src/app/assistants/mine/AssistantsList.tsx

    • Improved mobile layout for assistants list.
    +1/-1     
    ChatIntro.tsx
    Improved mobile layout for chat intro.                                     

    web/src/app/chat/ChatIntro.tsx

    • Improved mobile layout for chat intro.
    +1/-1     
    lib.tsx
    Added mobile parameter to scroll on stream.                           

    web/src/app/chat/lib.tsx

    • Added mobile parameter to scroll on stream.
    +1/-0     
    AssistantsTab.tsx
    Added spacing in assistants tab.                                                 

    web/src/app/chat/modal/configuration/AssistantsTab.tsx

    • Added spacing in assistants tab.
    +1/-0     
    lib.ts
    Added isMobile to combined settings interface.                     

    web/src/components/settings/lib.ts

    • Added isMobile to combined settings interface.
    +1/-0     
    interfaces.ts
    Added isMobile to combined settings interface.                     

    web/src/app/admin/settings/interfaces.ts

    • Added isMobile to combined settings interface.
    +1/-0     
    globals.css
    Added prevent-scroll class.                                                           

    web/src/app/globals.css

    • Added prevent-scroll class.
    +4/-0     
    styles.css
    Added font-family to popover content.                                       

    web/src/components/popover/styles.css

    • Added font-family to popover content.
    +1/-0     
    Bug fix
    2 files
    SearchResultsDisplay.tsx
    Fixed relevance key handling in search results display.   

    web/src/components/search/SearchResultsDisplay.tsx

    • Fixed relevance key handling in search results display.
    +2/-6     
    ToolsDisplay.tsx
    Fixed overflow issue in tools display.                                     

    web/src/app/assistants/ToolsDisplay.tsx

    • Fixed overflow issue in tools display.
    +1/-1     
    Other
    1 files
    page.tsx
    Commented out welcome modal and instant SSR auto-refresh.

    web/src/app/chat/page.tsx

    • Commented out welcome modal and instant SSR auto-refresh.
    +3/-4     
    Configuration changes
    1 files
    tailwind.config.js
    Added mobile and desktop breakpoints.                                       

    web/tailwind-themes/tailwind.config.js

    • Added mobile and desktop breakpoints.
    +2/-0     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @ajabhish
    Copy link
    Copy Markdown
    Owner Author

    ajabhish commented Aug 1, 2024

    /help

    @qodo-code-review
    Copy link
    Copy Markdown

    qodo-code-review Bot commented Aug 1, 2024

    PR Agent Walkthrough 🤖

    Welcome to the PR Agent, an AI-powered tool for automated pull request analysis, feedback, suggestions and more.

    Here is a list of tools you can use to interact with the PR Agent:

    ToolDescriptionTrigger Interactively 💎

    DESCRIBE

    Generates PR description - title, type, summary, code walkthrough and labels
    • Run

    REVIEW

    Adjustable feedback about the PR, possible issues, security concerns, review effort and more
    • Run

    IMPROVE

    Code suggestions for improving the PR
    • Run

    UPDATE CHANGELOG

    Automatically updates the changelog
    • Run

    ADD DOCS 💎

    Generates documentation to methods/functions/classes that changed in the PR
    • Run

    TEST 💎

    Generates unit tests for a specific component, based on the PR code change
    • Run

    IMPROVE COMPONENT 💎

    Code suggestions for a specific component that changed in the PR
    • Run

    ANALYZE 💎

    Identifies code components that changed in the PR, and enables to interactively generate tests, docs, and code suggestions for each component
    • Run

    ASK

    Answering free-text questions about the PR

    [*]

    GENERATE CUSTOM LABELS 💎

    Generates custom labels for the PR, based on specific guidelines defined by the user

    [*]

    CI FEEDBACK 💎

    Generates feedback and analysis for a failed CI job

    [*]

    CUSTOM PROMPT 💎

    Generates custom suggestions for improving the PR code, derived only from a specific guidelines prompt defined by the user

    [*]

    SIMILAR ISSUE

    Automatically retrieves and presents similar issues

    [*]

    (1) Note that each tool be triggered automatically when a new PR is opened, or called manually by commenting on a PR.

    (2) Tools marked with [*] require additional parameters to be passed. For example, to invoke the /ask tool, you need to comment on a PR: /ask "<question content>". See the relevant documentation for each tool for more details.

    @qodo-code-review qodo-code-review Bot added documentation Improvements or additions to documentation enhancement New feature or request bug fix Review effort [1-5]: 4 labels Aug 1, 2024
    @qodo-code-review
    Copy link
    Copy Markdown

    qodo-code-review Bot commented Aug 1, 2024

    PR Reviewer Guide 🔍

    (Review updated until commit 625cfd7)

    ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Possible Bug
    The method final_context_sections in the SearchPipeline class is using _merge_sections which might not handle empty or null inputs gracefully. Ensure that there are checks to handle such cases to prevent runtime errors.

    Code Clarity
    The method relevant_section_indices in the SearchPipeline class has a complex conditional logic which could be simplified or broken down into smaller methods for better readability and maintainability.

    Error Handling
    In the relevant_section_indices method, the exception message "You disabled llm evaluation and thus should not be asking ofr relevant section indices!" contains a typo and may not provide clear guidance on what action the user should take.

    Debug Code
    There is a debug print statement at line 254 which should be removed or replaced with proper logging before deployment.

    Inconsistent Data Handling
    The method run in the SearchTool class inconsistently handles the evaluation_type. It should ensure that the evaluation_type is consistently passed and handled across all methods that require it.

    @qodo-code-review
    Copy link
    Copy Markdown

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Possible bug
    Ensure consistent enum usage by correcting the enum value

    Replace the use of LLMEvaluationType.Basic with LLMEvaluationType.BASIC to maintain
    consistency in enum usage.

    backend/danswer/search/preprocessing/preprocessing.py [146]

    -LLMEvaluationType.Basic
    +LLMEvaluationType.BASIC
     
    • Apply this suggestion
    Suggestion importance[1-10]: 10

    Why: The suggestion corrects an inconsistency in enum usage, which is crucial for maintaining code readability and avoiding potential bugs related to incorrect enum values.

    10
    Correctly retrieve and assign the chunk_id from the document's center chunk

    Ensure that the chunk_id is correctly retrieved from document.center_chunk.chunk_id
    instead of just mentioning it.

    backend/danswer/secondary_llm_flows/agentic_evaluation.py [39]

    -document.center_chunk.chunk_id
    +chunk_id = document.center_chunk.chunk_id
     
    • Apply this suggestion
    Suggestion importance[1-10]: 10

    Why: The suggestion fixes a potential bug by ensuring that the chunk_id is correctly retrieved and assigned, which is crucial for the correct functioning of the evaluation logic.

    10
    Add a default value to the optional parameter to ensure predictable behavior

    Consider adding a default value for the toggled parameter in the toggle function to
    ensure it behaves predictably when no argument is passed. This change enhances the
    function's robustness and prevents potential bugs related to undefined behavior.

    web/src/app/chat/ChatPage.tsx [88]

    -toggle: (toggled?: boolean) => void;
    +toggle: (toggled: boolean = false) => void;
     
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: Adding a default value for the toggled parameter ensures predictable behavior and prevents potential bugs, which is crucial for robustness.

    9
    Best practice
    Replace print statement with logger for better output management

    Replace the direct print statement with a logging statement to better manage output
    and debugging information.

    backend/danswer/search/pipeline.py [254]

    -print(len(response_docs))
    +logger.debug("Number of response documents: %d", len(response_docs))
     
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: Using a logger instead of a print statement is a best practice for managing output and debugging information, making the code more robust and maintainable.

    9
    Move inline styles to CSS classes for better reusability and maintainability

    Replace the inline style for transition with a class in the CSS file. This change
    promotes better separation of concerns and reusability of styles across the
    application.

    web/src/app/chat/ChatPage.tsx [1240]

    -style={{ transition: "width 0.30s ease-out" }}
    +className="transition-width"
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Moving inline styles to CSS classes enhances reusability and maintainability, adhering to best practices for separation of concerns.

    7
    Use descriptive names for functions to enhance readability and maintainability

    Consider using a more descriptive variable name than toggle for the function that
    handles the sidebar visibility to enhance code readability and maintainability.

    web/src/app/chat/ChatPage.tsx [88]

    -toggle: (toggled?: boolean) => void;
    +toggleSidebarVisibility: (isVisible?: boolean) => void;
     
    • Apply this suggestion
    Suggestion importance[1-10]: 6

    Why: Using more descriptive names for functions improves readability and maintainability, although the current name is not incorrect.

    6
    Enhancement
    Improve the clarity and correctness of the error message

    Replace the hardcoded error message with a more descriptive and grammatically
    correct one.

    backend/danswer/search/pipeline.py [355]

    -"You disabled llm evaluation and thus should not be asking ofr relevant section indices!"
    +"LLM evaluation is disabled, and relevant section indices should not be requested."
     
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: The suggestion improves the clarity and grammatical correctness of the error message, making it more understandable for users and developers.

    8
    Prevent unnecessary overrides by checking the condition before setting the evaluation type

    Add a condition to check if disable_llm_chunk_filter is True before setting
    llm_evaluation_type to LLMEvaluationType.SKIP to avoid unnecessary overrides.

    backend/danswer/search/preprocessing/preprocessing.py [151-156]

    -if disable_llm_chunk_filter:
    -    if llm_evaluation_type:
    -        logger.info(
    -            "LLM chunk filtering would have run but has been globally disabled"
    -        )
    +if disable_llm_chunk_filter and llm_evaluation_type != LLMEvaluationType.SKIP:
    +    logger.info(
    +        "LLM chunk filtering would have run but has been globally disabled"
    +    )
         llm_evaluation_type = LLMEvaluationType.SKIP
     
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: This suggestion improves the logic by ensuring that llm_evaluation_type is not unnecessarily overridden, which enhances code robustness and prevents potential logical errors.

    8
    Correct a typo in the print statement

    Correct the typo in the print statement from 'evlaution' to 'evaluation'.

    backend/danswer/search/pipeline.py [272]

    -print("gathering evlaution from serach")
    +print("gathering evaluation from search")
     
    • Apply this suggestion
    Suggestion importance[1-10]: 5

    Why: Correcting the typo improves readability and professionalism of the code, but it is a minor enhancement.

    5
    Maintainability
    Consolidate similar functions into a single function for better maintainability

    Refactor the toggle and removeToggle functions to a single function that accepts a
    boolean parameter. This approach reduces redundancy and improves code
    maintainability by using a single function to handle both showing and hiding
    actions.

    web/src/app/chat/ChatPage.tsx [88-1055]

    -toggle: (toggled?: boolean) => void;
    -...
    -const removeToggle = () => {
    -  setShowDocSidebar(false);
    -  toggle(false);
    +toggleSidebar: (show: boolean) => {
    +  setShowDocSidebar(show);
    +  toggle(show);
     };
     
    Suggestion importance[1-10]: 8

    Why: Consolidating similar functions into a single function improves maintainability and reduces redundancy, making the codebase cleaner and easier to manage.

    8
    Remove redundant condition check to streamline the code

    Remove the redundant check for DISABLE_AGENTIC_SEARCH since it is already handled in
    the LLMEvaluationType.SKIP condition.

    backend/danswer/search/pipeline.py [358-362]

     if self.search_query.evaluation_type == LLMEvaluationType.AGENTIC:
    -    if DISABLE_AGENTIC_SEARCH:
    -        raise ValueError(
    -            "Agentic search operation called while DISABLE_AGENTIC_SEARCH is toggled"
    -        )
    +    # Proceed with agentic search operations
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The suggestion removes a redundant check, which simplifies the code and improves maintainability. However, it is not a critical change.

    7
    Performance
    Optimize the creation of the list using list comprehension for better readability and performance

    Use list comprehension for optimizing the creation of relevant_indices list in
    relevant_sections_to_indices function.

    backend/danswer/search/utils.py [45-55]

    -relevant_indices = []
    -for index, section in enumerate(inference_sections):
    -    for relevance_chunk in relevance_chunks:
    -        if (
    -            section.center_chunk.document_id == relevance_chunk.document_id
    -            and section.center_chunk.chunk_id == relevance_chunk.chunk_id
    -            and relevance_chunk.relevant
    -        ):
    -            relevant_indices.append(index)
    -            break
    -return relevant_indices
    +return [
    +    index for index, section in enumerate(inference_sections)
    +    for relevance_chunk in relevance_chunks
    +    if section.center_chunk.document_id == relevance_chunk.document_id
    +    and section.center_chunk.chunk_id == relevance_chunk.chunk_id
    +    and relevance_chunk.relevant
    +]
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: The use of list comprehension improves code readability and performance, although the original code is functionally correct. This is a minor enhancement.

    7

    @qodo-code-review
    Copy link
    Copy Markdown

    qodo-code-review Bot commented Aug 1, 2024

    PR Documentation 📚

    Here is a list of the files that were modified in the PR, with docstring for each altered code component:

    models.py                                                                                                                                             

      DocumentRelevance (class) [+3/-2]                                                                                                                     
      Component signature:
      class DocumentRelevance(RelevanceChunk):

      Docstring:

      """
      DocumentRelevance
      
      A class that extends RelevanceChunk to include document-specific relevance information.
      
      Attributes
      ----------
      document_id : str
          The unique identifier for the document.
      chunk_id : int
          The unique identifier for the chunk within the document.
      """

    process_message.py                                                                                                                           

      stream_chat_message_objects (function) [+23/-11]                                                                                       
      Component signature:
      def stream_chat_message_objects(
          new_msg_req: CreateChatMessageRequest,
          user: User | None,
          db_session: Session,
          default_num_chunks: float = MAX_CHUNKS_FED_TO_CHAT,
          max_document_percentage: float = CHAT_TARGET_CHUNK_PERCENTAGE,
          use_existing_user_message: bool = False,
          litellm_additional_headers: dict[str, str] | None = None,
      ) -> ChatPacketStream:

      Docstring:

      """
      Streams chat message objects in a specific order:
      1. [conditional] Retrieved documents if a search needs to be run.
      2. [conditional] LLM selected chunk indices if LLM chunk filtering is turned on.
      3. [always] A set of streamed LLM tokens or an error if something fails.
      4. [always] Details on the final AI response message that is created.
      
      Args:
          new_msg_req (CreateChatMessageRequest): The request object containing details for the new chat message.
          user (User | None): The user initiating the chat message. Can be None.
          db_session (Session): The database session to use for database operations.
          default_num_chunks (float, optional): The default number of chunks to be fed to the chat. Defaults to MAX_CHUNKS_FED_TO_CHAT.
          max_document_percentage (float, optional): The maximum percentage of the document to include in the chat. Defaults to CHAT_TARGET_CHUNK_PERCENTAGE.
          use_existing_user_message (bool, optional): If specified, uses the last user message and does not create a new user message based on the `new_msg_req.message`. Defaults to False.
          litellm_additional_headers (dict[str, str] | None, optional): Additional headers for the LLM. Defaults to None.
      
      Yields:
          ChatPacket: Various chat packets including retrieved documents, LLM selected chunk indices, streamed LLM tokens, error messages, and final AI response message details.
      
      Raises:
          RuntimeError: If certain conditions are not met, such as missing documents or LLM being disabled.
      """

    chat.py                                                                                                                                                 

      update_search_docs_table_with_relevance (function) [+2/-2]                                                                   
      Component signature:
      def update_search_docs_table_with_relevance(
          db_session: Session,
          reference_db_search_docs: list[SearchDoc],
          relevance_summary: LLMRelevanceSummaryResponse,
      ) -> None:

      Docstring:

      """
      Update the search documents table with relevance information.
      
      This function updates the `is_relevant` and `relevance_explanation` fields
      of the `SearchDoc` entries in the database based on the relevance summaries
      provided.
      
      :param db_session: The SQLAlchemy session to use for database operations.
      :type db_session: Session
      :param reference_db_search_docs: A list of `SearchDoc` objects to update.
      :type reference_db_search_docs: list[SearchDoc]
      :param relevance_summary: The relevance summary containing relevance data for the documents.
      :type relevance_summary: LLMRelevanceSummaryResponse
      :return: None
      :rtype: None
      """

    answer_question.py                                                                                                                           

      stream_answer_objects (function) [+10/-12]                                                                                                   
      Component signature:
      def stream_answer_objects(
          query_req: DirectQARequest,
          user: User | None,
          max_document_tokens: int | None,
          max_history_tokens: int | None,
          db_session: Session,
          default_num_chunks: float = MAX_CHUNKS_FED_TO_CHAT,
          timeout: int = QA_TIMEOUT,
          bypass_acl: bool = False,
          use_citations: bool = False,
          danswerbot_flow: bool = False,
          retrieval_metrics_callback: (
              Callable[[RetrievalMetricsContainer], None] | None
          ) = None,
          rerank_metrics_callback: Callable[[RerankMetricsContainer], None] | None = None,
      ) -> AnswerObjectIterator:

      Docstring:

      """
      Streams in order:
      1. [always] Retrieved documents, stops flow if nothing is found
      2. [conditional] LLM selected chunk indices if LLM chunk filtering is turned on
      3. [always] A set of streamed DanswerAnswerPiece and DanswerQuotes at the end
                  or an error anywhere along the line if something fails
      4. [always] Details on the final AI response message that is created
      
      :param query_req: The request object containing the query and other parameters.
      :type query_req: DirectQARequest
      :param user: The user making the request, or None if not applicable.
      :type user: User | None
      :param max_document_tokens: Maximum number of tokens for the document.
      :type max_document_tokens: int | None
      :param max_history_tokens: Maximum number of tokens for the history.
      :type max_history_tokens: int | None
      :param db_session: The database session to use.
      :type db_session: Session
      :param default_num_chunks: Default number of chunks to be fed to the chat, defaults to MAX_CHUNKS_FED_TO_CHAT.
      :type default_num_chunks: float, optional
      :param timeout: Timeout for the answer generation, defaults to QA_TIMEOUT.
      :type timeout: int, optional
      :param bypass_acl: Whether to bypass access control, defaults to False.
      :type bypass_acl: bool, optional
      :param use_citations: Whether to use citations in the response, defaults to False.
      :type use_citations: bool, optional
      :param danswerbot_flow: Whether to use the danswerbot flow, defaults to False.
      :type danswerbot_flow: bool, optional
      :param retrieval_metrics_callback: Callback for retrieval metrics, defaults to None.
      :type retrieval_metrics_callback: Callable[[RetrievalMetricsContainer], None] | None, optional
      :param rerank_metrics_callback: Callback for rerank metrics, defaults to None.
      :type rerank_metrics_callback: Callable[[RerankMetricsContainer], None] | None, optional
      :return: An iterator that yields various answer objects.
      :rtype: AnswerObjectIterator
      """

      get_search_answer (function) [+3/-3]                                                                                                               
      Component signature:
      def get_search_answer(
          query_req: DirectQARequest,
          user: User | None,
          max_document_tokens: int | None,
          max_history_tokens: int | None,
          db_session: Session,
          answer_generation_timeout: int = QA_TIMEOUT,
          enable_reflexion: bool = False,
          bypass_acl: bool = False,
          use_citations: bool = False,
          danswerbot_flow: bool = False,
          retrieval_metrics_callback: (
              Callable[[RetrievalMetricsContainer], None] | None
          ) = None,
          rerank_metrics_callback: Callable[[RerankMetricsContainer], None] | None = None,
      ) -> OneShotQAResponse:

      Docstring:

      """
      Collects the streamed one-shot answer responses into a single object.
      
      :param query_req: The request object containing the query details.
      :type query_req: DirectQARequest
      :param user: The user making the request, if any.
      :type user: User | None
      :param max_document_tokens: The maximum number of tokens for documents.
      :type max_document_tokens: int | None
      :param max_history_tokens: The maximum number of tokens for history.
      :type max_history_tokens: int | None
      :param db_session: The database session to use.
      :type db_session: Session
      :param answer_generation_timeout: The timeout for answer generation, defaults to QA_TIMEOUT.
      :type answer_generation_timeout: int, optional
      :param enable_reflexion: Whether to enable reflexion, defaults to False.
      :type enable_reflexion: bool, optional
      :param bypass_acl: Whether to bypass ACL, defaults to False.
      :type bypass_acl: bool, optional
      :param use_citations: Whether to use citations, defaults to False.
      :type use_citations: bool, optional
      :param danswerbot_flow: Whether to use the danswerbot flow, defaults to False.
      :type danswerbot_flow: bool, optional
      :param retrieval_metrics_callback: Callback for retrieval metrics, if any.
      :type retrieval_metrics_callback: Callable[[RetrievalMetricsContainer], None] | None, optional
      :param rerank_metrics_callback: Callback for rerank metrics, if any.
      :type rerank_metrics_callback: Callable[[RerankMetricsContainer], None] | None, optional
      :return: The collected one-shot QA response.
      :rtype: OneShotQAResponse
      """

    models.py                                                                                                                                             

      DirectQARequest (class) [+3/-2]                                                                                                                         
      Component signature:
      class DirectQARequest(ChunkContext):

      Docstring:

      """
      DirectQARequest is a class that extends ChunkContext and is used to handle direct question-answering requests.
      
      Attributes
      ----------
      messages : list[ThreadMessage]
          A list of messages in the thread.
      prompt_id : int | None
          The ID of the prompt, if any.
      persona_id : int
          The ID of the persona.
      agentic : bool | None, optional
          Indicates if the request is agentic. Defaults to None.
      retrieval_options : RetrievalDetails
          Options for retrieval details. Defaults to a new instance of RetrievalDetails.
      skip_rerank : bool | None, optional
          Indicates if reranking should be skipped. Defaults to None.
      evaluation_type : LLMEvaluationType
          The type of evaluation to be used. Defaults to LLMEvaluationType.BASIC.
      chain_of_thought : bool, optional
          Indicates if chain of thought should be used. Defaults to False.
      return_contexts : bool, optional
          Indicates if contexts should be returned. Defaults to False.
      query_override : str | None, optional
          Allows the caller to specify the exact search query to use. Defaults to None.
      llm_doc_eval : bool, optional
          Toggles agentic evaluation, which evaluates the relevance of each response and provides a summary. Defaults to False.
      skip_gen_ai_answer_generation : bool, optional
          If True, skips generating an AI response to the search query. Defaults to False.
      
      Methods
      -------
      check_chain_of_thought_and_prompt_id(cls, values: dict[str, Any]) -> dict[str, Any]
          Validates that if chain_of_thought is True, prompt_id must be None.
      """

    enums.py                                                                                                                                               

      LLMEvaluationType (class) [+4/-3]                                                                                                                     
      Component signature:
      class LLMEvaluationType(str, Enum):

      Docstring:

      """
      LLMEvaluationType is an enumeration that defines different types of evaluations 
      that can be applied. This class inherits from both `str` and `Enum`.
      
      Attributes:
          AGENTIC (str): Applies agentic evaluation.
          BASIC (str): Applies boolean evaluation.
          SKIP (str): Skips evaluation.
      """

    models.py                                                                                                                                             

      SearchRequest (class) [+2/-2]                                                                                                                             
      Component signature:
      class SearchRequest(ChunkContext):

      Docstring:

      """
      Input to the SearchPipeline.
      
      Attributes
      ----------
      query : str
          The search query string.
      search_type : SearchType, default=SearchType.HYBRID
          The type of search to perform (keyword, semantic, or hybrid).
      human_selected_filters : BaseFilters, optional
          Filters selected by the user.
      enable_auto_detect_filters : bool, optional
          Flag to enable or disable automatic detection of filters.
      persona : Persona, optional
          The persona associated with the search request.
      offset : int, optional
          The offset for pagination.
      limit : int, optional
          The limit for pagination.
      recency_bias_multiplier : float, default=1.0
          Multiplier to bias recent documents.
      hybrid_alpha : float, default=HYBRID_ALPHA
          Alpha value for hybrid search.
      skip_rerank : bool, optional
          Flag to forcibly skip or run the rerank step.
      evaluation_type : LLMEvaluationType, default=LLMEvaluationType.BASIC
          The type of evaluation to perform (agentic, basic, or skip).
      
      Config
      ------
      arbitrary_types_allowed : bool
          Allows arbitrary types in the model.
      """

      SearchQuery (class) [+2/-2]                                                                                                                                 
      Component signature:
      class SearchQuery(ChunkContext):

      Docstring:

      """
      SearchQuery class is used to define the structure of a search query with various parameters and filters.
      
      Attributes
      ----------
      query : str
          The search query string.
      filters : IndexFilters
          Filters to apply to the search query.
      recency_bias_multiplier : float
          Multiplier to apply a recency bias to the search results.
      num_hits : int, optional
          Number of hits to return, default is NUM_RETURNED_HITS.
      offset : int, optional
          Offset for the search results, default is 0.
      search_type : SearchType, optional
          Type of search to perform, default is SearchType.HYBRID.
      skip_rerank : bool, optional
          Whether to skip reranking of results, default is not ENABLE_RERANKING_REAL_TIME_FLOW.
      evaluation_type : LLMEvaluationType
          Type of evaluation to perform.
      num_rerank : int or None, optional
          Number of results to rerank, only used if not skip_rerank, default is NUM_RERANKED_RESULTS.
      max_llm_filter_sections : int, optional
          Maximum number of sections to filter using LLM, only used if not skip_llm_chunk_filter, default is NUM_RERANKED_RESULTS.
      
      Config
      ------
      frozen : bool
          Configuration to make the model immutable.
      """

    pipeline.py                                                                                                                                         

      __init__ (method) [+5/-3]                                                                                                                                     
      Component signature:
      def __init__(
          self,
          search_request: SearchRequest,
          user: User | None,
          llm: LLM,
          fast_llm: LLM,
          db_session: Session,
          bypass_acl: bool = False,
          retrieval_metrics_callback: (
              Callable[[RetrievalMetricsContainer], None] | None
          ) = None,
          rerank_metrics_callback: Callable[[RerankMetricsContainer], None] | None = None,
          prompt_config: PromptConfig | None = None,
          pruning_config: DocumentPruningConfig | None = None,
      ):

      Docstring:

      """
      Initialize the SearchPipeline.
      
      :param search_request: The search request containing query and other parameters.
      :type search_request: SearchRequest
      :param user: The user making the search request, optional.
      :type user: User | None
      :param llm: The primary language model used for processing.
      :type llm: LLM
      :param fast_llm: A faster, possibly less accurate language model for quick processing.
      :type fast_llm: LLM
      :param db_session: The database session for accessing the embedding model and other data.
      :type db_session: Session
      :param bypass_acl: Flag to bypass access control lists, use with caution.
      :type bypass_acl: bool, optional
      :param retrieval_metrics_callback: Callback function for retrieval metrics, optional.
      :type retrieval_metrics_callback: Callable[[RetrievalMetricsContainer], None] | None
      :param rerank_metrics_callback: Callback function for rerank metrics, optional.
      :type rerank_metrics_callback: Callable[[RerankMetricsContainer], None] | None
      :param prompt_config: Configuration for the prompt, optional.
      :type prompt_config: PromptConfig | None
      :param pruning_config: Configuration for document pruning, optional.
      :type pruning_config: DocumentPruningConfig | None
      """

      final_context_sections (method) [+7/-0]                                                                                                         
      Component signature:
      def final_context_sections(self) -> list[InferenceSection]:

      Docstring:

      """
      Get the final context sections after merging the reranked sections.
      
      This property method checks if the final context sections have already been computed.
      If not, it merges the reranked sections to produce the final context sections.
      
      Returns:
          list[InferenceSection]: A list of final context sections.
      """

      relevant_section_indices (method) [+28/-3]                                                                                                   
      Component signature:
      def relevant_section_indices(self) -> list[DocumentRelevance]:

      Docstring:

      """
      Determine the relevant section indices based on the evaluation type specified in the search query.
      
      Returns:
          list[DocumentRelevance]: A list of DocumentRelevance objects indicating the relevance of each section.
      
      Raises:
          ValueError: If LLM evaluation is disabled or agentic search is toggled off when requested.
      
      Notes:
          - If the evaluation type is SKIP, a ValueError is raised.
          - If the evaluation type is AGENTIC and agentic search is disabled, a ValueError is raised.
          - If the evaluation type is AGENTIC, it evaluates each section using the LLM and returns the results.
          - If the evaluation type is not AGENTIC, it retrieves the relevant section indices from the postprocessing generator.
      """

      section_relevance_list (method) [+7/-3]                                                                                                         
      Component signature:
      def section_relevance_list(self) -> list[bool]:

      Docstring:

      """
      Determine the relevance of each section based on LLM evaluation.
      
      This method compares the indices of relevant sections identified by the LLM
      with the final context sections and returns a list of boolean values indicating
      whether each section is relevant or not.
      
      Returns:
          list[bool]: A list where each element is True if the corresponding section
          is relevant, otherwise False.
      """

    postprocessing.py                                                                                                                             

      should_apply_llm_based_relevance_filter (function) [+1/-1]                                                                   
      Component signature:
      def should_apply_llm_based_relevance_filter(query: SearchQuery) -> bool:

      Docstring:

      """
      Determine whether to apply LLM-based relevance filtering based on the evaluation type of the search query.
      
      :param query: The search query containing the evaluation type.
      :type query: SearchQuery
      :return: True if LLM-based relevance filtering should be applied, False otherwise.
      :rtype: bool
      """

      search_postprocessing (function) [+10/-10]                                                                                                   
      Component signature:
      def search_postprocessing(
          search_query: SearchQuery,
          retrieved_sections: list[InferenceSection],
          llm: LLM,
          rerank_metrics_callback: Callable[[RerankMetricsContainer], None] | None = None,
      ) -> Iterator[list[InferenceSection] | list[DocumentRelevance]]:

      Docstring:

      """
      Post-processes the search results by optionally reranking and filtering sections based on relevance.
      
      This function performs the following steps:
      1. Checks if reranking is needed and adds the reranking task to the post-processing tasks.
      2. If reranking is not needed, yields the retrieved sections immediately.
      3. Checks if LLM-based relevance filtering is needed and adds the filtering task to the post-processing tasks.
      4. Runs the post-processing tasks in parallel.
      5. Yields the reranked sections if reranking was performed.
      6. Yields the document relevance results based on LLM filtering.
      
      :param search_query: The search query containing the query string and various configurations.
      :type search_query: SearchQuery
      :param retrieved_sections: The list of sections retrieved from the initial search.
      :type retrieved_sections: list[InferenceSection]
      :param llm: The language model used for relevance filtering.
      :type llm: LLM
      :param rerank_metrics_callback: Optional callback function to handle rerank metrics.
      :type rerank_metrics_callback: Callable[[RerankMetricsContainer], None] | None
      :return: An iterator yielding lists of either reranked sections or document relevance results.
      :rtype: Iterator[list[InferenceSection] | list[DocumentRelevance]]
      """

    @qodo-code-review qodo-code-review Bot added other and removed documentation Improvements or additions to documentation labels Aug 1, 2024
    @qodo-code-review
    Copy link
    Copy Markdown

    qodo-code-review Bot commented Aug 1, 2024

    PR Description updated to latest commit (625cfd7)

    @ajabhish
    Copy link
    Copy Markdown
    Owner Author

    ajabhish commented Aug 1, 2024

    Uploading Runs store by ajitesh123 · Pull Request #39 · ajitesh123_empirical.gif…

    @ajabhish
    Copy link
    Copy Markdown
    Owner Author

    ajabhish commented Aug 1, 2024

    /review

    @qodo-code-review
    Copy link
    Copy Markdown

    Persistent review updated to latest commit 625cfd7

    Copy link
    Copy Markdown

    Choose a reason for hiding this comment

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

    Changes walkthrough 📝

    Enhancement
    pipeline.py (+48/-31)
    Enhanced search pipeline with new evaluation types and relevance
    tracking.

    backend/danswer/search/pipeline.py

  • Introduced DocumentRelevance for better relevance tracking.
  • Added LLMEvaluationType to handle different evaluation types.
  • Refactored properties to use new evaluation logic.
  • answer_question.py (+12/-14)
    Integrated LLMEvaluationType and updated response handling.

    backend/danswer/one_shot_answer/answer_question.py

  • Integrated LLMEvaluationType into the search tool.
  • Modified response handling to use DocumentRelevance.
  • search_tool.py (+20/-13)
    Added LLMEvaluationType and updated context handling.       

    backend/danswer/tools/search/search_tool.py

  • Added LLMEvaluationType to the search tool.
  • Updated context section handling and pruning logic.
  • query_backend.py (+19/-7)
    Integrated LLMEvaluationType into query backend.                 

    backend/ee/danswer/server/query_and_chat/query_backend.py

  • Integrated LLMEvaluationType into search request handling.
  • Updated document relevance index handling.
  • process_message.py (+24/-10)
    Added LLMEvaluationType and updated relevance handling.   

    backend/danswer/chat/process_message.py

  • Added LLMEvaluationType to search tool initialization.
  • Updated relevance index handling.
  • postprocessing.py (+12/-4)
    Added DocumentRelevance and integrated LLMEvaluationType.

    backend/danswer/search/postprocessing/postprocessing.py

  • Added DocumentRelevance for post-processing.
  • Integrated LLMEvaluationType into post-processing logic.
  • preprocessing.py (+12/-7)
    Integrated LLMEvaluationType into retrieval preprocessing.

    backend/danswer/search/preprocessing/preprocessing.py

  • Integrated LLMEvaluationType into retrieval preprocessing.
  • Updated evaluation type handling.
  • models.py (+3/-3)
    Added LLMEvaluationType to search models.                               

    backend/danswer/search/models.py

  • Added LLMEvaluationType to search request and query models.
  • Removed skip_llm_chunk_filter.
  • utils.py (+35/-0)
    Added utility functions for relevance handling.                   

    backend/danswer/search/utils.py

    • Added utility functions for converting relevance to indices.
    agentic_evaluation.py (+8/-8)
    Updated agentic evaluation to use DocumentRelevance.         

    backend/danswer/secondary_llm_flows/agentic_evaluation.py

    • Updated agentic evaluation to return DocumentRelevance.
    models.py (+3/-1)
    Added LLMEvaluationType to DirectQARequest.                           

    backend/danswer/one_shot_answer/models.py

    • Added LLMEvaluationType to DirectQARequest.
    models.py (+2/-1)
    Added LLMEvaluationType to DocumentSearchRequest.               

    backend/ee/danswer/server/query_and_chat/models.py

    • Added LLMEvaluationType to DocumentSearchRequest.
    enums.py (+6/-0)
    Added LLMEvaluationType enum.                                                       

    backend/danswer/search/enums.py

    • Added LLMEvaluationType enum.
    chat.py (+1/-1)
    Updated relevance summary handling in the database.           

    backend/danswer/db/chat.py

    • Updated relevance summary handling in the database.
    models.py (+5/-0)
    Added DocumentRelevance model.                                                     

    backend/danswer/chat/models.py

    • Added DocumentRelevance model.
    ChatPage.tsx (+483/-470)
    Improved mobile resizing and sidebar toggling.                     

    web/src/app/chat/ChatPage.tsx

  • Improved mobile resizing and sidebar toggling.
  • Updated scroll and layout handling.
  • SearchSection.tsx (+97/-66)
    Added mobile redirection and updated sidebar handling.     

    web/src/components/search/SearchSection.tsx

  • Added mobile redirection to chat.
  • Updated sidebar and search bar handling.
  • Popup.tsx (+42/-7)
    Added mobile-specific positioning to Popup.                           

    web/src/components/popup/Popup.tsx

    • Added mobile-specific positioning and styles.
    FunctionalWrapper.tsx (+18/-9)
    Added mobile-specific toggle handling.                                     

    web/src/app/chat/shared_chat_search/FunctionalWrapper.tsx

    • Added mobile-specific toggle handling.
    ChatInputBar.tsx (+20/-12)
    Improved mobile input handling and layout.                             

    web/src/app/chat/input/ChatInputBar.tsx

    • Improved mobile input handling and layout.
    Header.tsx (+26/-10)
    Added mobile-specific sidebar toggle.                                       

    web/src/components/chat_search/Header.tsx

    • Added mobile-specific sidebar toggle.
    Messages.tsx (+10/-7)
    Improved mobile layout for messages.                                         

    web/src/app/chat/message/Messages.tsx

    • Improved mobile layout for messages.
    DocumentDisplay.tsx (+11/-5)
    Improved mobile layout for document display.                         

    web/src/components/search/DocumentDisplay.tsx

    • Improved mobile layout for document display.
    DocumentSidebar.tsx (+1/-39)
    Simplified document sidebar layout.                                           

    web/src/app/chat/documentSidebar/DocumentSidebar.tsx

    • Simplified document sidebar layout.
    SidebarWrapper.tsx (+8/-6)
    Added mobile-specific sidebar handling.                                   

    web/src/app/assistants/SidebarWrapper.tsx

    • Added mobile-specific sidebar handling.
    HistorySidebar.tsx (+11/-3)
    Added mobile-specific sidebar close handling.                       

    web/src/app/chat/sessionSidebar/HistorySidebar.tsx

    • Added mobile-specific sidebar close handling.
    hooks.ts (+21/-6)
    Added mobile-specific sidebar visibility handling.             

    web/src/components/chat_search/hooks.ts

    • Added mobile-specific sidebar visibility handling.
    ChatSessionDisplay.tsx (+10/-1)
    Added mobile-specific sidebar close on session select.     

    web/src/app/chat/sessionSidebar/ChatSessionDisplay.tsx

    • Added mobile-specific sidebar close on session select.
    layout.tsx (+20/-9)
    Added viewport meta tag for mobile.                                           

    web/src/app/layout.tsx

    • Added viewport meta tag for mobile.
    SearchBar.tsx (+10/-3)
    Improved mobile layout for search bar.                                     

    web/src/components/search/SearchBar.tsx

    • Improved mobile layout for search bar.
    ChatInputOption.tsx (+3/-3)
    Made name optional for chat input option.                               

    web/src/app/chat/input/ChatInputOption.tsx

    • Made name optional for chat input option.
    PagesTab.tsx (+4/-1)
    Added mobile-specific padding for pages tab.                         

    web/src/app/chat/sessionSidebar/PagesTab.tsx

    • Added mobile-specific padding for pages tab.
    UserDropdown.tsx (+6/-5)
    Improved layout for user dropdown.                                             

    web/src/components/UserDropdown.tsx

    • Improved layout for user dropdown.
    FixedLogo.tsx (+3/-3)
    Improved mobile layout for fixed logo.                                     

    web/src/app/chat/shared_chat_search/FixedLogo.tsx

    • Improved mobile layout for fixed logo.
    SettingsProvider.tsx (+14/-2)
    Added mobile detection to settings provider.                         

    web/src/components/settings/SettingsProvider.tsx

    • Added mobile detection to settings provider.
    SkippedSearch.tsx (+5/-2)
    Improved mobile layout for skipped search message.             

    web/src/app/chat/message/SkippedSearch.tsx

    • Improved mobile layout for skipped search message.
    AssistantsList.tsx (+1/-1)
    Improved mobile layout for assistants list.                           

    web/src/app/assistants/mine/AssistantsList.tsx

    • Improved mobile layout for assistants list.
    ChatIntro.tsx (+1/-1)
    Improved mobile layout for chat intro.                                     

    web/src/app/chat/ChatIntro.tsx

    • Improved mobile layout for chat intro.
    lib.tsx (+1/-0)
    Added mobile parameter to scroll on stream.                           

    web/src/app/chat/lib.tsx

    • Added mobile parameter to scroll on stream.
    AssistantsTab.tsx (+1/-0)
    Added spacing in assistants tab.                                                 

    web/src/app/chat/modal/configuration/AssistantsTab.tsx

    • Added spacing in assistants tab.
    lib.ts (+1/-0)
    Added isMobile to combined settings interface.                     

    web/src/components/settings/lib.ts

    • Added isMobile to combined settings interface.
    interfaces.ts (+1/-0)
    Added isMobile to combined settings interface.                     

    web/src/app/admin/settings/interfaces.ts

    • Added isMobile to combined settings interface.
    globals.css (+4/-0)
    Added prevent-scroll class.                                                           

    web/src/app/globals.css

    • Added prevent-scroll class.
    styles.css (+1/-0)
    Added font-family to popover content.                                       

    web/src/components/popover/styles.css

    • Added font-family to popover content.
    Bug fix
    SearchResultsDisplay.tsx (+2/-6)
    Fixed relevance key handling in search results display.   

    web/src/components/search/SearchResultsDisplay.tsx

    • Fixed relevance key handling in search results display.
    ToolsDisplay.tsx (+1/-1)
    Fixed overflow issue in tools display.                                     

    web/src/app/assistants/ToolsDisplay.tsx

    • Fixed overflow issue in tools display.
    Other
    page.tsx (+3/-4)
    Commented out welcome modal and instant SSR auto-refresh.

    web/src/app/chat/page.tsx

    • Commented out welcome modal and instant SSR auto-refresh.
    Configuration changes
    tailwind.config.js (+2/-0)
    Added mobile and desktop breakpoints.                                       

    web/tailwind-themes/tailwind.config.js

    • Added mobile and desktop breakpoints.

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    2 participants