@gitlab/duo-ui 10.9.0 → 10.10.0
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 +7 -0
- package/dist/components/agentic_chat/agentic_duo_chat.js +3 -14
- package/dist/components/chat/components/duo_chat_conversation/duo_chat_conversation.js +2 -1
- package/package.json +1 -1
- package/src/components/agentic_chat/agentic_duo_chat.md +1 -9
- package/src/components/agentic_chat/agentic_duo_chat.vue +1 -12
- package/src/components/chat/components/duo_chat_conversation/duo_chat_conversation.vue +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [10.10.0](https://gitlab.com/gitlab-org/duo-ui/compare/v10.9.0...v10.10.0) (2025-07-21)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* remove canceledRequestIds prop in Agentic Duo Chat ([5c34b99](https://gitlab.com/gitlab-org/duo-ui/commit/5c34b993ffd99cab36d5ae1694a591b9ee0ac5d9))
|
|
7
|
+
|
|
1
8
|
# [10.9.0](https://gitlab.com/gitlab-org/duo-ui/compare/v10.8.2...v10.9.0) (2025-07-17)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -126,14 +126,6 @@ var script = {
|
|
|
126
126
|
default: VIEW_TYPES.LIST,
|
|
127
127
|
validator: value => [VIEW_TYPES.LIST, VIEW_TYPES.CHAT].includes(value)
|
|
128
128
|
},
|
|
129
|
-
/**
|
|
130
|
-
* Array of RequestIds that have been canceled.
|
|
131
|
-
*/
|
|
132
|
-
canceledRequestIds: {
|
|
133
|
-
type: Array,
|
|
134
|
-
required: false,
|
|
135
|
-
default: () => []
|
|
136
|
-
},
|
|
137
129
|
/**
|
|
138
130
|
* A non-recoverable error message to display in the chat.
|
|
139
131
|
*/
|
|
@@ -311,11 +303,8 @@ var script = {
|
|
|
311
303
|
return this.prompt.toLowerCase().trim();
|
|
312
304
|
},
|
|
313
305
|
isStreaming() {
|
|
314
|
-
var _this$lastMessage, _this$
|
|
315
|
-
|
|
316
|
-
return false;
|
|
317
|
-
}
|
|
318
|
-
return Boolean(((_this$lastMessage2 = this.lastMessage) === null || _this$lastMessage2 === void 0 ? void 0 : (_this$lastMessage2$ch = _this$lastMessage2.chunks) === null || _this$lastMessage2$ch === void 0 ? void 0 : _this$lastMessage2$ch.length) > 0 && !((_this$lastMessage3 = this.lastMessage) !== null && _this$lastMessage3 !== void 0 && _this$lastMessage3.content) || typeof ((_this$lastMessage4 = this.lastMessage) === null || _this$lastMessage4 === void 0 ? void 0 : _this$lastMessage4.chunkId) === 'number');
|
|
306
|
+
var _this$lastMessage, _this$lastMessage$chu, _this$lastMessage2, _this$lastMessage3;
|
|
307
|
+
return Boolean(((_this$lastMessage = this.lastMessage) === null || _this$lastMessage === void 0 ? void 0 : (_this$lastMessage$chu = _this$lastMessage.chunks) === null || _this$lastMessage$chu === void 0 ? void 0 : _this$lastMessage$chu.length) > 0 && !((_this$lastMessage2 = this.lastMessage) !== null && _this$lastMessage2 !== void 0 && _this$lastMessage2.content) || typeof ((_this$lastMessage3 = this.lastMessage) === null || _this$lastMessage3 === void 0 ? void 0 : _this$lastMessage3.chunkId) === 'number');
|
|
319
308
|
},
|
|
320
309
|
filteredSlashCommands() {
|
|
321
310
|
return this.slashCommands.filter(c => c.name.toLowerCase().startsWith(this.caseInsensitivePrompt)).filter(c => {
|
|
@@ -656,7 +645,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
|
|
|
656
645
|
},attrs:{"width":_vm.shouldRenderResizable ? _vm.dimensions.width : null,"height":_vm.shouldRenderResizable ? _vm.dimensions.height : null,"max-width":_vm.shouldRenderResizable ? _vm.dimensions.maxWidth : null,"max-height":_vm.shouldRenderResizable ? _vm.dimensions.maxHeight : null,"min-width":_vm.shouldRenderResizable ? _vm.dimensions.minWidth : null,"left":_vm.shouldRenderResizable ? _vm.dimensions.left : null,"top":_vm.shouldRenderResizable ? _vm.dimensions.top : null,"fit-parent":true,"min-height":_vm.shouldRenderResizable ? _vm.dimensions.minHeight : null,"active":_vm.shouldRenderResizable ? ['l', 't', 'lt'] : null},on:{"resize:end":_vm.updateSize}},[(!_vm.isHidden)?_c('aside',{staticClass:"markdown-code-block duo-chat gl-bottom-0 gl-max-h-full gl-flex gl-flex-col",class:{
|
|
657
646
|
'resizable-content': _vm.shouldRenderResizable,
|
|
658
647
|
'duo-chat-drawer': !_vm.shouldRenderResizable,
|
|
659
|
-
},attrs:{"id":"chat-component","role":"complementary","data-testid":"chat-component"}},[(_vm.showHeader)?_c('duo-chat-header',{ref:"header",attrs:{"active-thread-id":_vm.activeThreadId,"title":_vm.isMultithreaded && _vm.currentView === 'list' ? _vm.$options.i18n.CHAT_HISTORY_TITLE : _vm.title,"subtitle":_vm.activeThreadTitleForView,"error":_vm.error,"is-multithreaded":_vm.isMultithreaded,"current-view":_vm.currentView,"should-render-resizable":_vm.shouldRenderResizable,"badge-type":_vm.isMultithreaded ? null : _vm.badgeType},on:{"go-back":_vm.onGoBack,"new-chat":_vm.onNewChat,"close":_vm.hideChat},scopedSlots:_vm._u([{key:"subheader",fn:function(){return [_vm._t("subheader")]},proxy:true}],null,true)}):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-overflow-y-auto gl-flex gl-flex-col gl-flex-1 gl-flex-grow gl-bg-inherit gl-overscroll-contain",attrs:{"data-testid":"chat-history"},on:{"scroll":_vm.handleScrollingThrottled}},[(_vm.shouldShowThreadList)?_c('duo-chat-threads',{attrs:{"threads":_vm.threadList,"preferred-locale":_vm.preferredLocale},on:{"new-chat":_vm.onNewChat,"select-thread":_vm.onSelectThread,"delete-thread":_vm.onDeleteThread,"close":_vm.hideChat}}):_c('transition-group',{staticClass:"duo-chat-history gl-p-5 gl-mt-auto",attrs:{"mode":"out-in","tag":"section","name":"message"}},[_vm._l((_vm.conversations),function(conversation,index){return _c('duo-chat-conversation',{key:("conversation-" + index),attrs:{"enable-code-insertion":_vm.enableCodeInsertion,"messages":conversation,"
|
|
648
|
+
},attrs:{"id":"chat-component","role":"complementary","data-testid":"chat-component"}},[(_vm.showHeader)?_c('duo-chat-header',{ref:"header",attrs:{"active-thread-id":_vm.activeThreadId,"title":_vm.isMultithreaded && _vm.currentView === 'list' ? _vm.$options.i18n.CHAT_HISTORY_TITLE : _vm.title,"subtitle":_vm.activeThreadTitleForView,"error":_vm.error,"is-multithreaded":_vm.isMultithreaded,"current-view":_vm.currentView,"should-render-resizable":_vm.shouldRenderResizable,"badge-type":_vm.isMultithreaded ? null : _vm.badgeType},on:{"go-back":_vm.onGoBack,"new-chat":_vm.onNewChat,"close":_vm.hideChat},scopedSlots:_vm._u([{key:"subheader",fn:function(){return [_vm._t("subheader")]},proxy:true}],null,true)}):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-overflow-y-auto gl-flex gl-flex-col gl-flex-1 gl-flex-grow gl-bg-inherit gl-overscroll-contain",attrs:{"data-testid":"chat-history"},on:{"scroll":_vm.handleScrollingThrottled}},[(_vm.shouldShowThreadList)?_c('duo-chat-threads',{attrs:{"threads":_vm.threadList,"preferred-locale":_vm.preferredLocale},on:{"new-chat":_vm.onNewChat,"select-thread":_vm.onSelectThread,"delete-thread":_vm.onDeleteThread,"close":_vm.hideChat}}):_c('transition-group',{staticClass:"duo-chat-history gl-p-5 gl-mt-auto",attrs:{"mode":"out-in","tag":"section","name":"message"}},[_vm._l((_vm.conversations),function(conversation,index){return _c('duo-chat-conversation',{key:("conversation-" + index),attrs:{"enable-code-insertion":_vm.enableCodeInsertion,"messages":conversation,"show-delimiter":index > 0,"with-feedback":_vm.withFeedback,"is-tool-approval-processing":_vm.isToolApprovalProcessing},on:{"track-feedback":_vm.onTrackFeedback,"insert-code-snippet":_vm.onInsertCodeSnippet,"copy-code-snippet":_vm.onCopyCodeSnippet,"copy-message":_vm.onCopyMessage,"get-context-item-content":_vm.onGetContextItemContent,"approve-tool":_vm.onApproveToolCall,"deny-tool":_vm.onDenyToolCall,"open-file-path":_vm.onOpenFilePath}})}),_vm._v(" "),(!_vm.hasMessages && !_vm.isLoading)?[_c('div',{key:"empty-state-message",staticClass:"duo-chat-message gl-rounded-bl-none gl-border-1 gl-border-solid gl-border-gray-50 gl-bg-gray-10 gl-p-4 gl-leading-20 gl-text-gray-900 gl-break-anywhere",attrs:{"data-testid":"gl-duo-chat-empty-state"}},[(_vm.emptyStateTitle)?_c('p',{staticClass:"gl-m-0",attrs:{"data-testid":"gl-duo-chat-empty-state-title"}},[_vm._v("\n "+_vm._s(_vm.emptyStateTitle)+"\n ")]):_vm._e(),_vm._v(" "),_c('duo-chat-predefined-prompts',{key:"predefined-prompts",attrs:{"prompts":_vm.predefinedPrompts},on:{"click":_vm.sendPredefinedPrompt}})],1)]:_vm._e(),_vm._v(" "),(_vm.isLoading)?_c('duo-chat-loader',{key:"loader",attrs:{"tool-name":_vm.toolName}}):_vm._e(),_vm._v(" "),_c('div',{key:"anchor",ref:"anchor",staticClass:"scroll-anchor"})],2)],1),_vm._v(" "),(_vm.isChatAvailable && !_vm.shouldShowThreadList)?_c('footer',{staticClass:"duo-chat-drawer-footer gl-border-0 gl-bg-default gl-pb-3 gl-shrink-0 gl-relative gl-z-2",class:{ 'duo-chat-drawer-body-scrim-on-footer': !_vm.scrolledToBottom },attrs:{"data-testid":"chat-footer"}},[_c('gl-form',{attrs:{"data-testid":"chat-prompt-form"},on:{"submit":function($event){$event.stopPropagation();$event.preventDefault();return _vm.sendChatPrompt.apply(null, arguments)}}},[_c('div',{staticClass:"gl-relative gl-max-w-full"},[_vm._t("context-items-menu",null,{"isOpen":_vm.contextItemsMenuIsOpen,"onClose":_vm.closeContextItemsMenuOpen,"setRef":_vm.setContextItemsMenuRef,"focusPrompt":_vm.focusChatInput})],2),_vm._v(" "),_c('gl-form-input-group',{scopedSlots:_vm._u([{key:"append",fn:function(){return [(_vm.canSubmit)?_c('gl-button',{staticClass:"!gl-absolute gl-bottom-2 gl-right-2 !gl-rounded-full",attrs:{"icon":"paper-airplane","category":"primary","variant":"confirm","type":"submit","data-testid":"chat-prompt-submit-button","aria-label":_vm.$options.i18n.CHAT_SUBMIT_LABEL}}):_c('gl-button',{staticClass:"!gl-absolute gl-bottom-2 gl-right-2 !gl-rounded-full",attrs:{"icon":"stop","category":"primary","variant":"default","data-testid":"chat-prompt-cancel-button","aria-label":_vm.$options.i18n.CHAT_CANCEL_LABEL},on:{"click":_vm.cancelPrompt}})]},proxy:true}],null,false,3738248012)},[_c('div',{staticClass:"duo-chat-input gl-min-h-8 gl-max-w-full gl-grow gl-align-top",attrs:{"data-value":_vm.prompt}},[(_vm.shouldShowSlashCommands)?_c('gl-card',{ref:"commands",staticClass:"slash-commands !gl-absolute gl-w-full -gl-translate-y-full gl-list-none gl-pl-0 gl-shadow-md",attrs:{"body-class":"!gl-p-2"}},_vm._l((_vm.filteredSlashCommands),function(command,index){return _c('gl-dropdown-item',{key:command.name,class:{ 'active-command': index === _vm.activeCommandIndex },on:{"click":function($event){return _vm.selectSlashCommand(index)}},nativeOn:{"mouseenter":function($event){_vm.activeCommandIndex = index;}}},[_c('span',{staticClass:"gl-flex gl-justify-between"},[_c('span',{staticClass:"gl-block"},[_vm._v(_vm._s(command.name))]),_vm._v(" "),_c('small',{staticClass:"gl-pl-3 gl-text-right gl-italic gl-text-subtle"},[_vm._v(_vm._s(command.description))])])])}),1):_vm._e(),_vm._v(" "),_c('gl-form-textarea',{ref:"prompt",staticClass:"gl-absolute !gl-h-full gl-rounded-br-none gl-rounded-tr-none !gl-bg-transparent !gl-py-4 !gl-shadow-none",class:{ 'gl-truncate': !_vm.prompt },attrs:{"disabled":!_vm.canSubmit,"data-testid":"chat-prompt-input","placeholder":_vm.inputPlaceholder,"autofocus":""},on:{"compositionend":_vm.compositionEnd},nativeOn:{"keydown":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,"enter",13,$event.key,"Enter")){ return null; }if($event.ctrlKey||$event.shiftKey||$event.altKey||$event.metaKey){ return null; }$event.preventDefault();},"keyup":function($event){return _vm.onInputKeyup.apply(null, arguments)}},model:{value:(_vm.prompt),callback:function ($$v) {_vm.prompt=$$v;},expression:"prompt"}})],1)])],1),_vm._v(" "),_vm._t("footer-controls"),_vm._v(" "),_c('p',{staticClass:"gl-mb-0 gl-mt-3 gl-px-4 gl-text-sm gl-text-secondary"},[_vm._v("\n "+_vm._s(_vm.$options.i18n.CHAT_DISCLAMER)+"\n ")])],2):_vm._e()],1):_vm._e()])};
|
|
660
649
|
var __vue_staticRenderFns__ = [];
|
|
661
650
|
|
|
662
651
|
/* style */
|
package/package.json
CHANGED
|
@@ -16,7 +16,6 @@ consumer component.
|
|
|
16
16
|
:is-loading="isLoading"
|
|
17
17
|
:is-chat-available="isChatAvailable"
|
|
18
18
|
:predefined-prompts="predefinedPrompts"
|
|
19
|
-
:canceled-request-ids="cancelledRequestIds"
|
|
20
19
|
:tool-name="toolName"
|
|
21
20
|
:empty-state-title="emptyStateTitle"
|
|
22
21
|
:empty-state-description="emptyStateDescription"
|
|
@@ -90,7 +89,6 @@ export default {
|
|
|
90
89
|
error: null,
|
|
91
90
|
isLoading: false,
|
|
92
91
|
toolName: '',
|
|
93
|
-
cancelledRequestIds: []
|
|
94
92
|
}
|
|
95
93
|
},
|
|
96
94
|
provide: {
|
|
@@ -112,8 +110,6 @@ export default {
|
|
|
112
110
|
}
|
|
113
111
|
methods: {
|
|
114
112
|
onChatCancel() {
|
|
115
|
-
// pushing last requestId of messages to canceled Request Ids
|
|
116
|
-
this.cancelledRequestIds.push(this.messages[this.messages.length - 1].requestId);
|
|
117
113
|
this.isLoading = false;
|
|
118
114
|
},
|
|
119
115
|
onChatHidden() {
|
|
@@ -128,11 +124,7 @@ export default {
|
|
|
128
124
|
...
|
|
129
125
|
},
|
|
130
126
|
onAiResponse(data) {
|
|
131
|
-
|
|
132
|
-
if (requestId && !this.cancelledRequestIds.includes(data.requestId)) {
|
|
133
|
-
this.messages = data
|
|
134
|
-
}
|
|
135
|
-
…
|
|
127
|
+
this.messages = data
|
|
136
128
|
this.isLoading = false;
|
|
137
129
|
},
|
|
138
130
|
onAiResponseError(error) {
|
|
@@ -182,14 +182,7 @@ export default {
|
|
|
182
182
|
default: VIEW_TYPES.LIST,
|
|
183
183
|
validator: (value) => [VIEW_TYPES.LIST, VIEW_TYPES.CHAT].includes(value),
|
|
184
184
|
},
|
|
185
|
-
|
|
186
|
-
* Array of RequestIds that have been canceled.
|
|
187
|
-
*/
|
|
188
|
-
canceledRequestIds: {
|
|
189
|
-
type: Array,
|
|
190
|
-
required: false,
|
|
191
|
-
default: () => [],
|
|
192
|
-
},
|
|
185
|
+
|
|
193
186
|
/**
|
|
194
187
|
* A non-recoverable error message to display in the chat.
|
|
195
188
|
*/
|
|
@@ -370,9 +363,6 @@ export default {
|
|
|
370
363
|
return this.prompt.toLowerCase().trim();
|
|
371
364
|
},
|
|
372
365
|
isStreaming() {
|
|
373
|
-
if (this.canceledRequestIds.includes(this.lastMessage?.requestId)) {
|
|
374
|
-
return false;
|
|
375
|
-
}
|
|
376
366
|
return Boolean(
|
|
377
367
|
(this.lastMessage?.chunks?.length > 0 && !this.lastMessage?.content) ||
|
|
378
368
|
typeof this.lastMessage?.chunkId === 'number'
|
|
@@ -790,7 +780,6 @@ export default {
|
|
|
790
780
|
:key="`conversation-${index}`"
|
|
791
781
|
:enable-code-insertion="enableCodeInsertion"
|
|
792
782
|
:messages="conversation"
|
|
793
|
-
:canceled-request-ids="canceledRequestIds"
|
|
794
783
|
:show-delimiter="index > 0"
|
|
795
784
|
:with-feedback="withFeedback"
|
|
796
785
|
:is-tool-approval-processing="isToolApprovalProcessing"
|