chore: replace all cn comments of fe to en version by volc api (#320)
This commit is contained in:
@@ -31,11 +31,11 @@ export const matchAllTemplateRanges = (
|
||||
text: string,
|
||||
template: string,
|
||||
): { start: number; end: number }[] => {
|
||||
// 正则表达式,用于匹配双花括号内的内容
|
||||
// Regular expressions to match the contents of double curly braces
|
||||
const templateRegex = new RegExp(getFixedVariableTemplate(template), 'g');
|
||||
const matches: { start: number; end: number }[] = [];
|
||||
|
||||
// 循环查找所有匹配项
|
||||
// Loop through all matches
|
||||
while (true) {
|
||||
const match = templateRegex.exec(text);
|
||||
|
||||
|
||||
@@ -90,14 +90,14 @@ export const getShuffledSuggestions = ({
|
||||
suggestion => suggestion.id,
|
||||
);
|
||||
|
||||
// chatArea 数据中比交集多的就是要删除的
|
||||
// There are more than intersections in the chatArea data that need to be deleted.
|
||||
const toDeleteSuggestion = xorBy(
|
||||
shuffledSuggestions,
|
||||
intersectionSuggestion,
|
||||
suggestion => suggestion.id,
|
||||
);
|
||||
|
||||
// bot 调试页面数据中比交集多的就是要添加的
|
||||
// There is more than intersection in the data of the bot debugging page, which needs to be added.
|
||||
const toAddSuggestion = preVisibleSuggestion.slice(
|
||||
0,
|
||||
maxLength - intersectionSuggestion.length,
|
||||
|
||||
Reference in New Issue
Block a user