mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-05-20 23:21:06 +00:00
ci: enforce code formatting checks for backend and frontend (#1536)
This commit is contained in:
@@ -23,7 +23,7 @@ export function ArtifactLink(props: AnchorHTMLAttributes<HTMLAnchorElement>) {
|
||||
<a
|
||||
{...rest}
|
||||
className={cn(
|
||||
"text-primary underline decoration-primary/30 underline-offset-2 hover:decoration-primary/60 transition-colors",
|
||||
"text-primary decoration-primary/30 hover:decoration-primary/60 underline underline-offset-2 transition-colors",
|
||||
className,
|
||||
)}
|
||||
target={target ?? (external ? "_blank" : undefined)}
|
||||
|
||||
@@ -9,13 +9,13 @@ import {
|
||||
} from "@/components/ui/hover-card";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
export function CitationLink({
|
||||
href,
|
||||
export function CitationLink({
|
||||
href,
|
||||
children,
|
||||
...props
|
||||
...props
|
||||
}: ComponentProps<"a">) {
|
||||
const domain = extractDomain(href ?? "");
|
||||
|
||||
|
||||
// Priority: children > domain
|
||||
const childrenText =
|
||||
typeof children === "string"
|
||||
@@ -48,12 +48,12 @@ export function CitationLink({
|
||||
<div className="p-3">
|
||||
<div className="space-y-1">
|
||||
{displayText && (
|
||||
<h4 className="truncate font-medium text-sm leading-tight">
|
||||
<h4 className="truncate text-sm leading-tight font-medium">
|
||||
{displayText}
|
||||
</h4>
|
||||
)}
|
||||
{href && (
|
||||
<p className="truncate break-all text-muted-foreground text-xs">
|
||||
<p className="text-muted-foreground truncate text-xs break-all">
|
||||
{href}
|
||||
</p>
|
||||
)}
|
||||
|
||||
@@ -63,7 +63,6 @@ export function CommandPalette() {
|
||||
|
||||
useGlobalShortcuts(shortcuts);
|
||||
|
||||
|
||||
const isMac =
|
||||
typeof navigator !== "undefined" && navigator.userAgent.includes("Mac");
|
||||
const metaKey = isMac ? "⌘" : "Ctrl+";
|
||||
@@ -80,7 +79,10 @@ export function CommandPalette() {
|
||||
<CommandItem onSelect={handleNewChat}>
|
||||
<MessageSquarePlusIcon className="mr-2 h-4 w-4" />
|
||||
{t.sidebar.newChat}
|
||||
<CommandShortcut>{metaKey}{shiftKey}N</CommandShortcut>
|
||||
<CommandShortcut>
|
||||
{metaKey}
|
||||
{shiftKey}N
|
||||
</CommandShortcut>
|
||||
</CommandItem>
|
||||
<CommandItem onSelect={handleOpenSettings}>
|
||||
<SettingsIcon className="mr-2 h-4 w-4" />
|
||||
|
||||
@@ -48,7 +48,10 @@ export function MarkdownContent({
|
||||
return (
|
||||
<a
|
||||
{...rest}
|
||||
className={cn("text-primary underline decoration-primary/30 underline-offset-2 hover:decoration-primary/60 transition-colors", className)}
|
||||
className={cn(
|
||||
"text-primary decoration-primary/30 hover:decoration-primary/60 underline underline-offset-2 transition-colors",
|
||||
className,
|
||||
)}
|
||||
target={target ?? (external ? "_blank" : undefined)}
|
||||
rel={rel ?? (external ? "noopener noreferrer" : undefined)}
|
||||
/>
|
||||
|
||||
@@ -29,7 +29,10 @@ function getModeDescriptionKey(
|
||||
mode: AgentMode,
|
||||
): keyof Pick<
|
||||
Translations["inputBox"],
|
||||
"flashModeDescription" | "reasoningModeDescription" | "proModeDescription" | "ultraModeDescription"
|
||||
| "flashModeDescription"
|
||||
| "reasoningModeDescription"
|
||||
| "proModeDescription"
|
||||
| "ultraModeDescription"
|
||||
> {
|
||||
switch (mode) {
|
||||
case "flash":
|
||||
|
||||
@@ -33,17 +33,20 @@ DeerFlow is proudly open source and distributed under the **MIT License**.
|
||||
We extend our heartfelt gratitude to the open source projects and contributors who have made DeerFlow a reality. We truly stand on the shoulders of giants.
|
||||
|
||||
### Core Frameworks
|
||||
|
||||
- **[LangChain](https://github.com/langchain-ai/langchain)**: A phenomenal framework that powers our LLM interactions and chains.
|
||||
- **[LangGraph](https://github.com/langchain-ai/langgraph)**: Enabling sophisticated multi-agent orchestration.
|
||||
- **[Next.js](https://nextjs.org/)**: A cutting-edge framework for building web applications.
|
||||
|
||||
### UI Libraries
|
||||
|
||||
- **[Shadcn](https://ui.shadcn.com/)**: Minimalistic components that power our UI.
|
||||
- **[SToneX](https://github.com/stonexer)**: For his invaluable contribution to token-by-token visual effects.
|
||||
|
||||
These outstanding projects form the backbone of DeerFlow and exemplify the transformative power of open source collaboration.
|
||||
|
||||
### Special Thanks
|
||||
|
||||
Finally, we want to express our heartfelt gratitude to the core authors of DeerFlow 1.0 and 2.0:
|
||||
|
||||
- **[Daniel Walnut](https://github.com/hetaoBackend/)**
|
||||
|
||||
@@ -227,8 +227,7 @@ export function MemorySettingsPage() {
|
||||
const filterAll = t.settings.memory.filterAll ?? "All";
|
||||
const filterFacts = t.settings.memory.filterFacts ?? "Facts";
|
||||
const filterSummaries = t.settings.memory.filterSummaries ?? "Summaries";
|
||||
const noMatches =
|
||||
t.settings.memory.noMatches ?? "No matching memory found";
|
||||
const noMatches = t.settings.memory.noMatches ?? "No matching memory found";
|
||||
|
||||
const sectionGroups = memory ? buildMemorySectionGroups(memory, t) : [];
|
||||
const filteredSectionGroups = sectionGroups
|
||||
@@ -295,7 +294,9 @@ export function MemorySettingsPage() {
|
||||
description={t.settings.memory.description}
|
||||
>
|
||||
{isLoading ? (
|
||||
<div className="text-muted-foreground text-sm">{t.common.loading}</div>
|
||||
<div className="text-muted-foreground text-sm">
|
||||
{t.common.loading}
|
||||
</div>
|
||||
) : error ? (
|
||||
<div>Error: {error.message}</div>
|
||||
) : !memory ? (
|
||||
@@ -408,7 +409,9 @@ export function MemorySettingsPage() {
|
||||
{formatTimeAgo(fact.createdAt)}
|
||||
</span>
|
||||
</div>
|
||||
<p className="break-words text-sm">{fact.content}</p>
|
||||
<p className="text-sm break-words">
|
||||
{fact.content}
|
||||
</p>
|
||||
<Link
|
||||
href={pathOfThread(fact.source)}
|
||||
className="text-primary text-sm underline-offset-4 hover:underline"
|
||||
@@ -443,9 +446,7 @@ export function MemorySettingsPage() {
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>{clearAllConfirmTitle}</DialogTitle>
|
||||
<DialogDescription>
|
||||
{clearAllConfirmDescription}
|
||||
</DialogDescription>
|
||||
<DialogDescription>{clearAllConfirmDescription}</DialogDescription>
|
||||
</DialogHeader>
|
||||
<DialogFooter>
|
||||
<Button
|
||||
|
||||
Reference in New Issue
Block a user