From 1c2d6440073d6041a182366e3f643b9803791219 Mon Sep 17 00:00:00 2001 From: Le Vivilet Date: Sun, 10 May 2026 21:37:33 +0200 Subject: [PATCH 1/2] refactor: Extract start and end handle definitions in getSelectionNodesDom function --- .../GetSelectionNodesDom.ts | 52 ++++++++++--------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/packages/chat-debug-view/src/parts/GetSelectionNodesDom/GetSelectionNodesDom.ts b/packages/chat-debug-view/src/parts/GetSelectionNodesDom/GetSelectionNodesDom.ts index 131f1546..b9c83c12 100644 --- a/packages/chat-debug-view/src/parts/GetSelectionNodesDom/GetSelectionNodesDom.ts +++ b/packages/chat-debug-view/src/parts/GetSelectionNodesDom/GetSelectionNodesDom.ts @@ -12,6 +12,32 @@ import { import { formatPercent } from '../FormatPercent/FormatPercent.ts' import * as TimelineSelectionHandleName from '../TimelineSelectionHandleName/TimelineSelectionHandleName.ts' +const startHandle: VirtualDomNode = { + childCount: 0, + className: mergeClassNames( + ChatDebugViewTimelineSelectionHandle, + ChatDebugViewTimelineSelectionHandleStart, + ChatDebugViewTimelineSelectionMarker, + ChatDebugViewTimelineSelectionMarkerStart, + ), + name: TimelineSelectionHandleName.Start, + role: AriaRoles.None, + type: VirtualDomElements.Button, +} + +const endHandle: VirtualDomNode = { + childCount: 0, + className: mergeClassNames( + ChatDebugViewTimelineSelectionHandle, + ChatDebugViewTimelineSelectionHandleEnd, + ChatDebugViewTimelineSelectionMarker, + ChatDebugViewTimelineSelectionMarkerEnd, + ), + name: TimelineSelectionHandleName.End, + role: AriaRoles.None, + type: VirtualDomElements.Button, +} + export const getSelectionNodesDom = ( hasSelection: boolean, selectionStartPercent: number | null, @@ -27,29 +53,7 @@ export const getSelectionNodesDom = ( style: `left:${formatPercent(selectionStartPercent)};width:${formatPercent(selectionEndPercent - selectionStartPercent)};`, type: VirtualDomElements.Div, }, - { - childCount: 0, - className: mergeClassNames( - ChatDebugViewTimelineSelectionHandle, - ChatDebugViewTimelineSelectionHandleStart, - ChatDebugViewTimelineSelectionMarker, - ChatDebugViewTimelineSelectionMarkerStart, - ), - name: TimelineSelectionHandleName.Start, - role: AriaRoles.None, - type: VirtualDomElements.Button, - }, - { - childCount: 0, - className: mergeClassNames( - ChatDebugViewTimelineSelectionHandle, - ChatDebugViewTimelineSelectionHandleEnd, - ChatDebugViewTimelineSelectionMarker, - ChatDebugViewTimelineSelectionMarkerEnd, - ), - name: TimelineSelectionHandleName.End, - role: AriaRoles.None, - type: VirtualDomElements.Button, - }, + startHandle, + endHandle, ] } From 1687707c23c6ccc08c64d74a4c3761d64a75fa59 Mon Sep 17 00:00:00 2001 From: Le Vivilet Date: Sun, 10 May 2026 20:01:22 +0000 Subject: [PATCH 2/2] memory --- packages/build/src/config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/build/src/config.ts b/packages/build/src/config.ts index 73877b4a..0192978c 100644 --- a/packages/build/src/config.ts +++ b/packages/build/src/config.ts @@ -1,7 +1,7 @@ import { join } from 'node:path' import { root } from './root.ts' -export const threshold = 600_000 +export const threshold = 620_000 export const instantiations = 200_000