提示词修改
This commit is contained in:
1 parent
c79f5c5a7a
commit
a7f1e89ce9
6 files changed
+389
-27
No files matched your search
@@ -80,35 +80,14 @@ import {
|
||||
DropdownMenuTrigger,
|
||||
} from "../ui/dropdown-menu";
|
||||
|
||||
import { useRecommendedQuestions } from "@/core/recommended-questions/hooks";
|
||||
|
||||
import { useThread } from "./messages/context";
|
||||
import { ModeHoverGuide } from "./mode-hover-guide";
|
||||
import { Tooltip } from "./tooltip";
|
||||
|
||||
type InputMode = "flash" | "thinking" | "pro" | "ultra";
|
||||
|
||||
// 推荐问题列表 — 可自由配置 title(卡片标题)和 content(发送给对话的内容)
|
||||
const RECOMMENDED_QUESTIONS: { title: string; content: string }[] = [
|
||||
{
|
||||
title: "市场分析报告",
|
||||
content: "请帮我写一份关于当前 AI 市场的详细分析报告,包括市场规模、主要玩家和发展趋势。",
|
||||
},
|
||||
{
|
||||
title: "制定学习计划",
|
||||
content: "请帮我制定一个为期 3 个月的 Python 编程学习计划,从基础到进阶,每周安排具体任务。",
|
||||
},
|
||||
{
|
||||
title: "代码审查建议",
|
||||
content: "请帮我审查代码,找出潜在的问题、性能瓶颈以及改进建议,并给出修改示例。",
|
||||
},
|
||||
{
|
||||
title: "数据分析方案",
|
||||
content: "请帮我设计一个用于分析用户行为数据的方案,包括数据收集、处理和可视化策略。",
|
||||
},
|
||||
{
|
||||
title: "文章润色优化",
|
||||
content: "请帮我润色以下文章,使其更加流畅、专业,并保持原意不变。",
|
||||
},
|
||||
];
|
||||
|
||||
function getResolvedMode(
|
||||
mode: InputMode | undefined,
|
||||
@@ -185,6 +164,8 @@ export function InputBox({
|
||||
null,
|
||||
);
|
||||
|
||||
const [recommendedQuestions] = useRecommendedQuestions();
|
||||
|
||||
useEffect(() => {
|
||||
if (models.length === 0) {
|
||||
return;
|
||||
@@ -461,11 +442,11 @@ export function InputBox({
|
||||
</div>
|
||||
)}
|
||||
|
||||
{isNewThread && searchParams.get("mode") !== "skill" && (
|
||||
{isNewThread && searchParams.get("mode") !== "skill" && recommendedQuestions.length > 0 && (
|
||||
<div className="flex flex-wrap justify-center gap-2.5 px-4 mb-[10px]">
|
||||
{RECOMMENDED_QUESTIONS.map((q) => (
|
||||
{recommendedQuestions.map((q) => (
|
||||
<button
|
||||
key={q.title}
|
||||
key={q.id}
|
||||
type="button"
|
||||
className="rounded-full border border-[#e4e4e7] bg-white px-4 py-2 text-sm text-[#18181b] shadow-none transition-colors hover:bg-[#f4f4f5] cursor-pointer"
|
||||
onClick={() => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import { ChevronsUpDown, Settings2Icon, SettingsIcon } from "lucide-react";
|
||||
import { ChevronsUpDown, MessageSquarePlusIcon, Settings2Icon, SettingsIcon } from "lucide-react";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import {
|
||||
@@ -19,6 +19,8 @@ import {
|
||||
} from "@/components/ui/sidebar";
|
||||
import { useI18n } from "@/core/i18n/hooks";
|
||||
|
||||
import { useNavigate } from "react-router-dom";
|
||||
|
||||
import { SettingsDialog } from "./settings";
|
||||
|
||||
function NavMenuButtonContent({
|
||||
@@ -42,6 +44,7 @@ function NavMenuButtonContent({
|
||||
}
|
||||
|
||||
export function WorkspaceNavMenu() {
|
||||
const navigate = useNavigate();
|
||||
const [settingsOpen, setSettingsOpen] = useState(false);
|
||||
const [settingsDefaultSection, setSettingsDefaultSection] = useState<
|
||||
"appearance" | "memory" | "tools" | "skills" | "notification" | "about"
|
||||
@@ -88,6 +91,14 @@ export function WorkspaceNavMenu() {
|
||||
<Settings2Icon />
|
||||
{t.common.settings}
|
||||
</DropdownMenuItem>
|
||||
<DropdownMenuItem
|
||||
onClick={() =>
|
||||
navigate("/page/workspace/settings/recommended-questions")
|
||||
}
|
||||
>
|
||||
<MessageSquarePlusIcon />
|
||||
推荐问题配置
|
||||
</DropdownMenuItem>
|
||||
</DropdownMenuGroup>
|
||||
<DropdownMenuSeparator />
|
||||
</DropdownMenuContent>
|
||||
|
||||
Reference in new issue
Block a user