add autofix pnpm (#25557)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -682,7 +682,7 @@ export const useChat = (
|
||||
updateChatTreeNode(targetAnswerId, {
|
||||
content: chatList[index].content,
|
||||
annotation: {
|
||||
...(chatList[index].annotation || {}),
|
||||
...chatList[index].annotation,
|
||||
id: '',
|
||||
} as Annotation,
|
||||
})
|
||||
|
||||
@@ -83,9 +83,7 @@ const OpeningSettingModal = ({
|
||||
}, [handleSave, hideConfirmAddVar])
|
||||
|
||||
const autoAddVar = useCallback(() => {
|
||||
onAutoAddPromptVariable?.([
|
||||
...notIncludeKeys.map(key => getNewVar(key, 'string')),
|
||||
])
|
||||
onAutoAddPromptVariable?.(notIncludeKeys.map(key => getNewVar(key, 'string')))
|
||||
hideConfirmAddVar()
|
||||
handleSave(true)
|
||||
}, [handleSave, hideConfirmAddVar, notIncludeKeys, onAutoAddPromptVariable])
|
||||
|
||||
@@ -17,7 +17,7 @@ const Link = ({ node, children, ...props }: any) => {
|
||||
}
|
||||
else {
|
||||
const href = props.href || node.properties?.href
|
||||
if (href && /^#[a-zA-Z0-9_\-]+$/.test(href.toString())) {
|
||||
if (href && /^#[a-zA-Z0-9_-]+$/.test(href.toString())) {
|
||||
const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {
|
||||
e.preventDefault()
|
||||
// scroll to target element if exists within the answer container
|
||||
|
||||
@@ -229,7 +229,7 @@ const PageSelector = ({
|
||||
if (current.expand) {
|
||||
current.expand = false
|
||||
|
||||
newDataList = [...dataList.filter(item => !descendantsIds.includes(item.page_id))]
|
||||
newDataList = dataList.filter(item => !descendantsIds.includes(item.page_id))
|
||||
}
|
||||
else {
|
||||
current.expand = true
|
||||
@@ -246,7 +246,7 @@ const PageSelector = ({
|
||||
setDataList(newDataList)
|
||||
}
|
||||
|
||||
const copyValue = new Set([...value])
|
||||
const copyValue = new Set(value)
|
||||
const handleCheck = (index: number) => {
|
||||
const current = currentDataList[index]
|
||||
const pageId = current.page_id
|
||||
@@ -269,7 +269,7 @@ const PageSelector = ({
|
||||
copyValue.add(pageId)
|
||||
}
|
||||
|
||||
onSelect(new Set([...copyValue]))
|
||||
onSelect(new Set(copyValue))
|
||||
}
|
||||
|
||||
const handlePreview = (index: number) => {
|
||||
|
||||
@@ -142,7 +142,7 @@ export const PortalToFollowElemTrigger = (
|
||||
context.getReferenceProps({
|
||||
ref,
|
||||
...props,
|
||||
...(children.props || {}),
|
||||
...children.props,
|
||||
'data-state': context.open ? 'open' : 'closed',
|
||||
} as React.HTMLProps<HTMLElement>),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user