@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/open-element-stack.mjs
ADDED
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { TAG_ID as t, NS as n, NUMBERED_HEADERS as h } from "../common/html.mjs";
|
|
2
|
+
const p = /* @__PURE__ */ new Set([t.DD, t.DT, t.LI, t.OPTGROUP, t.OPTION, t.P, t.RB, t.RP, t.RT, t.RTC]), T = /* @__PURE__ */ new Set([...p, t.CAPTION, t.COLGROUP, t.TBODY, t.TD, t.TFOOT, t.TH, t.THEAD, t.TR]), a = /* @__PURE__ */ new Set([t.APPLET, t.CAPTION, t.HTML, t.MARQUEE, t.OBJECT, t.TABLE, t.TD, t.TEMPLATE, t.TH]), u = /* @__PURE__ */ new Set([...a, t.OL, t.UL]), l = /* @__PURE__ */ new Set([...a, t.BUTTON]), o = /* @__PURE__ */ new Set([t.ANNOTATION_XML, t.MI, t.MN, t.MO, t.MS, t.MTEXT]), c = /* @__PURE__ */ new Set([t.DESC, t.FOREIGN_OBJECT, t.TITLE]), d = /* @__PURE__ */ new Set([t.TR, t.TEMPLATE, t.HTML]), I = /* @__PURE__ */ new Set([t.TBODY, t.TFOOT, t.THEAD, t.TEMPLATE, t.HTML]), m = /* @__PURE__ */ new Set([t.TABLE, t.TEMPLATE, t.HTML]), E = /* @__PURE__ */ new Set([t.TD, t.TH]);
|
|
3
|
+
class f {
|
|
4
|
+
get currentTmplContentOrNode() {
|
|
5
|
+
return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;
|
|
6
|
+
}
|
|
7
|
+
constructor(e, s, i) {
|
|
8
|
+
this.treeAdapter = s, this.handler = i, this.items = [], this.tagIDs = [], this.stackTop = -1, this.tmplCount = 0, this.currentTagId = t.UNKNOWN, this.current = e;
|
|
9
|
+
}
|
|
10
|
+
//Index of element
|
|
11
|
+
_indexOf(e) {
|
|
12
|
+
return this.items.lastIndexOf(e, this.stackTop);
|
|
13
|
+
}
|
|
14
|
+
//Update current element
|
|
15
|
+
_isInTemplate() {
|
|
16
|
+
return this.currentTagId === t.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === n.HTML;
|
|
17
|
+
}
|
|
18
|
+
_updateCurrentElement() {
|
|
19
|
+
this.current = this.items[this.stackTop], this.currentTagId = this.tagIDs[this.stackTop];
|
|
20
|
+
}
|
|
21
|
+
//Mutations
|
|
22
|
+
push(e, s) {
|
|
23
|
+
this.stackTop++, this.items[this.stackTop] = e, this.current = e, this.tagIDs[this.stackTop] = s, this.currentTagId = s, this._isInTemplate() && this.tmplCount++, this.handler.onItemPush(e, s, !0);
|
|
24
|
+
}
|
|
25
|
+
pop() {
|
|
26
|
+
const e = this.current;
|
|
27
|
+
this.tmplCount > 0 && this._isInTemplate() && this.tmplCount--, this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(e, !0);
|
|
28
|
+
}
|
|
29
|
+
replace(e, s) {
|
|
30
|
+
const i = this._indexOf(e);
|
|
31
|
+
this.items[i] = s, i === this.stackTop && (this.current = s);
|
|
32
|
+
}
|
|
33
|
+
insertAfter(e, s, i) {
|
|
34
|
+
const r = this._indexOf(e) + 1;
|
|
35
|
+
this.items.splice(r, 0, s), this.tagIDs.splice(r, 0, i), this.stackTop++, r === this.stackTop && this._updateCurrentElement(), this.current && this.currentTagId !== void 0 && this.handler.onItemPush(this.current, this.currentTagId, r === this.stackTop);
|
|
36
|
+
}
|
|
37
|
+
popUntilTagNamePopped(e) {
|
|
38
|
+
let s = this.stackTop + 1;
|
|
39
|
+
do
|
|
40
|
+
s = this.tagIDs.lastIndexOf(e, s - 1);
|
|
41
|
+
while (s > 0 && this.treeAdapter.getNamespaceURI(this.items[s]) !== n.HTML);
|
|
42
|
+
this.shortenToLength(Math.max(s, 0));
|
|
43
|
+
}
|
|
44
|
+
shortenToLength(e) {
|
|
45
|
+
for (; this.stackTop >= e; ) {
|
|
46
|
+
const s = this.current;
|
|
47
|
+
this.tmplCount > 0 && this._isInTemplate() && (this.tmplCount -= 1), this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(s, this.stackTop < e);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
popUntilElementPopped(e) {
|
|
51
|
+
const s = this._indexOf(e);
|
|
52
|
+
this.shortenToLength(Math.max(s, 0));
|
|
53
|
+
}
|
|
54
|
+
popUntilPopped(e, s) {
|
|
55
|
+
const i = this._indexOfTagNames(e, s);
|
|
56
|
+
this.shortenToLength(Math.max(i, 0));
|
|
57
|
+
}
|
|
58
|
+
popUntilNumberedHeaderPopped() {
|
|
59
|
+
this.popUntilPopped(h, n.HTML);
|
|
60
|
+
}
|
|
61
|
+
popUntilTableCellPopped() {
|
|
62
|
+
this.popUntilPopped(E, n.HTML);
|
|
63
|
+
}
|
|
64
|
+
popAllUpToHtmlElement() {
|
|
65
|
+
this.tmplCount = 0, this.shortenToLength(1);
|
|
66
|
+
}
|
|
67
|
+
_indexOfTagNames(e, s) {
|
|
68
|
+
for (let i = this.stackTop; i >= 0; i--)
|
|
69
|
+
if (e.has(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === s)
|
|
70
|
+
return i;
|
|
71
|
+
return -1;
|
|
72
|
+
}
|
|
73
|
+
clearBackTo(e, s) {
|
|
74
|
+
const i = this._indexOfTagNames(e, s);
|
|
75
|
+
this.shortenToLength(i + 1);
|
|
76
|
+
}
|
|
77
|
+
clearBackToTableContext() {
|
|
78
|
+
this.clearBackTo(m, n.HTML);
|
|
79
|
+
}
|
|
80
|
+
clearBackToTableBodyContext() {
|
|
81
|
+
this.clearBackTo(I, n.HTML);
|
|
82
|
+
}
|
|
83
|
+
clearBackToTableRowContext() {
|
|
84
|
+
this.clearBackTo(d, n.HTML);
|
|
85
|
+
}
|
|
86
|
+
remove(e) {
|
|
87
|
+
const s = this._indexOf(e);
|
|
88
|
+
s >= 0 && (s === this.stackTop ? this.pop() : (this.items.splice(s, 1), this.tagIDs.splice(s, 1), this.stackTop--, this._updateCurrentElement(), this.handler.onItemPop(e, !1)));
|
|
89
|
+
}
|
|
90
|
+
//Search
|
|
91
|
+
tryPeekProperlyNestedBodyElement() {
|
|
92
|
+
return this.stackTop >= 1 && this.tagIDs[1] === t.BODY ? this.items[1] : null;
|
|
93
|
+
}
|
|
94
|
+
contains(e) {
|
|
95
|
+
return this._indexOf(e) > -1;
|
|
96
|
+
}
|
|
97
|
+
getCommonAncestor(e) {
|
|
98
|
+
const s = this._indexOf(e) - 1;
|
|
99
|
+
return s >= 0 ? this.items[s] : null;
|
|
100
|
+
}
|
|
101
|
+
isRootHtmlElementCurrent() {
|
|
102
|
+
return this.stackTop === 0 && this.tagIDs[0] === t.HTML;
|
|
103
|
+
}
|
|
104
|
+
//Element in scope
|
|
105
|
+
hasInDynamicScope(e, s) {
|
|
106
|
+
for (let i = this.stackTop; i >= 0; i--) {
|
|
107
|
+
const r = this.tagIDs[i];
|
|
108
|
+
switch (this.treeAdapter.getNamespaceURI(this.items[i])) {
|
|
109
|
+
case n.HTML: {
|
|
110
|
+
if (r === e)
|
|
111
|
+
return !0;
|
|
112
|
+
if (s.has(r))
|
|
113
|
+
return !1;
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
case n.SVG: {
|
|
117
|
+
if (c.has(r))
|
|
118
|
+
return !1;
|
|
119
|
+
break;
|
|
120
|
+
}
|
|
121
|
+
case n.MATHML: {
|
|
122
|
+
if (o.has(r))
|
|
123
|
+
return !1;
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
return !0;
|
|
129
|
+
}
|
|
130
|
+
hasInScope(e) {
|
|
131
|
+
return this.hasInDynamicScope(e, a);
|
|
132
|
+
}
|
|
133
|
+
hasInListItemScope(e) {
|
|
134
|
+
return this.hasInDynamicScope(e, u);
|
|
135
|
+
}
|
|
136
|
+
hasInButtonScope(e) {
|
|
137
|
+
return this.hasInDynamicScope(e, l);
|
|
138
|
+
}
|
|
139
|
+
hasNumberedHeaderInScope() {
|
|
140
|
+
for (let e = this.stackTop; e >= 0; e--) {
|
|
141
|
+
const s = this.tagIDs[e];
|
|
142
|
+
switch (this.treeAdapter.getNamespaceURI(this.items[e])) {
|
|
143
|
+
case n.HTML: {
|
|
144
|
+
if (h.has(s))
|
|
145
|
+
return !0;
|
|
146
|
+
if (a.has(s))
|
|
147
|
+
return !1;
|
|
148
|
+
break;
|
|
149
|
+
}
|
|
150
|
+
case n.SVG: {
|
|
151
|
+
if (c.has(s))
|
|
152
|
+
return !1;
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
case n.MATHML: {
|
|
156
|
+
if (o.has(s))
|
|
157
|
+
return !1;
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return !0;
|
|
163
|
+
}
|
|
164
|
+
hasInTableScope(e) {
|
|
165
|
+
for (let s = this.stackTop; s >= 0; s--)
|
|
166
|
+
if (this.treeAdapter.getNamespaceURI(this.items[s]) === n.HTML)
|
|
167
|
+
switch (this.tagIDs[s]) {
|
|
168
|
+
case e:
|
|
169
|
+
return !0;
|
|
170
|
+
case t.TABLE:
|
|
171
|
+
case t.HTML:
|
|
172
|
+
return !1;
|
|
173
|
+
}
|
|
174
|
+
return !0;
|
|
175
|
+
}
|
|
176
|
+
hasTableBodyContextInTableScope() {
|
|
177
|
+
for (let e = this.stackTop; e >= 0; e--)
|
|
178
|
+
if (this.treeAdapter.getNamespaceURI(this.items[e]) === n.HTML)
|
|
179
|
+
switch (this.tagIDs[e]) {
|
|
180
|
+
case t.TBODY:
|
|
181
|
+
case t.THEAD:
|
|
182
|
+
case t.TFOOT:
|
|
183
|
+
return !0;
|
|
184
|
+
case t.TABLE:
|
|
185
|
+
case t.HTML:
|
|
186
|
+
return !1;
|
|
187
|
+
}
|
|
188
|
+
return !0;
|
|
189
|
+
}
|
|
190
|
+
hasInSelectScope(e) {
|
|
191
|
+
for (let s = this.stackTop; s >= 0; s--)
|
|
192
|
+
if (this.treeAdapter.getNamespaceURI(this.items[s]) === n.HTML)
|
|
193
|
+
switch (this.tagIDs[s]) {
|
|
194
|
+
case e:
|
|
195
|
+
return !0;
|
|
196
|
+
case t.OPTION:
|
|
197
|
+
case t.OPTGROUP:
|
|
198
|
+
break;
|
|
199
|
+
default:
|
|
200
|
+
return !1;
|
|
201
|
+
}
|
|
202
|
+
return !0;
|
|
203
|
+
}
|
|
204
|
+
//Implied end tags
|
|
205
|
+
generateImpliedEndTags() {
|
|
206
|
+
for (; this.currentTagId !== void 0 && p.has(this.currentTagId); )
|
|
207
|
+
this.pop();
|
|
208
|
+
}
|
|
209
|
+
generateImpliedEndTagsThoroughly() {
|
|
210
|
+
for (; this.currentTagId !== void 0 && T.has(this.currentTagId); )
|
|
211
|
+
this.pop();
|
|
212
|
+
}
|
|
213
|
+
generateImpliedEndTagsWithExclusion(e) {
|
|
214
|
+
for (; this.currentTagId !== void 0 && this.currentTagId !== e && T.has(this.currentTagId); )
|
|
215
|
+
this.pop();
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
export {
|
|
219
|
+
f as OpenElementStack
|
|
220
|
+
};
|