UNPKG

@restnfeel/agentc-starter-kit

Version:

한국어 기업용 CMS 모듈 - Task Master AI와 함께 빠르게 웹사이트를 구현할 수 있는 재사용 가능한 컴포넌트 시스템

28 lines (25 loc) 833 B
import { BaseDocumentLoader } from './base.js'; class TextDocumentLoader extends BaseDocumentLoader { constructor() { super(...arguments); this.supportedExtensions = ["txt", "md", "markdown"]; } async load(filePath, content) { try { const text = content.toString("utf-8"); const cleanedText = this.cleanText(text); const metadata = this.createBaseMetadata(filePath, content.length); return { id: this.generateDocumentId(filePath), content: cleanedText, metadata, source: filePath, }; } catch (error) { throw new Error(`Failed to load text document: ${error}`); } } } export { TextDocumentLoader }; //# sourceMappingURL=text.js.map