@adminforth/agent 1.24.8 → 1.24.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build.log
CHANGED
|
@@ -38,5 +38,5 @@ custom/skills/fetch_data/SKILL.md
|
|
|
38
38
|
custom/skills/mutate_data/
|
|
39
39
|
custom/skills/mutate_data/SKILL.md
|
|
40
40
|
|
|
41
|
-
sent 201,
|
|
42
|
-
total size is 199,
|
|
41
|
+
sent 201,354 bytes received 566 bytes 403,840.00 bytes/sec
|
|
42
|
+
total size is 199,080 speedup is 0.99
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script setup lang="ts">
|
|
14
|
-
import { ref, onMounted, onUnmounted, nextTick } from 'vue'
|
|
14
|
+
import { ref, onMounted, onUnmounted, nextTick, watch } from 'vue'
|
|
15
15
|
import CustomScrollbar from 'custom-vue-scrollbar';
|
|
16
16
|
import 'custom-vue-scrollbar/dist/style.css';
|
|
17
17
|
import { useAgentStore } from './composables/useAgentStore';
|
|
@@ -50,7 +50,6 @@ function scrollToBottom(force = false): void {
|
|
|
50
50
|
if (!container) return
|
|
51
51
|
|
|
52
52
|
if (isUserScrolledUp.value && !force) return
|
|
53
|
-
|
|
54
53
|
container.scrollTo({
|
|
55
54
|
top: container.scrollHeight,
|
|
56
55
|
behavior: props.behavior
|
|
@@ -65,7 +64,7 @@ function hasScrollbar(): boolean {
|
|
|
65
64
|
}
|
|
66
65
|
|
|
67
66
|
|
|
68
|
-
function handleScroll(): void {
|
|
67
|
+
function handleScroll(detectScrollDown = true): void {
|
|
69
68
|
const container = containerRef.value.scrollEl
|
|
70
69
|
if (!container) return
|
|
71
70
|
|
|
@@ -80,12 +79,10 @@ function handleScroll(): void {
|
|
|
80
79
|
isUserScrolledUp.value = false
|
|
81
80
|
} else {
|
|
82
81
|
const isScrollingUp = scrollTop < lastScrollTop
|
|
83
|
-
const isScrollingDown = scrollTop > lastScrollTop
|
|
82
|
+
const isScrollingDown = detectScrollDown ? scrollTop > lastScrollTop : false
|
|
84
83
|
const isContentUnchanged = scrollHeight === lastScrollHeight
|
|
85
84
|
if ((isScrollingUp || isScrollingDown) && isContentUnchanged) {
|
|
86
85
|
isUserScrolledUp.value = true
|
|
87
|
-
} else if (!isNearBottom()) {
|
|
88
|
-
isUserScrolledUp.value = true
|
|
89
86
|
}
|
|
90
87
|
}
|
|
91
88
|
lastScrollTop = scrollTop
|
|
@@ -110,7 +107,6 @@ onMounted(() => {
|
|
|
110
107
|
}
|
|
111
108
|
|
|
112
109
|
lastScrollHeight = containerRef.value.scrollEl.scrollHeight
|
|
113
|
-
|
|
114
110
|
if (props.enabled && !isUserScrolledUp.value) {
|
|
115
111
|
scrollToBottom()
|
|
116
112
|
}
|
|
@@ -83,12 +83,11 @@ const showScrollToBottomButton = ref(false);
|
|
|
83
83
|
const innerScrollContainerRef = ref(null);
|
|
84
84
|
const agentStore = useAgentStore();
|
|
85
85
|
const agentTransitions = useAgentTransitions();
|
|
86
|
-
const clicks = ref(0);
|
|
87
86
|
const showScrollContainer = ref(true);
|
|
88
87
|
|
|
89
88
|
function recalculateScroll() {
|
|
90
89
|
if (scrollContainer.value) {
|
|
91
|
-
scrollContainer.value.handleScroll();
|
|
90
|
+
scrollContainer.value.handleScroll(false);
|
|
92
91
|
const isScrolledUp = scrollContainer.value.isUserScrolledUp();
|
|
93
92
|
showScrollToBottomButton.value = !!isScrolledUp;
|
|
94
93
|
}
|
|
@@ -121,9 +120,6 @@ watch(scrollContainer, () => {
|
|
|
121
120
|
}
|
|
122
121
|
})
|
|
123
122
|
|
|
124
|
-
watch(clicks, () => {
|
|
125
|
-
recalculateScroll();
|
|
126
|
-
})
|
|
127
123
|
|
|
128
124
|
|
|
129
125
|
</script>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
</template>
|
|
12
12
|
|
|
13
13
|
<script setup lang="ts">
|
|
14
|
-
import { ref, onMounted, onUnmounted, nextTick } from 'vue'
|
|
14
|
+
import { ref, onMounted, onUnmounted, nextTick, watch } from 'vue'
|
|
15
15
|
import CustomScrollbar from 'custom-vue-scrollbar';
|
|
16
16
|
import 'custom-vue-scrollbar/dist/style.css';
|
|
17
17
|
import { useAgentStore } from './composables/useAgentStore';
|
|
@@ -50,7 +50,6 @@ function scrollToBottom(force = false): void {
|
|
|
50
50
|
if (!container) return
|
|
51
51
|
|
|
52
52
|
if (isUserScrolledUp.value && !force) return
|
|
53
|
-
|
|
54
53
|
container.scrollTo({
|
|
55
54
|
top: container.scrollHeight,
|
|
56
55
|
behavior: props.behavior
|
|
@@ -65,7 +64,7 @@ function hasScrollbar(): boolean {
|
|
|
65
64
|
}
|
|
66
65
|
|
|
67
66
|
|
|
68
|
-
function handleScroll(): void {
|
|
67
|
+
function handleScroll(detectScrollDown = true): void {
|
|
69
68
|
const container = containerRef.value.scrollEl
|
|
70
69
|
if (!container) return
|
|
71
70
|
|
|
@@ -80,12 +79,10 @@ function handleScroll(): void {
|
|
|
80
79
|
isUserScrolledUp.value = false
|
|
81
80
|
} else {
|
|
82
81
|
const isScrollingUp = scrollTop < lastScrollTop
|
|
83
|
-
const isScrollingDown = scrollTop > lastScrollTop
|
|
82
|
+
const isScrollingDown = detectScrollDown ? scrollTop > lastScrollTop : false
|
|
84
83
|
const isContentUnchanged = scrollHeight === lastScrollHeight
|
|
85
84
|
if ((isScrollingUp || isScrollingDown) && isContentUnchanged) {
|
|
86
85
|
isUserScrolledUp.value = true
|
|
87
|
-
} else if (!isNearBottom()) {
|
|
88
|
-
isUserScrolledUp.value = true
|
|
89
86
|
}
|
|
90
87
|
}
|
|
91
88
|
lastScrollTop = scrollTop
|
|
@@ -110,7 +107,6 @@ onMounted(() => {
|
|
|
110
107
|
}
|
|
111
108
|
|
|
112
109
|
lastScrollHeight = containerRef.value.scrollEl.scrollHeight
|
|
113
|
-
|
|
114
110
|
if (props.enabled && !isUserScrolledUp.value) {
|
|
115
111
|
scrollToBottom()
|
|
116
112
|
}
|
|
@@ -83,12 +83,11 @@ const showScrollToBottomButton = ref(false);
|
|
|
83
83
|
const innerScrollContainerRef = ref(null);
|
|
84
84
|
const agentStore = useAgentStore();
|
|
85
85
|
const agentTransitions = useAgentTransitions();
|
|
86
|
-
const clicks = ref(0);
|
|
87
86
|
const showScrollContainer = ref(true);
|
|
88
87
|
|
|
89
88
|
function recalculateScroll() {
|
|
90
89
|
if (scrollContainer.value) {
|
|
91
|
-
scrollContainer.value.handleScroll();
|
|
90
|
+
scrollContainer.value.handleScroll(false);
|
|
92
91
|
const isScrolledUp = scrollContainer.value.isUserScrolledUp();
|
|
93
92
|
showScrollToBottomButton.value = !!isScrolledUp;
|
|
94
93
|
}
|
|
@@ -121,9 +120,6 @@ watch(scrollContainer, () => {
|
|
|
121
120
|
}
|
|
122
121
|
})
|
|
123
122
|
|
|
124
|
-
watch(clicks, () => {
|
|
125
|
-
recalculateScroll();
|
|
126
|
-
})
|
|
127
123
|
|
|
128
124
|
|
|
129
125
|
</script>
|