chore: remove useless files

This commit is contained in:
kangfenmao 2024-10-30 00:29:51 +08:00
parent 3e049baaa4
commit 02edd983d1
2 changed files with 0 additions and 32 deletions

View File

@ -99,7 +99,6 @@ export interface Painting {
steps?: number
guidanceScale?: number
model?: string
status?: 'generating' | 'downloading' | 'completed' | 'error'
}
export type MinAppType = {

View File

@ -1,31 +0,0 @@
import { TextAreaRef } from 'antd/es/input/TextArea'
import { RefObject } from 'react'
export const insertTextAtCursor = ({
text,
pasteText,
textareaRef,
setText
}: {
text: string
pasteText: string
textareaRef: RefObject<TextAreaRef>
setText: (text: string) => void
}) => {
const textarea = textareaRef.current?.resizableTextArea?.textArea
if (!textarea) {
return
}
const start = textarea.selectionStart
const end = textarea.selectionEnd
const newValue = text.substring(0, start) + pasteText + text.substring(end)
setText(newValue)
setTimeout(() => {
textarea.setSelectionRange(start + pasteText.length, start + pasteText.length)
textarea.focus()
}, 0)
}