@adminforth/agent 1.24.3 → 1.24.4

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
@@ -38,5 +38,5 @@ custom/skills/fetch_data/SKILL.md
38
38
  custom/skills/mutate_data/
39
39
  custom/skills/mutate_data/SKILL.md
40
40
 
41
- sent 200,122 bytes received 558 bytes 401,360.00 bytes/sec
42
- total size is 197,822 speedup is 0.99
41
+ sent 200,251 bytes received 562 bytes 401,626.00 bytes/sec
42
+ total size is 197,947 speedup is 0.99
@@ -11,7 +11,7 @@
11
11
  v-if="part.type === 'text'"
12
12
  :message="part.text"
13
13
  :role="props.message.role"
14
- :state="part.state || props.message.role === 'user' ? 'done' : 'kapets'"
14
+ :state="part.state ?? (props.message.role === 'user' ? 'done' : undefined)"
15
15
  />
16
16
  </template>
17
17
 
@@ -36,7 +36,7 @@
36
36
 
37
37
  <script setup lang="ts">
38
38
  import type { Code } from 'mdast';
39
- import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue';
39
+ import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
40
40
  import embed from 'vega-embed';
41
41
 
42
42
  import { highlightCodeSnippetHtml, type IncremarkCodeTheme } from './incremarkCodeHighlight';
@@ -171,7 +171,13 @@ async function renderHighlight() {
171
171
  if (shouldRenderVega.value) {
172
172
  renderedHtml.value = '';
173
173
 
174
- if (!sourceCode.value || !vegaContainer.value) {
174
+ if (!sourceCode.value) {
175
+ return;
176
+ }
177
+
178
+ await nextTick();
179
+
180
+ if (requestId !== renderRequestId || !shouldRenderVega.value || !vegaContainer.value) {
175
181
  return;
176
182
  }
177
183
 
@@ -11,7 +11,7 @@
11
11
  v-if="part.type === 'text'"
12
12
  :message="part.text"
13
13
  :role="props.message.role"
14
- :state="part.state || props.message.role === 'user' ? 'done' : 'kapets'"
14
+ :state="part.state ?? (props.message.role === 'user' ? 'done' : undefined)"
15
15
  />
16
16
  </template>
17
17
 
@@ -36,7 +36,7 @@
36
36
 
37
37
  <script setup lang="ts">
38
38
  import type { Code } from 'mdast';
39
- import { computed, onBeforeUnmount, onMounted, ref, watch } from 'vue';
39
+ import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue';
40
40
  import embed from 'vega-embed';
41
41
 
42
42
  import { highlightCodeSnippetHtml, type IncremarkCodeTheme } from './incremarkCodeHighlight';
@@ -171,7 +171,13 @@ async function renderHighlight() {
171
171
  if (shouldRenderVega.value) {
172
172
  renderedHtml.value = '';
173
173
 
174
- if (!sourceCode.value || !vegaContainer.value) {
174
+ if (!sourceCode.value) {
175
+ return;
176
+ }
177
+
178
+ await nextTick();
179
+
180
+ if (requestId !== renderRequestId || !shouldRenderVega.value || !vegaContainer.value) {
175
181
  return;
176
182
  }
177
183
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/agent",
3
- "version": "1.24.3",
3
+ "version": "1.24.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",