Skip to content

Commit 8d122f2

Browse files
fix(ingest): hoist timeoutMs out of try so manual ingest timeout reaches warning (#212) (#213)
1 parent 9be7431 commit 8d122f2

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@four-bytes/four-opencode-brain",
3-
"version": "1.8.6",
3+
"version": "1.8.7",
44
"description": "Unified brain plugin — single SQLite DB for RAG search, memory, and knowledge base",
55
"license": "Apache-2.0",
66
"type": "module",

‎src/four-opencode-brain.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ const _serverPlugin = async (input: PluginInput) => {
230230
return withSessionId(toolCtx.sessionID, async () => {
231231
const db = initBrainDatabase();
232232
const resolvedPath = resolve(toolCtx.directory, args.path);
233+
let timeoutMs = calculateIngestTimeout(0);
233234
try {
234235
// Resolve path relative to project directory (like RAG plugin does)
235236
const name = basename(resolvedPath);
@@ -243,7 +244,7 @@ const _serverPlugin = async (input: PluginInput) => {
243244
} catch {
244245
// fallback: use default
245246
}
246-
const timeoutMs = calculateIngestTimeout(fileCount);
247+
timeoutMs = calculateIngestTimeout(fileCount);
247248
let lastUpdate = 0;
248249

249250
const result = await withTimeout(

0 commit comments

Comments
 (0)