Skip to content

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

3.0 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.
 */

.markdownContentWrapper {
  line-height: 1.8;
  :global(img) {
    max-width: 100%;
    height: auto;
  }
  :global(details.think) {
    padding-inline-start: 10px;
    color: #8b8b8b;
    border-inline-start: 2px solid #d5d3d3;
    margin-bottom: 10px;
    font-size: 12px;

    summary {
      cursor: pointer;
      font-weight: 500;
      color: #999;
      user-select: none;
      &:hover {
        color: #666;
      }
    }
  }
  :global(details.retrieving) {
    padding-inline-start: 10px;
    color: #8b8b8b;
    border-inline-start: 2px solid #a3d5c9;
    margin-bottom: 10px;
    font-size: 12px;

    summary {
      cursor: pointer;
      font-weight: 500;
      color: #6ba89a;
      user-select: none;
      &:hover {
        color: #4a8a7c;
      }
    }
  }
  :global(blockquote) {
    padding-inline-start: 10px;
    border-inline-start: 4px solid #ccc;
  }
  :global(ul),
  :global(ol) {
    margin: 0.5em 0;
    padding-inline-start: 1.5em;
  }
  :global(ul) {
    list-style-type: disc;
  }
  :global(ol) {
    list-style-type: decimal;
  }
  :global(li) {
    margin: 0.25em 0;
  }
  :global(li > p) {
    margin: 0.15em 0;
  }

  // RTL Support
  &[dir='rtl'] {
    text-align: start;
  }
}

.referencePopoverWrapper {
  max-width: 50vw;
}

.referenceChunkImage {
  width: 10vw;
  object-fit: contain;
}

.referenceInnerChunkImage {
  display: block;
  object-fit: contain;
  max-width: 100%;
  max-height: 6vh;
}

.referenceImagePreview {
  max-width: 45vw;
  max-height: 45vh;
}
.chunkContentText {
  .chunkText;
  max-height: 45vh;
  overflow-y: auto;

  // RTL Support
  &[dir='rtl'] {
    text-align: start;
  }
}
.documentLink {
  padding: 0;
}

.referenceIcon {
  padding: 0 6px;
}

.cursor {
  display: inline-block;
  width: 1px;
  height: 16px;
  background-color: black;
  animation: blink 0.6s infinite;
  vertical-align: text-top;
  @keyframes blink {
    0% {
      opacity: 1;
    }
    50% {
      opacity: 0;
    }
    100% {
      opacity: 1;
    }
  }
}

.fileThumbnail {
  display: inline-block;
  max-width: 40px;
}

.artifactImageWrapper {
  display: block;
  margin: 8px 0;
}

.artifactImage {
  max-width: 100%;
  max-height: 60vh;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  display: block;
}

.artifactDownload {
  display: inline-block;
  margin-top: 4px;
  font-size: 12px;
  color: #1677ff;
  text-decoration: none;
  &:hover {
    text-decoration: underline;
  }
}