mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
refactor: rename Tool.alpha to Tool.experimental
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
const fs = require("node:fs");
|
||||
const os = require("node:os");
|
||||
const path = require("node:path");
|
||||
|
||||
const _input = JSON.parse(fs.readFileSync("/dev/stdin", "utf8"));
|
||||
const counterFile = path.join(os.tmpdir(), "stirling-claude-tool-count.json");
|
||||
|
||||
let count = 0;
|
||||
try {
|
||||
const data = JSON.parse(fs.readFileSync(counterFile, "utf8"));
|
||||
count = data.count || 0;
|
||||
} catch {
|
||||
// First call or file missing
|
||||
}
|
||||
|
||||
count++;
|
||||
fs.writeFileSync(counterFile, JSON.stringify({ count }));
|
||||
|
||||
if (count === 50 || (count > 50 && (count - 50) % 25 === 0)) {
|
||||
console.log(
|
||||
`${count} tool calls this session. Consider /compact at a logical boundary to free up context.`,
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user