feat(chat): 移除欢迎页两条指定建议文案
This commit is contained in:
parent
c787802352
commit
db13c1a4e0
|
|
@ -112,6 +112,11 @@ const iconMap: Record<string, any> = {
|
||||||
学术: ThesisIcon,
|
学术: ThesisIcon,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const excludedSuggestionTexts = new Set([
|
||||||
|
"让可学 AI 成为我的全科学习导师?",
|
||||||
|
"让 AI 扮演一位严谨的学术论文写作导师?",
|
||||||
|
]);
|
||||||
|
|
||||||
const suggestions = computed(() => {
|
const suggestions = computed(() => {
|
||||||
// 内部类型,包含 icon 组件用于渲染
|
// 内部类型,包含 icon 组件用于渲染
|
||||||
type SuggestionWithIcon = Suggestion & { iconComponent: typeof Code };
|
type SuggestionWithIcon = Suggestion & { iconComponent: typeof Code };
|
||||||
|
|
@ -121,6 +126,8 @@ const suggestions = computed(() => {
|
||||||
// 遍历 prompt.json 的分类和条目
|
// 遍历 prompt.json 的分类和条目
|
||||||
for (const category of Object.values(promptData)) {
|
for (const category of Object.values(promptData)) {
|
||||||
for (const [text, systemPrompt] of Object.entries(category)) {
|
for (const [text, systemPrompt] of Object.entries(category)) {
|
||||||
|
if (excludedSuggestionTexts.has(text)) continue;
|
||||||
|
|
||||||
// 根据文本关键词选择图标
|
// 根据文本关键词选择图标
|
||||||
let iconComponent = Code; // 默认图标
|
let iconComponent = Code; // 默认图标
|
||||||
for (const [keyword, icon] of Object.entries(iconMap)) {
|
for (const [keyword, icon] of Object.entries(iconMap)) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue