Skip to content

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

463 B
Raw Blame
export interface IProgressLogEntry {
  key: number;
  text: string;
  isError: boolean;
  isWarning: boolean;
}

export const parseProgressMsg = (progressMsg?: string): IProgressLogEntry[] =>
  (progressMsg ?? '')
    .split('\n')
    .filter((line) => line.trim().length > 0)
    .map((line, index) => ({
      key: index,
      text: line,
      isError: line.includes('[ERROR]') || line.startsWith('ERROR:'),
      isWarning: line.includes('[WARN]'),
    }));