@eclipse-lyra/extension-rag-system 0.7.57 → 0.7.59

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.
package/dist/api.js CHANGED
@@ -1,90 +1,48 @@
1
- import { c, a, d, e, b, g, r, s } from "./rag-service-Bs_tAGWe.js";
2
- import { createRAGToolExecutor, integrateRAGWithAI, ragPromptEnhancer, registerRAGCommands } from "./rag-integration-DADxKKrU.js";
1
+ import { c as createIndexValuesFromArray, l as euclideanDistance, m as embeddingService, n as searchWorkspaceDocuments, o as documentIndexService, s as cosineSimilarity, t as ragService, u as getIndexValueArray } from "./rag-service-Chw9PNZn.js";
2
+ import { i as registerRAGCommands, n as integrateRAGWithAI, r as ragPromptEnhancer, t as createRAGToolExecutor } from "./rag-integration-DxW9zwLt.js";
3
+ //#region src/utils/context-scopes.ts
3
4
  function createEditorScope(openFiles) {
4
- return {
5
- includePaths: openFiles
6
- };
5
+ return { includePaths: openFiles };
7
6
  }
8
7
  function createDirectoryScope(directoryPath, recursive = true) {
9
- const pattern = recursive ? `^${directoryPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}/.*` : `^${directoryPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}/[^/]+$`;
10
- return {
11
- pathPattern: new RegExp(pattern)
12
- };
8
+ const pattern = recursive ? `^${directoryPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}/.*` : `^${directoryPath.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}/[^/]+$`;
9
+ return { pathPattern: new RegExp(pattern) };
13
10
  }
14
11
  function createFileTypeScope(fileTypes) {
15
- const pattern = `\\.(${fileTypes.join("|")})$`;
16
- return {
17
- pathPattern: new RegExp(pattern)
18
- };
12
+ const pattern = `\\.(${fileTypes.join("|")})$`;
13
+ return { pathPattern: new RegExp(pattern) };
19
14
  }
20
15
  function combineScopes(...scopes) {
21
- const validScopes = scopes.filter((s2) => s2 !== null);
22
- if (validScopes.length === 0) {
23
- return null;
24
- }
25
- if (validScopes.length === 1) {
26
- return validScopes[0];
27
- }
28
- const combined = {};
29
- const allIncludePaths = [];
30
- const allExcludePaths = [];
31
- const allTags = [];
32
- const allMetadataFilters = [];
33
- for (const scope of validScopes) {
34
- if (scope.includePaths) {
35
- allIncludePaths.push(...scope.includePaths);
36
- }
37
- if (scope.excludePaths) {
38
- allExcludePaths.push(...scope.excludePaths);
39
- }
40
- if (scope.tags) {
41
- allTags.push(...scope.tags);
42
- }
43
- if (scope.metadataFilter) {
44
- allMetadataFilters.push(scope.metadataFilter);
45
- }
46
- if (scope.pathPattern) {
47
- const existingPattern = combined.pathPattern;
48
- if (existingPattern) {
49
- const newPattern = scope.pathPattern instanceof RegExp ? scope.pathPattern : new RegExp(scope.pathPattern);
50
- combined.pathPattern = new RegExp(`(${existingPattern instanceof RegExp ? existingPattern.source : existingPattern})|(${newPattern.source})`);
51
- } else {
52
- combined.pathPattern = scope.pathPattern;
53
- }
54
- }
55
- }
56
- if (allIncludePaths.length > 0) {
57
- combined.includePaths = [...new Set(allIncludePaths)];
58
- }
59
- if (allExcludePaths.length > 0) {
60
- combined.excludePaths = [...new Set(allExcludePaths)];
61
- }
62
- if (allTags.length > 0) {
63
- combined.tags = [...new Set(allTags)];
64
- }
65
- if (allMetadataFilters.length > 0) {
66
- combined.metadataFilter = (doc) => {
67
- return allMetadataFilters.every((filter) => filter(doc));
68
- };
69
- }
70
- return combined;
16
+ const validScopes = scopes.filter((s) => s !== null);
17
+ if (validScopes.length === 0) return null;
18
+ if (validScopes.length === 1) return validScopes[0];
19
+ const combined = {};
20
+ const allIncludePaths = [];
21
+ const allExcludePaths = [];
22
+ const allTags = [];
23
+ const allMetadataFilters = [];
24
+ for (const scope of validScopes) {
25
+ if (scope.includePaths) allIncludePaths.push(...scope.includePaths);
26
+ if (scope.excludePaths) allExcludePaths.push(...scope.excludePaths);
27
+ if (scope.tags) allTags.push(...scope.tags);
28
+ if (scope.metadataFilter) allMetadataFilters.push(scope.metadataFilter);
29
+ if (scope.pathPattern) {
30
+ const existingPattern = combined.pathPattern;
31
+ if (existingPattern) {
32
+ const newPattern = scope.pathPattern instanceof RegExp ? scope.pathPattern : new RegExp(scope.pathPattern);
33
+ combined.pathPattern = new RegExp(`(${existingPattern instanceof RegExp ? existingPattern.source : existingPattern})|(${newPattern.source})`);
34
+ } else combined.pathPattern = scope.pathPattern;
35
+ }
36
+ }
37
+ if (allIncludePaths.length > 0) combined.includePaths = [...new Set(allIncludePaths)];
38
+ if (allExcludePaths.length > 0) combined.excludePaths = [...new Set(allExcludePaths)];
39
+ if (allTags.length > 0) combined.tags = [...new Set(allTags)];
40
+ if (allMetadataFilters.length > 0) combined.metadataFilter = (doc) => {
41
+ return allMetadataFilters.every((filter) => filter(doc));
42
+ };
43
+ return combined;
71
44
  }
72
- export {
73
- combineScopes,
74
- c as cosineSimilarity,
75
- createDirectoryScope,
76
- createEditorScope,
77
- createFileTypeScope,
78
- a as createIndexValuesFromArray,
79
- createRAGToolExecutor,
80
- d as documentIndexService,
81
- e as embeddingService,
82
- b as euclideanDistance,
83
- g as getIndexValueArray,
84
- integrateRAGWithAI,
85
- ragPromptEnhancer,
86
- r as ragService,
87
- registerRAGCommands,
88
- s as searchWorkspaceDocuments
89
- };
90
- //# sourceMappingURL=api.js.map
45
+ //#endregion
46
+ export { combineScopes, cosineSimilarity, createDirectoryScope, createEditorScope, createFileTypeScope, createIndexValuesFromArray, createRAGToolExecutor, documentIndexService, embeddingService, euclideanDistance, getIndexValueArray, integrateRAGWithAI, ragPromptEnhancer, ragService, registerRAGCommands, searchWorkspaceDocuments };
47
+
48
+ //# sourceMappingURL=api.js.map
package/dist/api.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sources":["../src/utils/context-scopes.ts"],"sourcesContent":["import { DocumentSearchScope } from '../document-index-service';\nimport { IndexedDocument } from '../document-index-service';\n\nexport interface ContextScopeProvider {\n getScope(): DocumentSearchScope | null;\n getName(): string;\n}\n\nexport class PathBasedScope implements ContextScopeProvider {\n constructor(\n private includePaths: string[],\n private excludePaths: string[] = [],\n private name: string = 'Path-based scope'\n ) {}\n\n getScope(): DocumentSearchScope {\n return {\n includePaths: this.includePaths,\n excludePaths: this.excludePaths\n };\n }\n\n getName(): string {\n return this.name;\n }\n}\n\nexport class PatternBasedScope implements ContextScopeProvider {\n constructor(\n private pattern: string | RegExp,\n private name: string = 'Pattern-based scope'\n ) {}\n\n getScope(): DocumentSearchScope {\n return {\n pathPattern: this.pattern\n };\n }\n\n getName(): string {\n return this.name;\n }\n}\n\nexport class TagBasedScope implements ContextScopeProvider {\n constructor(\n private tags: string[],\n private name: string = 'Tag-based scope'\n ) {}\n\n getScope(): DocumentSearchScope {\n return {\n tags: this.tags\n };\n }\n\n getName(): string {\n return this.name;\n }\n}\n\nexport class CustomScope implements ContextScopeProvider {\n constructor(\n private scope: DocumentSearchScope,\n private name: string = 'Custom scope'\n ) {}\n\n getScope(): DocumentSearchScope {\n return this.scope;\n }\n\n getName(): string {\n return this.name;\n }\n}\n\nexport function createEditorScope(openFiles: string[]): DocumentSearchScope {\n return {\n includePaths: openFiles\n };\n}\n\nexport function createDirectoryScope(directoryPath: string, recursive: boolean = true): DocumentSearchScope {\n const pattern = recursive \n ? `^${directoryPath.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}/.*`\n : `^${directoryPath.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}/[^/]+$`;\n return {\n pathPattern: new RegExp(pattern)\n };\n}\n\nexport function createFileTypeScope(fileTypes: string[]): DocumentSearchScope {\n const pattern = `\\\\.(${fileTypes.join('|')})$`;\n return {\n pathPattern: new RegExp(pattern)\n };\n}\n\nexport function combineScopes(...scopes: (DocumentSearchScope | null)[]): DocumentSearchScope | null {\n const validScopes = scopes.filter((s): s is DocumentSearchScope => s !== null);\n if (validScopes.length === 0) {\n return null;\n }\n if (validScopes.length === 1) {\n return validScopes[0];\n }\n\n const combined: DocumentSearchScope = {};\n \n const allIncludePaths: string[] = [];\n const allExcludePaths: string[] = [];\n const allTags: string[] = [];\n const allMetadataFilters: Array<(doc: IndexedDocument) => boolean> = [];\n\n for (const scope of validScopes) {\n if (scope.includePaths) {\n allIncludePaths.push(...scope.includePaths);\n }\n if (scope.excludePaths) {\n allExcludePaths.push(...scope.excludePaths);\n }\n if (scope.tags) {\n allTags.push(...scope.tags);\n }\n if (scope.metadataFilter) {\n allMetadataFilters.push(scope.metadataFilter);\n }\n if (scope.pathPattern) {\n const existingPattern = combined.pathPattern;\n if (existingPattern) {\n const newPattern = scope.pathPattern instanceof RegExp \n ? scope.pathPattern \n : new RegExp(scope.pathPattern);\n combined.pathPattern = new RegExp(`(${existingPattern instanceof RegExp ? existingPattern.source : existingPattern})|(${newPattern.source})`);\n } else {\n combined.pathPattern = scope.pathPattern;\n }\n }\n }\n\n if (allIncludePaths.length > 0) {\n combined.includePaths = [...new Set(allIncludePaths)];\n }\n if (allExcludePaths.length > 0) {\n combined.excludePaths = [...new Set(allExcludePaths)];\n }\n if (allTags.length > 0) {\n combined.tags = [...new Set(allTags)];\n }\n if (allMetadataFilters.length > 0) {\n combined.metadataFilter = (doc: IndexedDocument) => {\n return allMetadataFilters.every(filter => filter(doc));\n };\n }\n\n return combined;\n}\n\n"],"names":["s"],"mappings":";;AA4EO,SAAS,kBAAkB,WAA0C;AACxE,SAAO;AAAA,IACH,cAAc;AAAA,EAAA;AAEtB;AAEO,SAAS,qBAAqB,eAAuB,YAAqB,MAA2B;AACxG,QAAM,UAAU,YACV,IAAI,cAAc,QAAQ,uBAAuB,MAAM,CAAC,QACxD,IAAI,cAAc,QAAQ,uBAAuB,MAAM,CAAC;AAC9D,SAAO;AAAA,IACH,aAAa,IAAI,OAAO,OAAO;AAAA,EAAA;AAEvC;AAEO,SAAS,oBAAoB,WAA0C;AAC1E,QAAM,UAAU,OAAO,UAAU,KAAK,GAAG,CAAC;AAC1C,SAAO;AAAA,IACH,aAAa,IAAI,OAAO,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ACpB,aAAS,OAAO,CAAC,GAAG,IAAI,IAAI,OAAO,CAAC;AAAA,EACxC;AACA,MAAI,mBAAmB,SAAS,GAAG;AAC/B,aAAS,iBAAiB,CAAC,QAAyB;AAChD,aAAO,mBAAmB,MAAM,CAAA,WAAU,OAAO,GAAG,CAAC;AAAA,IACzD;AAAA,EACJ;AAEA,SAAO;AACX;"}
1
+ {"version":3,"file":"api.js","names":[],"sources":["../src/utils/context-scopes.ts"],"sourcesContent":["import { DocumentSearchScope } from '../document-index-service';\nimport { IndexedDocument } from '../document-index-service';\n\nexport interface ContextScopeProvider {\n getScope(): DocumentSearchScope | null;\n getName(): string;\n}\n\nexport class PathBasedScope implements ContextScopeProvider {\n constructor(\n private includePaths: string[],\n private excludePaths: string[] = [],\n private name: string = 'Path-based scope'\n ) {}\n\n getScope(): DocumentSearchScope {\n return {\n includePaths: this.includePaths,\n excludePaths: this.excludePaths\n };\n }\n\n getName(): string {\n return this.name;\n }\n}\n\nexport class PatternBasedScope implements ContextScopeProvider {\n constructor(\n private pattern: string | RegExp,\n private name: string = 'Pattern-based scope'\n ) {}\n\n getScope(): DocumentSearchScope {\n return {\n pathPattern: this.pattern\n };\n }\n\n getName(): string {\n return this.name;\n }\n}\n\nexport class TagBasedScope implements ContextScopeProvider {\n constructor(\n private tags: string[],\n private name: string = 'Tag-based scope'\n ) {}\n\n getScope(): DocumentSearchScope {\n return {\n tags: this.tags\n };\n }\n\n getName(): string {\n return this.name;\n }\n}\n\nexport class CustomScope implements ContextScopeProvider {\n constructor(\n private scope: DocumentSearchScope,\n private name: string = 'Custom scope'\n ) {}\n\n getScope(): DocumentSearchScope {\n return this.scope;\n }\n\n getName(): string {\n return this.name;\n }\n}\n\nexport function createEditorScope(openFiles: string[]): DocumentSearchScope {\n return {\n includePaths: openFiles\n };\n}\n\nexport function createDirectoryScope(directoryPath: string, recursive: boolean = true): DocumentSearchScope {\n const pattern = recursive \n ? `^${directoryPath.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}/.*`\n : `^${directoryPath.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&')}/[^/]+$`;\n return {\n pathPattern: new RegExp(pattern)\n };\n}\n\nexport function createFileTypeScope(fileTypes: string[]): DocumentSearchScope {\n const pattern = `\\\\.(${fileTypes.join('|')})$`;\n return {\n pathPattern: new RegExp(pattern)\n };\n}\n\nexport function combineScopes(...scopes: (DocumentSearchScope | null)[]): DocumentSearchScope | null {\n const validScopes = scopes.filter((s): s is DocumentSearchScope => s !== null);\n if (validScopes.length === 0) {\n return null;\n }\n if (validScopes.length === 1) {\n return validScopes[0];\n }\n\n const combined: DocumentSearchScope = {};\n \n const allIncludePaths: string[] = [];\n const allExcludePaths: string[] = [];\n const allTags: string[] = [];\n const allMetadataFilters: Array<(doc: IndexedDocument) => boolean> = [];\n\n for (const scope of validScopes) {\n if (scope.includePaths) {\n allIncludePaths.push(...scope.includePaths);\n }\n if (scope.excludePaths) {\n allExcludePaths.push(...scope.excludePaths);\n }\n if (scope.tags) {\n allTags.push(...scope.tags);\n }\n if (scope.metadataFilter) {\n allMetadataFilters.push(scope.metadataFilter);\n }\n if (scope.pathPattern) {\n const existingPattern = combined.pathPattern;\n if (existingPattern) {\n const newPattern = scope.pathPattern instanceof RegExp \n ? scope.pathPattern \n : new RegExp(scope.pathPattern);\n combined.pathPattern = new RegExp(`(${existingPattern instanceof RegExp ? existingPattern.source : existingPattern})|(${newPattern.source})`);\n } else {\n combined.pathPattern = scope.pathPattern;\n }\n }\n }\n\n if (allIncludePaths.length > 0) {\n combined.includePaths = [...new Set(allIncludePaths)];\n }\n if (allExcludePaths.length > 0) {\n combined.excludePaths = [...new Set(allExcludePaths)];\n }\n if (allTags.length > 0) {\n combined.tags = [...new Set(allTags)];\n }\n if (allMetadataFilters.length > 0) {\n combined.metadataFilter = (doc: IndexedDocument) => {\n return allMetadataFilters.every(filter => filter(doc));\n };\n }\n\n return combined;\n}\n\n"],"mappings":";;;AA4EA,SAAgB,kB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AAe,CAAC,GAAG,IAAI,IAAI,gBAAgB,CAAC;AAEzD,KAAI,gBAAgB,SAAS,EACzB,UAAS,eAAe,CAAC,GAAG,IAAI,IAAI,gBAAgB,CAAC;AAEzD,KAAI,QAAQ,SAAS,EACjB,UAAS,OAAO,CAAC,GAAG,IAAI,IAAI,QAAQ,CAAC;AAEzC,KAAI,mBAAmB,SAAS,EAC5B,UAAS,kBAAkB,QAAyB;AAChD,SAAO,mBAAmB,OAAM,WAAU,OAAO,IAAI,CAAC;;AAI9D,QAAO"}
@@ -0,0 +1,11 @@
1
+ //#region src/i18n.de.json
2
+ var EXT_RAG_SYSTEM_NAME = "RAG-System";
3
+ var EXT_RAG_SYSTEM_DESC = "Retrieval-Augmented Generation System für Dokumentenindizierung, Suche und Abruf";
4
+ var i18n_de_default = {
5
+ EXT_RAG_SYSTEM_NAME,
6
+ EXT_RAG_SYSTEM_DESC
7
+ };
8
+ //#endregion
9
+ export { EXT_RAG_SYSTEM_DESC, EXT_RAG_SYSTEM_NAME, i18n_de_default as default };
10
+
11
+ //# sourceMappingURL=i18n.de-C4Oy9SoE.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.de-C4Oy9SoE.js","names":[],"sources":["../src/i18n.de.json"],"sourcesContent":["{\n \"EXT_RAG_SYSTEM_NAME\": \"RAG-System\",\n \"EXT_RAG_SYSTEM_DESC\": \"Retrieval-Augmented Generation System für Dokumentenindizierung, Suche und Abruf\"\n}\n"],"mappings":""}
@@ -0,0 +1,11 @@
1
+ //#region src/i18n.en.json
2
+ var EXT_RAG_SYSTEM_NAME = "RAG System";
3
+ var EXT_RAG_SYSTEM_DESC = "Retrieval-Augmented Generation system for document indexing, search and retrieval";
4
+ var i18n_en_default = {
5
+ EXT_RAG_SYSTEM_NAME,
6
+ EXT_RAG_SYSTEM_DESC
7
+ };
8
+ //#endregion
9
+ export { EXT_RAG_SYSTEM_DESC, EXT_RAG_SYSTEM_NAME, i18n_en_default as default };
10
+
11
+ //# sourceMappingURL=i18n.en-BGbyrXax.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"i18n.en-BGbyrXax.js","names":[],"sources":["../src/i18n.en.json"],"sourcesContent":["{\n \"EXT_RAG_SYSTEM_NAME\": \"RAG System\",\n \"EXT_RAG_SYSTEM_DESC\": \"Retrieval-Augmented Generation system for document indexing, search and retrieval\"\n}\n"],"mappings":""}
package/dist/index.js CHANGED
@@ -1,13 +1,19 @@
1
- import { i18n, extensionRegistry } from "@eclipse-lyra/core";
1
+ import { extensionRegistry, i18n } from "@eclipse-lyra/core";
2
2
  import pkg from "../package.json";
3
- const t = await i18n(/* @__PURE__ */ Object.assign({ "./i18n.de.json": () => import("./i18n.de-CcQ_-YBM.js"), "./i18n.en.json": () => import("./i18n.en-BUMbE-M4.js") }), true);
3
+ //#region src/index.ts
4
+ var t = await i18n(/* @__PURE__ */ Object.assign({
5
+ "./i18n.de.json": () => import("./i18n.de-C4Oy9SoE.js"),
6
+ "./i18n.en.json": () => import("./i18n.en-BGbyrXax.js")
7
+ }), true);
4
8
  extensionRegistry.registerExtension({
5
- id: pkg.name,
6
- name: t.EXT_RAG_SYSTEM_NAME,
7
- description: t.EXT_RAG_SYSTEM_DESC,
8
- loader: () => import("./rag-system-extension-BvmOXMX-.js"),
9
- icon: "database",
10
- experimental: true,
11
- dependencies: ["@eclipse-lyra/extension-ai-system", "@eclipse-lyra/extension-in-browser-ml"]
9
+ id: pkg.name,
10
+ name: t.EXT_RAG_SYSTEM_NAME,
11
+ description: t.EXT_RAG_SYSTEM_DESC,
12
+ loader: () => import("./rag-system-extension-COa1OXhK.js"),
13
+ icon: "database",
14
+ experimental: true,
15
+ dependencies: ["@eclipse-lyra/extension-ai-system", "@eclipse-lyra/extension-in-browser-ml"]
12
16
  });
13
- //# sourceMappingURL=index.js.map
17
+ //#endregion
18
+
19
+ //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/index.ts"],"sourcesContent":["import { extensionRegistry, i18n } from '@eclipse-lyra/core';\nimport pkg from '../package.json';\n\nconst t = await i18n(import.meta.glob('./i18n*.json'), true);\n\nextensionRegistry.registerExtension({\n id: pkg.name,\n name: t.EXT_RAG_SYSTEM_NAME,\n description: t.EXT_RAG_SYSTEM_DESC,\n loader: () => import(\"./rag-system-extension\"),\n icon: \"database\",\n experimental: true,\n dependencies: [\"@eclipse-lyra/extension-ai-system\", \"@eclipse-lyra/extension-in-browser-ml\"],\n});\n"],"names":[],"mappings":";;AAGA,MAAM,IAAI,MAAM,KAAK,uBAAA,OAAA,EAAA,kBAAA,MAAA,OAAA,uBAAA,GAAA,kBAAA,MAAA,OAAA,uBAAA,EAAA,CAAA,GAAkC,IAAI;AAE3D,kBAAkB,kBAAkB;AAAA,EAClC,IAAI,IAAI;AAAA,EACR,MAAM,EAAE;AAAA,EACR,aAAa,EAAE;AAAA,EACf,QAAQ,MAAM,OAAO,oCAAwB;AAAA,EAC7C,MAAM;AAAA,EACN,cAAc;AAAA,EACd,cAAc,CAAC,qCAAqC,uCAAuC;AAC7F,CAAC;"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../src/index.ts"],"sourcesContent":["import { extensionRegistry, i18n } from '@eclipse-lyra/core';\nimport pkg from '../package.json';\n\nconst t = await i18n(import.meta.glob('./i18n*.json'), true);\n\nextensionRegistry.registerExtension({\n id: pkg.name,\n name: t.EXT_RAG_SYSTEM_NAME,\n description: t.EXT_RAG_SYSTEM_DESC,\n loader: () => import(\"./rag-system-extension\"),\n icon: \"database\",\n experimental: true,\n dependencies: [\"@eclipse-lyra/extension-ai-system\", \"@eclipse-lyra/extension-in-browser-ml\"],\n});\n"],"mappings":";;;AAGA,IAAM,IAAI,MAAM,KAAK,uBAAA,OAAA;CAAA,wBAAA,OAAA;CAAA,wBAAA,OAAA;CAAA,CAAgC,EAAE,KAAK;AAE5D,kBAAkB,kBAAkB;CAClC,IAAI,IAAI;CACR,MAAM,EAAE;CACR,aAAa,EAAE;CACf,cAAc,OAAO;CACrB,MAAM;CACN,cAAc;CACd,cAAc,CAAC,qCAAqC,wCAAA;CACrD,CAAC"}
@@ -0,0 +1,2 @@
1
+ import { n as integrateRAGWithAI } from "./rag-integration-DxW9zwLt.js";
2
+ export { integrateRAGWithAI };
@@ -0,0 +1,173 @@
1
+ import { a as getWorkspacePath, f as SEARCH_CONFIG, i as SnippetExtractor, n as searchWorkspaceDocuments, o as documentIndexService, r as RAGResultFormatter, t as ragService } from "./rag-service-Chw9PNZn.js";
2
+ import { createLogger, registerAll, rootContext } from "@eclipse-lyra/core";
3
+ import { aiService } from "@eclipse-lyra/extension-ai-system/api";
4
+ //#region src/rag-integration.ts
5
+ var logger = createLogger("RAGIntegration");
6
+ var resultFormatter = new RAGResultFormatter(new SnippetExtractor());
7
+ var ragPromptEnhancer = {
8
+ priority: 10,
9
+ async enhance(prompt, context) {
10
+ try {
11
+ if ((await documentIndexService.getStats()).totalDocuments === 0) return prompt;
12
+ return `${prompt}\n\nIMPORTANT: When a user mentions a specific file name or path:
13
+ 1. ALWAYS first check if the file is indexed using rag.checindexed with the file path
14
+ 2. If indexed: Use rag.search-documents with filePath parameter to get relevant content from the indexed document
15
+ 3. If not indexed: Read the file directly using file commands (cat_file, ls, etc.)
16
+
17
+ NEVER use filePath or fileName parameters in rag.search-documents without first verifying the file is indexed with rag.checindexed. If you use a non-indexed file path/name, the search will return no results.
18
+
19
+ For general searches (not specific files), use rag.search-documents with just the query parameter to search across all indexed documents. This is more efficient than reading files one by one.`;
20
+ } catch (error) {
21
+ logger.warn(`RAG enhancement failed: ${error}`);
22
+ return prompt;
23
+ }
24
+ }
25
+ };
26
+ function createRAGToolExecutor() {
27
+ return async (toolName, params) => {
28
+ if (toolName === "search_workspace_documents") {
29
+ const query = params.query || "";
30
+ const limit = Math.min(params.limit || SEARCH_CONFIG.DEFAULT_LIMIT, SEARCH_CONFIG.MAX_LIMIT);
31
+ const fileType = params.fileType;
32
+ const filePath = params.filePath;
33
+ const fileName = params.fileName;
34
+ const results = await searchWorkspaceDocuments(query, {
35
+ limit,
36
+ fileType,
37
+ filePath,
38
+ fileName,
39
+ documentSearchScope: params.includePaths || params.excludePaths || params.pathPattern ? {
40
+ includePaths: params.includePaths,
41
+ excludePaths: params.excludePaths,
42
+ pathPattern: params.pathPattern
43
+ } : void 0
44
+ });
45
+ return {
46
+ results: resultFormatter.formatSearchResults(results),
47
+ total: results.length
48
+ };
49
+ }
50
+ throw new Error(`Unknown RAG tool: ${toolName}`);
51
+ };
52
+ }
53
+ function registerRAGCommands() {
54
+ registerAll({
55
+ command: {
56
+ id: "rag.search-documents",
57
+ name: "Search Workspace Documents (RAG)",
58
+ description: "Search indexed workspace documents for relevant content. IMPORTANT: Only use filePath or fileName if you have already verified the file is indexed using rag.checindexed. If the file is not indexed, this will return no results.",
59
+ parameters: [
60
+ {
61
+ name: "query",
62
+ description: "Search query (optional if filePath or fileName is provided)",
63
+ required: false
64
+ },
65
+ {
66
+ name: "limit",
67
+ description: "Maximum number of results",
68
+ required: false
69
+ },
70
+ {
71
+ name: "fileType",
72
+ description: "Filter by file type",
73
+ required: false
74
+ },
75
+ {
76
+ name: "filePath",
77
+ description: "Exact file path to search (relative to workspace root). Only use if you verified the file is indexed with rag.checindexed.",
78
+ required: false
79
+ },
80
+ {
81
+ name: "fileName",
82
+ description: "File name to search for (partial match supported). Only use if you verified the file is indexed with rag.checindexed.",
83
+ required: false
84
+ }
85
+ ]
86
+ },
87
+ handler: {
88
+ canExecute: () => true,
89
+ execute: async (context) => {
90
+ const query = context.params?.query || "";
91
+ const limit = context.params?.limit ? Math.min(parseInt(context.params.limit), SEARCH_CONFIG.MAX_LIMIT) : SEARCH_CONFIG.DEFAULT_LIMIT;
92
+ const fileType = context.params?.fileType;
93
+ const filePath = context.params?.filePath;
94
+ const fileName = context.params?.fileName;
95
+ if (!query && !filePath && !fileName) throw new Error("Either query, filePath, or fileName parameter must be provided");
96
+ const results = await searchWorkspaceDocuments(query, {
97
+ limit,
98
+ fileType,
99
+ filePath,
100
+ fileName
101
+ });
102
+ if ((filePath || fileName) && results.length === 0) return {
103
+ query: query || (filePath ? `filePath: ${filePath}` : `fileName: ${fileName}`),
104
+ results: [],
105
+ warning: `No indexed document found for ${filePath ? `file path "${filePath}"` : `file name "${fileName}"`}. The file may not be indexed. Use rag.checindexed to verify if a file is indexed before searching.`
106
+ };
107
+ return {
108
+ query: query || (filePath ? `filePath: ${filePath}` : fileName ? `fileName: ${fileName}` : ""),
109
+ results: resultFormatter.formatCommandResults(results)
110
+ };
111
+ }
112
+ }
113
+ });
114
+ registerAll({
115
+ command: {
116
+ id: "rag.checindexed",
117
+ name: "Check if File is Indexed",
118
+ description: "Check if a specific file is indexed in the document index. Use this to determine if you should use RAG search or read the file directly.",
119
+ parameters: [{
120
+ name: "filePath",
121
+ description: "The file path to check (relative to workspace root)",
122
+ required: true
123
+ }]
124
+ },
125
+ handler: {
126
+ canExecute: () => true,
127
+ execute: async (context) => {
128
+ const filePath = context.params?.filePath;
129
+ if (!filePath) throw new Error("File path parameter required");
130
+ const workspaceResult = await getWorkspacePath();
131
+ if (!workspaceResult) return {
132
+ indexed: false,
133
+ reason: "No workspace connected"
134
+ };
135
+ const { workspacePath } = workspaceResult;
136
+ const document = await documentIndexService.getDocumentByPath(workspacePath, filePath);
137
+ if (document) return {
138
+ indexed: true,
139
+ filePath: document.filePath,
140
+ fileName: document.fileName,
141
+ fileType: document.fileType,
142
+ indexedAt: new Date(document.indexedAt).toISOString(),
143
+ size: document.metadata.size
144
+ };
145
+ return {
146
+ indexed: false,
147
+ filePath,
148
+ reason: "File not found in document index"
149
+ };
150
+ }
151
+ }
152
+ });
153
+ }
154
+ function integrateRAGWithAI() {
155
+ try {
156
+ registerRAGCommands();
157
+ const promptBuilder = aiService.promptBuilder;
158
+ if (promptBuilder && typeof promptBuilder.addEnhancer === "function") {
159
+ promptBuilder.addEnhancer(ragPromptEnhancer);
160
+ logger.info("RAG prompt enhancer and commands registered - AI will be instructed to use RAG before reading files");
161
+ } else {
162
+ logger.warn("AI service prompt builder not available yet, will retry");
163
+ setTimeout(() => integrateRAGWithAI(), 1e3);
164
+ }
165
+ } catch (error) {
166
+ logger.warn(`Failed to integrate RAG with AI: ${error}`);
167
+ }
168
+ }
169
+ rootContext.put("ragService", ragService);
170
+ //#endregion
171
+ export { registerRAGCommands as i, integrateRAGWithAI as n, ragPromptEnhancer as r, createRAGToolExecutor as t };
172
+
173
+ //# sourceMappingURL=rag-integration-DxW9zwLt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rag-integration-DxW9zwLt.js","names":[],"sources":["../src/rag-integration.ts"],"sourcesContent":["import { ragService, searchWorkspaceDocuments } from './rag-service';\nimport { DocumentSearchScope } from './document-index-service';\nimport { documentIndexService } from './document-index-service';\nimport { getWorkspacePath } from './utils/workspace-utils';\nimport { rootContext } from '@eclipse-lyra/core';\nimport { SEARCH_CONFIG } from './utils/constants';\nimport { RAGResultFormatter } from './services/rag-result-formatter';\nimport { SnippetExtractor } from './utils/snippet-extractor';\nimport { aiService } from '@eclipse-lyra/extension-ai-system/api';\nimport { commandRegistry, registerAll } from '@eclipse-lyra/core';\nimport type { ExecutionContext } from '@eclipse-lyra/core';\nimport type { PromptEnhancer, ToolDefinition } from '@eclipse-lyra/extension-ai-system/api';\nimport { createLogger } from '@eclipse-lyra/core';\n\nconst logger = createLogger('RAGIntegration');\nconst resultFormatter = new RAGResultFormatter(new SnippetExtractor());\n\nexport const ragPromptEnhancer: PromptEnhancer = {\n priority: 10,\n async enhance(prompt: string, context: ExecutionContext): Promise<string> {\n try {\n const stats = await documentIndexService.getStats();\n if (stats.totalDocuments === 0) {\n return prompt;\n }\n\n const instruction = `IMPORTANT: When a user mentions a specific file name or path:\n1. ALWAYS first check if the file is indexed using rag.checindexed with the file path\n2. If indexed: Use rag.search-documents with filePath parameter to get relevant content from the indexed document\n3. If not indexed: Read the file directly using file commands (cat_file, ls, etc.)\n\nNEVER use filePath or fileName parameters in rag.search-documents without first verifying the file is indexed with rag.checindexed. If you use a non-indexed file path/name, the search will return no results.\n\nFor general searches (not specific files), use rag.search-documents with just the query parameter to search across all indexed documents. This is more efficient than reading files one by one.`;\n\n return `${prompt}\\n\\n${instruction}`;\n } catch (error) {\n logger.warn(`RAG enhancement failed: ${error}`);\n return prompt;\n }\n }\n};\n\nexport function createRAGToolExecutor() {\n return async (toolName: string, params: any): Promise<any> => {\n if (toolName === 'search_workspace_documents') {\n const query = params.query || '';\n const limit = Math.min(params.limit || SEARCH_CONFIG.DEFAULT_LIMIT, SEARCH_CONFIG.MAX_LIMIT);\n const fileType = params.fileType;\n const filePath = params.filePath;\n const fileName = params.fileName;\n\n const documentSearchScope: DocumentSearchScope | undefined = \n (params.includePaths || params.excludePaths || params.pathPattern)\n ? {\n includePaths: params.includePaths,\n excludePaths: params.excludePaths,\n pathPattern: params.pathPattern\n }\n : undefined;\n\n const results = await searchWorkspaceDocuments(query, {\n limit,\n fileType,\n filePath,\n fileName,\n documentSearchScope\n });\n\n return {\n results: resultFormatter.formatSearchResults(results),\n total: results.length\n };\n }\n\n throw new Error(`Unknown RAG tool: ${toolName}`);\n };\n}\n\nexport function registerRAGCommands() {\n registerAll({\n command: {\n id: 'rag.search-documents',\n name: 'Search Workspace Documents (RAG)',\n description: 'Search indexed workspace documents for relevant content. IMPORTANT: Only use filePath or fileName if you have already verified the file is indexed using rag.checindexed. If the file is not indexed, this will return no results.',\n parameters: [\n {\n name: 'query',\n description: 'Search query (optional if filePath or fileName is provided)',\n required: false\n },\n {\n name: 'limit',\n description: 'Maximum number of results',\n required: false\n },\n {\n name: 'fileType',\n description: 'Filter by file type',\n required: false\n },\n {\n name: 'filePath',\n description: 'Exact file path to search (relative to workspace root). Only use if you verified the file is indexed with rag.checindexed.',\n required: false\n },\n {\n name: 'fileName',\n description: 'File name to search for (partial match supported). Only use if you verified the file is indexed with rag.checindexed.',\n required: false\n }\n ]\n },\n handler: {\n canExecute: () => true,\n execute: async (context) => {\n const query = context.params?.query || '';\n const limit = context.params?.limit \n ? Math.min(parseInt(context.params.limit), SEARCH_CONFIG.MAX_LIMIT)\n : SEARCH_CONFIG.DEFAULT_LIMIT;\n const fileType = context.params?.fileType;\n const filePath = context.params?.filePath;\n const fileName = context.params?.fileName;\n\n if (!query && !filePath && !fileName) {\n throw new Error('Either query, filePath, or fileName parameter must be provided');\n }\n\n const results = await searchWorkspaceDocuments(query, {\n limit,\n fileType,\n filePath,\n fileName\n });\n\n if ((filePath || fileName) && results.length === 0) {\n return {\n query: query || (filePath ? `filePath: ${filePath}` : `fileName: ${fileName}`),\n results: [],\n warning: `No indexed document found for ${filePath ? `file path \"${filePath}\"` : `file name \"${fileName}\"`}. The file may not be indexed. Use rag.checindexed to verify if a file is indexed before searching.`\n };\n }\n\n return {\n query: query || (filePath ? `filePath: ${filePath}` : fileName ? `fileName: ${fileName}` : ''),\n results: resultFormatter.formatCommandResults(results)\n };\n }\n }\n });\n\n registerAll({\n command: {\n id: 'rag.checindexed',\n name: 'Check if File is Indexed',\n description: 'Check if a specific file is indexed in the document index. Use this to determine if you should use RAG search or read the file directly.',\n parameters: [\n {\n name: 'filePath',\n description: 'The file path to check (relative to workspace root)',\n required: true\n }\n ]\n },\n handler: {\n canExecute: () => true,\n execute: async (context) => {\n const filePath = context.params?.filePath;\n if (!filePath) {\n throw new Error('File path parameter required');\n }\n\n const workspaceResult = await getWorkspacePath();\n if (!workspaceResult) {\n return { indexed: false, reason: 'No workspace connected' };\n }\n\n const { workspacePath } = workspaceResult;\n const document = await documentIndexService.getDocumentByPath(workspacePath, filePath);\n\n if (document) {\n return {\n indexed: true,\n filePath: document.filePath,\n fileName: document.fileName,\n fileType: document.fileType,\n indexedAt: new Date(document.indexedAt).toISOString(),\n size: document.metadata.size\n };\n }\n\n return {\n indexed: false,\n filePath,\n reason: 'File not found in document index'\n };\n }\n }\n });\n}\n\nexport function integrateRAGWithAI() {\n try {\n registerRAGCommands();\n \n const promptBuilder = (aiService as any).promptBuilder;\n if (promptBuilder && typeof promptBuilder.addEnhancer === 'function') {\n promptBuilder.addEnhancer(ragPromptEnhancer);\n logger.info('RAG prompt enhancer and commands registered - AI will be instructed to use RAG before reading files');\n } else {\n logger.warn('AI service prompt builder not available yet, will retry');\n setTimeout(() => integrateRAGWithAI(), 1000);\n }\n } catch (error) {\n logger.warn(`Failed to integrate RAG with AI: ${error}`);\n }\n}\n\nrootContext.put('ragService', ragService);\n\n"],"mappings":";;;;AAcA,IAAM,SAAS,aAAa,iBAAiB;AAC7C,IAAM,kBAAkB,IAAI,mBAAmB,IAAI,kBAAkB,CAAC;AAEtE,IAAa,oBAAoC;CAC7C,UAAU;CACV,MAAM,QAAQ,QAAgB,SAA4C;AACtE,MAAI;AAEA,QADc,MAAM,qBAAqB,UAAU,EACzC,mBAAmB,EACzB,QAAO;AAYX,UAAO,GAAG,OAAO;;;;;;;;WACZ,OAAO;AACZ,UAAO,KAAK,2BAA2B,QAAQ;AAC/C,UAAO;;;CAGlB;AAED,SAAgB,wBAAwB;AACpC,QAAO,OAAO,UAAkB,WAA8B;AAC1D,MAAI,aAAa,8BAA8B;GAC3C,MAAM,QAAQ,OAAO,SAAS;GAC9B,MAAM,QAAQ,KAAK,IAAI,OAAO,SAAS,cAAc,eAAe,cAAc,UAAU;GAC5F,MAAM,WAAW,OAAO;GACxB,MAAM,WAAW,OAAO;GACxB,MAAM,WAAW,OAAO;GAWxB,MAAM,UAAU,MAAM,yBAAyB,OAAO;IAClD;IACA;IACA;IACA;IACA,qBAbC,OAAO,gBAAgB,OAAO,gBAAgB,OAAO,cAChD;KACE,cAAc,OAAO;KACrB,cAAc,OAAO;KACrB,aAAa,OAAO;KACvB,GACC,KAAA;IAQT,CAAC;AAEF,UAAO;IACH,SAAS,gBAAgB,oBAAoB,QAAQ;IACrD,OAAO,QAAQ;IAClB;;AAGL,QAAM,IAAI,MAAM,qBAAqB,WAAW;;;AAIxD,SAAgB,sBAAsB;AAClC,aAAY;EACR,SA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