@lvce-editor/chat-view 3.8.0 → 3.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chatViewWorkerMain.js +26 -4
- package/package.json +1 -1
|
@@ -1393,13 +1393,16 @@ const unknownViewMode = () => {
|
|
|
1393
1393
|
|
|
1394
1394
|
/* eslint-disable @cspell/spellchecker */
|
|
1395
1395
|
|
|
1396
|
-
const
|
|
1396
|
+
const getDefaultModelsTest = () => {
|
|
1397
1397
|
const defaultModelId = 'test';
|
|
1398
1398
|
return [{
|
|
1399
1399
|
id: defaultModelId,
|
|
1400
1400
|
name: 'test',
|
|
1401
1401
|
provider: 'test'
|
|
1402
|
-
}
|
|
1402
|
+
}];
|
|
1403
|
+
};
|
|
1404
|
+
const getDefaultModelsOpenAi = () => {
|
|
1405
|
+
return [{
|
|
1403
1406
|
id: 'openapi/gpt-5-mini',
|
|
1404
1407
|
name: 'GPT-5 Mini',
|
|
1405
1408
|
provider: 'openApi'
|
|
@@ -1415,7 +1418,10 @@ const getDefaultModels = () => {
|
|
|
1415
1418
|
id: 'openapi/gpt-4.1-mini',
|
|
1416
1419
|
name: 'GPT-4.1 Mini',
|
|
1417
1420
|
provider: 'openApi'
|
|
1418
|
-
}
|
|
1421
|
+
}];
|
|
1422
|
+
};
|
|
1423
|
+
const getDefaultModelsOpenRouter = () => {
|
|
1424
|
+
return [{
|
|
1419
1425
|
id: 'codex-5.3',
|
|
1420
1426
|
name: 'Codex 5.3',
|
|
1421
1427
|
provider: 'openRouter'
|
|
@@ -1465,6 +1471,10 @@ const getDefaultModels = () => {
|
|
|
1465
1471
|
provider: 'openRouter'
|
|
1466
1472
|
}];
|
|
1467
1473
|
};
|
|
1474
|
+
const getDefaultModels = () => {
|
|
1475
|
+
return [...getDefaultModelsTest(), ...getDefaultModelsOpenAi(), ...getDefaultModelsOpenRouter()];
|
|
1476
|
+
};
|
|
1477
|
+
|
|
1468
1478
|
const createDefaultState = () => {
|
|
1469
1479
|
const defaultSessionId = 'session-1';
|
|
1470
1480
|
const defaultModelId = 'test';
|
|
@@ -6918,6 +6928,12 @@ const getInlineNodeDom = inlineNode => {
|
|
|
6918
6928
|
type: Strong
|
|
6919
6929
|
}, text(inlineNode.text)];
|
|
6920
6930
|
}
|
|
6931
|
+
if (inlineNode.type === 'italic') {
|
|
6932
|
+
return [{
|
|
6933
|
+
childCount: 1,
|
|
6934
|
+
type: Em
|
|
6935
|
+
}, text(inlineNode.text)];
|
|
6936
|
+
}
|
|
6921
6937
|
return [{
|
|
6922
6938
|
childCount: 1,
|
|
6923
6939
|
className: ChatMessageLink,
|
|
@@ -7583,7 +7599,7 @@ const getToolCallsDom = message => {
|
|
|
7583
7599
|
|
|
7584
7600
|
const orderedListItemRegex = /^\s*\d+\.\s+(.*)$/;
|
|
7585
7601
|
const unorderedListItemRegex = /^\s*[-*]\s+(.*)$/;
|
|
7586
|
-
const markdownInlineRegex = /\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)
|
|
7602
|
+
const markdownInlineRegex = /\[([^\]]+)\]\(([^)]+)\)|\*\*([^*]+)\*\*|\*([^*]+)\*/g;
|
|
7587
7603
|
const markdownTableSeparatorCellRegex = /^:?-{3,}:?$/;
|
|
7588
7604
|
const fencedCodeBlockRegex = /^```/;
|
|
7589
7605
|
const markdownHeadingRegex = /^\s*(#{1,6})\s+(.*)$/;
|
|
@@ -7646,6 +7662,7 @@ const parseInlineNodes = value => {
|
|
|
7646
7662
|
const linkText = match[1];
|
|
7647
7663
|
const href = match[2];
|
|
7648
7664
|
const boldText = match[3];
|
|
7665
|
+
const italicText = match[4];
|
|
7649
7666
|
const index = match.index ?? 0;
|
|
7650
7667
|
if (index > lastIndex) {
|
|
7651
7668
|
nodes.push({
|
|
@@ -7664,6 +7681,11 @@ const parseInlineNodes = value => {
|
|
|
7664
7681
|
text: boldText,
|
|
7665
7682
|
type: 'bold'
|
|
7666
7683
|
});
|
|
7684
|
+
} else if (italicText) {
|
|
7685
|
+
nodes.push({
|
|
7686
|
+
text: italicText,
|
|
7687
|
+
type: 'italic'
|
|
7688
|
+
});
|
|
7667
7689
|
}
|
|
7668
7690
|
lastIndex = index + fullMatch.length;
|
|
7669
7691
|
}
|