@gitlab/ui 78.1.2 → 78.2.1
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 +14 -0
- package/dist/components/experimental/duo/chat/constants.js +2 -1
- package/dist/components/experimental/duo/chat/duo_chat.js +2 -5
- package/dist/components/experimental/duo/chat/mock_data.js +20 -2
- package/dist/index.css +1 -1
- package/dist/index.css.map +1 -1
- package/dist/tokens/css/tokens.css +1 -1
- package/dist/tokens/css/tokens.dark.css +1 -1
- package/dist/tokens/js/tokens.dark.js +1 -1
- package/dist/tokens/js/tokens.js +1 -1
- package/dist/tokens/scss/_tokens.dark.scss +1 -1
- package/dist/tokens/scss/_tokens.scss +1 -1
- package/package.json +4 -4
- package/src/components/base/table/table.scss +1 -6
- package/src/components/experimental/duo/chat/constants.js +1 -0
- package/src/components/experimental/duo/chat/duo_chat.spec.js +27 -37
- package/src/components/experimental/duo/chat/duo_chat.stories.js +11 -22
- package/src/components/experimental/duo/chat/duo_chat.vue +2 -5
- package/src/components/experimental/duo/chat/mock_data.js +31 -1
- package/src/scss/variables.scss +5 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
## [78.2.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v78.2.0...v78.2.1) (2024-03-19)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **GlDuoChat:** clear prompt after /clean ([d3fcd9f](https://gitlab.com/gitlab-org/gitlab-ui/commit/d3fcd9f5aa20db65162cebf5ce0f52445725c87c))
|
|
7
|
+
|
|
8
|
+
# [78.2.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v78.1.2...v78.2.0) (2024-03-14)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Features
|
|
12
|
+
|
|
13
|
+
* **css:** Add easing variables ([33a3973](https://gitlab.com/gitlab-org/gitlab-ui/commit/33a39733abb383509ab70f88b8ecd26925a7aff3))
|
|
14
|
+
|
|
1
15
|
## [78.1.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v78.1.1...v78.1.2) (2024-03-13)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const CHAT_RESET_MESSAGE = '/reset';
|
|
2
|
+
const CHAT_CLEAN_MESSAGE = '/clean';
|
|
2
3
|
const LOADING_TRANSITION_DURATION = 7500;
|
|
3
4
|
const DOCUMENTATION_SOURCE_TYPES = {
|
|
4
5
|
HANDBOOK: {
|
|
@@ -20,4 +21,4 @@ const MESSAGE_MODEL_ROLES = {
|
|
|
20
21
|
assistant: 'assistant'
|
|
21
22
|
};
|
|
22
23
|
|
|
23
|
-
export { CHAT_RESET_MESSAGE, DOCUMENTATION_SOURCE_TYPES, LOADING_TRANSITION_DURATION, MESSAGE_MODEL_ROLES };
|
|
24
|
+
export { CHAT_CLEAN_MESSAGE, CHAT_RESET_MESSAGE, DOCUMENTATION_SOURCE_TYPES, LOADING_TRANSITION_DURATION, MESSAGE_MODEL_ROLES };
|
|
@@ -237,13 +237,9 @@ var script = {
|
|
|
237
237
|
}
|
|
238
238
|
},
|
|
239
239
|
watch: {
|
|
240
|
-
isLoading(
|
|
240
|
+
isLoading() {
|
|
241
241
|
this.isHidden = false;
|
|
242
242
|
this.scrollToBottom();
|
|
243
|
-
if (newVal) {
|
|
244
|
-
// We reset the prompt when we start getting the response and focus in the prompt field
|
|
245
|
-
this.setPromptAndFocus();
|
|
246
|
-
}
|
|
247
243
|
}
|
|
248
244
|
},
|
|
249
245
|
created() {
|
|
@@ -274,6 +270,7 @@ var script = {
|
|
|
274
270
|
* @param {String} prompt The user prompt to send.
|
|
275
271
|
*/
|
|
276
272
|
this.$emit('send-chat-prompt', this.prompt);
|
|
273
|
+
this.setPromptAndFocus();
|
|
277
274
|
}
|
|
278
275
|
},
|
|
279
276
|
sendPredefinedPrompt(prompt) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { setStoryTimeout } from '../../../../utils/test_utils';
|
|
2
|
-
import { DOCUMENTATION_SOURCE_TYPES, MESSAGE_MODEL_ROLES } from './constants';
|
|
2
|
+
import { DOCUMENTATION_SOURCE_TYPES, MESSAGE_MODEL_ROLES, CHAT_RESET_MESSAGE, CHAT_CLEAN_MESSAGE } from './constants';
|
|
3
3
|
|
|
4
4
|
const MOCK_SOURCES = [{
|
|
5
5
|
title: 'GitLab Handbook',
|
|
@@ -116,5 +116,23 @@ const renderGFM = el => {
|
|
|
116
116
|
block === null || block === void 0 ? void 0 : block.classList.add('gl-markdown', 'gl-compact-markdown');
|
|
117
117
|
});
|
|
118
118
|
};
|
|
119
|
+
const SLASH_COMMANDS = [{
|
|
120
|
+
name: CHAT_RESET_MESSAGE,
|
|
121
|
+
shouldSubmit: true,
|
|
122
|
+
description: 'Reset conversation, ignore the previous messages.'
|
|
123
|
+
}, {
|
|
124
|
+
name: CHAT_CLEAN_MESSAGE,
|
|
125
|
+
shouldSubmit: true,
|
|
126
|
+
description: 'Delete all messages in this conversation.'
|
|
127
|
+
}, {
|
|
128
|
+
name: '/tests',
|
|
129
|
+
description: 'Write tests for the selected snippet.'
|
|
130
|
+
}, {
|
|
131
|
+
name: '/refactor',
|
|
132
|
+
description: 'Refactor the selected snippet.'
|
|
133
|
+
}, {
|
|
134
|
+
name: '/explain',
|
|
135
|
+
description: 'Explain the selected snippet.'
|
|
136
|
+
}];
|
|
119
137
|
|
|
120
|
-
export { MOCK_RESPONSE_MESSAGE, MOCK_RESPONSE_MESSAGE_FOR_STREAMING, MOCK_USER_PROMPT_MESSAGE, generateMockResponseChunks, renderGFM, renderMarkdown };
|
|
138
|
+
export { MOCK_RESPONSE_MESSAGE, MOCK_RESPONSE_MESSAGE_FOR_STREAMING, MOCK_USER_PROMPT_MESSAGE, SLASH_COMMANDS, generateMockResponseChunks, renderGFM, renderMarkdown };
|