@glodon-aiot/agent-cli-ui 3.9.0-beta.10 → 3.11.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/es/Dialog/AgentChat/HistoryItem/FileItem/index.mjs +12 -12
- package/dist/es/Dialog/AgentChat/HistoryItem/SessionRefer/index.mjs +11 -11
- package/dist/es/Dialog/AgentChat/HistoryItem/SessionRelated/index.mjs +2 -2
- package/dist/es/Dialog/AgentChat/HistoryItem/index.mjs +118 -133
- package/dist/es/Dialog/AgentChat/Tools/UploadKnowledgeFiles/index.mjs +1 -1
- package/dist/es/Dialog/AgentChat/index.mjs +573 -604
- package/dist/es/Dialog/SessionList/index.mjs +218 -271
- package/dist/es/ReactTextGenerationUI/components/TextSiders/index.mjs +53 -53
- package/dist/es/components/FilePreview/index.mjs +6 -6
- package/dist/es/components/Iconfont/index.mjs +3 -3
- package/dist/es/constant.mjs +4 -4
- package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/components/Markdown/Code/index.mjs +1 -1
- package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/components/Markdown/Image/index.mjs +3 -3
- package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/components/Markdown/index.mjs +25 -24
- package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/index.mjs +1 -1
- package/dist/es/node_modules/hast-util-from-parse5/lib/index.mjs +162 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/index.mjs +12 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/aria.mjs +61 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/find.mjs +33 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/html.mjs +368 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/normalize.mjs +6 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/svg.mjs +566 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/case-insensitive-transform.mjs +7 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/case-sensitive-transform.mjs +6 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/create.mjs +14 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/defined-info.mjs +36 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/info.mjs +28 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/merge.mjs +10 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/schema.mjs +21 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/util/types.mjs +15 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/xlink.mjs +19 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/xml.mjs +15 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/property-information/lib/xmlns.mjs +16 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/vfile-location/lib/index.mjs +47 -0
- package/dist/es/node_modules/hast-util-from-parse5/node_modules/web-namespaces/index.mjs +11 -0
- package/dist/es/node_modules/rehype-raw/lib/index.mjs +26 -0
- package/dist/es/node_modules/rehype-raw/node_modules/entities/dist/esm/decode-codepoint.mjs +38 -0
- package/dist/es/node_modules/rehype-raw/node_modules/entities/dist/esm/decode.mjs +251 -0
- package/dist/es/node_modules/rehype-raw/node_modules/entities/dist/esm/generated/decode-data-html.mjs +7 -0
- package/dist/es/node_modules/rehype-raw/node_modules/hast-util-raw/lib/index.mjs +249 -0
- package/dist/es/node_modules/rehype-raw/node_modules/hast-util-to-parse5/lib/index.mjs +125 -0
- package/dist/es/node_modules/rehype-raw/node_modules/html-void-elements/index.mjs +4 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/doctype.mjs +34 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/error-codes.mjs +7 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/foreign-content.mjs +103 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/html.mjs +44 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/token.mjs +14 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/common/unicode.mjs +38 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/parser/formatting-element-list.mjs +91 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/parser/index.mjs +2308 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/parser/open-element-stack.mjs +220 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/serializer/index.mjs +2 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/tokenizer/index.mjs +1948 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/tokenizer/preprocessor.mjs +92 -0
- package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/tree-adapters/default.mjs +173 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/index.mjs +12 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/aria.mjs +61 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/find.mjs +33 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/html.mjs +368 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/normalize.mjs +6 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/svg.mjs +566 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/case-insensitive-transform.mjs +7 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/case-sensitive-transform.mjs +6 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/create.mjs +17 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/defined-info.mjs +27 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/info.mjs +23 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/merge.mjs +11 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/schema.mjs +17 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/util/types.mjs +15 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/xlink.mjs +19 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/xml.mjs +15 -0
- package/dist/es/node_modules/rehype-raw/node_modules/property-information/lib/xmlns.mjs +16 -0
- package/dist/es/node_modules/rehype-raw/node_modules/unist-util-visit/lib/index.mjs +16 -0
- package/dist/es/node_modules/rehype-raw/node_modules/web-namespaces/index.mjs +11 -0
- package/dist/es/node_modules/zwitch/index.mjs +18 -0
- package/dist/es/packages/agent-cli-ui/package.json.mjs +3 -3
- package/dist/es/src/style11.css +1 -1
- package/dist/es/src/style12.css +1 -1
- package/dist/es/src/style13.css +1 -1
- package/dist/es/src/style14.css +1 -1
- package/dist/es/src/style15.css +1 -1
- package/dist/es/src/style16.css +1 -1
- package/dist/es/src/style17.css +1 -1
- package/dist/es/src/style18.css +1 -1
- package/dist/es/src/style19.css +1 -1
- package/dist/es/src/style20.css +1 -1
- package/dist/es/src/style21.css +1 -1
- package/dist/es/src/style22.css +1 -1
- package/dist/es/src/style23.css +1 -1
- package/dist/es/src/style26.css +1 -1
- package/dist/es/src/style27.css +1 -1
- package/dist/es/src/style28.css +1 -1
- package/dist/es/src/style30.css +1 -1
- package/dist/es/src/style31.css +1 -1
- package/dist/es/src/style32.css +1 -1
- package/dist/es/src/style5.css +1 -1
- package/dist/es/src/style6.css +1 -1
- package/dist/es/src/style8.css +1 -1
- package/dist/es/src/style9.css +1 -1
- package/dist/lib/index.css +1 -1
- package/dist/lib/index.js +68 -69
- package/dist/src/constant.d.ts +2 -2
- package/package.json +3 -3
- /package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/Iconfont/index.mjs +0 -0
- /package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/components/Copy/index.mjs +0 -0
- /package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/components/Markdown/ATag/index.mjs +0 -0
- /package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/components/Markdown/Video/index.mjs +0 -0
- /package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/utils/clipboard.mjs +0 -0
- /package/dist/es/{packages → node_modules/@glodon-aiot}/react-components/dist/es/utils/markdown/index.mjs +0 -0
package/dist/es/node_modules/rehype-raw/node_modules/parse5/dist/parser/formatting-element-list.mjs
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
var s;
|
|
2
|
+
(function(a) {
|
|
3
|
+
a[a.Marker = 0] = "Marker", a[a.Element = 1] = "Element";
|
|
4
|
+
})(s || (s = {}));
|
|
5
|
+
const c = {
|
|
6
|
+
type: s.Marker
|
|
7
|
+
};
|
|
8
|
+
class m {
|
|
9
|
+
constructor(e) {
|
|
10
|
+
this.treeAdapter = e, this.entries = [], this.bookmark = null;
|
|
11
|
+
}
|
|
12
|
+
//Noah Ark's condition
|
|
13
|
+
//OPTIMIZATION: at first we try to find possible candidates for exclusion using
|
|
14
|
+
//lightweight heuristics without thorough attributes check.
|
|
15
|
+
_getNoahArkConditionCandidates(e, t) {
|
|
16
|
+
const n = [], l = t.length, h = this.treeAdapter.getTagName(e), i = this.treeAdapter.getNamespaceURI(e);
|
|
17
|
+
for (let r = 0; r < this.entries.length; r++) {
|
|
18
|
+
const o = this.entries[r];
|
|
19
|
+
if (o.type === s.Marker)
|
|
20
|
+
break;
|
|
21
|
+
const {
|
|
22
|
+
element: d
|
|
23
|
+
} = o;
|
|
24
|
+
if (this.treeAdapter.getTagName(d) === h && this.treeAdapter.getNamespaceURI(d) === i) {
|
|
25
|
+
const A = this.treeAdapter.getAttrList(d);
|
|
26
|
+
A.length === l && n.push({
|
|
27
|
+
idx: r,
|
|
28
|
+
attrs: A
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return n;
|
|
33
|
+
}
|
|
34
|
+
_ensureNoahArkCondition(e) {
|
|
35
|
+
if (this.entries.length < 3)
|
|
36
|
+
return;
|
|
37
|
+
const t = this.treeAdapter.getAttrList(e), n = this._getNoahArkConditionCandidates(e, t);
|
|
38
|
+
if (n.length < 3)
|
|
39
|
+
return;
|
|
40
|
+
const l = new Map(t.map((i) => [i.name, i.value]));
|
|
41
|
+
let h = 0;
|
|
42
|
+
for (let i = 0; i < n.length; i++) {
|
|
43
|
+
const r = n[i];
|
|
44
|
+
r.attrs.every((o) => l.get(o.name) === o.value) && (h += 1, h >= 3 && this.entries.splice(r.idx, 1));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
//Mutations
|
|
48
|
+
insertMarker() {
|
|
49
|
+
this.entries.unshift(c);
|
|
50
|
+
}
|
|
51
|
+
pushElement(e, t) {
|
|
52
|
+
this._ensureNoahArkCondition(e), this.entries.unshift({
|
|
53
|
+
type: s.Element,
|
|
54
|
+
element: e,
|
|
55
|
+
token: t
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
insertElementAfterBookmark(e, t) {
|
|
59
|
+
const n = this.entries.indexOf(this.bookmark);
|
|
60
|
+
this.entries.splice(n, 0, {
|
|
61
|
+
type: s.Element,
|
|
62
|
+
element: e,
|
|
63
|
+
token: t
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
removeEntry(e) {
|
|
67
|
+
const t = this.entries.indexOf(e);
|
|
68
|
+
t !== -1 && this.entries.splice(t, 1);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Clears the list of formatting elements up to the last marker.
|
|
72
|
+
*
|
|
73
|
+
* @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker
|
|
74
|
+
*/
|
|
75
|
+
clearToLastMarker() {
|
|
76
|
+
const e = this.entries.indexOf(c);
|
|
77
|
+
e === -1 ? this.entries.length = 0 : this.entries.splice(0, e + 1);
|
|
78
|
+
}
|
|
79
|
+
//Search
|
|
80
|
+
getElementEntryInScopeWithTagName(e) {
|
|
81
|
+
const t = this.entries.find((n) => n.type === s.Marker || this.treeAdapter.getTagName(n.element) === e);
|
|
82
|
+
return t && t.type === s.Element ? t : null;
|
|
83
|
+
}
|
|
84
|
+
getElementEntry(e) {
|
|
85
|
+
return this.entries.find((t) => t.type === s.Element && t.element === e);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
export {
|
|
89
|
+
s as EntryType,
|
|
90
|
+
m as FormattingElementList
|
|
91
|
+
};
|