Fix frontend imports and track frontend lib files

This commit is contained in:
2026-03-21 09:22:10 +08:00
parent 83f7a66e32
commit 190cee20bd
8 changed files with 285 additions and 19 deletions

View File

@@ -1,15 +1,15 @@
"use client";
"use client";
import { useCallback, useEffect, useRef, useState } from "react";
import MarkdownMessage from "@/components/MarkdownMessage";
import { sendChatMessage } from "@/lib/api";
import MarkdownMessage from "./MarkdownMessage";
import { sendChatMessage } from "../lib/api";
import {
parseJsonSafely,
splitSseEvents,
type TencentErrorEvent,
type TencentReplyEvent,
} from "@/lib/tencentSse";
import type { ChatMessage } from "@/types/mindmap";
} from "../lib/tencentSse";
import type { ChatMessage } from "../types/mindmap";
type TriggerRequest = {
id: number;

View File

@@ -1,11 +1,11 @@
"use client";
"use client";
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
import ReactFlow, { Background, Controls, MiniMap, type ReactFlowInstance } from "reactflow";
import "reactflow/dist/style.css";
import MindmapNodeCard from "@/components/MindmapNodeCard";
import { treeToGraph } from "@/lib/treeToGraph";
import type { MindmapNode } from "@/types/mindmap";
import MindmapNodeCard from "./MindmapNodeCard";
import { treeToGraph } from "../lib/treeToGraph";
import type { MindmapNode } from "../types/mindmap";
type MindmapCanvasProps = {
tree: MindmapNode;

View File

@@ -1,8 +1,8 @@
"use client";
"use client";
import { memo, useCallback, type MouseEvent } from "react";
import { Handle, Position, type NodeProps } from "reactflow";
import type { GraphNodeData } from "@/types/mindmap";
import type { GraphNodeData } from "../types/mindmap";
function MindmapNodeCard({ data }: NodeProps<GraphNodeData>) {
const isRoot = data.level === 0;