@adminforth/agent 1.32.0 → 1.32.2

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 CHANGED
@@ -40,5 +40,5 @@ custom/skills/fetch_data/SKILL.md
40
40
  custom/skills/mutate_data/
41
41
  custom/skills/mutate_data/SKILL.md
42
42
 
43
- sent 208,774 bytes received 581 bytes 418,710.00 bytes/sec
44
- total size is 206,372 speedup is 0.99
43
+ sent 209,157 bytes received 585 bytes 419,484.00 bytes/sec
44
+ total size is 206,747 speedup is 0.99
@@ -163,6 +163,10 @@ a.incremark-link::after {
163
163
  mask-size: contain;
164
164
  }
165
165
 
166
+ .incremark-table a.incremark-link {
167
+ word-break: break-word;
168
+ }
169
+
166
170
  .incremark-list {
167
171
  list-style: disc;
168
172
  }
@@ -39,7 +39,7 @@ import type { Code } from 'mdast';
39
39
  import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
40
40
  import embed from 'vega-embed';
41
41
 
42
- import { highlightCodeSnippetHtml, type IncremarkCodeTheme } from './incremarkCodeHighlight';
42
+ import type { IncremarkCodeTheme } from './incremarkCodeHighlight';
43
43
 
44
44
  const props = withDefaults(defineProps<{
45
45
  node: Code;
@@ -67,6 +67,7 @@ let renderRequestId = 0;
67
67
  let scheduledFrameId: number | null = null;
68
68
  let themeObserver: MutationObserver | null = null;
69
69
  let vegaResult: { finalize: () => void } | null = null;
70
+ let highlightModulePromise: Promise<typeof import('./incremarkCodeHighlight')> | null = null;
70
71
 
71
72
  const sourceCode = computed(() => props.node.value ?? '');
72
73
  const language = computed(() => props.node.lang?.trim().toLowerCase() || 'text');
@@ -165,6 +166,14 @@ function scheduleHighlight() {
165
166
  });
166
167
  }
167
168
 
169
+ function loadHighlightModule() {
170
+ if (!highlightModulePromise) {
171
+ highlightModulePromise = import('./incremarkCodeHighlight');
172
+ }
173
+
174
+ return highlightModulePromise;
175
+ }
176
+
168
177
  async function renderHighlight() {
169
178
  const requestId = ++renderRequestId;
170
179
 
@@ -219,6 +228,7 @@ async function renderHighlight() {
219
228
  }
220
229
 
221
230
  try {
231
+ const { highlightCodeSnippetHtml } = await loadHighlightModule();
222
232
  const html = await highlightCodeSnippetHtml(sourceCode.value, language.value, codeTheme.value);
223
233
 
224
234
  if (requestId === renderRequestId) {
@@ -163,6 +163,10 @@ a.incremark-link::after {
163
163
  mask-size: contain;
164
164
  }
165
165
 
166
+ .incremark-table a.incremark-link {
167
+ word-break: break-word;
168
+ }
169
+
166
170
  .incremark-list {
167
171
  list-style: disc;
168
172
  }
@@ -39,7 +39,7 @@ import type { Code } from 'mdast';
39
39
  import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
40
40
  import embed from 'vega-embed';
41
41
 
42
- import { highlightCodeSnippetHtml, type IncremarkCodeTheme } from './incremarkCodeHighlight';
42
+ import type { IncremarkCodeTheme } from './incremarkCodeHighlight';
43
43
 
44
44
  const props = withDefaults(defineProps<{
45
45
  node: Code;
@@ -67,6 +67,7 @@ let renderRequestId = 0;
67
67
  let scheduledFrameId: number | null = null;
68
68
  let themeObserver: MutationObserver | null = null;
69
69
  let vegaResult: { finalize: () => void } | null = null;
70
+ let highlightModulePromise: Promise<typeof import('./incremarkCodeHighlight')> | null = null;
70
71
 
71
72
  const sourceCode = computed(() => props.node.value ?? '');
72
73
  const language = computed(() => props.node.lang?.trim().toLowerCase() || 'text');
@@ -165,6 +166,14 @@ function scheduleHighlight() {
165
166
  });
166
167
  }
167
168
 
169
+ function loadHighlightModule() {
170
+ if (!highlightModulePromise) {
171
+ highlightModulePromise = import('./incremarkCodeHighlight');
172
+ }
173
+
174
+ return highlightModulePromise;
175
+ }
176
+
168
177
  async function renderHighlight() {
169
178
  const requestId = ++renderRequestId;
170
179
 
@@ -219,6 +228,7 @@ async function renderHighlight() {
219
228
  }
220
229
 
221
230
  try {
231
+ const { highlightCodeSnippetHtml } = await loadHighlightModule();
222
232
  const html = await highlightCodeSnippetHtml(sourceCode.value, language.value, codeTheme.value);
223
233
 
224
234
  if (requestId === renderRequestId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/agent",
3
- "version": "1.32.0",
3
+ "version": "1.32.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",