osborn 0.9.235 → 0.9.236
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/claude-llm.js +5 -1
- package/package.json +1 -1
package/dist/claude-llm.js
CHANGED
|
@@ -47,7 +47,11 @@ async function buildRecallInjection(sessionId, workingDir, prompt) {
|
|
|
47
47
|
try {
|
|
48
48
|
if (!RECALL_ENABLED() || !sessionId || !workingDir)
|
|
49
49
|
return '';
|
|
50
|
-
|
|
50
|
+
// CAP the recall query length (defense-in-depth). A pasted or echoed giant prompt — e.g. a
|
|
51
|
+
// "liked" log step that serialized a 24KB command+output — would otherwise build a massive
|
|
52
|
+
// FTS MATCH and an oversized embed request on the hot UserPromptSubmit path and stall the
|
|
53
|
+
// turn. A real user utterance is short; 512 chars is ample to retrieve on.
|
|
54
|
+
const q = String(prompt || '').trim().slice(0, 512);
|
|
51
55
|
if (q.length < 3)
|
|
52
56
|
return '';
|
|
53
57
|
if (!storeExists(sessionId, workingDir))
|