mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-27 04:49:47 +01:00
Merge branch 'xinnan-tech:main' into main
This commit is contained in:
commit
56d26638d1
4 changed files with 32 additions and 10 deletions
|
|
@ -7,6 +7,7 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import jakarta.validation.constraints.*;
|
||||
|
||||
/**
|
||||
|
|
@ -129,6 +130,7 @@ public class DatasetDTO {
|
|||
@JsonProperty("parser_config")
|
||||
private ParserConfig parserConfig;
|
||||
|
||||
@JsonInclude(JsonInclude.Include.NON_NULL)
|
||||
@Schema(description = "PageRank 权重 (0-100)", example = "50")
|
||||
private Integer pagerank;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<img src="@/assets/home/delete.png" alt="" style="width: 18px;height: 18px;margin-right: 10px;"
|
||||
@click.stop="handleDelete" />
|
||||
<el-tooltip class="item" effect="light" :content="device.systemPrompt" placement="top"
|
||||
popper-class="custom-tooltip">
|
||||
popper-class="device-item-tooltip">
|
||||
<img src="@/assets/home/info.png" alt="" style="width: 18px;height: 18px;" />
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
|
@ -193,8 +193,23 @@ export default {
|
|||
</style>
|
||||
|
||||
<style>
|
||||
.custom-tooltip {
|
||||
max-width: 400px;
|
||||
.device-item-tooltip {
|
||||
max-height: 60vh !important;
|
||||
max-width: 400px !important;
|
||||
overflow-y: auto !important;
|
||||
scrollbar-width: thin;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.device-item-tooltip .popper__arrow {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.device-item-tooltip[x-placement^="top"] .popper__arrow {
|
||||
border-top-color: transparent !important;
|
||||
}
|
||||
|
||||
.device-item-tooltip[x-placement^="bottom"] .popper__arrow {
|
||||
border-bottom-color: transparent !important;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -477,13 +477,15 @@ export default {
|
|||
|
||||
.function-column {
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: auto;
|
||||
height:700px;
|
||||
height: 100%;
|
||||
padding: 10px;
|
||||
overflow-y: auto;
|
||||
border-right: 1px solid #EBEEF5;
|
||||
scrollbar-width: none;
|
||||
overflow-x: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.mcp-access-point {
|
||||
|
|
@ -497,6 +499,9 @@ export default {
|
|||
}
|
||||
|
||||
.function-list {
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
scrollbar-width: thin;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 8px;
|
||||
|
|
|
|||
|
|
@ -130,17 +130,17 @@ class MarkdownCleaner:
|
|||
"""
|
||||
主入口方法:依序执行所有正则,移除或替换 Markdown 元素
|
||||
"""
|
||||
# 检查文本是否全为英文和基本标点符号
|
||||
if text and all((c.isascii() or c.isspace() or c in punctuation_set) for c in text):
|
||||
# 保留原始空格,直接返回
|
||||
return text
|
||||
|
||||
for regex, replacement in MarkdownCleaner.REGEXES:
|
||||
text = regex.sub(replacement, text)
|
||||
|
||||
# 去除emoji表情
|
||||
text = check_emoji(text)
|
||||
|
||||
# 检查文本是否全为英文和基本标点符号
|
||||
if text and all((c.isascii() or c.isspace() or c in punctuation_set) for c in text):
|
||||
# 保留原始空格,直接返回
|
||||
return text
|
||||
|
||||
return text.strip()
|
||||
|
||||
def convert_percentage_to_range(percentage, min_val, max_val, base_val=None):
|
||||
|
|
|
|||
Loading…
Reference in a new issue