dsh-plugin-turn-index 1.0.0 → 1.0.1
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/lib/client.js +3 -2
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -1205,7 +1205,7 @@ body[data-ds-dark-theme] .dsh-turn-index-prompt::highlight(dsh-turn-index) {
|
|
|
1205
1205
|
}, [open, query, searchNeedle, filteredNeedle, lockedHeight])
|
|
1206
1206
|
|
|
1207
1207
|
const layout = useMemo(() => {
|
|
1208
|
-
if (rect === null) return null
|
|
1208
|
+
if (rail === null || rect === null || !rail.isConnected) return null
|
|
1209
1209
|
const viewportWidth = window.innerWidth
|
|
1210
1210
|
const viewportHeight = window.innerHeight
|
|
1211
1211
|
const buttonSize = 22
|
|
@@ -1224,7 +1224,8 @@ body[data-ds-dark-theme] .dsh-turn-index-prompt::highlight(dsh-turn-index) {
|
|
|
1224
1224
|
// The overlay sits above the conversation, so the index may cover the
|
|
1225
1225
|
// composer: use the full window height (minus a small margin) instead of
|
|
1226
1226
|
// stopping at the chat scroller's bottom.
|
|
1227
|
-
const
|
|
1227
|
+
const railParent = rail.parentElement
|
|
1228
|
+
const frame = railParent === null ? null : railParent.parentElement
|
|
1228
1229
|
const flow = frame === null ? null : frame.querySelector('[data-chat-flow]')
|
|
1229
1230
|
const scroller = flow === null ? null : flow.parentElement
|
|
1230
1231
|
const scrollBox = scroller === null ? null : scroller.getBoundingClientRect()
|