Skip to content

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

chore: reformat conditional expressions and assertions for readability

Steven Enamakel7efceee900e5
diff --git a/app/src/components/settings/panels/SearchPanelAllowedSites.tsx b/app/src/components/settings/panels/SearchPanelAllowedSites.tsx
index c9c819513c..642650ed23 100644
--- a/app/src/components/settings/panels/SearchPanelAllowedSites.tsx
+++ b/app/src/components/settings/panels/SearchPanelAllowedSites.tsx
@@ -64,8 +64,15 @@ const SearchPanelAllowedSites = ({ settings, saving, persist, t }: Props) => {
const previous = mode;
setMode(next);
const update =
- next === 'all' ? { allow_all: true } : next === 'block' ? { allowed_domains: [], allow_all: false } : null;
- if (update) void persist(update).then(ok => { if (!ok) setMode(previous); });
+ next === 'all'
+ ? { allow_all: true }
+ : next === 'block'
+ ? { allowed_domains: [], allow_all: false }
+ : null;
+ if (update)
+ void persist(update).then(ok => {
+ if (!ok) setMode(previous);
+ });
};
const persistAllowedDomains = () => {
diff --git a/app/test/e2e/specs/harness-search-tool-flow.spec.ts b/app/test/e2e/specs/harness-search-tool-flow.spec.ts
index 029bae2960..a47797e18d 100644
--- a/app/test/e2e/specs/harness-search-tool-flow.spec.ts
+++ b/app/test/e2e/specs/harness-search-tool-flow.spec.ts
@@ -391,13 +391,19 @@ describe('Harness - Search tool-flow', () => {
const toolResults = log.flatMap(request => {
if (!request.body) return [];
try {
- const body = JSON.parse(request.body) as { messages?: Array<{ role?: string; content?: string }> };
- return (body.messages ?? []).filter(message => message.role === 'tool').map(message => message.content ?? '');
+ const body = JSON.parse(request.body) as {
+ messages?: Array<{ role?: string; content?: string }>;
+ };
+ return (body.messages ?? [])
+ .filter(message => message.role === 'tool')
+ .map(message => message.content ?? '');
} catch {
return [];
}
});
- expect(toolResults.some(result => result.includes('Canberra') && /https?:\/\//.test(result))).toBe(true);
+ expect(
+ toolResults.some(result => result.includes('Canberra') && /https?:\/\//.test(result))
+ ).toBe(true);
console.log(`${LOG_PREFIX} S3.4: PASSED`);
});