Skip to content

Commit 79519db

Browse files
author
rmmayo
committed
updated initial instructions. added props for generate/stop button and instructions placeholder
1 parent 3364bd1 commit 79519db

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

dashboard/src/common-components/utilities/learning-conent-gen/AiPromptDialog.vue

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,18 @@ const props = defineProps({
7070
type: String,
7171
default: 'Got it! I\'ll get started right away!'
7272
},
73+
instructionsPlaceholder: {
74+
type: String,
75+
default: 'Type Instructions Here'
76+
},
77+
sendButtonLabel: {
78+
type: String,
79+
default: 'Send'
80+
},
81+
stopButtonLabel: {
82+
type: String,
83+
default: 'Stop'
84+
},
7385
isValid: {
7486
type: Boolean,
7587
default: true
@@ -330,15 +342,15 @@ const finalMsgSeverity = (historyItem) => historyItem.failedToGenerate ? 'error'
330342
id="instructionsInputId"
331343
v-model="instructions"
332344
class="w-full"
333-
placeholder="Type Instructions Here"
345+
:placeholder="instructionsPlaceholder"
334346
:disabled="isGenerating"
335347
@keydown.enter="startGeneration"
336348
data-cy="instructionsInput"
337349
autofocus/>
338350
<div class="flex justify-end">
339351
<SkillsButton
340352
:icon="`fa-solid ${isGenerating ? 'fa-stop': 'fa-play'}`"
341-
:label="isGenerating ? 'Stop' : 'Send'"
353+
:label="isGenerating ? stopButtonLabel : sendButtonLabel"
342354
:severity="isGenerating ? 'warn' : 'success'"
343355
data-cy="sendAndStopBtn"
344356
@click="onStartStopBtn" />

dashboard/src/common-components/utilities/learning-conent-gen/GenerateQuizDialog2.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ const { values, meta, handleSubmit, isSubmitting, resetForm, setFieldValue, vali
6969
7070
const generateQuizFromDescription = (skillDescription) => {
7171
currentDescription.value = skillDescription
72-
const welcomeMsg = 'Hi there! I\'ll generate a quiz based on the existing skill instructions/description. Feel to type additional instructions for me or just click the Send button to get started?'
72+
const welcomeMsg = 'Hi there! I\'ll generate a quiz based on the *existing skill description*. Feel free to type additional instructions for me or just click the `Generate` button to get started'
7373
aiPromptDialogRef.value.addWelcomeMsg(welcomeMsg)
7474
}
7575
defineExpose({
@@ -293,6 +293,8 @@ const toggleEnableEditQuestions = ((id) => {
293293
:add-prefix-fn="handleAddPrefix"
294294
:generation-started-msg="'Generating a new quiz for this skill, please stand by...'"
295295
:use-generated-label="'Use Generated Quiz'"
296+
:instructions-placeholder="'Optional Additional Instructions Here'"
297+
:send-button-label="'Generate'"
296298
@use-generated="useGenerated"
297299
:community-value="communityValue"
298300
:is-valid="meta.valid"

0 commit comments

Comments
 (0)