@gitlab/duo-ui 12.4.2 → 12.4.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [12.4.3](https://gitlab.com/gitlab-org/duo-ui/compare/v12.4.2...v12.4.3) (2025-10-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **DuoChat:** Fix renderGFM call in messages ([7c6e84d](https://gitlab.com/gitlab-org/duo-ui/commit/7c6e84d6c406725d0212d2f02f2af8a55e4455e7))
7
+
1
8
  ## [12.4.2](https://gitlab.com/gitlab-org/duo-ui/compare/v12.4.1...v12.4.2) (2025-10-22)
2
9
 
3
10
 
@@ -107,6 +107,14 @@ var script = {
107
107
  };
108
108
  },
109
109
  computed: {
110
+ isDoneStreaming() {
111
+ // Agentic chat format
112
+ if (Object.hasOwn(this.message, 'status')) {
113
+ return this.message.status === 'success';
114
+ }
115
+ // Classic chat format
116
+ return !this.isChunk;
117
+ },
110
118
  isChunk() {
111
119
  return typeof this.message.chunkId === 'number';
112
120
  },
@@ -221,8 +229,10 @@ var script = {
221
229
  }
222
230
  },
223
231
  hydrateContentWithGFM() {
224
- if (!this.isChunk && this.$refs.content) {
225
- this.$nextTick(this.renderGFM(this.$refs.content));
232
+ if (this.isDoneStreaming && this.$refs.content) {
233
+ this.$nextTick(() => {
234
+ this.renderGFM(this.$refs.content);
235
+ });
226
236
  }
227
237
  this.detectScrollableCodeBlocks();
228
238
  },
@@ -61,7 +61,9 @@ var script = {
61
61
  methods: {
62
62
  hydrateContentWithGFM() {
63
63
  if (this.$refs.content) {
64
- this.$nextTick(this.renderGFM(this.$refs.content, this.message.role));
64
+ this.$nextTick(() => {
65
+ this.renderGFM(this.$refs.content, this.message.role);
66
+ });
65
67
  }
66
68
  }
67
69
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/duo-ui",
3
- "version": "12.4.2",
3
+ "version": "12.4.3",
4
4
  "description": "Duo UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -121,6 +121,14 @@ export default {
121
121
  };
122
122
  },
123
123
  computed: {
124
+ isDoneStreaming() {
125
+ // Agentic chat format
126
+ if (Object.hasOwn(this.message, 'status')) {
127
+ return this.message.status === 'success';
128
+ }
129
+ // Classic chat format
130
+ return !this.isChunk;
131
+ },
124
132
  isChunk() {
125
133
  return typeof this.message.chunkId === 'number';
126
134
  },
@@ -250,8 +258,10 @@ export default {
250
258
  }
251
259
  },
252
260
  hydrateContentWithGFM() {
253
- if (!this.isChunk && this.$refs.content) {
254
- this.$nextTick(this.renderGFM(this.$refs.content));
261
+ if (this.isDoneStreaming && this.$refs.content) {
262
+ this.$nextTick(() => {
263
+ this.renderGFM(this.$refs.content);
264
+ });
255
265
  }
256
266
  this.detectScrollableCodeBlocks();
257
267
  },
@@ -60,7 +60,9 @@ export default {
60
60
  methods: {
61
61
  hydrateContentWithGFM() {
62
62
  if (this.$refs.content) {
63
- this.$nextTick(this.renderGFM(this.$refs.content, this.message.role));
63
+ this.$nextTick(() => {
64
+ this.renderGFM(this.$refs.content, this.message.role);
65
+ });
64
66
  }
65
67
  },
66
68
  },