feat: add strategic_investment report style (#595)

* add strategic_investment mode

* make format

* make lint

* fix: repair
lint-frontend
This commit is contained in:
HagonChan
2025-09-24 09:50:36 +08:00
committed by GitHub
parent 1c27e0f2ae
commit c214999606
13 changed files with 135 additions and 22 deletions

View File

@@ -38,7 +38,7 @@ const generalFormSchema = z.object({
// Others
enableBackgroundInvestigation: z.boolean(),
enableDeepThinking: z.boolean(),
reportStyle: z.enum(["academic", "popular_science", "news", "social_media"]),
reportStyle: z.enum(["academic", "popular_science", "news", "social_media","strategic_investment"]),
});
export const GeneralTab: Tab = ({

View File

@@ -3,7 +3,7 @@
import { useTranslations } from "next-intl";
import { useState } from "react";
import { Check, FileText, Newspaper, Users, GraduationCap } from "lucide-react";
import { Check, FileText, Newspaper, Users, GraduationCap, TrendingUp } from "lucide-react";
import { Button } from "~/components/ui/button";
import {
@@ -44,6 +44,12 @@ const REPORT_STYLES = [
descriptionKey: "socialMediaDesc",
icon: Users,
},
{
value: "strategic_investment" as const,
labelKey: "strategicInvestment",
descriptionKey: "strategicInvestmentDesc",
icon: TrendingUp,
},
];
export function ReportStyleDialog() {
@@ -52,7 +58,7 @@ export function ReportStyleDialog() {
const currentStyle = useSettingsStore((state) => state.general.reportStyle);
const handleStyleChange = (
style: "academic" | "popular_science" | "news" | "social_media",
style: "academic" | "popular_science" | "news" | "social_media" | "strategic_investment",
) => {
setReportStyle(style);
setOpen(false);

View File

@@ -24,7 +24,7 @@ export async function* chatStream(
interrupt_feedback?: string;
enable_deep_thinking?: boolean;
enable_background_investigation: boolean;
report_style?: "academic" | "popular_science" | "news" | "social_media";
report_style?: "academic" | "popular_science" | "news" | "social_media" | "strategic_investment";
mcp_settings?: {
servers: Record<
string,

View File

@@ -30,7 +30,7 @@ export type SettingsState = {
maxPlanIterations: number;
maxStepNum: number;
maxSearchResults: number;
reportStyle: "academic" | "popular_science" | "news" | "social_media";
reportStyle: "academic" | "popular_science" | "news" | "social_media" | "strategic_investment";
};
mcp: {
servers: MCPServerMetadata[];
@@ -130,7 +130,7 @@ export const getChatStreamSettings = () => {
};
export function setReportStyle(
value: "academic" | "popular_science" | "news" | "social_media",
value: "academic" | "popular_science" | "news" | "social_media" | "strategic_investment",
) {
useSettingsStore.setState((state) => ({
general: {