@ahggg/dsh-side-chat 0.7.1 → 0.7.3
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/README.md +3 -3
- package/README.zh-CN.md +3 -3
- package/lib/client/apply.d.ts +0 -1
- package/lib/client/apply.js +0 -1
- package/lib/client/contracts.d.ts +0 -1
- package/lib/client/contracts.js +0 -1
- package/lib/client/index.d.ts +0 -1
- package/lib/client/index.js +0 -1
- package/lib/client/model-preference.d.ts +0 -1
- package/lib/client/model-preference.js +0 -1
- package/lib/client/panel/SelectionQuote.d.ts +0 -1
- package/lib/client/panel/SelectionQuote.js +0 -1
- package/lib/client/panel/SendIcon.d.ts +0 -1
- package/lib/client/panel/SendIcon.js +0 -1
- package/lib/client/panel/SideChatBody.d.ts +0 -1
- package/lib/client/panel/SideChatBody.js +0 -1
- package/lib/client/panel/SideChatErrorState.d.ts +0 -1
- package/lib/client/panel/SideChatErrorState.js +0 -1
- package/lib/client/panel/SideChatHeader.d.ts +0 -1
- package/lib/client/panel/SideChatHeader.js +0 -1
- package/lib/client/panel/SideChatModelSelect.d.ts +0 -1
- package/lib/client/panel/SideChatModelSelect.js +0 -1
- package/lib/client/panel/SideChatPanel.d.ts +0 -1
- package/lib/client/panel/SideChatPanel.js +0 -1
- package/lib/client/panel/StopIcon.d.ts +0 -1
- package/lib/client/panel/StopIcon.js +0 -1
- package/lib/client/panel/messages.d.ts +0 -1
- package/lib/client/panel/messages.js +0 -1
- package/lib/client/panel/use-auto-growing-textarea.d.ts +0 -1
- package/lib/client/panel/use-auto-growing-textarea.js +0 -1
- package/lib/client/parent-composer/ParentConversationAnnotations.d.ts +0 -1
- package/lib/client/parent-composer/ParentConversationAnnotations.js +26 -3
- package/lib/client/parent-composer/add-to-conversation.d.ts +15 -54
- package/lib/client/parent-composer/add-to-conversation.js +308 -63
- package/lib/client/parent-composer/annotation-persistence.d.ts +1 -2
- package/lib/client/parent-composer/annotation-persistence.js +43 -41
- package/lib/client/parent-composer/composer-reference.d.ts +81 -0
- package/lib/client/parent-composer/composer-reference.js +89 -0
- package/lib/client/parent-composer/referenced-conversation.d.ts +2 -3
- package/lib/client/parent-composer/referenced-conversation.js +36 -25
- package/lib/client/rc6/ArchivedConversation.d.ts +2 -3
- package/lib/client/rc6/ArchivedConversation.js +6 -5
- package/lib/client/rc6/Rc6SideChatOverlay.d.ts +0 -1
- package/lib/client/rc6/Rc6SideChatOverlay.js +12 -2
- package/lib/client/rc6/SideChatTool.d.ts +1 -2
- package/lib/client/rc6/SideChatTool.js +18 -9
- package/lib/client/rc6/context.d.ts +9 -3
- package/lib/client/rc6/context.js +0 -1
- package/lib/client/rc6/primitive-labels.d.ts +7 -0
- package/lib/client/rc6/primitive-labels.js +60 -0
- package/lib/client/rc6/remote-adapter.d.ts +0 -1
- package/lib/client/rc6/remote-adapter.js +4 -3
- package/lib/client/rc6/runtime-compat.d.ts +120 -0
- package/lib/client/rc6/runtime-compat.js +187 -0
- package/lib/client/rc6/sessions-adapter.d.ts +9 -4
- package/lib/client/rc6/sessions-adapter.js +74 -46
- package/lib/client/selection/ConversationAnnotationMarkers.d.ts +0 -1
- package/lib/client/selection/ConversationAnnotationMarkers.js +0 -1
- package/lib/client/selection/SelectionActions.d.ts +5 -2
- package/lib/client/selection/SelectionActions.js +66 -50
- package/lib/client/selection/selection-controller.d.ts +0 -1
- package/lib/client/selection/selection-controller.js +0 -1
- package/lib/client/selection/selection-limits.d.ts +0 -1
- package/lib/client/selection/selection-limits.js +0 -1
- package/lib/client/selection/selection-normalizer.d.ts +0 -1
- package/lib/client/selection/selection-normalizer.js +0 -1
- package/lib/client/side-chat-controller.d.ts +0 -1
- package/lib/client/side-chat-controller.js +0 -1
- package/lib/client.js +1173 -8744
- package/lib/host/archived-fork-service.d.ts +0 -1
- package/lib/host/archived-fork-service.js +71 -26
- package/lib/host/index.d.ts +0 -1
- package/lib/host/index.js +0 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -1
- package/lib/remote.d.ts +0 -1
- package/lib/remote.js +0 -1
- package/lib/shared/archived-wire.d.ts +0 -1
- package/lib/shared/archived-wire.js +0 -1
- package/lib/shared/constants.d.ts +0 -1
- package/lib/shared/constants.js +0 -1
- package/lib/shared/contracts.d.ts +0 -1
- package/lib/shared/contracts.js +0 -1
- package/lib/shared/error-codes.d.ts +0 -1
- package/lib/shared/error-codes.js +0 -1
- package/lib/shared/observable.d.ts +0 -1
- package/lib/shared/observable.js +0 -1
- package/lib/typert.d.ts +0 -1
- package/lib/typert.js +64 -51
- package/package.json +60 -38
- package/lib/client/apply.d.ts.map +0 -1
- package/lib/client/apply.js.map +0 -1
- package/lib/client/contracts.d.ts.map +0 -1
- package/lib/client/contracts.js.map +0 -1
- package/lib/client/index.d.ts.map +0 -1
- package/lib/client/index.js.map +0 -1
- package/lib/client/model-preference.d.ts.map +0 -1
- package/lib/client/model-preference.js.map +0 -1
- package/lib/client/panel/SelectionQuote.d.ts.map +0 -1
- package/lib/client/panel/SelectionQuote.js.map +0 -1
- package/lib/client/panel/SendIcon.d.ts.map +0 -1
- package/lib/client/panel/SendIcon.js.map +0 -1
- package/lib/client/panel/SideChatBody.d.ts.map +0 -1
- package/lib/client/panel/SideChatBody.js.map +0 -1
- package/lib/client/panel/SideChatErrorState.d.ts.map +0 -1
- package/lib/client/panel/SideChatErrorState.js.map +0 -1
- package/lib/client/panel/SideChatHeader.d.ts.map +0 -1
- package/lib/client/panel/SideChatHeader.js.map +0 -1
- package/lib/client/panel/SideChatModelSelect.d.ts.map +0 -1
- package/lib/client/panel/SideChatModelSelect.js.map +0 -1
- package/lib/client/panel/SideChatPanel.d.ts.map +0 -1
- package/lib/client/panel/SideChatPanel.js.map +0 -1
- package/lib/client/panel/StopIcon.d.ts.map +0 -1
- package/lib/client/panel/StopIcon.js.map +0 -1
- package/lib/client/panel/messages.d.ts.map +0 -1
- package/lib/client/panel/messages.js.map +0 -1
- package/lib/client/panel/use-auto-growing-textarea.d.ts.map +0 -1
- package/lib/client/panel/use-auto-growing-textarea.js.map +0 -1
- package/lib/client/parent-composer/ParentConversationAnnotations.d.ts.map +0 -1
- package/lib/client/parent-composer/ParentConversationAnnotations.js.map +0 -1
- package/lib/client/parent-composer/add-to-conversation.d.ts.map +0 -1
- package/lib/client/parent-composer/add-to-conversation.js.map +0 -1
- package/lib/client/parent-composer/annotation-persistence.d.ts.map +0 -1
- package/lib/client/parent-composer/annotation-persistence.js.map +0 -1
- package/lib/client/parent-composer/referenced-conversation.d.ts.map +0 -1
- package/lib/client/parent-composer/referenced-conversation.js.map +0 -1
- package/lib/client/rc6/ArchivedConversation.d.ts.map +0 -1
- package/lib/client/rc6/ArchivedConversation.js.map +0 -1
- package/lib/client/rc6/Rc6SideChatOverlay.d.ts.map +0 -1
- package/lib/client/rc6/Rc6SideChatOverlay.js.map +0 -1
- package/lib/client/rc6/SideChatTool.d.ts.map +0 -1
- package/lib/client/rc6/SideChatTool.js.map +0 -1
- package/lib/client/rc6/context.d.ts.map +0 -1
- package/lib/client/rc6/context.js.map +0 -1
- package/lib/client/rc6/remote-adapter.d.ts.map +0 -1
- package/lib/client/rc6/remote-adapter.js.map +0 -1
- package/lib/client/rc6/sessions-adapter.d.ts.map +0 -1
- package/lib/client/rc6/sessions-adapter.js.map +0 -1
- package/lib/client/selection/ConversationAnnotationMarkers.d.ts.map +0 -1
- package/lib/client/selection/ConversationAnnotationMarkers.js.map +0 -1
- package/lib/client/selection/SelectionActions.d.ts.map +0 -1
- package/lib/client/selection/SelectionActions.js.map +0 -1
- package/lib/client/selection/selection-controller.d.ts.map +0 -1
- package/lib/client/selection/selection-controller.js.map +0 -1
- package/lib/client/selection/selection-limits.d.ts.map +0 -1
- package/lib/client/selection/selection-limits.js.map +0 -1
- package/lib/client/selection/selection-normalizer.d.ts.map +0 -1
- package/lib/client/selection/selection-normalizer.js.map +0 -1
- package/lib/client/side-chat-controller.d.ts.map +0 -1
- package/lib/client/side-chat-controller.js.map +0 -1
- package/lib/client.js.map +0 -1
- package/lib/host/archived-fork-service.d.ts.map +0 -1
- package/lib/host/archived-fork-service.js.map +0 -1
- package/lib/host/index.d.ts.map +0 -1
- package/lib/host/index.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/remote.d.ts.map +0 -1
- package/lib/remote.js.map +0 -1
- package/lib/shared/archived-wire.d.ts.map +0 -1
- package/lib/shared/archived-wire.js.map +0 -1
- package/lib/shared/constants.d.ts.map +0 -1
- package/lib/shared/constants.js.map +0 -1
- package/lib/shared/contracts.d.ts.map +0 -1
- package/lib/shared/contracts.js.map +0 -1
- package/lib/shared/error-codes.d.ts.map +0 -1
- package/lib/shared/error-codes.js.map +0 -1
- package/lib/shared/observable.d.ts.map +0 -1
- package/lib/shared/observable.js.map +0 -1
- package/lib/typert.d.ts.map +0 -1
- package/lib/typert.js.map +0 -1
|
@@ -10,97 +10,115 @@ export function calculateSelectionActionsPosition(rect, size, touch, viewport =
|
|
|
10
10
|
const edge = 8;
|
|
11
11
|
const width = Math.max(0, size.width);
|
|
12
12
|
const height = Math.max(0, size.height);
|
|
13
|
-
|
|
13
|
+
// Range and fixed-position coordinates use the layout viewport origin. A
|
|
14
|
+
// visual viewport must therefore contribute both its size and its offset.
|
|
15
|
+
const viewportLeft = viewport.offsetLeft ?? 0;
|
|
16
|
+
const viewportTop = viewport.offsetTop ?? 0;
|
|
17
|
+
const viewportRight = viewportLeft + viewport.width;
|
|
18
|
+
const viewportBottom = viewportTop + viewport.height;
|
|
19
|
+
const left = clamp(rect.x + rect.width / 2 - width / 2, viewportLeft + edge, viewportRight - width - edge);
|
|
14
20
|
const belowGap = touch ? 12 : 8;
|
|
15
21
|
const aboveGap = touch ? 64 : 8;
|
|
16
22
|
const below = rect.y + rect.height + belowGap;
|
|
17
23
|
const above = rect.y - height - aboveGap;
|
|
18
|
-
const belowFits = below + height <=
|
|
19
|
-
const aboveFits = above >= edge;
|
|
24
|
+
const belowFits = below + height <= viewportBottom - edge;
|
|
25
|
+
const aboveFits = above >= viewportTop + edge;
|
|
20
26
|
let top;
|
|
21
|
-
if (
|
|
27
|
+
if (belowFits)
|
|
22
28
|
top = below;
|
|
23
29
|
else if (aboveFits)
|
|
24
30
|
top = above;
|
|
25
|
-
else if (belowFits)
|
|
26
|
-
top = below;
|
|
27
31
|
else {
|
|
28
|
-
const roomAbove = rect.y - aboveGap - edge;
|
|
29
|
-
const roomBelow =
|
|
32
|
+
const roomAbove = rect.y - aboveGap - viewportTop - edge;
|
|
33
|
+
const roomBelow = viewportBottom - edge - rect.y - rect.height - belowGap;
|
|
30
34
|
top = roomAbove >= roomBelow ? above : below;
|
|
31
35
|
}
|
|
32
36
|
return {
|
|
33
37
|
left,
|
|
34
|
-
top: clamp(top, edge,
|
|
38
|
+
top: clamp(top, viewportTop + edge, viewportBottom - height - edge),
|
|
35
39
|
};
|
|
36
40
|
}
|
|
37
|
-
export function SelectionActions({ selection, touchInteraction = false, askDisabledReason, annotationNumber = 1, annotationEditor, onAddToChat, onMoreDetails, onAskInSideChat, onAnnotationEditorChange, onDismiss, }) {
|
|
41
|
+
export function SelectionActions({ selection, touchInteraction = false, askDisabledReason, annotationNumber = 1, annotationEditor, onAddToChat, onMoreDetails, onAskInSideChat, onAnnotationEditorChange, onRemoveAnnotation, onDismiss, }) {
|
|
38
42
|
const [editingAnnotation, setEditingAnnotation] = useState(annotationEditor !== undefined);
|
|
39
43
|
const [comment, setComment] = useState(annotationEditor?.initialComment ?? '');
|
|
40
|
-
const [
|
|
44
|
+
const [toolbarSize, setToolbarSize] = useState(() => ({
|
|
41
45
|
width: 0,
|
|
42
46
|
height: 0,
|
|
43
|
-
|
|
44
|
-
|
|
47
|
+
}));
|
|
48
|
+
const [viewport, setViewport] = useState(() => ({
|
|
49
|
+
width: selection.rect.viewportWidth,
|
|
50
|
+
height: selection.rect.viewportHeight,
|
|
51
|
+
offsetLeft: 0,
|
|
52
|
+
offsetTop: 0,
|
|
45
53
|
}));
|
|
46
54
|
const commentRef = useRef(null);
|
|
47
55
|
const toolbarRef = useRef(null);
|
|
48
56
|
const touchActivationRef = useRef(null);
|
|
49
|
-
const toolbarPosition = calculateSelectionActionsPosition(selection.rect,
|
|
57
|
+
const toolbarPosition = calculateSelectionActionsPosition(selection.rect, toolbarSize, touchInteraction, viewport);
|
|
50
58
|
const style = {
|
|
51
59
|
left: toolbarPosition.left,
|
|
52
60
|
top: toolbarPosition.top,
|
|
53
61
|
};
|
|
54
|
-
const
|
|
55
|
-
const
|
|
62
|
+
const viewportLeft = viewport.offsetLeft;
|
|
63
|
+
const viewportTop = viewport.offsetTop;
|
|
64
|
+
const viewportRight = viewportLeft + viewport.width;
|
|
65
|
+
const viewportBottom = viewportTop + viewport.height;
|
|
66
|
+
const editorEdge = 8;
|
|
67
|
+
const editorHeight = 118;
|
|
68
|
+
const editorWidth = Math.max(0, Math.min(420, viewport.width - editorEdge * 2));
|
|
69
|
+
const editorAbove = selection.rect.y - editorHeight;
|
|
70
|
+
const editorBelow = selection.rect.y + selection.rect.height + 12;
|
|
56
71
|
const editorStyle = {
|
|
57
|
-
left: clamp(selection.rect.x + selection.rect.width + 28,
|
|
58
|
-
top: editorAbove >=
|
|
59
|
-
? editorAbove
|
|
60
|
-
: clamp(selection.rect.y + selection.rect.height + 12, 8, selection.rect.viewportHeight - 126),
|
|
72
|
+
left: clamp(selection.rect.x + selection.rect.width + 28, viewportLeft + editorEdge, viewportRight - editorWidth - editorEdge),
|
|
73
|
+
top: clamp(editorAbove >= viewportTop + editorEdge ? editorAbove : editorBelow, viewportTop + editorEdge, viewportBottom - editorHeight - editorEdge),
|
|
61
74
|
width: editorWidth,
|
|
62
75
|
};
|
|
76
|
+
const markerEdge = 4;
|
|
77
|
+
const markerSize = 22;
|
|
63
78
|
const markerStyle = {
|
|
64
|
-
left: clamp(selection.rect.x + selection.rect.width + 3,
|
|
65
|
-
top: clamp(selection.rect.y - 12,
|
|
79
|
+
left: clamp(selection.rect.x + selection.rect.width + 3, viewportLeft + markerEdge, viewportRight - markerSize - markerEdge),
|
|
80
|
+
top: clamp(selection.rect.y - 12, viewportTop + markerEdge, viewportBottom - markerSize - markerEdge),
|
|
66
81
|
};
|
|
67
82
|
const markerNumber = annotationNumber > 99 ? '99+' : String(annotationNumber);
|
|
68
83
|
const keepSelection = (event) => { event.preventDefault(); };
|
|
69
84
|
useLayoutEffect(() => {
|
|
70
|
-
|
|
71
|
-
return;
|
|
72
|
-
const toolbar = toolbarRef.current;
|
|
73
|
-
if (toolbar === null)
|
|
74
|
-
return;
|
|
85
|
+
const visualViewport = window.visualViewport;
|
|
75
86
|
const measure = () => {
|
|
76
|
-
const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
width: bounds.width,
|
|
82
|
-
height: bounds.height,
|
|
83
|
-
viewportWidth,
|
|
84
|
-
viewportHeight,
|
|
87
|
+
const nextViewport = {
|
|
88
|
+
width: visualViewport?.width ?? window.innerWidth ?? selection.rect.viewportWidth,
|
|
89
|
+
height: visualViewport?.height ?? window.innerHeight ?? selection.rect.viewportHeight,
|
|
90
|
+
offsetLeft: visualViewport?.offsetLeft ?? 0,
|
|
91
|
+
offsetTop: visualViewport?.offsetTop ?? 0,
|
|
85
92
|
};
|
|
86
|
-
|
|
87
|
-
&& current.height ===
|
|
88
|
-
&& current.
|
|
89
|
-
&& current.
|
|
93
|
+
setViewport(current => current.width === nextViewport.width
|
|
94
|
+
&& current.height === nextViewport.height
|
|
95
|
+
&& current.offsetLeft === nextViewport.offsetLeft
|
|
96
|
+
&& current.offsetTop === nextViewport.offsetTop
|
|
97
|
+
? current
|
|
98
|
+
: nextViewport);
|
|
99
|
+
const toolbar = toolbarRef.current;
|
|
100
|
+
if (toolbar === null)
|
|
101
|
+
return;
|
|
102
|
+
const bounds = toolbar.getBoundingClientRect();
|
|
103
|
+
const nextSize = { width: bounds.width, height: bounds.height };
|
|
104
|
+
setToolbarSize(current => current.width === nextSize.width
|
|
105
|
+
&& current.height === nextSize.height
|
|
90
106
|
? current
|
|
91
|
-
:
|
|
107
|
+
: nextSize);
|
|
92
108
|
};
|
|
93
109
|
measure();
|
|
110
|
+
const toolbar = toolbarRef.current;
|
|
94
111
|
const observer = typeof ResizeObserver === 'undefined' ? undefined : new ResizeObserver(measure);
|
|
95
|
-
|
|
112
|
+
if (toolbar !== null)
|
|
113
|
+
observer?.observe(toolbar);
|
|
96
114
|
window.addEventListener('resize', measure);
|
|
97
|
-
|
|
98
|
-
|
|
115
|
+
visualViewport?.addEventListener('resize', measure);
|
|
116
|
+
visualViewport?.addEventListener('scroll', measure);
|
|
99
117
|
return () => {
|
|
100
118
|
observer?.disconnect();
|
|
101
119
|
window.removeEventListener('resize', measure);
|
|
102
|
-
|
|
103
|
-
|
|
120
|
+
visualViewport?.removeEventListener('resize', measure);
|
|
121
|
+
visualViewport?.removeEventListener('scroll', measure);
|
|
104
122
|
};
|
|
105
123
|
}, [editingAnnotation, selection, touchInteraction]);
|
|
106
124
|
useEffect(() => {
|
|
@@ -111,8 +129,7 @@ export function SelectionActions({ selection, touchInteraction = false, askDisab
|
|
|
111
129
|
setEditingAnnotation(false);
|
|
112
130
|
setComment('');
|
|
113
131
|
onAnnotationEditorChange?.(false);
|
|
114
|
-
|
|
115
|
-
onDismiss();
|
|
132
|
+
onDismiss();
|
|
116
133
|
};
|
|
117
134
|
const saveAnnotation = () => {
|
|
118
135
|
const trimmed = comment.trim();
|
|
@@ -172,7 +189,7 @@ export function SelectionActions({ selection, touchInteraction = false, askDisab
|
|
|
172
189
|
action();
|
|
173
190
|
};
|
|
174
191
|
if (editingAnnotation) {
|
|
175
|
-
return (_jsxs(_Fragment, { children: [annotationEditor === undefined && (_jsx("span", { className: "dsh-side-chat-selection-marker", "aria-hidden": "true", "data-large": annotationNumber > 99 || undefined, style: markerStyle, children: markerNumber })), _jsxs("form", { className: "dsh-side-chat-selection-comment", role: "dialog", "aria-label": annotationEditor?.dialogLabel ?? 'Add annotation comment', style: editorStyle, onSubmit: submitAnnotation, onMouseDown: (event) => { event.stopPropagation(); }, onKeyUp: (event) => { event.stopPropagation(); }, children: [_jsx("textarea", { ref: commentRef, value: comment, rows: 2, "aria-label": "Optional annotation comment", placeholder: "Add an optional comment\u2026", onChange: (event) => { setComment(event.currentTarget.value); }, onKeyDown: annotationKeyDown }), _jsxs("div", { className: "dsh-side-chat-selection-comment-actions", children: [_jsx("button", { type: "button", onClick: closeEditor, children: "Cancel" }), _jsx("button", { type: "submit", className: "dsh-side-chat-selection-comment-save", children: "Save" })] })] })] }));
|
|
192
|
+
return (_jsxs(_Fragment, { children: [annotationEditor === undefined && (_jsx("span", { className: "dsh-side-chat-selection-marker", "aria-hidden": "true", "data-large": annotationNumber > 99 || undefined, style: markerStyle, children: markerNumber })), _jsxs("form", { className: "dsh-side-chat-selection-comment", role: "dialog", "aria-label": annotationEditor?.dialogLabel ?? 'Add annotation comment', style: editorStyle, onSubmit: submitAnnotation, onMouseDown: (event) => { event.stopPropagation(); }, onKeyUp: (event) => { event.stopPropagation(); }, children: [_jsx("textarea", { ref: commentRef, value: comment, rows: 2, "aria-label": "Optional annotation comment", placeholder: "Add an optional comment\u2026", onChange: (event) => { setComment(event.currentTarget.value); }, onKeyDown: annotationKeyDown }), _jsxs("div", { className: "dsh-side-chat-selection-comment-actions", children: [annotationEditor !== undefined && onRemoveAnnotation !== undefined && (_jsx("button", { type: "button", onClick: onRemoveAnnotation, children: "Remove" })), _jsx("button", { type: "button", onClick: closeEditor, children: "Cancel" }), _jsx("button", { type: "submit", className: "dsh-side-chat-selection-comment-save", children: "Save" })] })] })] }));
|
|
176
193
|
}
|
|
177
194
|
return (_jsxs("div", { ref: toolbarRef, className: "dsh-side-chat-selection-actions", role: "toolbar", "aria-label": "Selected conversation text actions", "data-touch": touchInteraction || undefined, style: style, onMouseDown: keepSelection, onPointerDown: (event) => {
|
|
178
195
|
if (touchInteraction && event.pointerType === 'touch')
|
|
@@ -182,4 +199,3 @@ export function SelectionActions({ selection, touchInteraction = false, askDisab
|
|
|
182
199
|
onDismiss();
|
|
183
200
|
}, children: [_jsx("button", { type: "button", onPointerDown: (event) => { activateOnTouch(event, openAnnotationEditor); }, onClick: (event) => { activateOnClick(event, openAnnotationEditor); }, children: "Add to chat" }), _jsx("button", { type: "button", disabled: askDisabledReason !== undefined, title: askDisabledReason, onPointerDown: (event) => { activateOnTouch(event, showMoreDetails); }, onClick: (event) => { activateOnClick(event, showMoreDetails); }, children: "More details" }), _jsx("button", { type: "button", disabled: askDisabledReason !== undefined, title: askDisabledReason, onPointerDown: (event) => { activateOnTouch(event, askInSideChat); }, onClick: (event) => { activateOnClick(event, askInSideChat); }, children: "Ask in side chat" })] }));
|
|
184
201
|
}
|
|
185
|
-
//# sourceMappingURL=SelectionActions.js.map
|
|
@@ -4,4 +4,3 @@ export declare function utf8ByteLength(value: string): number;
|
|
|
4
4
|
export declare function selectionFitsLimit(value: string): boolean;
|
|
5
5
|
/** Code-point-safe preview that never cuts a surrogate pair. */
|
|
6
6
|
export declare function summarizeSelection(value: string, maxCodePoints?: number): string;
|
|
7
|
-
//# sourceMappingURL=selection-limits.d.ts.map
|
|
@@ -13,4 +13,3 @@ export interface ConversationSelectionInput {
|
|
|
13
13
|
}
|
|
14
14
|
export declare function finalizeConversationSelection(input: ConversationSelectionInput): ConversationSelection;
|
|
15
15
|
export declare function assertSelectionCurrent(selection: ConversationSelection, currentSessionId: SessionId | undefined): void;
|
|
16
|
-
//# sourceMappingURL=selection-normalizer.d.ts.map
|