Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/sim/app/_shell/paste-admission-guard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { assessTextPaste, formatPasteLimit, PASTE_LIMITS } from '@sim/utils/past
import { readSelectionContextFromClipboard } from '@/lib/mothership/chat/selection-clipboard'

const EDITABLE_TARGET_SELECTOR =
'input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]), textarea, [contenteditable]:not([contenteditable="false"]), .monaco-editor, .xterm'
'input:not([type="file"]):not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="hidden"]), textarea, [contenteditable]:not([contenteditable="false"]), [data-code-editor], .xterm'

function finitePositiveAttribute(element: Element | null, name: string): number | undefined {
const raw = element?.getAttribute(name)
Expand All @@ -29,7 +29,7 @@ function clipboardHasImageFile(data: DataTransfer | null): boolean {
* crash-only fallback. This layer bounds only the clipboard payload, so a small paste into an already
* large field keeps native behavior. Editors with a real result-size contract enforce it themselves.
* Targets that explicitly handle clipboard images may claim those file events before the text guards.
* The capture listener runs before React, ProseMirror, Monaco, and xterm parse the clipboard value.
* The capture listener runs before React, ProseMirror, the code editor, and xterm parse the clipboard value.
*/
export function PasteAdmissionGuard() {
const { toast: notify } = useToast()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
DropdownMenuShortcut,
DropdownMenuTrigger,
} from '@sim/emcn'
import { Blimp, Clipboard, Duplicate, Scissors, Search, SelectAll } from '@sim/emcn/icons'
import { Blimp, Clipboard, Duplicate, Scissors, SelectAll } from '@sim/emcn/icons'

interface EditorContextMenuProps {
isOpen: boolean
Expand All @@ -21,7 +21,6 @@ interface EditorContextMenuProps {
onCopyAll: () => void
onPaste: () => void
onSelectAll: () => void
onFind: () => void
/** Adds the current selection to Chat as a reference. Omit to hide the item. */
onAddToChat?: () => void
}
Expand All @@ -37,7 +36,6 @@ export function EditorContextMenu({
onCopyAll,
onPaste,
onSelectAll,
onFind,
onAddToChat,
}: EditorContextMenuProps) {
return (
Expand Down Expand Up @@ -103,11 +101,6 @@ export function EditorContextMenu({
Select all
<DropdownMenuShortcut>⌘A</DropdownMenuShortcut>
</DropdownMenuItem>
<DropdownMenuItem onSelect={onFind}>
<Search />
Find
<DropdownMenuShortcut>⌘F</DropdownMenuShortcut>
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
)
Expand Down

This file was deleted.

Loading
Loading