Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(ai): handle missing background loop primitives gracefully

Steven Enamakel0b338020d8c3
diff --git a/app/src/components/settings/panels/ai/backgroundLoopPrimitives.tsx b/app/src/components/settings/panels/ai/backgroundLoopPrimitives.tsx
index bbe586013a..4f91adcf8b 100644
--- a/app/src/components/settings/panels/ai/backgroundLoopPrimitives.tsx
+++ b/app/src/components/settings/panels/ai/backgroundLoopPrimitives.tsx
@@ -1,10 +1,9 @@
/*
* Pure formatting helpers + small presentational primitives shared by the
- * background-loop controls (heartbeat section + usage ledger section).
+ * background-loop controls (loop map + usage ledger section).
*/
import type { ComposioConnection } from '../../../../lib/composio/types';
import type { CreditTransaction } from '../../../../services/api/creditsApi';
-import { SettingsSwitch } from '../../controls';
import type { ProviderRef } from './aiPanelTypes';
export const USD = new Intl.NumberFormat('en-US', {
@@ -49,14 +48,6 @@ export const activeConnection = (connection: ComposioConnection): boolean => {
return status === 'ACTIVE' || status === 'CONNECTED';
};
-export const normalizedToolkit = (connection: ComposioConnection): string =>
- connection.toolkit.toLowerCase().replace(/[^a-z0-9]/g, '');
-
-export const isCalendarConnection = (connection: ComposioConnection): boolean => {
- const toolkit = normalizedToolkit(connection);
- return toolkit === 'googlecalendar' || toolkit === 'calendar';
-};
-
export function summarizeSpendByAction(
transactions: CreditTransaction[]
): Array<[string, number, number]> {
@@ -125,34 +116,6 @@ export function describeProvider(
return `${provider?.label ?? ref.providerSlug} ${ref.model || 'custom model'}`;
}
-export const LoopToggle = ({
- label,
- description,
- checked,
- busy,
- onToggle,
-}: {
- label: string;
- description: string;
- checked: boolean;
- busy: boolean;
- onToggle: () => void;
-}) => (
- <div className="flex items-center justify-between gap-3 rounded-lg border border-line bg-surface px-3 py-2">
- <div className="min-w-0">
- <div className="text-sm font-medium text-content">{label}</div>
- <div className="text-xs text-content-muted">{description}</div>
- </div>
- <SettingsSwitch
- id={`loop-toggle-${label.toLowerCase().replace(/[^a-z0-9]/g, '-')}`}
- checked={checked}
- onCheckedChange={onToggle}
- disabled={busy}
- aria-label={label}
- />
- </div>
-);
-
export const MetricTile = ({
label,
value,