mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-17 03:34:45 +08:00
feat: integrated with artifact resizable
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type { Message } from "@langchain/langgraph-sdk";
|
||||
import {
|
||||
BookOpenTextIcon,
|
||||
FileTextIcon,
|
||||
FolderOpenIcon,
|
||||
GlobeIcon,
|
||||
LightbulbIcon,
|
||||
@@ -219,6 +220,24 @@ function ToolCall({
|
||||
)}
|
||||
</ChainOfThoughtStep>
|
||||
);
|
||||
} else if (name === "present_files") {
|
||||
return (
|
||||
<ChainOfThoughtStep
|
||||
key={id}
|
||||
label={`Present file${(args as { filepaths: string[] }).filepaths.length > 1 ? "s" : ""}`}
|
||||
icon={FileTextIcon}
|
||||
>
|
||||
<ChainOfThoughtSearchResult>
|
||||
{(args as { filepaths: string[] }).filepaths.map(
|
||||
(filepath: string) => (
|
||||
<ChainOfThoughtSearchResult key={filepath}>
|
||||
{filepath}
|
||||
</ChainOfThoughtSearchResult>
|
||||
),
|
||||
)}
|
||||
</ChainOfThoughtSearchResult>
|
||||
</ChainOfThoughtStep>
|
||||
);
|
||||
} else {
|
||||
const description: string | undefined = (args as { description: string })
|
||||
?.description;
|
||||
@@ -324,6 +343,9 @@ function describeStep(step: CoTStep | undefined): {
|
||||
} else if (step.name === "bash") {
|
||||
label = "Execute command";
|
||||
icon = <SquareTerminalIcon className="size-4" />;
|
||||
} else if (step.name === "present_files") {
|
||||
label = `Present file${(step.args as { filepaths: string[] }).filepaths.length > 1 ? "s" : ""}`;
|
||||
icon = <FileTextIcon className="size-4" />;
|
||||
} else {
|
||||
label = `Call tool "${step.name}"`;
|
||||
icon = <WrenchIcon className="size-4" />;
|
||||
|
||||
@@ -122,24 +122,6 @@ export function WorkspaceBody({
|
||||
);
|
||||
}
|
||||
|
||||
export function WorkspaceFooter({
|
||||
className,
|
||||
children,
|
||||
...props
|
||||
}: React.ComponentProps<"footer">) {
|
||||
return (
|
||||
<footer
|
||||
className={cn(
|
||||
"absolute right-0 bottom-0 left-0 z-30 flex justify-center",
|
||||
className,
|
||||
)}
|
||||
{...props}
|
||||
>
|
||||
{children}
|
||||
</footer>
|
||||
);
|
||||
}
|
||||
|
||||
function nameOfSegment(segment: string | undefined) {
|
||||
if (!segment) return "Home";
|
||||
return segment[0]?.toUpperCase() + segment.slice(1);
|
||||
|
||||
Reference in New Issue
Block a user