feat: change to lucide Icons

This commit is contained in:
Li Xin 2025-04-20 21:32:56 +08:00
parent 81b1dbfefb
commit 2f6b6a1d8d
6 changed files with 40 additions and 47 deletions

View File

@ -1,8 +1,8 @@
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates // Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
import { ArrowUpOutlined, CloseOutlined } from "@ant-design/icons";
import { AnimatePresence, motion } from "framer-motion"; import { AnimatePresence, motion } from "framer-motion";
import { ArrowUp, X } from "lucide-react";
import { import {
type KeyboardEvent, type KeyboardEvent,
useCallback, useCallback,
@ -105,8 +105,9 @@ export function InputBox({
<div className="text-brand flex h-full w-full items-center justify-center text-sm opacity-90"> <div className="text-brand flex h-full w-full items-center justify-center text-sm opacity-90">
{feedback.option.text} {feedback.option.text}
</div> </div>
<CloseOutlined <X
className="cursor-pointer text-[9px] opacity-60" className="cursor-pointer opacity-60"
size={16}
onClick={onRemoveFeedback} onClick={onRemoveFeedback}
/> />
</motion.div> </motion.div>
@ -148,7 +149,7 @@ export function InputBox({
<div className="bg-foreground h-4 w-4 rounded-sm opacity-70" /> <div className="bg-foreground h-4 w-4 rounded-sm opacity-70" />
</div> </div>
) : ( ) : (
<ArrowUpOutlined /> <ArrowUp />
)} )}
</Button> </Button>
</Tooltip> </Tooltip>

View File

@ -1,7 +1,7 @@
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates // Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
import { CheckOutlined, CopyOutlined } from "@ant-design/icons"; import { Check, Copy } from "lucide-react";
import { useMemo, useState } from "react"; import { useMemo, useState } from "react";
import ReactMarkdown, { import ReactMarkdown, {
type Options as ReactMarkdownOptions, type Options as ReactMarkdownOptions,
@ -91,9 +91,9 @@ function CopyButton({ content }: { content: string }) {
}} }}
> >
{copied ? ( {copied ? (
<CheckOutlined className="h-4 w-4" /> <Check className="h-4 w-4" />
) : ( ) : (
<CopyOutlined className="h-4 w-4" /> <Copy className="h-4 w-4" />
)}{" "} )}{" "}
</Button> </Button>
</Tooltip> </Tooltip>

View File

@ -1,13 +1,10 @@
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates // Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
import { import { LoadingOutlined } from "@ant-design/icons";
DownloadOutlined,
SoundOutlined,
LoadingOutlined,
} from "@ant-design/icons";
import { parse } from "best-effort-json-parser"; import { parse } from "best-effort-json-parser";
import { motion } from "framer-motion"; import { motion } from "framer-motion";
import { Download, Podcast } from "lucide-react";
import { useCallback, useMemo, useState } from "react"; import { useCallback, useMemo, useState } from "react";
import { Button } from "~/components/ui/button"; import { Button } from "~/components/ui/button";
@ -383,7 +380,7 @@ function PodcastCard({
<CardHeader> <CardHeader>
<div className="text-muted-foreground flex items-center justify-between text-sm"> <div className="text-muted-foreground flex items-center justify-between text-sm">
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
{isGenerating ? <LoadingOutlined /> : <SoundOutlined />} {isGenerating ? <LoadingOutlined /> : <Podcast />}
<RainbowText animated={isGenerating}> <RainbowText animated={isGenerating}>
{isGenerating {isGenerating
? "Generating podcast..." ? "Generating podcast..."
@ -400,7 +397,7 @@ function PodcastCard({
href={audioUrl} href={audioUrl}
download={`${(title ?? "podcast").replaceAll(" ", "-")}.mp3`} download={`${(title ?? "podcast").replaceAll(" ", "-")}.mp3`}
> >
<DownloadOutlined /> <Download />
</a> </a>
</Button> </Button>
</Tooltip> </Tooltip>

View File

@ -1,14 +1,11 @@
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates // Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
import { import { PythonOutlined } from "@ant-design/icons";
BookOutlined,
PythonOutlined,
SearchOutlined,
} from "@ant-design/icons";
import { parse } from "best-effort-json-parser"; import { parse } from "best-effort-json-parser";
import { motion } from "framer-motion"; import { motion } from "framer-motion";
import { LRUCache } from "lru-cache"; import { LRUCache } from "lru-cache";
import { BookOpenText, Search } from "lucide-react";
import { useMemo } from "react"; import { useMemo } from "react";
import SyntaxHighlighter from "react-syntax-highlighter"; import SyntaxHighlighter from "react-syntax-highlighter";
import { docco } from "react-syntax-highlighter/dist/esm/styles/hljs"; import { docco } from "react-syntax-highlighter/dist/esm/styles/hljs";
@ -139,20 +136,20 @@ function WebSearchToolCall({ toolCall }: { toolCall: ToolCallRuntime }) {
[searchResults], [searchResults],
); );
return ( return (
<section className="mt-4"> <section className="mt-4 pl-4">
<div className="font-medium italic"> <div className="font-medium italic">
<RainbowText <RainbowText
className="flex items-center" className="flex items-center"
animated={searchResults === undefined} animated={searchResults === undefined}
> >
<SearchOutlined className={"mr-2"} /> <Search className={"mr-2"} />
<span>Searching for&nbsp;</span> <span>Searching for&nbsp;</span>
<span className="max-w-[500px] overflow-hidden text-ellipsis whitespace-nowrap"> <span className="max-w-[500px] overflow-hidden text-ellipsis whitespace-nowrap">
{(toolCall.args as { query: string }).query} {(toolCall.args as { query: string }).query}
</span> </span>
</RainbowText> </RainbowText>
</div> </div>
<div className="px-5"> <div className="pr-4">
{pageResults && ( {pageResults && (
<ul className="mt-2 flex flex-wrap gap-4"> <ul className="mt-2 flex flex-wrap gap-4">
{searching && {searching &&
@ -231,17 +228,16 @@ function CrawlToolCall({ toolCall }: { toolCall: ToolCallRuntime }) {
); );
const title = useMemo(() => __pageCache.get(url), [url]); const title = useMemo(() => __pageCache.get(url), [url]);
return ( return (
<section className="mt-4"> <section className="mt-4 pl-4">
<div className="font-medium italic"> <div className="font-medium italic">
<RainbowText <RainbowText
className="flex items-center" className="flex items-center"
animated={toolCall.result === undefined} animated={toolCall.result === undefined}
> >
<BookOutlined className={"mr-2"} /> <BookOpenText className={"mr-2"} />
<span>Reading</span> <span>Reading</span>
</RainbowText> </RainbowText>
</div> </div>
<div className="px-5">
<ul className="mt-2 flex flex-wrap gap-4"> <ul className="mt-2 flex flex-wrap gap-4">
<motion.li <motion.li
className="text-muted-foreground bg-accent flex h-40 w-40 gap-2 rounded-md px-2 py-1 text-sm" className="text-muted-foreground bg-accent flex h-40 w-40 gap-2 rounded-md px-2 py-1 text-sm"
@ -258,7 +254,6 @@ function CrawlToolCall({ toolCall }: { toolCall: ToolCallRuntime }) {
</a> </a>
</motion.li> </motion.li>
</ul> </ul>
</div>
</section> </section>
); );
} }
@ -268,7 +263,7 @@ function PythonToolCall({ toolCall }: { toolCall: ToolCallRuntime }) {
return (toolCall.args as { code: string }).code; return (toolCall.args as { code: string }).code;
}, [toolCall.args]); }, [toolCall.args]);
return ( return (
<section> <section className="mt-4 pl-4">
<div className="font-medium italic"> <div className="font-medium italic">
<PythonOutlined className={"mr-2"} /> <PythonOutlined className={"mr-2"} />
<RainbowText animated={toolCall.result === undefined}> <RainbowText animated={toolCall.result === undefined}>

View File

@ -1,7 +1,7 @@
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates // Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
import { CloseOutlined } from "@ant-design/icons"; import { X } from "lucide-react";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { Button } from "~/components/ui/button"; import { Button } from "~/components/ui/button";
@ -48,7 +48,7 @@ export function ResearchBlock({
openResearch(null); openResearch(null);
}} }}
> >
<CloseOutlined /> <X />
</Button> </Button>
</Tooltip> </Tooltip>
</div> </div>

View File

@ -1,7 +1,7 @@
// Copyright (c) 2025 Bytedance Ltd. and/or its affiliates // Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
import { SoundOutlined } from "@ant-design/icons"; import { Podcast } from "lucide-react";
import { useCallback, useRef, useState } from "react"; import { useCallback, useRef, useState } from "react";
import { Button } from "~/components/ui/button"; import { Button } from "~/components/ui/button";
@ -51,7 +51,7 @@ export function ResearchReportBlock({
void handleListenToReport(); void handleListenToReport();
}} }}
> >
<SoundOutlined /> <Podcast />
</Button> </Button>
</Tooltip> </Tooltip>
)} )}