{
alignItems: "stretch",
outline: shape.props.agentBinding ? "2px solid orange" : "none",
}}
+ //TODO: FIX SCROLL IN PROMPT CHAT WHEN HOVERING OVER ELEMENT
+ onPointerEnter={() => setIsHovering(true)}
+ onPointerLeave={() => setIsHovering(false)}
+ onWheel={(e) => {
+ if (isSelected || isHovering) {
+ e.preventDefault()
+ e.stopPropagation()
+
+ if (chatContainerRef.current) {
+ chatContainerRef.current.scrollTop += e.deltaY
+ }
+ }
+ }}
>
{
overflowY: "auto",
whiteSpace: "pre-wrap",
fontFamily: "monospace",
+ pointerEvents: isSelected || isHovering ? "all" : "none",
}}
>
{shape.props.value ? (
@@ -263,7 +340,10 @@ export class PromptShape extends BaseBoxShapeUtil {
onClick={async () => {
try {
await navigator.clipboard.writeText(parsed.content)
- // Optional: Show a brief "Copied!" tooltip
+ setCopiedIndex(index)
+ setTimeout(() => {
+ setCopiedIndex(null)
+ }, 2000)
} catch (err) {
console.error('Failed to copy text:', err)
}
@@ -275,7 +355,7 @@ export class PromptShape extends BaseBoxShapeUtil {
e.currentTarget.style.opacity = '0.7'
}}
>
-
+ {copiedIndex === index ? : }
@@ -292,7 +372,8 @@ export class PromptShape extends BaseBoxShapeUtil {
display: "flex",
flexDirection: "column",
gap: "5px",
- marginTop: "auto"
+ marginTop: "auto",
+ pointerEvents: isSelected || isHovering ? "all" : "none",
}}>
{
)
}
- indicator(shape: IPrompt) {
- return
+ // Override the default indicator behavior
+ // TODO: FIX SECOND INDICATOR UX GLITCH
+ override indicator(shape: IPrompt) {
+ return (
+
+ )
}
}