@gitlab/duo-ui 15.0.6 → 15.0.8
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,17 @@
|
|
|
1
|
+
## [15.0.8](https://gitlab.com/gitlab-org/duo-ui/compare/v15.0.7...v15.0.8) (2025-12-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **DuoChat:** Remove layout shift for custom empty state ([b0a583a](https://gitlab.com/gitlab-org/duo-ui/commit/b0a583a5b13448fec8959a359929a892d2458512))
|
|
7
|
+
|
|
8
|
+
## [15.0.7](https://gitlab.com/gitlab-org/duo-ui/compare/v15.0.6...v15.0.7) (2025-12-08)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **DuoChat:** Apply centering classes conditionally for custom-empty-state slot ([4dc6b50](https://gitlab.com/gitlab-org/duo-ui/commit/4dc6b50224e3d53eb5303d8a3946e2faa0a26ef5))
|
|
14
|
+
|
|
1
15
|
## [15.0.6](https://gitlab.com/gitlab-org/duo-ui/compare/v15.0.5...v15.0.6) (2025-12-08)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -757,9 +757,9 @@ const __vue_script__ = script;
|
|
|
757
757
|
/* template */
|
|
758
758
|
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:"markdown-code-block duo-chat web-only gl-bottom-0 gl-flex gl-max-h-full gl-flex-grow gl-flex-col",attrs:{"id":"chat-component","role":"complementary","data-testid":"chat-component"}},[(_vm.showHeader)?_c('web-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,"info":_vm.hasMessages ? _vm.chatState.reason : '',"is-multithreaded":_vm.isMultithreaded,"current-view":_vm.currentView,"should-render-resizable":_vm.shouldRenderResizable,"badge-type":_vm.isMultithreaded ? null : _vm.badgeType,"session-id":_vm.sessionId,"agents":_vm.agents,"show-studio-header":_vm.showStudioHeader},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-flex gl-flex-1 gl-flex-grow gl-flex-col gl-overflow-y-auto gl-overscroll-contain gl-bg-inherit",class:{ 'gl-border-t': !_vm.showStudioHeader },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',{class:[
|
|
759
759
|
'duo-chat-history gl-px-4',
|
|
760
|
-
_vm.$scopedSlots['custom-empty-state']
|
|
761
|
-
? 'gl-
|
|
762
|
-
: 'gl-mt-auto gl-pb-4 gl-pt-6' ],attrs:{"mode":"out-in","tag":"section","name":
|
|
760
|
+
_vm.$scopedSlots['custom-empty-state'] && !_vm.hasMessages && !_vm.isLoading
|
|
761
|
+
? 'gl-m-auto'
|
|
762
|
+
: 'gl-mt-auto gl-pb-4 gl-pt-6' ],attrs:{"mode":"out-in","tag":"section","name":_vm.$scopedSlots['custom-empty-state'] ? '' : 'message',"data-testid":"chat-messages"}},[_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,"working-directory":_vm.workingDirectory,"trusted-urls":_vm.trustedUrls},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-container"},[_vm._t("custom-empty-state",function(){return [_c('div',{key:"empty-state-message",staticClass:"duo-chat-message gl-rounded-bl-none gl-leading-20 gl-text-default gl-break-anywhere",attrs:{"data-testid":"gl-duo-chat-empty-state"}},[_c('div',{staticClass:"gl-mb-[3.75rem] gl-flex gl-flex-col gl-items-center gl-justify-center gl-gap-3 gl-text-center"},[_c('h1',{staticClass:"gl-my-0 gl-text-[3.5rem]",attrs:{"data-testid":"gl-duo-chat-empty-state-emoji"}},[_vm._v("\n "+_vm._s(_vm.$options.i18n.CHAT_EMPTY_STATE_EMOJI)+"\n ")]),_vm._v(" "),(_vm.agentName)?_c('h2',{staticClass:"gl-heading-2 gl-my-0",attrs:{"data-testid":"gl-duo-chat-empty-state-greeting"}},[_vm._v("\n "+_vm._s(_vm.emptyStateGreeting)+"\n ")]):_vm._e(),_vm._v(" "),_c('h2',{staticClass:"gl-my-0 gl-text-size-h2",attrs:{"data-testid":"gl-duo-chat-empty-state-title"}},[_vm._v("\n "+_vm._s(_vm.emptyStateMainText)+"\n ")]),_vm._v(" "),_c('p',{staticClass:"gl-text-base gl-text-subtle",attrs:{"data-testid":"gl-duo-chat-empty-state-subtitle"}},[_vm._v("\n "+_vm._s(_vm.emptyStateSubText)+"\n ")])]),_vm._v(" "),_c('duo-chat-predefined-prompts',{key:"predefined-prompts",attrs:{"prompts":_vm.predefinedPrompts},on:{"click":_vm.sendPredefinedPrompt}})],1)]})],2)]:_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.shouldShowThreadList)?_c('footer',{staticClass:"duo-chat-drawer-footer gl-relative gl-z-2 gl-shrink-0",attrs:{"data-testid":"chat-footer"}},[_c('p',{staticClass:"gl-mb-3 gl-text-sm gl-text-subtle",class:{ 'gl-invisible': !_vm.hasAssistantMessages },attrs:{"data-testid":"chat-disclaimer"}},[_vm._v("\n "+_vm._s(_vm.$options.i18n.CHAT_DISCLAIMER)+"\n ")]),_vm._v(" "),_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('div',{staticClass:"duo-chat-input gl-relative gl-min-h-8 gl-max-w-full gl-grow gl-flex-col gl-rounded-bl-[12px] gl-rounded-br-[18px] gl-rounded-tl-[12px] gl-rounded-tr-[12px] gl-align-top forced-colors:gl-border"},[(_vm.$scopedSlots['agentic-model'] || _vm.$scopedSlots['agentic-switch'])?_c('div',{staticClass:"gl-flex gl-items-center gl-justify-between gl-gap-5 gl-border-0 gl-border-b-1 gl-border-solid gl-border-strong gl-px-4 gl-py-4 forced-colors:gl-border-none"},[_c('div',{staticClass:"duo-model-switcher gl-min-w-0 gl-max-w-full"},[_vm._t("agentic-model")],2),_vm._v(" "),_c('div',{staticClass:"duo-agent-mode-switcher gl-min-w-0 gl-max-w-full gl-shrink-0"},[_vm._t("agentic-switch")],2)]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-h-[80px] gl-grow",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",attrs:{"disabled":!_vm.canSubmit || !_vm.isChatAvailable || !_vm.chatState.isEnabled,"data-testid":"chat-prompt-input","placeholder":_vm.inputPlaceholder,"character-count-limit":_vm.maxPromptLength,"textarea-classes":[
|
|
763
763
|
'!gl-h-full',
|
|
764
764
|
'!gl-bg-transparent',
|
|
765
765
|
'!gl-py-4',
|
package/package.json
CHANGED
|
@@ -887,12 +887,12 @@ export default {
|
|
|
887
887
|
v-else
|
|
888
888
|
mode="out-in"
|
|
889
889
|
tag="section"
|
|
890
|
-
name="message"
|
|
890
|
+
:name="$scopedSlots['custom-empty-state'] ? '' : 'message'"
|
|
891
891
|
data-testid="chat-messages"
|
|
892
892
|
:class="[
|
|
893
893
|
'duo-chat-history gl-px-4',
|
|
894
|
-
$scopedSlots['custom-empty-state']
|
|
895
|
-
? 'gl-
|
|
894
|
+
$scopedSlots['custom-empty-state'] && !hasMessages && !isLoading
|
|
895
|
+
? 'gl-m-auto'
|
|
896
896
|
: 'gl-mt-auto gl-pb-4 gl-pt-6',
|
|
897
897
|
]"
|
|
898
898
|
>
|
|
@@ -916,42 +916,44 @@ export default {
|
|
|
916
916
|
@open-file-path="onOpenFilePath"
|
|
917
917
|
/>
|
|
918
918
|
<template v-if="!hasMessages && !isLoading">
|
|
919
|
-
<
|
|
920
|
-
<
|
|
921
|
-
key="empty-state-message"
|
|
922
|
-
class="duo-chat-message gl-rounded-bl-none gl-leading-20 gl-text-default gl-break-anywhere"
|
|
923
|
-
data-testid="gl-duo-chat-empty-state"
|
|
924
|
-
>
|
|
919
|
+
<div key="empty-state-container">
|
|
920
|
+
<slot name="custom-empty-state">
|
|
925
921
|
<div
|
|
926
|
-
|
|
922
|
+
key="empty-state-message"
|
|
923
|
+
class="duo-chat-message gl-rounded-bl-none gl-leading-20 gl-text-default gl-break-anywhere"
|
|
924
|
+
data-testid="gl-duo-chat-empty-state"
|
|
927
925
|
>
|
|
928
|
-
<
|
|
929
|
-
|
|
930
|
-
</h1>
|
|
931
|
-
<h2
|
|
932
|
-
v-if="agentName"
|
|
933
|
-
class="gl-heading-2 gl-my-0"
|
|
934
|
-
data-testid="gl-duo-chat-empty-state-greeting"
|
|
935
|
-
>
|
|
936
|
-
{{ emptyStateGreeting }}
|
|
937
|
-
</h2>
|
|
938
|
-
<h2 class="gl-my-0 gl-text-size-h2" data-testid="gl-duo-chat-empty-state-title">
|
|
939
|
-
{{ emptyStateMainText }}
|
|
940
|
-
</h2>
|
|
941
|
-
<p
|
|
942
|
-
class="gl-text-base gl-text-subtle"
|
|
943
|
-
data-testid="gl-duo-chat-empty-state-subtitle"
|
|
926
|
+
<div
|
|
927
|
+
class="gl-mb-[3.75rem] gl-flex gl-flex-col gl-items-center gl-justify-center gl-gap-3 gl-text-center"
|
|
944
928
|
>
|
|
945
|
-
|
|
946
|
-
|
|
929
|
+
<h1 class="gl-my-0 gl-text-[3.5rem]" data-testid="gl-duo-chat-empty-state-emoji">
|
|
930
|
+
{{ $options.i18n.CHAT_EMPTY_STATE_EMOJI }}
|
|
931
|
+
</h1>
|
|
932
|
+
<h2
|
|
933
|
+
v-if="agentName"
|
|
934
|
+
class="gl-heading-2 gl-my-0"
|
|
935
|
+
data-testid="gl-duo-chat-empty-state-greeting"
|
|
936
|
+
>
|
|
937
|
+
{{ emptyStateGreeting }}
|
|
938
|
+
</h2>
|
|
939
|
+
<h2 class="gl-my-0 gl-text-size-h2" data-testid="gl-duo-chat-empty-state-title">
|
|
940
|
+
{{ emptyStateMainText }}
|
|
941
|
+
</h2>
|
|
942
|
+
<p
|
|
943
|
+
class="gl-text-base gl-text-subtle"
|
|
944
|
+
data-testid="gl-duo-chat-empty-state-subtitle"
|
|
945
|
+
>
|
|
946
|
+
{{ emptyStateSubText }}
|
|
947
|
+
</p>
|
|
948
|
+
</div>
|
|
949
|
+
<duo-chat-predefined-prompts
|
|
950
|
+
key="predefined-prompts"
|
|
951
|
+
:prompts="predefinedPrompts"
|
|
952
|
+
@click="sendPredefinedPrompt"
|
|
953
|
+
/>
|
|
947
954
|
</div>
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
:prompts="predefinedPrompts"
|
|
951
|
-
@click="sendPredefinedPrompt"
|
|
952
|
-
/>
|
|
953
|
-
</div>
|
|
954
|
-
</slot>
|
|
955
|
+
</slot>
|
|
956
|
+
</div>
|
|
955
957
|
</template>
|
|
956
958
|
<duo-chat-loader v-if="isLoading" key="loader" :tool-name="toolName" />
|
|
957
959
|
<div key="anchor" ref="anchor" class="scroll-anchor"></div>
|