mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-23 16:35:59 +00:00
chore(frontend): apply pre-commit formatting
This commit is contained in:
@@ -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}`;
|
||||
|
||||
@@ -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>;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ import React, {
|
||||
} from "react";
|
||||
|
||||
import { isStaticWebsiteOnly } from "../static-mode";
|
||||
|
||||
import { type User, buildLoginUrl } from "./types";
|
||||
|
||||
// Re-export for consumers
|
||||
|
||||
@@ -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,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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user