Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

2.1 KB
Raw Blame
/*
 *  Copyright 2026 The InfiniFlow Authors. All Rights Reserved.
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

.messageItem {
  padding: 24px 0;
  .messageItemSection {
    display: inline-block;
  }
  .messageItemSectionLeft {
    width: 80%;
  }
  .messageItemContent {
    display: inline-flex;
    gap: 20px;
    width: 100%;
    min-width: 0;
  }
  .messageItemContentReverse {
    flex-direction: row-reverse;
  }

  .messageTextBase() {
    padding: 6px 10px;
    border-radius: 8px;
    & > p {
      margin: 0;
    }
  }
  .messageText {
    .chunkText();
    .messageTextBase();
    // background-color: #e6f4ff;
    word-break: break-word;
  }
  .messageTextDark {
    .chunkText();
    .messageTextBase();
    padding: 0;
    word-break: break-word;
    :global(details.think) {
      color: rgb(166, 166, 166);
      border-inline-start-color: rgb(78, 78, 86);

      summary {
        color: rgb(140, 140, 140);
        &:hover {
          color: rgb(180, 180, 180);
        }
      }
    }
    :global(details.retrieving) {
      color: rgb(166, 166, 166);
      border-inline-start-color: rgb(60, 100, 90);

      summary {
        color: rgb(120, 170, 155);
        &:hover {
          color: rgb(150, 200, 185);
        }
      }
    }
  }

  .messageUserText {
    .chunkText();
    .messageTextBase();
    background-color: rgba(255, 255, 255, 0.3);
    word-break: break-word;
    text-align: justify;
  }
  .messageEmpty {
    width: 300px;
  }

  .thumbnailImg {
    max-width: 20px;
  }
}

.messageItemLeft {
  text-align: start;
}

.messageItemRight {
  text-align: end;
}