@retrivora-ai/rag-engine 2.3.1 → 2.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -240,7 +240,6 @@ export function ChatWindow({
240
240
  };
241
241
 
242
242
  useEffect(() => {
243
- // eslint-disable-next-line react-hooks/set-state-in-effect
244
243
  setMounted(true);
245
244
  }, []);
246
245
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  import React from 'react';
4
4
  import { Check, Copy } from 'lucide-react';
5
- import { Snippet } from '@/app/types';
5
+ import type { Snippet } from '../app/types';
6
6
 
7
7
  export function CodeViewer({ snippet }: { snippet: Snippet }) {
8
8
  const [copied, setCopied] = React.useState(false);
@@ -14,7 +14,6 @@ import { RagConfig } from "../config/RagConfig";
14
14
  * - Invocation uses `{ messages: [...] }` instead of `{ input, chat_history }`.
15
15
  */
16
16
  export class LangChainAgent {
17
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
18
17
  private agent?: any;
19
18
 
20
19
  constructor(private pipeline: Pipeline, private config: RagConfig) {}
@@ -75,7 +74,6 @@ export class LangChainAgent {
75
74
  }
76
75
 
77
76
  this.agent = createAgent({
78
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
79
77
  model: chatModel as any,
80
78
  tools: [searchTool],
81
79
  systemPrompt: finalSystemPrompt,
package/src/index.ts CHANGED
@@ -26,14 +26,9 @@ export { useRagChat } from './hooks/useRagChat';
26
26
  // ── Utils ─────────────────────────────────────────────────────
27
27
  export { addSynonyms } from './utils/synonyms';
28
28
 
29
- // ── Visualization Decision Engine & Rendering ──────────────────
30
- export {
31
- VisualizationDecisionEngine,
32
- decideVisualization,
33
- RendererRegistry,
34
- IntentClassifier,
35
- RuleEngine,
36
- } from './rendering';
29
+ // ── Visualization Types ────────────────────────────────────────
30
+ // Runtime rendering utilities are exported from the server entrypoint to
31
+ // avoid pulling the rendering engine into client bundles unnecessarily.
37
32
  export type {
38
33
  RenderDecision,
39
34
  RenderType,
@@ -42,7 +37,7 @@ export type {
42
37
  DecisionContext,
43
38
  IRenderRule,
44
39
  IRendererStrategy,
45
- } from './rendering';
40
+ } from './rendering/types';
46
41
 
47
42
  // ── Types (Interfaces/Types only, no Node.js deps) ─────────────
48
43
  export type {
@@ -106,7 +106,6 @@ export class MilvusProvider extends BaseVectorProvider {
106
106
  }));
107
107
  }
108
108
 
109
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
110
109
  async delete(id: string | number, _namespace?: string): Promise<void> {
111
110
  await this.http.post('/v1/vector/delete', {
112
111
  collectionName: this.indexName,
@@ -11,7 +11,6 @@ import { ValidationError } from '../../core/ConfigValidator';
11
11
  export class MongoDBProvider extends BaseVectorProvider {
12
12
  private client: MongoClient;
13
13
  private db?: Db;
14
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
14
  private collection?: Collection<any>;
16
15
  private dbName: string;
17
16
  private collectionName: string;
@@ -436,11 +436,11 @@ export class MultiTablePostgresProvider extends BaseVectorProvider {
436
436
  return finalSorted.slice(0, Math.max(topK, 15));
437
437
  }
438
438
 
439
- async delete(_id: string | number, _namespace?: string): Promise<void> { // eslint-disable-line @typescript-eslint/no-unused-vars
439
+ async delete(_id: string | number, _namespace?: string): Promise<void> {
440
440
  console.warn('[MultiTablePostgresProvider] delete() is a no-op for multi-table mode.');
441
441
  }
442
442
 
443
- async deleteNamespace(_namespace: string): Promise<void> { // eslint-disable-line @typescript-eslint/no-unused-vars
443
+ async deleteNamespace(_namespace: string): Promise<void> {
444
444
  console.warn('[MultiTablePostgresProvider] deleteNamespace() is a no-op for multi-table mode.');
445
445
  }
446
446
 
@@ -61,7 +61,6 @@ export class RedisProvider extends BaseVectorProvider {
61
61
  }
62
62
  }
63
63
 
64
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
65
64
  async query(vector: number[], topK: number, namespace?: string, _filter?: Record<string, unknown>): Promise<VectorMatch[]> {
66
65
  const payload = {
67
66
  index: this.indexName,
@@ -113,7 +113,6 @@ export class WeaviateProvider extends BaseVectorProvider {
113
113
  }));
114
114
  }
115
115
 
116
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
117
116
  async delete(id: string, _namespace?: string): Promise<void> {
118
117
  await this.http.delete(`/v1/objects/${this.indexName}/${id}`);
119
118
  }
@@ -27,7 +27,6 @@ export class LlamaIndexIngestor {
27
27
  const doc = new Document({ text, metadata: options.metadata || {} });
28
28
  const nodes = splitter.getNodesFromDocuments([doc]);
29
29
 
30
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
31
30
  return (nodes as any[]).map((node: any, index: number) => ({
32
31
  id: `${options.docId || 'doc'}_node_${index}`,
33
32
  content: node.getContent(MetadataMode.ALL),