mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-23 08:25:57 +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) {
|
function htmlWithBaseHref(content: string, url?: string) {
|
||||||
if (!url || content.match(/<base\s/i)) {
|
if (!url || /<base\s/i.exec(content)) {
|
||||||
return content;
|
return content;
|
||||||
}
|
}
|
||||||
|
|
||||||
const baseHref = htmlBaseHref(url);
|
const baseHref = htmlBaseHref(url);
|
||||||
const baseElement = `<base href="${escapeHtmlAttribute(baseHref)}">`;
|
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 content.replace(/<head([^>]*)>/i, `<head$1>${baseElement}`);
|
||||||
}
|
}
|
||||||
return `${baseElement}${content}`;
|
return `${baseElement}${content}`;
|
||||||
|
|||||||
@@ -97,9 +97,12 @@ function createStaticClient(): LangGraphClient {
|
|||||||
}) as typeof client.threads.update;
|
}) as typeof client.threads.update;
|
||||||
|
|
||||||
client.runs.list = (async () => []) as typeof client.runs.list;
|
client.runs.list = (async () => []) as typeof client.runs.list;
|
||||||
client.runs.stream = async function* () {} as typeof client.runs.stream;
|
client.runs.stream = async function* () {
|
||||||
client.runs.joinStream =
|
/* empty */
|
||||||
async function* () {} as typeof client.runs.joinStream;
|
} as typeof client.runs.stream;
|
||||||
|
client.runs.joinStream = async function* () {
|
||||||
|
/* empty */
|
||||||
|
} as typeof client.runs.joinStream;
|
||||||
|
|
||||||
return client as LangGraphClient<AgentThreadState>;
|
return client as LangGraphClient<AgentThreadState>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import React, {
|
|||||||
} from "react";
|
} from "react";
|
||||||
|
|
||||||
import { isStaticWebsiteOnly } from "../static-mode";
|
import { isStaticWebsiteOnly } from "../static-mode";
|
||||||
|
|
||||||
import { type User, buildLoginUrl } from "./types";
|
import { type User, buildLoginUrl } from "./types";
|
||||||
|
|
||||||
// Re-export for consumers
|
// Re-export for consumers
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
import { cookies } from "next/headers";
|
import { cookies } from "next/headers";
|
||||||
|
|
||||||
import { getGatewayConfig } from "./gateway-config";
|
|
||||||
import { isStaticWebsiteOnly } from "../static-mode";
|
import { isStaticWebsiteOnly } from "../static-mode";
|
||||||
|
|
||||||
|
import { getGatewayConfig } from "./gateway-config";
|
||||||
import { STATIC_WEBSITE_USER } from "./static-user";
|
import { STATIC_WEBSITE_USER } from "./static-user";
|
||||||
import { type AuthResult, userSchema } from "./types";
|
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 { ThreadState } from "@langchain/langgraph-sdk";
|
||||||
|
import type { ThreadsClient } from "@langchain/langgraph-sdk/client";
|
||||||
|
|
||||||
import type { AgentThread, AgentThreadState } from "./types";
|
import type { AgentThread, AgentThreadState } from "./types";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user