From 90cec5e8bd9bfd1949a45ce6f834ad8eccd5244b Mon Sep 17 00:00:00 2001 From: David Snelling Date: Tue, 4 Nov 2025 07:43:24 -0800 Subject: [PATCH] fix: resolve TypeScript compilation errors in fork() and disableAutoRebuild MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix commit() call signature (takes single options object, not two args) - Fix disableAutoRebuild comparison to avoid TypeScript 5.4+ type narrowing issue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/brainy.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/brainy.ts b/src/brainy.ts index 0a54742f..b408872c 100644 --- a/src/brainy.ts +++ b/src/brainy.ts @@ -2163,9 +2163,10 @@ export class Brainy implements BrainyInterface { const currentRef = await refManager.getRef(currentBranch) if (!currentRef) { // Auto-create initial commit if none exists - await this.commit(`Initial commit on ${currentBranch}`, { + await this.commit({ + message: `Initial commit on ${currentBranch}`, author: options?.author || 'Brainy', - timestamp: Date.now() + metadata: { timestamp: Date.now() } }) if (!this.config.silent) { console.log(`📝 Auto-created initial commit on ${currentBranch} (required for fork)`) @@ -4368,9 +4369,9 @@ export class Brainy implements BrainyInterface { return } - // BUG FIX: If disableAutoRebuild === true, skip rebuild even if indexes are empty + // BUG FIX: If disableAutoRebuild is truthy, skip rebuild even if indexes are empty // Indexes will load lazily on first query - if (this.config.disableAutoRebuild === true) { + if (this.config.disableAutoRebuild) { if (!this.config.silent) { console.log('⚡ Indexes empty but auto-rebuild disabled - using lazy loading') }