chore: remove useless files
This commit is contained in:
parent
3e049baaa4
commit
02edd983d1
@ -99,7 +99,6 @@ export interface Painting {
|
|||||||
steps?: number
|
steps?: number
|
||||||
guidanceScale?: number
|
guidanceScale?: number
|
||||||
model?: string
|
model?: string
|
||||||
status?: 'generating' | 'downloading' | 'completed' | 'error'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type MinAppType = {
|
export type MinAppType = {
|
||||||
|
|||||||
@ -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)
|
|
||||||
}
|
|
||||||
Loading…
x
Reference in New Issue
Block a user