@absolutejs/absolute 0.19.0-beta.600 → 0.19.0-beta.601
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/ai/client/index.js +9 -4
- package/dist/ai/client/index.js.map +3 -3
- package/dist/ai/index.js +14 -7
- package/dist/ai/index.js.map +4 -4
- package/dist/ai/rag/quality.js +9 -4
- package/dist/ai/rag/quality.js.map +3 -3
- package/dist/ai-client/react/ai/index.js +0 -2
- package/dist/ai-client/vue/ai/index.js +0 -2
- package/dist/angular/index.js +2 -2
- package/dist/angular/index.js.map +1 -1
- package/dist/angular/server.js +2 -2
- package/dist/angular/server.js.map +1 -1
- package/dist/build.js +2 -2
- package/dist/build.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/react/ai/index.js +9 -4
- package/dist/react/ai/index.js.map +3 -3
- package/dist/svelte/ai/index.js +9 -4
- package/dist/svelte/ai/index.js.map +3 -3
- package/dist/vue/ai/index.js +9 -4
- package/dist/vue/ai/index.js.map +3 -3
- package/package.json +7 -7
package/dist/ai/index.js
CHANGED
|
@@ -154,7 +154,6 @@ var init_constants = __esm(() => {
|
|
|
154
154
|
|
|
155
155
|
// src/ai/rag/quality.ts
|
|
156
156
|
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
157
|
-
import { createRequire } from "module";
|
|
158
157
|
import { dirname } from "path";
|
|
159
158
|
|
|
160
159
|
// src/ai/protocol.ts
|
|
@@ -450,7 +449,13 @@ var buildRAGGroundingReferences = (sources) => {
|
|
|
450
449
|
var DEFAULT_TOP_K = 6;
|
|
451
450
|
var DEFAULT_HISTORY_LIMIT = 20;
|
|
452
451
|
var DEFAULT_SEARCH_TRACE_TABLE_NAME = "rag_search_traces";
|
|
453
|
-
var
|
|
452
|
+
var loadBunSQLiteModule = () => {
|
|
453
|
+
const runtimeRequire = import.meta.require;
|
|
454
|
+
if (typeof runtimeRequire !== "function") {
|
|
455
|
+
throw new Error("SQLite trace storage requires Bun runtime support for import.meta.require.");
|
|
456
|
+
}
|
|
457
|
+
return runtimeRequire("bun:sqlite");
|
|
458
|
+
};
|
|
454
459
|
var normalizeStringArray = (value) => {
|
|
455
460
|
if (!Array.isArray(value)) {
|
|
456
461
|
return [];
|
|
@@ -2331,7 +2336,7 @@ var mapSQLiteSearchTraceRow = (row) => ({
|
|
|
2331
2336
|
var createRAGSQLiteSearchTraceStore = (options) => {
|
|
2332
2337
|
const tableName = options.tableName ?? DEFAULT_SEARCH_TRACE_TABLE_NAME;
|
|
2333
2338
|
assertSupportedIdentifier(tableName);
|
|
2334
|
-
const db = options.db ?? new (
|
|
2339
|
+
const db = options.db ?? new (loadBunSQLiteModule()).Database(options.path ?? ":memory:");
|
|
2335
2340
|
db.exec(`
|
|
2336
2341
|
CREATE TABLE IF NOT EXISTS ${tableName} (
|
|
2337
2342
|
id TEXT PRIMARY KEY,
|
|
@@ -17822,10 +17827,8 @@ import { existsSync as existsSync2 } from "fs";
|
|
|
17822
17827
|
|
|
17823
17828
|
// src/ai/rag/resolveAbsoluteSQLiteVec.ts
|
|
17824
17829
|
import { existsSync, readFileSync } from "fs";
|
|
17825
|
-
import { createRequire as createRequire2 } from "module";
|
|
17826
17830
|
import { arch, platform } from "os";
|
|
17827
17831
|
import { dirname as dirname3, join as join2 } from "path";
|
|
17828
|
-
var require3 = createRequire2(import.meta.url);
|
|
17829
17832
|
var PLATFORM_PACKAGE_MAP = {
|
|
17830
17833
|
"darwin-arm64": {
|
|
17831
17834
|
libraryFile: "vec0.dylib",
|
|
@@ -17874,7 +17877,11 @@ var resolveAbsoluteSQLiteVec = () => {
|
|
|
17874
17877
|
};
|
|
17875
17878
|
}
|
|
17876
17879
|
try {
|
|
17877
|
-
const
|
|
17880
|
+
const resolve3 = import.meta.resolve;
|
|
17881
|
+
if (typeof resolve3 !== "function") {
|
|
17882
|
+
throw new Error("AbsoluteJS sqlite-vec package resolution requires import.meta.resolve support.");
|
|
17883
|
+
}
|
|
17884
|
+
const packageJsonPath = new URL(resolve3(`${packageInfo.packageName}/package.json`)).pathname;
|
|
17878
17885
|
const packageRoot = dirname3(packageJsonPath);
|
|
17879
17886
|
const libraryPath = join2(packageRoot, packageInfo.libraryFile);
|
|
17880
17887
|
const packageVersion = readPackageVersion(packageJsonPath);
|
|
@@ -20550,5 +20557,5 @@ export {
|
|
|
20550
20557
|
aiChat
|
|
20551
20558
|
};
|
|
20552
20559
|
|
|
20553
|
-
//# debugId=
|
|
20560
|
+
//# debugId=2B4444B4E5A08B1464756E2164756E21
|
|
20554
20561
|
//# sourceMappingURL=index.js.map
|