You've already forked agentic-coding-workflow
Web优化 1
This commit is contained in:
@@ -215,12 +215,18 @@ watch(
|
||||
)
|
||||
|
||||
// 流式输出时 messages.length 不变,只 content 增长 —— 同时观察末消息内容长度。
|
||||
let scrollPending = false
|
||||
watch(
|
||||
() => [chat.messages.length, chat.messages.at(-1)?.content?.length ?? 0],
|
||||
() => {
|
||||
nextTick(() => {
|
||||
const el = scrollEl.value
|
||||
if (el) el.scrollTo(0, el.scrollHeight)
|
||||
if (scrollPending) return
|
||||
scrollPending = true
|
||||
requestAnimationFrame(() => {
|
||||
scrollPending = false
|
||||
nextTick(() => {
|
||||
const el = scrollEl.value
|
||||
if (el) el.scrollTo(0, el.scrollHeight)
|
||||
})
|
||||
})
|
||||
},
|
||||
)
|
||||
|
||||
@@ -82,9 +82,8 @@ function remove(id: string) {
|
||||
}
|
||||
|
||||
watch(
|
||||
attachments,
|
||||
() => attachments.value.map((a) => a.id),
|
||||
() => emit('change', attachments.value.map((a) => a.id)),
|
||||
{ deep: true },
|
||||
)
|
||||
|
||||
defineExpose({
|
||||
|
||||
Reference in New Issue
Block a user