52 lines
1.0 KiB
TypeScript
52 lines
1.0 KiB
TypeScript
export type KnowledgeSourceType =
|
|
| 'user_chat'
|
|
| 'imported_chat'
|
|
| 'imported_ai_chat'
|
|
| 'imported_document'
|
|
| 'doc'
|
|
| 'note'
|
|
| 'spec'
|
|
| 'research'
|
|
| 'other';
|
|
|
|
export type KnowledgeSourceOrigin =
|
|
| 'chatgpt'
|
|
| 'gemini'
|
|
| 'claude'
|
|
| 'cursor'
|
|
| 'vibn'
|
|
| 'other';
|
|
|
|
export type KnowledgeImportance = 'primary' | 'supporting' | 'irrelevant';
|
|
|
|
export interface ChunkMetadata {
|
|
chunkIndex: number;
|
|
totalChunks: number;
|
|
startChar: number;
|
|
endChar: number;
|
|
tokenCount: number;
|
|
}
|
|
|
|
export interface KnowledgeSourceMeta {
|
|
origin?: KnowledgeSourceOrigin;
|
|
url?: string | null;
|
|
filename?: string | null;
|
|
createdAtOriginal?: string | null;
|
|
importance?: KnowledgeImportance;
|
|
tags?: string[];
|
|
chunkMetadata?: ChunkMetadata;
|
|
}
|
|
|
|
export interface KnowledgeItem {
|
|
id: string;
|
|
projectId: string;
|
|
sourceType: KnowledgeSourceType;
|
|
title?: string | null;
|
|
content: string;
|
|
sourceMeta?: KnowledgeSourceMeta;
|
|
createdAt: FirebaseFirestore.Timestamp;
|
|
updatedAt: FirebaseFirestore.Timestamp;
|
|
}
|
|
|
|
|