@adminforth/agent 1.43.24 → 1.43.26
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/build.log +2 -2
- package/custom/chat.ts +1 -2
- package/custom/incremark_code_renderers/incremarkCodeHighlight.ts +13 -10
- package/custom/incremark_code_renderers/renderIncremarkMarkdown.ts +1 -12
- package/dist/custom/chat.ts +1 -2
- package/dist/custom/incremark_code_renderers/incremarkCodeHighlight.ts +13 -10
- package/dist/custom/incremark_code_renderers/renderIncremarkMarkdown.ts +1 -12
- package/package.json +1 -1
package/build.log
CHANGED
|
@@ -62,5 +62,5 @@ custom/speech_recognition_frontend/voiceActivityDetection.ts
|
|
|
62
62
|
custom/speech_recognition_frontend/types/
|
|
63
63
|
custom/speech_recognition_frontend/types/voice-activity-detection.d.ts
|
|
64
64
|
|
|
65
|
-
sent 1,666,
|
|
66
|
-
total size is 1,662,
|
|
65
|
+
sent 1,666,123 bytes received 917 bytes 3,334,080.00 bytes/sec
|
|
66
|
+
total size is 1,662,008 speedup is 1.00
|
package/custom/chat.ts
CHANGED
|
@@ -17,10 +17,9 @@ import type {
|
|
|
17
17
|
ChatStatus,
|
|
18
18
|
UIMessage,
|
|
19
19
|
} from 'ai';
|
|
20
|
+
import { AbstractChat, } from 'ai'
|
|
20
21
|
import { Ref, ref } from 'vue';
|
|
21
22
|
|
|
22
|
-
const { AbstractChat } = await import('ai');
|
|
23
|
-
|
|
24
23
|
class VueChatState<
|
|
25
24
|
UI_MESSAGE extends UIMessage,
|
|
26
25
|
> implements ChatState<UI_MESSAGE> {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
createBundledHighlighter,
|
|
3
|
+
type HighlighterGeneric,
|
|
4
|
+
type LanguageInput,
|
|
5
|
+
type ThemeInput
|
|
6
|
+
} from 'shiki/core';
|
|
7
|
+
import { createOnigurumaEngine } from 'shiki/engine/oniguruma';
|
|
2
8
|
|
|
3
9
|
export type IncremarkCodeTheme = 'dark' | 'light';
|
|
4
10
|
|
|
@@ -110,6 +116,12 @@ const SHIKI_LANGUAGE_LOADERS = {
|
|
|
110
116
|
vue: () => import('@shikijs/langs/vue')
|
|
111
117
|
} as const satisfies Record<SupportedShikiLanguage, LanguageInput>;
|
|
112
118
|
|
|
119
|
+
const createShikiHighlighter = createBundledHighlighter({
|
|
120
|
+
themes: SHIKI_THEME_LOADERS,
|
|
121
|
+
langs: SHIKI_LANGUAGE_LOADERS,
|
|
122
|
+
engine: () => createOnigurumaEngine(() => import('shiki/wasm'))
|
|
123
|
+
});
|
|
124
|
+
|
|
113
125
|
interface HighlighterState {
|
|
114
126
|
highlighter: HighlighterGeneric<SupportedShikiLanguage, SupportedShikiTheme>;
|
|
115
127
|
loadedLanguages: Set<SupportedShikiLanguage>;
|
|
@@ -214,15 +226,6 @@ function setHighlightedHtmlCache(cacheKey: string, highlightedHtml: string): voi
|
|
|
214
226
|
async function getHighlighter(): Promise<HighlighterState> {
|
|
215
227
|
if (!highlighterPromise) {
|
|
216
228
|
highlighterPromise = (async () => {
|
|
217
|
-
const [{ createBundledHighlighter }, { createOnigurumaEngine }] = await Promise.all([
|
|
218
|
-
import('shiki/core'),
|
|
219
|
-
import('shiki/engine/oniguruma')
|
|
220
|
-
]);
|
|
221
|
-
const createShikiHighlighter = createBundledHighlighter({
|
|
222
|
-
themes: SHIKI_THEME_LOADERS,
|
|
223
|
-
langs: SHIKI_LANGUAGE_LOADERS,
|
|
224
|
-
engine: () => createOnigurumaEngine(() => import('shiki/wasm'))
|
|
225
|
-
});
|
|
226
229
|
const highlighter = await createShikiHighlighter({
|
|
227
230
|
themes: [],
|
|
228
231
|
langs: []
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { createIncremarkParser, type IncremarkParserOptions } from '@incremark/core';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
highlightCodeSnippetHtml,
|
|
@@ -13,8 +13,6 @@ const INCREMARK_PARSER_OPTIONS = {
|
|
|
13
13
|
htmlTree: true
|
|
14
14
|
} satisfies IncremarkParserOptions;
|
|
15
15
|
|
|
16
|
-
let incremarkCorePromise: Promise<typeof import('@incremark/core')> | null = null;
|
|
17
|
-
|
|
18
16
|
const INCREMARK_CODE_BLOCK_PATTERN =
|
|
19
17
|
/(<div class="incremark-block incremark-code"><div class="incremark-code-toolbar">[\s\S]*?<\/div>)<pre><code(?: class="language-([^"]+)")?>([\s\S]*?)<\/code><\/pre><\/div>/g;
|
|
20
18
|
const HTML_ENTITY_RE = /&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g;
|
|
@@ -31,7 +29,6 @@ export async function renderIncremarkMarkdown(
|
|
|
31
29
|
markdown: string,
|
|
32
30
|
theme: IncremarkCodeTheme = 'dark'
|
|
33
31
|
): Promise<string> {
|
|
34
|
-
const { createIncremarkParser } = await getIncremarkCore();
|
|
35
32
|
const parser = createIncremarkParser(INCREMARK_PARSER_OPTIONS);
|
|
36
33
|
|
|
37
34
|
if (markdown) {
|
|
@@ -45,14 +42,6 @@ export async function renderIncremarkMarkdown(
|
|
|
45
42
|
return highlightRenderedIncremarkHtmlServer(mathHtml, theme);
|
|
46
43
|
}
|
|
47
44
|
|
|
48
|
-
async function getIncremarkCore(): Promise<typeof import('@incremark/core')> {
|
|
49
|
-
if (!incremarkCorePromise) {
|
|
50
|
-
incremarkCorePromise = import('@incremark/core');
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return incremarkCorePromise;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
45
|
async function highlightRenderedIncremarkHtmlServer(
|
|
57
46
|
html: string,
|
|
58
47
|
theme: IncremarkCodeTheme
|
package/dist/custom/chat.ts
CHANGED
|
@@ -17,10 +17,9 @@ import type {
|
|
|
17
17
|
ChatStatus,
|
|
18
18
|
UIMessage,
|
|
19
19
|
} from 'ai';
|
|
20
|
+
import { AbstractChat, } from 'ai'
|
|
20
21
|
import { Ref, ref } from 'vue';
|
|
21
22
|
|
|
22
|
-
const { AbstractChat } = await import('ai');
|
|
23
|
-
|
|
24
23
|
class VueChatState<
|
|
25
24
|
UI_MESSAGE extends UIMessage,
|
|
26
25
|
> implements ChatState<UI_MESSAGE> {
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
|
+
createBundledHighlighter,
|
|
3
|
+
type HighlighterGeneric,
|
|
4
|
+
type LanguageInput,
|
|
5
|
+
type ThemeInput
|
|
6
|
+
} from 'shiki/core';
|
|
7
|
+
import { createOnigurumaEngine } from 'shiki/engine/oniguruma';
|
|
2
8
|
|
|
3
9
|
export type IncremarkCodeTheme = 'dark' | 'light';
|
|
4
10
|
|
|
@@ -110,6 +116,12 @@ const SHIKI_LANGUAGE_LOADERS = {
|
|
|
110
116
|
vue: () => import('@shikijs/langs/vue')
|
|
111
117
|
} as const satisfies Record<SupportedShikiLanguage, LanguageInput>;
|
|
112
118
|
|
|
119
|
+
const createShikiHighlighter = createBundledHighlighter({
|
|
120
|
+
themes: SHIKI_THEME_LOADERS,
|
|
121
|
+
langs: SHIKI_LANGUAGE_LOADERS,
|
|
122
|
+
engine: () => createOnigurumaEngine(() => import('shiki/wasm'))
|
|
123
|
+
});
|
|
124
|
+
|
|
113
125
|
interface HighlighterState {
|
|
114
126
|
highlighter: HighlighterGeneric<SupportedShikiLanguage, SupportedShikiTheme>;
|
|
115
127
|
loadedLanguages: Set<SupportedShikiLanguage>;
|
|
@@ -214,15 +226,6 @@ function setHighlightedHtmlCache(cacheKey: string, highlightedHtml: string): voi
|
|
|
214
226
|
async function getHighlighter(): Promise<HighlighterState> {
|
|
215
227
|
if (!highlighterPromise) {
|
|
216
228
|
highlighterPromise = (async () => {
|
|
217
|
-
const [{ createBundledHighlighter }, { createOnigurumaEngine }] = await Promise.all([
|
|
218
|
-
import('shiki/core'),
|
|
219
|
-
import('shiki/engine/oniguruma')
|
|
220
|
-
]);
|
|
221
|
-
const createShikiHighlighter = createBundledHighlighter({
|
|
222
|
-
themes: SHIKI_THEME_LOADERS,
|
|
223
|
-
langs: SHIKI_LANGUAGE_LOADERS,
|
|
224
|
-
engine: () => createOnigurumaEngine(() => import('shiki/wasm'))
|
|
225
|
-
});
|
|
226
229
|
const highlighter = await createShikiHighlighter({
|
|
227
230
|
themes: [],
|
|
228
231
|
langs: []
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { createIncremarkParser, type IncremarkParserOptions } from '@incremark/core';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
highlightCodeSnippetHtml,
|
|
@@ -13,8 +13,6 @@ const INCREMARK_PARSER_OPTIONS = {
|
|
|
13
13
|
htmlTree: true
|
|
14
14
|
} satisfies IncremarkParserOptions;
|
|
15
15
|
|
|
16
|
-
let incremarkCorePromise: Promise<typeof import('@incremark/core')> | null = null;
|
|
17
|
-
|
|
18
16
|
const INCREMARK_CODE_BLOCK_PATTERN =
|
|
19
17
|
/(<div class="incremark-block incremark-code"><div class="incremark-code-toolbar">[\s\S]*?<\/div>)<pre><code(?: class="language-([^"]+)")?>([\s\S]*?)<\/code><\/pre><\/div>/g;
|
|
20
18
|
const HTML_ENTITY_RE = /&(#x?[0-9a-fA-F]+|[a-zA-Z]+);/g;
|
|
@@ -31,7 +29,6 @@ export async function renderIncremarkMarkdown(
|
|
|
31
29
|
markdown: string,
|
|
32
30
|
theme: IncremarkCodeTheme = 'dark'
|
|
33
31
|
): Promise<string> {
|
|
34
|
-
const { createIncremarkParser } = await getIncremarkCore();
|
|
35
32
|
const parser = createIncremarkParser(INCREMARK_PARSER_OPTIONS);
|
|
36
33
|
|
|
37
34
|
if (markdown) {
|
|
@@ -45,14 +42,6 @@ export async function renderIncremarkMarkdown(
|
|
|
45
42
|
return highlightRenderedIncremarkHtmlServer(mathHtml, theme);
|
|
46
43
|
}
|
|
47
44
|
|
|
48
|
-
async function getIncremarkCore(): Promise<typeof import('@incremark/core')> {
|
|
49
|
-
if (!incremarkCorePromise) {
|
|
50
|
-
incremarkCorePromise = import('@incremark/core');
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return incremarkCorePromise;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
45
|
async function highlightRenderedIncremarkHtmlServer(
|
|
57
46
|
html: string,
|
|
58
47
|
theme: IncremarkCodeTheme
|