Download src/hooks/chat/model-command-event-anchor.ts from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 472 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/hooks/chat/model-command-event-anchor.ts
- Command line
-
hf download hf://SaylorTwift/openhands/src/hooks/chat/model-command-event-anchor.ts
-
curl -L -o model-command-event-anchor.ts https://huggingface.co/SaylorTwift/openhands/resolve/main/src/hooks/chat/model-command-event-anchor.ts
472 Bytes
| import { shouldRenderEvent } from "#/components/conversation-events/chat/event-content-helpers/should-render-event"; | |
| import { useEventStore } from "#/stores/use-event-store"; | |
| export const getLastRenderableEventId = (): string | null => { | |
| const { uiEvents } = useEventStore.getState(); | |
| for (let index = uiEvents.length - 1; index >= 0; index -= 1) { | |
| const event = uiEvents[index]; | |
| if (shouldRenderEvent(event)) return String(event.id); | |
| } | |
| return null; | |
| }; | |