feat: 优化输入框placeholder动态显示逻辑,支持基于知识库和网络搜索状态的个性化提示

This commit is contained in:
wizardchen
2025-12-22 12:11:09 +08:00
committed by lyingbug
parent 58ae0d8350
commit 1ac663fc3f
8 changed files with 146 additions and 14 deletions
+4 -1
View File
@@ -32,6 +32,7 @@ export const useMenuStore = defineStore('menuStore', () => {
const isFirstSession = ref(false)
const firstQuery = ref('')
const firstMentionedItems = ref<any[]>([])
const applyMenuTranslations = () => {
menuArr.forEach(item => {
@@ -90,14 +91,16 @@ export const useMenuStore = defineStore('menuStore', () => {
isFirstSession.value = payload
}
const changeFirstQuery = (payload: string) => {
const changeFirstQuery = (payload: string, mentionedItems: any[] = []) => {
firstQuery.value = payload
firstMentionedItems.value = mentionedItems
}
return {
menuArr,
isFirstSession,
firstQuery,
firstMentionedItems,
clearMenuArr,
updatemenuArr,
updataMenuChildren,