fix chat quote reader (#4125)
This commit is contained in:
@@ -211,7 +211,7 @@ export function useLinkedScroll<
|
||||
// 初始加载
|
||||
useEffect(() => {
|
||||
if (canLoadData) {
|
||||
// 重置初始滚动状态
|
||||
setInitialLoadDone(false);
|
||||
hasScrolledToInitial.current = false;
|
||||
|
||||
loadData({
|
||||
@@ -225,10 +225,10 @@ export function useLinkedScroll<
|
||||
// 监听初始加载完成,执行初始滚动
|
||||
useEffect(() => {
|
||||
if (initialLoadDone && dataList.length > 0 && !hasScrolledToInitial.current) {
|
||||
hasScrolledToInitial.current = true;
|
||||
const foundIndex = dataList.findIndex((item) => item._id === initialId);
|
||||
|
||||
if (foundIndex >= 0) {
|
||||
hasScrolledToInitial.current = true;
|
||||
setTimeout(() => {
|
||||
scrollToItem(foundIndex);
|
||||
}, 200);
|
||||
@@ -299,7 +299,6 @@ export function useLinkedScroll<
|
||||
setDataList,
|
||||
isLoading,
|
||||
loadData,
|
||||
initialLoadDone,
|
||||
ScrollData,
|
||||
itemRefs,
|
||||
scrollToItem
|
||||
|
||||
@@ -457,6 +457,7 @@
|
||||
"core.chat.quote.Read Quote": "View Quote",
|
||||
"core.chat.quote.afterUpdate": "After update",
|
||||
"core.chat.quote.beforeUpdate": "Before update",
|
||||
"core.chat.quote.source": "From: {{source}}",
|
||||
"core.chat.response.Complete Response": "Complete Response",
|
||||
"core.chat.response.Extension model": "Question Optimization Model",
|
||||
"core.chat.response.Read complete response": "View Details",
|
||||
|
||||
@@ -460,6 +460,7 @@
|
||||
"core.chat.quote.Read Quote": "查看引用",
|
||||
"core.chat.quote.afterUpdate": "更新后",
|
||||
"core.chat.quote.beforeUpdate": "更新前",
|
||||
"core.chat.quote.source": "来源:{{source}}",
|
||||
"core.chat.response.Complete Response": "完整响应",
|
||||
"core.chat.response.Extension model": "问题优化模型",
|
||||
"core.chat.response.Read complete response": "查看详情",
|
||||
|
||||
@@ -456,6 +456,7 @@
|
||||
"core.chat.quote.Read Quote": "檢視引用",
|
||||
"core.chat.quote.afterUpdate": "更新後",
|
||||
"core.chat.quote.beforeUpdate": "更新前",
|
||||
"core.chat.quote.source": "來源:{{source}}",
|
||||
"core.chat.response.Complete Response": "完整回應",
|
||||
"core.chat.response.Extension model": "問題最佳化模型",
|
||||
"core.chat.response.Read complete response": "檢視詳細資料",
|
||||
|
||||
Reference in New Issue
Block a user