@veracity/ai 0.0.1
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/ChatCompletionSSE.d.ts +35 -0
- package/dist/ChatCompletionSSE.d.ts.map +1 -0
- package/dist/Markdown.d.ts +2 -0
- package/dist/Markdown.d.ts.map +1 -0
- package/dist/SmoothChatCompletionSSE.d.ts +23 -0
- package/dist/SmoothChatCompletionSSE.d.ts.map +1 -0
- package/dist/components/AIChat/index.d.ts +26 -0
- package/dist/components/AIChat/index.d.ts.map +1 -0
- package/dist/components/AIChatBubble.d.ts +7 -0
- package/dist/components/AIChatBubble.d.ts.map +1 -0
- package/dist/components/AIChatMessage.d.ts +22 -0
- package/dist/components/AIChatMessage.d.ts.map +1 -0
- package/dist/components/AIChatToolCall.d.ts +26 -0
- package/dist/components/AIChatToolCall.d.ts.map +1 -0
- package/dist/components/AIChatToolCallGroup.d.ts +20 -0
- package/dist/components/AIChatToolCallGroup.d.ts.map +1 -0
- package/dist/components/Avatar.d.ts +23 -0
- package/dist/components/Avatar.d.ts.map +1 -0
- package/dist/components/HighlightCode/index.d.ts +11 -0
- package/dist/components/HighlightCode/index.d.ts.map +1 -0
- package/dist/components/VeracityAvatar.d.ts +3 -0
- package/dist/components/VeracityAvatar.d.ts.map +1 -0
- package/dist/components/VeracityLogoSquare.d.ts +3 -0
- package/dist/components/VeracityLogoSquare.d.ts.map +1 -0
- package/dist/components/icons/Check.d.ts +3 -0
- package/dist/components/icons/Check.d.ts.map +1 -0
- package/dist/components/icons/ExclamationCircle.d.ts +3 -0
- package/dist/components/icons/ExclamationCircle.d.ts.map +1 -0
- package/dist/components/icons/IconProps.d.ts +12 -0
- package/dist/components/icons/IconProps.d.ts.map +1 -0
- package/dist/components/icons/InfoCircle.d.ts +3 -0
- package/dist/components/icons/InfoCircle.d.ts.map +1 -0
- package/dist/components/icons/QuestionCircle.d.ts +3 -0
- package/dist/components/icons/QuestionCircle.d.ts.map +1 -0
- package/dist/components/icons/Spinner.d.ts +13 -0
- package/dist/components/icons/Spinner.d.ts.map +1 -0
- package/dist/core-Diwflo5W.js +1077 -0
- package/dist/csharp-Cigc7XMa.js +371 -0
- package/dist/css-B-yPI1XM.js +719 -0
- package/dist/dtos.d.ts +18 -0
- package/dist/dtos.d.ts.map +1 -0
- package/dist/enums.d.ts +30 -0
- package/dist/enums.d.ts.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/javascript-CDslspYb.js +654 -0
- package/dist/python-CzH_tl5q.js +397 -0
- package/dist/typescript-Bx5cZccb.js +728 -0
- package/dist/utils/CancellationToken.d.ts +16 -0
- package/dist/utils/CancellationToken.d.ts.map +1 -0
- package/dist/utils/OperationCancelledError.d.ts +5 -0
- package/dist/utils/OperationCancelledError.d.ts.map +1 -0
- package/dist/utils/createSVGElement.d.ts +2 -0
- package/dist/utils/createSVGElement.d.ts.map +1 -0
- package/dist/veracity-ai.es.js +4173 -0
- package/dist/veracity-ai.umd.js +5 -0
- package/package.json +36 -0
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
function R(e) {
|
|
2
|
+
const g = e.regex, s = new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*", "u"), b = [
|
|
3
|
+
"and",
|
|
4
|
+
"as",
|
|
5
|
+
"assert",
|
|
6
|
+
"async",
|
|
7
|
+
"await",
|
|
8
|
+
"break",
|
|
9
|
+
"case",
|
|
10
|
+
"class",
|
|
11
|
+
"continue",
|
|
12
|
+
"def",
|
|
13
|
+
"del",
|
|
14
|
+
"elif",
|
|
15
|
+
"else",
|
|
16
|
+
"except",
|
|
17
|
+
"finally",
|
|
18
|
+
"for",
|
|
19
|
+
"from",
|
|
20
|
+
"global",
|
|
21
|
+
"if",
|
|
22
|
+
"import",
|
|
23
|
+
"in",
|
|
24
|
+
"is",
|
|
25
|
+
"lambda",
|
|
26
|
+
"match",
|
|
27
|
+
"nonlocal|10",
|
|
28
|
+
"not",
|
|
29
|
+
"or",
|
|
30
|
+
"pass",
|
|
31
|
+
"raise",
|
|
32
|
+
"return",
|
|
33
|
+
"try",
|
|
34
|
+
"while",
|
|
35
|
+
"with",
|
|
36
|
+
"yield"
|
|
37
|
+
], r = {
|
|
38
|
+
$pattern: /[A-Za-z]\w+|__\w+__/,
|
|
39
|
+
keyword: b,
|
|
40
|
+
built_in: [
|
|
41
|
+
"__import__",
|
|
42
|
+
"abs",
|
|
43
|
+
"all",
|
|
44
|
+
"any",
|
|
45
|
+
"ascii",
|
|
46
|
+
"bin",
|
|
47
|
+
"bool",
|
|
48
|
+
"breakpoint",
|
|
49
|
+
"bytearray",
|
|
50
|
+
"bytes",
|
|
51
|
+
"callable",
|
|
52
|
+
"chr",
|
|
53
|
+
"classmethod",
|
|
54
|
+
"compile",
|
|
55
|
+
"complex",
|
|
56
|
+
"delattr",
|
|
57
|
+
"dict",
|
|
58
|
+
"dir",
|
|
59
|
+
"divmod",
|
|
60
|
+
"enumerate",
|
|
61
|
+
"eval",
|
|
62
|
+
"exec",
|
|
63
|
+
"filter",
|
|
64
|
+
"float",
|
|
65
|
+
"format",
|
|
66
|
+
"frozenset",
|
|
67
|
+
"getattr",
|
|
68
|
+
"globals",
|
|
69
|
+
"hasattr",
|
|
70
|
+
"hash",
|
|
71
|
+
"help",
|
|
72
|
+
"hex",
|
|
73
|
+
"id",
|
|
74
|
+
"input",
|
|
75
|
+
"int",
|
|
76
|
+
"isinstance",
|
|
77
|
+
"issubclass",
|
|
78
|
+
"iter",
|
|
79
|
+
"len",
|
|
80
|
+
"list",
|
|
81
|
+
"locals",
|
|
82
|
+
"map",
|
|
83
|
+
"max",
|
|
84
|
+
"memoryview",
|
|
85
|
+
"min",
|
|
86
|
+
"next",
|
|
87
|
+
"object",
|
|
88
|
+
"oct",
|
|
89
|
+
"open",
|
|
90
|
+
"ord",
|
|
91
|
+
"pow",
|
|
92
|
+
"print",
|
|
93
|
+
"property",
|
|
94
|
+
"range",
|
|
95
|
+
"repr",
|
|
96
|
+
"reversed",
|
|
97
|
+
"round",
|
|
98
|
+
"set",
|
|
99
|
+
"setattr",
|
|
100
|
+
"slice",
|
|
101
|
+
"sorted",
|
|
102
|
+
"staticmethod",
|
|
103
|
+
"str",
|
|
104
|
+
"sum",
|
|
105
|
+
"super",
|
|
106
|
+
"tuple",
|
|
107
|
+
"type",
|
|
108
|
+
"vars",
|
|
109
|
+
"zip"
|
|
110
|
+
],
|
|
111
|
+
literal: [
|
|
112
|
+
"__debug__",
|
|
113
|
+
"Ellipsis",
|
|
114
|
+
"False",
|
|
115
|
+
"None",
|
|
116
|
+
"NotImplemented",
|
|
117
|
+
"True"
|
|
118
|
+
],
|
|
119
|
+
type: [
|
|
120
|
+
"Any",
|
|
121
|
+
"Callable",
|
|
122
|
+
"Coroutine",
|
|
123
|
+
"Dict",
|
|
124
|
+
"List",
|
|
125
|
+
"Literal",
|
|
126
|
+
"Generic",
|
|
127
|
+
"Optional",
|
|
128
|
+
"Sequence",
|
|
129
|
+
"Set",
|
|
130
|
+
"Tuple",
|
|
131
|
+
"Type",
|
|
132
|
+
"Union"
|
|
133
|
+
]
|
|
134
|
+
}, n = {
|
|
135
|
+
className: "meta",
|
|
136
|
+
begin: /^(>>>|\.\.\.) /
|
|
137
|
+
}, i = {
|
|
138
|
+
className: "subst",
|
|
139
|
+
begin: /\{/,
|
|
140
|
+
end: /\}/,
|
|
141
|
+
keywords: r,
|
|
142
|
+
illegal: /#/
|
|
143
|
+
}, o = {
|
|
144
|
+
begin: /\{\{/,
|
|
145
|
+
relevance: 0
|
|
146
|
+
}, c = {
|
|
147
|
+
className: "string",
|
|
148
|
+
contains: [e.BACKSLASH_ESCAPE],
|
|
149
|
+
variants: [
|
|
150
|
+
{
|
|
151
|
+
begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,
|
|
152
|
+
end: /'''/,
|
|
153
|
+
contains: [
|
|
154
|
+
e.BACKSLASH_ESCAPE,
|
|
155
|
+
n
|
|
156
|
+
],
|
|
157
|
+
relevance: 10
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
begin: /([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,
|
|
161
|
+
end: /"""/,
|
|
162
|
+
contains: [
|
|
163
|
+
e.BACKSLASH_ESCAPE,
|
|
164
|
+
n
|
|
165
|
+
],
|
|
166
|
+
relevance: 10
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
begin: /([fF][rR]|[rR][fF]|[fF])'''/,
|
|
170
|
+
end: /'''/,
|
|
171
|
+
contains: [
|
|
172
|
+
e.BACKSLASH_ESCAPE,
|
|
173
|
+
n,
|
|
174
|
+
o,
|
|
175
|
+
i
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
begin: /([fF][rR]|[rR][fF]|[fF])"""/,
|
|
180
|
+
end: /"""/,
|
|
181
|
+
contains: [
|
|
182
|
+
e.BACKSLASH_ESCAPE,
|
|
183
|
+
n,
|
|
184
|
+
o,
|
|
185
|
+
i
|
|
186
|
+
]
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
begin: /([uU]|[rR])'/,
|
|
190
|
+
end: /'/,
|
|
191
|
+
relevance: 10
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
begin: /([uU]|[rR])"/,
|
|
195
|
+
end: /"/,
|
|
196
|
+
relevance: 10
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
begin: /([bB]|[bB][rR]|[rR][bB])'/,
|
|
200
|
+
end: /'/
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
begin: /([bB]|[bB][rR]|[rR][bB])"/,
|
|
204
|
+
end: /"/
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
begin: /([fF][rR]|[rR][fF]|[fF])'/,
|
|
208
|
+
end: /'/,
|
|
209
|
+
contains: [
|
|
210
|
+
e.BACKSLASH_ESCAPE,
|
|
211
|
+
o,
|
|
212
|
+
i
|
|
213
|
+
]
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
begin: /([fF][rR]|[rR][fF]|[fF])"/,
|
|
217
|
+
end: /"/,
|
|
218
|
+
contains: [
|
|
219
|
+
e.BACKSLASH_ESCAPE,
|
|
220
|
+
o,
|
|
221
|
+
i
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
e.APOS_STRING_MODE,
|
|
225
|
+
e.QUOTE_STRING_MODE
|
|
226
|
+
]
|
|
227
|
+
}, t = "[0-9](_?[0-9])*", d = `(\\b(${t}))?\\.(${t})|\\b(${t})\\.`, a = `\\b|${b.join("|")}`, l = {
|
|
228
|
+
className: "number",
|
|
229
|
+
relevance: 0,
|
|
230
|
+
variants: [
|
|
231
|
+
// exponentfloat, pointfloat
|
|
232
|
+
// https://docs.python.org/3.9/reference/lexical_analysis.html#floating-point-literals
|
|
233
|
+
// optionally imaginary
|
|
234
|
+
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
235
|
+
// Note: no leading \b because floats can start with a decimal point
|
|
236
|
+
// and we don't want to mishandle e.g. `fn(.5)`,
|
|
237
|
+
// no trailing \b for pointfloat because it can end with a decimal point
|
|
238
|
+
// and we don't want to mishandle e.g. `0..hex()`; this should be safe
|
|
239
|
+
// because both MUST contain a decimal point and so cannot be confused with
|
|
240
|
+
// the interior part of an identifier
|
|
241
|
+
{
|
|
242
|
+
begin: `(\\b(${t})|(${d}))[eE][+-]?(${t})[jJ]?(?=${a})`
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
begin: `(${d})[jJ]?`
|
|
246
|
+
},
|
|
247
|
+
// decinteger, bininteger, octinteger, hexinteger
|
|
248
|
+
// https://docs.python.org/3.9/reference/lexical_analysis.html#integer-literals
|
|
249
|
+
// optionally "long" in Python 2
|
|
250
|
+
// https://docs.python.org/2.7/reference/lexical_analysis.html#integer-and-long-integer-literals
|
|
251
|
+
// decinteger is optionally imaginary
|
|
252
|
+
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
253
|
+
{
|
|
254
|
+
begin: `\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${a})`
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
begin: `\\b0[bB](_?[01])+[lL]?(?=${a})`
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
begin: `\\b0[oO](_?[0-7])+[lL]?(?=${a})`
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
begin: `\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${a})`
|
|
264
|
+
},
|
|
265
|
+
// imagnumber (digitpart-based)
|
|
266
|
+
// https://docs.python.org/3.9/reference/lexical_analysis.html#imaginary-literals
|
|
267
|
+
{
|
|
268
|
+
begin: `\\b(${t})[jJ](?=${a})`
|
|
269
|
+
}
|
|
270
|
+
]
|
|
271
|
+
}, p = {
|
|
272
|
+
className: "comment",
|
|
273
|
+
begin: g.lookahead(/# type:/),
|
|
274
|
+
end: /$/,
|
|
275
|
+
keywords: r,
|
|
276
|
+
contains: [
|
|
277
|
+
{
|
|
278
|
+
// prevent keywords from coloring `type`
|
|
279
|
+
begin: /# type:/
|
|
280
|
+
},
|
|
281
|
+
// comment within a datatype comment includes no keywords
|
|
282
|
+
{
|
|
283
|
+
begin: /#/,
|
|
284
|
+
end: /\b\B/,
|
|
285
|
+
endsWithParent: !0
|
|
286
|
+
}
|
|
287
|
+
]
|
|
288
|
+
}, _ = {
|
|
289
|
+
className: "params",
|
|
290
|
+
variants: [
|
|
291
|
+
// Exclude params in functions without params
|
|
292
|
+
{
|
|
293
|
+
className: "",
|
|
294
|
+
begin: /\(\s*\)/,
|
|
295
|
+
skip: !0
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
begin: /\(/,
|
|
299
|
+
end: /\)/,
|
|
300
|
+
excludeBegin: !0,
|
|
301
|
+
excludeEnd: !0,
|
|
302
|
+
keywords: r,
|
|
303
|
+
contains: [
|
|
304
|
+
"self",
|
|
305
|
+
n,
|
|
306
|
+
l,
|
|
307
|
+
c,
|
|
308
|
+
e.HASH_COMMENT_MODE
|
|
309
|
+
]
|
|
310
|
+
}
|
|
311
|
+
]
|
|
312
|
+
};
|
|
313
|
+
return i.contains = [
|
|
314
|
+
c,
|
|
315
|
+
l,
|
|
316
|
+
n
|
|
317
|
+
], {
|
|
318
|
+
name: "Python",
|
|
319
|
+
aliases: [
|
|
320
|
+
"py",
|
|
321
|
+
"gyp",
|
|
322
|
+
"ipython"
|
|
323
|
+
],
|
|
324
|
+
unicodeRegex: !0,
|
|
325
|
+
keywords: r,
|
|
326
|
+
illegal: /(<\/|\?)|=>/,
|
|
327
|
+
contains: [
|
|
328
|
+
n,
|
|
329
|
+
l,
|
|
330
|
+
{
|
|
331
|
+
// very common convention
|
|
332
|
+
begin: /\bself\b/
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
// eat "if" prior to string so that it won't accidentally be
|
|
336
|
+
// labeled as an f-string
|
|
337
|
+
beginKeywords: "if",
|
|
338
|
+
relevance: 0
|
|
339
|
+
},
|
|
340
|
+
c,
|
|
341
|
+
p,
|
|
342
|
+
e.HASH_COMMENT_MODE,
|
|
343
|
+
{
|
|
344
|
+
match: [
|
|
345
|
+
/\bdef/,
|
|
346
|
+
/\s+/,
|
|
347
|
+
s
|
|
348
|
+
],
|
|
349
|
+
scope: {
|
|
350
|
+
1: "keyword",
|
|
351
|
+
3: "title.function"
|
|
352
|
+
},
|
|
353
|
+
contains: [_]
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
variants: [
|
|
357
|
+
{
|
|
358
|
+
match: [
|
|
359
|
+
/\bclass/,
|
|
360
|
+
/\s+/,
|
|
361
|
+
s,
|
|
362
|
+
/\s*/,
|
|
363
|
+
/\(\s*/,
|
|
364
|
+
s,
|
|
365
|
+
/\s*\)/
|
|
366
|
+
]
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
match: [
|
|
370
|
+
/\bclass/,
|
|
371
|
+
/\s+/,
|
|
372
|
+
s
|
|
373
|
+
]
|
|
374
|
+
}
|
|
375
|
+
],
|
|
376
|
+
scope: {
|
|
377
|
+
1: "keyword",
|
|
378
|
+
3: "title.class",
|
|
379
|
+
6: "title.class.inherited"
|
|
380
|
+
}
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
className: "meta",
|
|
384
|
+
begin: /^[\t ]*@/,
|
|
385
|
+
end: /(?=#)|$/,
|
|
386
|
+
contains: [
|
|
387
|
+
l,
|
|
388
|
+
_,
|
|
389
|
+
c
|
|
390
|
+
]
|
|
391
|
+
}
|
|
392
|
+
]
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
export {
|
|
396
|
+
R as default
|
|
397
|
+
};
|