Skip to content

The open-source agent harness - the runtime layer that turns an LLM into a working agent.

lint fix (#308)

Govinda Vashishthaf1dbd38163d9
diff --git a/packages/trueforge/src/frontend.ts b/packages/trueforge/src/frontend.ts
index 651ea59e3..378d7b04e 100644
--- a/packages/trueforge/src/frontend.ts
+++ b/packages/trueforge/src/frontend.ts
@@ -71,9 +71,15 @@ export function mountFrontend(app: OpenAPIHono, dir: string): boolean {
* accept HTML keep their 404 rather than getting the shell as a fake asset.
*/
const serveSpaFallback: MiddlewareHandler = async (c, next) => {
- if (isServerPath(c.req.path)) return next();
- if (c.req.method !== 'GET' && c.req.method !== 'HEAD') return next();
- if (c.req.header('accept')?.includes('text/html') !== true) return next();
+ if (isServerPath(c.req.path)) {
+ return next();
+ }
+ if (c.req.method !== 'GET' && c.req.method !== 'HEAD') {
+ return next();
+ }
+ if (c.req.header('accept')?.includes('text/html') !== true) {
+ return next();
+ }
const response = await serveAppShell(c, next);
if (response instanceof Response) {