mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-23 14:14:46 +08:00
feat: support to adjust writing style (#290)
* feat: implment backend for adjust report style * feat: add web part * fix test cases * fix: fix typing --------- Co-authored-by: Henry Li <henry1943@163.com>
This commit is contained in:
@@ -9,6 +9,7 @@ import { Detective } from "~/components/deer-flow/icons/detective";
|
||||
import MessageInput, {
|
||||
type MessageInputRef,
|
||||
} from "~/components/deer-flow/message-input";
|
||||
import { ReportStyleDialog } from "~/components/deer-flow/report-style-dialog";
|
||||
import { Tooltip } from "~/components/deer-flow/tooltip";
|
||||
import { Button } from "~/components/ui/button";
|
||||
import type { Option, Resource } from "~/core/messages";
|
||||
@@ -104,7 +105,7 @@ export function InputBox({
|
||||
/>
|
||||
</div>
|
||||
<div className="flex items-center px-4 py-2">
|
||||
<div className="flex grow">
|
||||
<div className="flex grow gap-2">
|
||||
<Tooltip
|
||||
className="max-w-60"
|
||||
title={
|
||||
@@ -133,6 +134,7 @@ export function InputBox({
|
||||
<Detective /> Investigation
|
||||
</Button>
|
||||
</Tooltip>
|
||||
<ReportStyleDialog />
|
||||
</div>
|
||||
<div className="flex shrink-0 items-center gap-2">
|
||||
<Tooltip title={responding ? "Stop" : "Send"}>
|
||||
|
||||
@@ -25,7 +25,6 @@ import type { Tab } from "./types";
|
||||
|
||||
const generalFormSchema = z.object({
|
||||
autoAcceptedPlan: z.boolean(),
|
||||
enableBackgroundInvestigation: z.boolean(),
|
||||
maxPlanIterations: z.number().min(1, {
|
||||
message: "Max plan iterations must be at least 1.",
|
||||
}),
|
||||
@@ -35,6 +34,9 @@ const generalFormSchema = z.object({
|
||||
maxSearchResults: z.number().min(1, {
|
||||
message: "Max search results must be at least 1.",
|
||||
}),
|
||||
// Others
|
||||
enableBackgroundInvestigation: z.boolean(),
|
||||
reportStyle: z.enum(["academic", "popular_science", "news", "social_media"]),
|
||||
});
|
||||
|
||||
export const GeneralTab: Tab = ({
|
||||
|
||||
Reference in New Issue
Block a user