feat: markdown extension (#3663)
* feat: markdown extension * media cros * rerank test * default price * perf: default model * fix: cannot custom provider * fix: default model select * update bg * perf: default model selector * fix: usage export * i18n * fix: rerank * update init extension * perf: ip limit check * doubao model order * web default modle * perf: tts selector * perf: tts error * qrcode package
This commit is contained in:
@@ -26,11 +26,12 @@ const MyNumberInput = (props: Props) => {
|
||||
{...restProps}
|
||||
onChange={(e) => {
|
||||
if (!onChange) return;
|
||||
if (e === '') {
|
||||
const numE = Number(e);
|
||||
if (isNaN(numE)) {
|
||||
// @ts-ignore
|
||||
onChange('');
|
||||
} else {
|
||||
onChange(Number(e));
|
||||
onChange(numE);
|
||||
}
|
||||
}}
|
||||
>
|
||||
|
||||
@@ -58,7 +58,6 @@ export const MultipleRowSelect = ({
|
||||
const selectedValue = cloneValue[index];
|
||||
const selectedIndex = list.findIndex((item) => item.value === selectedValue);
|
||||
const children = list[selectedIndex]?.children || [];
|
||||
const hasChildren = list.some((item) => item.children && item.children?.length > 0);
|
||||
|
||||
// Store current scroll position before update
|
||||
const currentScrollTop = MenuRef.current[index]?.scrollTop;
|
||||
@@ -84,54 +83,58 @@ export const MultipleRowSelect = ({
|
||||
overflowY={'auto'}
|
||||
whiteSpace={'nowrap'}
|
||||
>
|
||||
{list.map((item) => (
|
||||
<Flex
|
||||
key={item.value}
|
||||
ref={(ref) => {
|
||||
if (item.value === selectedValue) {
|
||||
SelectedItemRef.current[index] = ref;
|
||||
}
|
||||
}}
|
||||
py={1.5}
|
||||
_notLast={{ mb: 1 }}
|
||||
cursor={'pointer'}
|
||||
px={1.5}
|
||||
borderRadius={'sm'}
|
||||
_hover={{
|
||||
bg: 'primary.50'
|
||||
}}
|
||||
onClick={() => {
|
||||
const newValue = [...cloneValue];
|
||||
{list.map((item) => {
|
||||
const hasChildren = item.children && item.children.length > 0;
|
||||
|
||||
if (item.value === selectedValue) {
|
||||
for (let i = index; i < newValue.length; i++) {
|
||||
newValue[i] = undefined;
|
||||
return (
|
||||
<Flex
|
||||
key={item.value}
|
||||
ref={(ref) => {
|
||||
if (item.value === selectedValue) {
|
||||
SelectedItemRef.current[index] = ref;
|
||||
}
|
||||
setCloneValue(newValue);
|
||||
onSelect(newValue);
|
||||
} else {
|
||||
newValue[index] = item.value;
|
||||
setCloneValue(newValue);
|
||||
}}
|
||||
py={1.5}
|
||||
_notLast={{ mb: 1 }}
|
||||
cursor={'pointer'}
|
||||
px={1.5}
|
||||
borderRadius={'sm'}
|
||||
_hover={{
|
||||
bg: 'primary.50'
|
||||
}}
|
||||
onClick={() => {
|
||||
const newValue = [...cloneValue];
|
||||
|
||||
if (changeOnEverySelect || !hasChildren) {
|
||||
if (item.value === selectedValue) {
|
||||
for (let i = index; i < newValue.length; i++) {
|
||||
newValue[i] = undefined;
|
||||
}
|
||||
setCloneValue(newValue);
|
||||
onSelect(newValue);
|
||||
}
|
||||
} else {
|
||||
newValue[index] = item.value;
|
||||
setCloneValue(newValue);
|
||||
|
||||
if (!hasChildren) {
|
||||
onClose();
|
||||
if (changeOnEverySelect || !hasChildren) {
|
||||
onSelect(newValue);
|
||||
}
|
||||
|
||||
if (!hasChildren) {
|
||||
onClose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}}
|
||||
{...(item.value === selectedValue
|
||||
? {
|
||||
bg: 'primary.50',
|
||||
color: 'primary.600'
|
||||
}
|
||||
: {})}
|
||||
>
|
||||
{item.label}
|
||||
</Flex>
|
||||
))}
|
||||
}}
|
||||
{...(item.value === selectedValue
|
||||
? {
|
||||
bg: 'primary.50',
|
||||
color: 'primary.600'
|
||||
}
|
||||
: {})}
|
||||
>
|
||||
{item.label}
|
||||
</Flex>
|
||||
);
|
||||
})}
|
||||
{list.length === 0 && (
|
||||
<EmptyTip
|
||||
text={emptyTip ?? t('common:common.MultipleRowSelect.No data')}
|
||||
|
||||
@@ -70,6 +70,7 @@
|
||||
"personal_information": "Personal",
|
||||
"personalization": "Personalization",
|
||||
"promotion_records": "Promotions",
|
||||
"reset_default": "Restore the default configuration",
|
||||
"team": "Team",
|
||||
"third_party": "Third Party",
|
||||
"usage_records": "Usage"
|
||||
|
||||
@@ -146,6 +146,9 @@
|
||||
"transition_to_workflow": "Convert to Workflow",
|
||||
"transition_to_workflow_create_new_placeholder": "Create a new app instead of modifying the current app",
|
||||
"transition_to_workflow_create_new_tip": "Once converted to a workflow, it cannot be reverted to simple mode. Please confirm!",
|
||||
"tts_ai_model": "Use a speech synthesis model",
|
||||
"tts_browser": "Browser's own (free)",
|
||||
"tts_close": "Close",
|
||||
"type.All": "All",
|
||||
"type.Create http plugin tip": "Batch create plugins through OpenAPI Schema, compatible with GPTs format.",
|
||||
"type.Create one plugin tip": "Customizable input and output workflows, usually used to encapsulate reusable workflows.",
|
||||
|
||||
@@ -375,12 +375,10 @@
|
||||
"core.app.tool_label.github": "GitHub Address",
|
||||
"core.app.tool_label.price": "Pricing",
|
||||
"core.app.tool_label.view_doc": "View Documentation",
|
||||
"core.app.tts.Close": "Do Not Use",
|
||||
"core.app.tts.Speech model": "Speech Model",
|
||||
"core.app.tts.Speech speed": "Speech Speed",
|
||||
"core.app.tts.Test Listen": "Test Listen",
|
||||
"core.app.tts.Test Listen Text": "Hello, this is a voice test. If you can hear this sentence, the voice playback function is normal.",
|
||||
"core.app.tts.Web": "Browser Built-in (Free)",
|
||||
"core.app.whisper.Auto send": "Auto Send",
|
||||
"core.app.whisper.Auto send tip": "Automatically send after voice input is completed, no need to click the send button manually",
|
||||
"core.app.whisper.Auto tts response": "Auto Voice Response",
|
||||
@@ -922,10 +920,10 @@
|
||||
"model.name": "Model name",
|
||||
"model.provider": "Provider",
|
||||
"model.search_name_placeholder": "Search by model name",
|
||||
"model.type.chat": "language model",
|
||||
"model.type.chat": "LLM",
|
||||
"model.type.embedding": "Embedding",
|
||||
"model.type.reRank": "ReRank",
|
||||
"model.type.stt": "speech recognition",
|
||||
"model.type.stt": "STT",
|
||||
"model.type.tts": "TTS",
|
||||
"model_alicloud": "Ali Cloud",
|
||||
"model_baai": "BAAI",
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
"personal_information": "个人信息",
|
||||
"personalization": "个性化",
|
||||
"promotion_records": "促销记录",
|
||||
"reset_default": "恢复默认配置",
|
||||
"team": "团队管理",
|
||||
"third_party": "第三方账号",
|
||||
"usage_records": "使用记录"
|
||||
|
||||
@@ -146,6 +146,9 @@
|
||||
"transition_to_workflow": "转成工作流",
|
||||
"transition_to_workflow_create_new_placeholder": "创建一个新的应用,而不是修改当前应用",
|
||||
"transition_to_workflow_create_new_tip": "转化成工作流后,将无法转化回简易模式,请确认!",
|
||||
"tts_ai_model": "使用语音合成模型",
|
||||
"tts_browser": "浏览器自带(免费)",
|
||||
"tts_close": "关闭",
|
||||
"type.All": "全部",
|
||||
"type.Create http plugin tip": "通过 OpenAPI Schema 批量创建插件,兼容 GPTs 格式",
|
||||
"type.Create one plugin tip": "可以自定义输入和输出的工作流,通常用于封装重复使用的工作流",
|
||||
|
||||
@@ -378,12 +378,10 @@
|
||||
"core.app.tool_label.github": "GitHub地址",
|
||||
"core.app.tool_label.price": "计费说明",
|
||||
"core.app.tool_label.view_doc": "查看说明文档",
|
||||
"core.app.tts.Close": "不使用",
|
||||
"core.app.tts.Speech model": "语音模型",
|
||||
"core.app.tts.Speech speed": "语速",
|
||||
"core.app.tts.Test Listen": "试听",
|
||||
"core.app.tts.Test Listen Text": "你好,这是语音测试,如果你能听到这句话,说明语音播放功能正常",
|
||||
"core.app.tts.Web": "浏览器自带(免费)",
|
||||
"core.app.whisper.Auto send": "自动发送",
|
||||
"core.app.whisper.Auto send tip": "语音输入完毕后直接发送,不需要再手动点击发送按键",
|
||||
"core.app.whisper.Auto tts response": "自动语音回复",
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
"personal_information": "個人資訊",
|
||||
"personalization": "個人化",
|
||||
"promotion_records": "促銷記錄",
|
||||
"reset_default": "恢復默認配置",
|
||||
"team": "團隊管理",
|
||||
"third_party": "第三方账号",
|
||||
"usage_records": "使用記錄"
|
||||
|
||||
@@ -146,6 +146,9 @@
|
||||
"transition_to_workflow": "轉換成工作流程",
|
||||
"transition_to_workflow_create_new_placeholder": "建立新的應用程式,而不是修改目前應用程式",
|
||||
"transition_to_workflow_create_new_tip": "轉換成工作流程後,將無法轉換回簡易模式,請確認!",
|
||||
"tts_ai_model": "使用語音合成模型",
|
||||
"tts_browser": "瀏覽器自帶(免費)",
|
||||
"tts_close": "關閉",
|
||||
"type.All": "全部",
|
||||
"type.Create http plugin tip": "透過 OpenAPI Schema 批次建立外掛,相容 GPTs 格式",
|
||||
"type.Create one plugin tip": "可以自訂輸入和輸出的工作流程,通常用於封裝重複使用的工作流程",
|
||||
|
||||
@@ -374,12 +374,10 @@
|
||||
"core.app.tool_label.github": "GitHub 網址",
|
||||
"core.app.tool_label.price": "收費說明",
|
||||
"core.app.tool_label.view_doc": "檢視說明文件",
|
||||
"core.app.tts.Close": "不使用",
|
||||
"core.app.tts.Speech model": "語音模型",
|
||||
"core.app.tts.Speech speed": "語速",
|
||||
"core.app.tts.Test Listen": "測試聆聽",
|
||||
"core.app.tts.Test Listen Text": "您好,這是語音測試。如果您能聽到這句話,表示語音播放功能正常",
|
||||
"core.app.tts.Web": "瀏覽器內建(免費)",
|
||||
"core.app.whisper.Auto send": "自動傳送",
|
||||
"core.app.whisper.Auto send tip": "語音輸入完成後自動傳送,無需手動點選傳送按鈕",
|
||||
"core.app.whisper.Auto tts response": "自動語音回應",
|
||||
|
||||
Reference in New Issue
Block a user