@gitlab/duo-ui 11.1.2 → 11.2.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.
Files changed (25) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/components/chat/components/duo_chat_message/message_types/message_tool.js +8 -4
  3. package/dist/components/chat/components/duo_chat_message_tool_approval/components/base_tool_params.js +79 -0
  4. package/dist/components/chat/components/duo_chat_message_tool_approval/components/issuable_tool_params.js +116 -0
  5. package/dist/components/chat/components/duo_chat_message_tool_approval/components/run_command_tool_params.js +45 -5
  6. package/dist/components/chat/components/duo_chat_message_tool_approval/message_tool_approval.js +67 -20
  7. package/dist/components/chat/constants.js +12 -1
  8. package/dist/components/chat/mock_data.js +77 -1
  9. package/dist/components.css +1 -1
  10. package/dist/components.css.map +1 -1
  11. package/dist/tailwind.css +1 -1
  12. package/dist/tailwind.css.map +1 -1
  13. package/package.json +2 -2
  14. package/src/components/chat/components/duo_chat_message/message_types/message_tool.vue +23 -11
  15. package/src/components/chat/components/duo_chat_message_tool_approval/components/base_tool_params.vue +55 -0
  16. package/src/components/chat/components/duo_chat_message_tool_approval/components/issuable_tool_params.vue +112 -0
  17. package/src/components/chat/components/duo_chat_message_tool_approval/components/run_command_tool_params.vue +51 -6
  18. package/src/components/chat/components/duo_chat_message_tool_approval/message_tool_approval.vue +97 -22
  19. package/src/components/chat/constants.js +12 -0
  20. package/src/components/chat/mock_data.js +80 -0
  21. package/translations.js +24 -7
  22. package/dist/components/chat/components/duo_chat_message_tool_approval/components/create_issue_tool_params.js +0 -88
  23. package/dist/components/chat/components/duo_chat_message_tool_approval/components/create_merge_request_tool_params.js +0 -83
  24. package/src/components/chat/components/duo_chat_message_tool_approval/components/create_issue_tool_params.vue +0 -80
  25. package/src/components/chat/components/duo_chat_message_tool_approval/components/create_merge_request_tool_params.vue +0 -74
@@ -1,80 +0,0 @@
1
- <script>
2
- import { GlSprintf, GlAccordion, GlAccordionItem } from '@gitlab/ui';
3
- import { translate } from '../../../../../utils/i18n';
4
- import PreBlock from './pre_block.vue';
5
-
6
- export default {
7
- name: 'CreateIssueToolParams',
8
- components: {
9
- GlSprintf,
10
- GlAccordion,
11
- GlAccordionItem,
12
- PreBlock,
13
- },
14
- props: {
15
- projectId: {
16
- type: [String, Number],
17
- required: true,
18
- },
19
- projectPath: {
20
- type: String,
21
- required: false,
22
- default: '',
23
- },
24
- title: {
25
- type: String,
26
- required: true,
27
- },
28
- description: {
29
- type: String,
30
- required: true,
31
- },
32
- labels: {
33
- type: String,
34
- required: false,
35
- default: '',
36
- },
37
- },
38
- computed: {
39
- issueMessage() {
40
- const baseMessage = this.$options.i18n.ISSUE_SUMMARY_MESSAGE_BASE;
41
- const labelsMessage = this.$options.i18n.ISSUE_SUMMARY_MESSAGE_WITH_LABELS;
42
-
43
- return this.labels ? `${baseMessage} ${labelsMessage}` : baseMessage;
44
- },
45
- },
46
- i18n: {
47
- ISSUE_SUMMARY_MESSAGE_BASE: translate(
48
- 'CreateIssueToolParams.ISSUE_SUMMARY_MESSAGE_BASE',
49
- 'Open an issue with title "%{title}" in project %{project}.'
50
- ),
51
- ISSUE_SUMMARY_MESSAGE_WITH_LABELS: translate(
52
- 'CreateIssueToolParams.ISSUE_SUMMARY_MESSAGE_WITH_LABELS',
53
- 'Assign the labels %{labels}.'
54
- ),
55
- ACCORDION_TITLE: translate('CreateIssueToolParams.ACCORDION_TITLE', 'Read description'),
56
- },
57
- };
58
- </script>
59
- <template>
60
- <div class="gl-flex gl-flex-col">
61
- <div>
62
- <gl-sprintf :message="issueMessage">
63
- <template #title>
64
- <em>{{ title }}</em>
65
- </template>
66
- <template #project>
67
- <code>{{ projectPath || projectId }}</code>
68
- </template>
69
- <template #labels>
70
- <code>{{ labels }}</code>
71
- </template>
72
- </gl-sprintf>
73
- </div>
74
- <gl-accordion class="-gl-ml-2 gl-mt-3" :header-level="3">
75
- <gl-accordion-item :title="$options.i18n.ACCORDION_TITLE">
76
- <pre-block>{{ description }}</pre-block>
77
- </gl-accordion-item>
78
- </gl-accordion>
79
- </div>
80
- </template>
@@ -1,74 +0,0 @@
1
- <script>
2
- import { GlSprintf, GlAccordion, GlAccordionItem } from '@gitlab/ui';
3
- import { translate } from '../../../../../utils/i18n';
4
- import PreBlock from './pre_block.vue';
5
-
6
- export default {
7
- name: 'CreateMergeRequestToolParams',
8
- components: {
9
- GlSprintf,
10
- GlAccordion,
11
- GlAccordionItem,
12
- PreBlock,
13
- },
14
- props: {
15
- projectId: {
16
- type: [String, Number],
17
- required: true,
18
- },
19
- projectPath: {
20
- type: String,
21
- required: false,
22
- default: '',
23
- },
24
- title: {
25
- type: String,
26
- required: true,
27
- },
28
- sourceBranch: {
29
- type: String,
30
- required: true,
31
- },
32
- targetBranch: {
33
- type: String,
34
- required: true,
35
- },
36
- description: {
37
- type: String,
38
- required: true,
39
- },
40
- },
41
- i18n: {
42
- MERGE_REQUEST_SUMMARY_MESSAGE: translate(
43
- 'CreateMergeRequestToolParams.MERGE_REQUEST_SUMMARY_MESSAGE',
44
- 'Open a merge request with title "%{title}" in project %{project} from branch %{sourceBranch} to branch %{targetBranch}.'
45
- ),
46
- ACCORDION_TITLE: translate('CreateMergeRequestToolParams.ACCORDION_TITLE', 'Read description'),
47
- },
48
- };
49
- </script>
50
- <template>
51
- <div class="gl-flex gl-flex-col">
52
- <div>
53
- <gl-sprintf :message="$options.i18n.MERGE_REQUEST_SUMMARY_MESSAGE">
54
- <template #title>
55
- <em>{{ title }}</em>
56
- </template>
57
- <template #project>
58
- <code>{{ projectPath || projectId }}</code>
59
- </template>
60
- <template #sourceBranch>
61
- <code>{{ sourceBranch }}</code>
62
- </template>
63
- <template #targetBranch>
64
- <code>{{ targetBranch }}</code>
65
- </template>
66
- </gl-sprintf>
67
- </div>
68
- <gl-accordion class="-gl-ml-2 gl-mt-3" :header-level="3">
69
- <gl-accordion-item :title="$options.i18n.ACCORDION_TITLE">
70
- <pre-block>{{ description }}</pre-block>
71
- </gl-accordion-item>
72
- </gl-accordion>
73
- </div>
74
- </template>