chore(frontend): apply pre-commit formatting

This commit is contained in:
foreleven
2026-05-22 22:11:14 +08:00
parent ff4a3409c7
commit 55a4149be4
5 changed files with 12 additions and 7 deletions
@@ -339,13 +339,13 @@ export function ArtifactFilePreview({
}
function htmlWithBaseHref(content: string, url?: string) {
if (!url || content.match(/<base\s/i)) {
if (!url || /<base\s/i.exec(content)) {
return content;
}
const baseHref = htmlBaseHref(url);
const baseElement = `<base href="${escapeHtmlAttribute(baseHref)}">`;
if (content.match(/<head[^>]*>/i)) {
if (/<head[^>]*>/i.exec(content)) {
return content.replace(/<head([^>]*)>/i, `<head$1>${baseElement}`);
}
return `${baseElement}${content}`;
+6 -3
View File
@@ -97,9 +97,12 @@ function createStaticClient(): LangGraphClient {
}) as typeof client.threads.update;
client.runs.list = (async () => []) as typeof client.runs.list;
client.runs.stream = async function* () {} as typeof client.runs.stream;
client.runs.joinStream =
async function* () {} as typeof client.runs.joinStream;
client.runs.stream = async function* () {
/* empty */
} as typeof client.runs.stream;
client.runs.joinStream = async function* () {
/* empty */
} as typeof client.runs.joinStream;
return client as LangGraphClient<AgentThreadState>;
}
+1
View File
@@ -11,6 +11,7 @@ import React, {
} from "react";
import { isStaticWebsiteOnly } from "../static-mode";
import { type User, buildLoginUrl } from "./types";
// Re-export for consumers
+2 -1
View File
@@ -1,7 +1,8 @@
import { cookies } from "next/headers";
import { getGatewayConfig } from "./gateway-config";
import { isStaticWebsiteOnly } from "../static-mode";
import { getGatewayConfig } from "./gateway-config";
import { STATIC_WEBSITE_USER } from "./static-user";
import { type AuthResult, userSchema } from "./types";
+1 -1
View File
@@ -1,5 +1,5 @@
import type { ThreadsClient } from "@langchain/langgraph-sdk/client";
import type { ThreadState } from "@langchain/langgraph-sdk";
import type { ThreadsClient } from "@langchain/langgraph-sdk/client";
import type { AgentThread, AgentThreadState } from "./types";