fix(tests): add test for disabling all tools in CcwToolsMcpCard component

fix(api): handle empty enabledTools array and improve default tool logic
fix(queueScheduler): ignore network errors in loadInitialState
fix(auth): ensure token generation handles max session capacity
chore(dependencies): update package requirements to use compatible version specifiers
chore(tests): add new test cases for incremental indexer and migrations
This commit is contained in:
catlog22
2026-03-02 11:26:15 +08:00
parent b36a46d59d
commit 8ad283086b
7 changed files with 159 additions and 84 deletions

View File

@@ -195,9 +195,21 @@ export const useQueueSchedulerStore = create<QueueSchedulerStore>()(
'loadInitialState'
);
} catch (error) {
// Silently ignore network errors (backend not connected)
// Only log non-network errors
const message = error instanceof Error ? error.message : 'Unknown error';
console.error('[QueueScheduler] loadInitialState error:', message);
set({ error: message }, false, 'loadInitialState/error');
const isNetworkError =
message.includes('Failed to fetch') ||
message.includes('NetworkError') ||
message.includes('Network request failed') ||
message.includes('ERR_CONNECTION_REFUSED') ||
message.includes('ERR_CONNECTION_RESET');
if (!isNetworkError) {
console.error('[QueueScheduler] loadInitialState error:', message);
set({ error: message }, false, 'loadInitialState/error');
}
// For network errors, keep state as-is without showing error
}
},