From c79f5c5a7a6012cd7297116209464721fb233c34 Mon Sep 17 00:00:00 2001
From: fengxiangdebaozi <10845145+fengxiangdebaozi@user.noreply.gitee.com>
Date: Thu, 14 May 2026 10:42:37 +0800
Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/components/workspace/input-box.tsx | 64 +++++++++++++++----
.../workspace/messages/message-list.tsx | 2 +-
.../workspace/messages/skeleton.tsx | 2 +-
.../src/components/workspace/welcome.tsx | 8 +--
frontend-web/src/core/i18n/locales/zh-CN.ts | 2 +-
frontend-web/src/pages/ChatPage.tsx | 4 +-
6 files changed, 59 insertions(+), 23 deletions(-)
diff --git a/frontend-web/src/components/workspace/input-box.tsx b/frontend-web/src/components/workspace/input-box.tsx
index 85dc3dd4..7bc633fa 100644
--- a/frontend-web/src/components/workspace/input-box.tsx
+++ b/frontend-web/src/components/workspace/input-box.tsx
@@ -86,6 +86,30 @@ 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,
supportsThinking: boolean,
@@ -430,7 +454,32 @@ export function InputBox({
}, [context.model_name, disabled, isMock, status, thread.messages, threadId]);
return (
-
+
+ {extraHeader && (
+
+ {extraHeader}
+
+ )}
+
+ {isNewThread && searchParams.get("mode") !== "skill" && (
+
+ {RECOMMENDED_QUESTIONS.map((q) => (
+
+ ))}
+
+ )}
+
{showFollowups && (
@@ -473,13 +522,6 @@ export function InputBox({
onSubmit={handleSubmit}
{...props}
>
- {extraHeader && (
-
- )}
{(attachment) => }
@@ -846,12 +888,6 @@ export function InputBox({
)}
- {isNewThread && searchParams.get("mode") !== "skill" && (
-
-
-
- )}
-