true-mem 1.0.12 → 1.0.13
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/README.md +9 -0
- package/dist/index.js +5 -10
- package/dist/memory/classifier.d.ts +1 -1
- package/dist/memory/classifier.d.ts.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -115,6 +115,15 @@ Add to your `~/.config/opencode/opencode.jsonc`:
|
|
|
115
115
|
|
|
116
116
|
OpenCode will automatically download the plugin from npm.
|
|
117
117
|
|
|
118
|
+
After restarting OpenCode, you'll see a toast notification in the top-right corner confirming the plugin is loaded:
|
|
119
|
+
|
|
120
|
+
```
|
|
121
|
+
True-Mem vX.X.X
|
|
122
|
+
Memory active.
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
This confirms True-Mem is installed and working correctly.
|
|
126
|
+
|
|
118
127
|
---
|
|
119
128
|
|
|
120
129
|
## Usage
|
package/dist/index.js
CHANGED
|
@@ -1229,14 +1229,6 @@ function inferClassification(text) {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
function classifyWithExplicitIntent(text, signals) {
|
|
1231
1231
|
const hasExplicitRemember = signals.some((s) => s.type === "explicit_remember");
|
|
1232
|
-
if (hasExplicitRemember) {
|
|
1233
|
-
log("Debug: Explicit intent signal found, isolating sentence...");
|
|
1234
|
-
}
|
|
1235
|
-
if (!hasExplicitRemember) {
|
|
1236
|
-
const classification = inferClassification(text);
|
|
1237
|
-
const confidence = classification ? calculateClassificationScore(text, classification) : 0;
|
|
1238
|
-
return { classification, confidence, isolatedContent: text };
|
|
1239
|
-
}
|
|
1240
1232
|
const markerPatterns = [
|
|
1241
1233
|
/\bricordati(?:\s+\w+){0,5}?\s+che\b:?\s*/gi,
|
|
1242
1234
|
/\bricordati\b:?\s*/gi,
|
|
@@ -1272,12 +1264,15 @@ function classifyWithExplicitIntent(text, signals) {
|
|
|
1272
1264
|
isolatedContent = text.substring(firstMatch.index + firstMatch.match[0].length).trim();
|
|
1273
1265
|
log("Debug: Extracted content after first explicit marker:", isolatedContent);
|
|
1274
1266
|
}
|
|
1275
|
-
if (!isolatedContent) {
|
|
1276
|
-
log("Debug: No explicit marker found, falling back to normal classification");
|
|
1267
|
+
if (!isolatedContent && !hasExplicitRemember) {
|
|
1268
|
+
log("Debug: No explicit marker or signal found, falling back to normal classification");
|
|
1277
1269
|
const classification = inferClassification(text);
|
|
1278
1270
|
const confidence = classification ? calculateClassificationScore(text, classification) : 0;
|
|
1279
1271
|
return { classification, confidence, isolatedContent: text };
|
|
1280
1272
|
}
|
|
1273
|
+
if (!isolatedContent) {
|
|
1274
|
+
isolatedContent = text;
|
|
1275
|
+
}
|
|
1281
1276
|
log("Debug: Isolated content for classification:", isolatedContent);
|
|
1282
1277
|
let bestClassification = null;
|
|
1283
1278
|
let bestScore = 0;
|
|
@@ -31,7 +31,7 @@ export declare function shouldStoreMemory(text: string, classification: string,
|
|
|
31
31
|
export declare function inferClassification(text: string): string | null;
|
|
32
32
|
/**
|
|
33
33
|
* Classify content with explicit intent detection.
|
|
34
|
-
* If explicit_remember signal is present, isolate the sentence and classify it.
|
|
34
|
+
* If explicit_remember signal is present OR marker pattern matches, isolate the sentence and classify it.
|
|
35
35
|
*/
|
|
36
36
|
export declare function classifyWithExplicitIntent(text: string, signals: any[]): {
|
|
37
37
|
classification: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classifier.d.ts","sourceRoot":"","sources":["../../src/memory/classifier.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAoCjE,eAAO,MAAM,oBAAoB,MAAM,CAAC;AAExC;;;GAGG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,MAAM,CAkCzF;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI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