@gotza02/sequential-thinking 2026.2.33 → 2026.2.34
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/graph.js +1 -1
- package/dist/lib.js +7 -0
- package/package.json +1 -1
package/dist/graph.js
CHANGED
|
@@ -549,7 +549,7 @@ export class ProjectKnowledgeGraph {
|
|
|
549
549
|
imports.push(im[1]);
|
|
550
550
|
}
|
|
551
551
|
// Go symbols
|
|
552
|
-
const funcMatches = content.matchAll(/^func\s+(?:\([^\)]*\)\s+)?([
|
|
552
|
+
const funcMatches = content.matchAll(/^func\s+(?:\([^\)]*\)\s+)?([a-zA-Z_][a-zA-Z0-9_]*)/gm);
|
|
553
553
|
for (const match of funcMatches)
|
|
554
554
|
symbols.push(`func:${match[1]}`);
|
|
555
555
|
const typeMatches = content.matchAll(/^type\s+([A-Z][a-zA-Z0-9_]*)\s+(?:struct|interface)/gm);
|
package/dist/lib.js
CHANGED
|
@@ -209,6 +209,13 @@ export class SequentialThinkingServer {
|
|
|
209
209
|
if (this.thoughtHistory.length > 100) {
|
|
210
210
|
const removed = this.thoughtHistory.splice(0, this.thoughtHistory.length - 100);
|
|
211
211
|
console.error(`[AutoPrune] Removed ${removed.length} old thoughts to maintain performance.`);
|
|
212
|
+
// Sync blocks: Remove pruned thoughts from their respective blocks
|
|
213
|
+
// This prevents unbounded file growth by ensuring blocks don't retain references to deleted thoughts
|
|
214
|
+
const historyIds = new Set(this.thoughtHistory.map(t => t.thoughtNumber));
|
|
215
|
+
for (const block of this.blocks) {
|
|
216
|
+
// Only keep thoughts that are still in the active history
|
|
217
|
+
block.thoughts = block.thoughts.filter(t => historyIds.has(t.thoughtNumber));
|
|
218
|
+
}
|
|
212
219
|
}
|
|
213
220
|
}
|
|
214
221
|
async clearHistory() {
|