opencode-mem 2.14.0 → 2.14.1
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../../src/services/embedding.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"embedding.d.ts","sourceRoot":"","sources":["../../src/services/embedding.ts"],"names":[],"mappings":"AAgDA,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,WAAW,CAA8B;IAC1C,UAAU,EAAE,OAAO,CAAS;IACnC,OAAO,CAAC,KAAK,CAAwC;IACrD,OAAO,CAAC,eAAe,CAAuB;IAE9C,MAAM,CAAC,WAAW,IAAI,gBAAgB;IAOhC,MAAM,CAAC,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;YAOzD,eAAe;IAuBvB,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAmD1C,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAI3D,UAAU,IAAI,IAAI;CAGnB;AAED,eAAO,MAAM,gBAAgB,kBAAiC,CAAC"}
|
|
@@ -5,10 +5,16 @@ const TIMEOUT_MS = 30000;
|
|
|
5
5
|
const GLOBAL_EMBEDDING_KEY = Symbol.for("opencode-mem.embedding.instance");
|
|
6
6
|
const MAX_CACHE_SIZE = 100;
|
|
7
7
|
let _transformers = null;
|
|
8
|
+
function getTransformersPackageSpecifier() {
|
|
9
|
+
// Keep this non-literal so OpenCode/Bun plugin-loader bundling does not eagerly
|
|
10
|
+
// traverse @huggingface/transformers internals during plugin startup. The package
|
|
11
|
+
// is only needed for the local embedding backend, and should stay lazy.
|
|
12
|
+
return ["@huggingface", "transformers"].join("/");
|
|
13
|
+
}
|
|
8
14
|
async function ensureTransformersLoaded() {
|
|
9
15
|
if (_transformers !== null)
|
|
10
16
|
return _transformers;
|
|
11
|
-
const mod = await import(
|
|
17
|
+
const mod = (await import(getTransformersPackageSpecifier()));
|
|
12
18
|
mod.env.allowLocalModels = true;
|
|
13
19
|
mod.env.allowRemoteModels = true;
|
|
14
20
|
mod.env.cacheDir = join(CONFIG.storagePath, ".cache");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-mem",
|
|
3
|
-
"version": "2.14.
|
|
3
|
+
"version": "2.14.1",
|
|
4
4
|
"description": "OpenCode plugin that gives coding agents persistent memory using local vector database",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/plugin.js",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@huggingface/transformers": "
|
|
46
|
+
"@huggingface/transformers": "4.0.1",
|
|
47
47
|
"@opencode-ai/plugin": "^1.3.0",
|
|
48
48
|
"@opencode-ai/sdk": "^1.3.0",
|
|
49
49
|
"franc-min": "^6.2.0",
|