|
|
@@ -1,4 +1,4 @@
|
|
|
-import { useCallback, useEffect, useMemo, useRef, useState, type ReactNode } from 'react'
|
|
|
+import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
|
|
import {
|
|
|
Tabs,
|
|
|
Card,
|
|
|
@@ -37,6 +37,7 @@ import MaterialRecallTab from '../components/MaterialRecallTab'
|
|
|
import ArticleRecallTab from '../components/ArticleRecallTab'
|
|
|
import { useRecallFilters, RecallFilterBar } from '../components/RecallFilterBar'
|
|
|
import RankingWeightsPanel from '../components/RankingWeightsPanel'
|
|
|
+import RecallFormSection from '../components/RecallFormSection'
|
|
|
import type { Modality } from '../api/types'
|
|
|
import { DEFAULT_RANKING_PARAMS } from '../utils/scoring'
|
|
|
import { toHttps } from '../utils/url'
|
|
|
@@ -746,7 +747,7 @@ function TextRecallTab() {
|
|
|
<Space direction="vertical" size={16} style={{ width: '100%' }}>
|
|
|
<Card size="small" bodyStyle={{ padding: 16 }}>
|
|
|
<Space direction="vertical" size={16} style={{ width: '100%' }}>
|
|
|
- <RecallFormSection title="召回文本">
|
|
|
+ <RecallFormSection title="召回文本" noBorder>
|
|
|
<TextArea
|
|
|
placeholder="请输入查询文本(选题、灵感点描述等)"
|
|
|
value={queryText}
|
|
|
@@ -801,7 +802,6 @@ function TextRecallTab() {
|
|
|
}
|
|
|
setRankingParams({ ...rankingParams, boostsByCode: next })
|
|
|
}}
|
|
|
- onPressEnter={onSubmit}
|
|
|
style={{ width: 68 }}
|
|
|
/>
|
|
|
</div>
|
|
|
@@ -847,23 +847,3 @@ function TextRecallTab() {
|
|
|
</Space>
|
|
|
)
|
|
|
}
|
|
|
-
|
|
|
-function RecallFormSection({
|
|
|
- title,
|
|
|
- extra,
|
|
|
- children,
|
|
|
-}: {
|
|
|
- title: string
|
|
|
- extra?: ReactNode
|
|
|
- children: ReactNode
|
|
|
-}) {
|
|
|
- return (
|
|
|
- <div style={{ borderTop: title === '召回文本' ? undefined : '1px solid #f0f0f0', paddingTop: title === '召回文本' ? 0 : 12 }}>
|
|
|
- <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between', marginBottom: 8 }}>
|
|
|
- <Text strong>{title}</Text>
|
|
|
- {extra}
|
|
|
- </div>
|
|
|
- {children}
|
|
|
- </div>
|
|
|
- )
|
|
|
-}
|