@windward/core 0.11.0 → 0.12.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 +3 -0
- package/components/Content/Blocks/Accordion.vue +3 -2
- package/components/Content/Blocks/ClickableIcons.vue +4 -0
- package/components/Content/Blocks/GenerateAIQuestionButton.vue +3 -2
- package/components/Content/Blocks/OpenResponse.vue +11 -1
- package/components/Content/Blocks/Tab.vue +2 -1
- package/components/utils/TinyMCEWrapper.vue +8 -0
- package/i18n/en-US/components/content/blocks/generate_questions.ts +11 -16
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -64,7 +64,9 @@
|
|
|
64
64
|
<ImageAssetViewer
|
|
65
65
|
v-if="
|
|
66
66
|
block.metadata.config.items[itemIndex]
|
|
67
|
-
.fileConfig.asset
|
|
67
|
+
.fileConfig.asset &&
|
|
68
|
+
block.metadata.config.items[itemIndex]
|
|
69
|
+
.fileConfig.asset.file_asset_id
|
|
68
70
|
"
|
|
69
71
|
v-model="
|
|
70
72
|
block.metadata.config.items[itemIndex]
|
|
@@ -245,7 +247,6 @@ export default {
|
|
|
245
247
|
default:
|
|
246
248
|
return 'flex-column '
|
|
247
249
|
}
|
|
248
|
-
|
|
249
250
|
},
|
|
250
251
|
getImageOrder(item) {
|
|
251
252
|
const margin = item.fileConfig.display?.margin
|
|
@@ -103,7 +103,8 @@ export default {
|
|
|
103
103
|
this.$emit('click:generate', generatedQuestion)
|
|
104
104
|
}
|
|
105
105
|
} catch (error) {
|
|
106
|
-
const
|
|
106
|
+
const errorMessage = error.response?.data?.error?.message || 'assessment.error.technical'
|
|
107
|
+
const errorType = errorMessage.split('.').pop()
|
|
107
108
|
const basePath = 'windward.core.components.content.blocks.generate_questions.error'
|
|
108
109
|
|
|
109
110
|
this.$dialog.error(
|
|
@@ -128,4 +129,4 @@ export default {
|
|
|
128
129
|
.btn-selector {
|
|
129
130
|
width: 100%;
|
|
130
131
|
}
|
|
131
|
-
</style>
|
|
132
|
+
</style>
|
|
@@ -49,7 +49,11 @@
|
|
|
49
49
|
}}
|
|
50
50
|
</p>
|
|
51
51
|
<v-alert color="light-blue lighten-4">
|
|
52
|
-
<TextViewer
|
|
52
|
+
<TextViewer
|
|
53
|
+
v-model="response"
|
|
54
|
+
:height="200"
|
|
55
|
+
class="alert-text"
|
|
56
|
+
></TextViewer>
|
|
53
57
|
</v-alert>
|
|
54
58
|
<div v-if="block.metadata.config.sample_response">
|
|
55
59
|
<p>
|
|
@@ -63,6 +67,7 @@
|
|
|
63
67
|
<TextViewer
|
|
64
68
|
v-model="block.metadata.config.sample_response"
|
|
65
69
|
:height="200"
|
|
70
|
+
class="alert-text"
|
|
66
71
|
></TextViewer>
|
|
67
72
|
</v-alert>
|
|
68
73
|
</div>
|
|
@@ -192,3 +197,8 @@ export default {
|
|
|
192
197
|
},
|
|
193
198
|
}
|
|
194
199
|
</script>
|
|
200
|
+
<style scoped>
|
|
201
|
+
.alert-text {
|
|
202
|
+
color: black !important;
|
|
203
|
+
}
|
|
204
|
+
</style>
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
<label v-if="label" class="editor-label">{{ label }}</label>
|
|
12
12
|
</slot>
|
|
13
13
|
<Editor
|
|
14
|
+
ref="editor"
|
|
14
15
|
:id="editorId"
|
|
15
16
|
:key="seed + (isDarkTheme ? '-theme-dark' : '-theme-light')"
|
|
16
17
|
v-model="text"
|
|
@@ -468,6 +469,13 @@ export default {
|
|
|
468
469
|
},
|
|
469
470
|
|
|
470
471
|
methods: {
|
|
472
|
+
getEditor() {
|
|
473
|
+
if (this.$refs.editor && this.$refs.editor.editor) {
|
|
474
|
+
return this.$refs.editor.editor
|
|
475
|
+
} else {
|
|
476
|
+
return null
|
|
477
|
+
}
|
|
478
|
+
},
|
|
471
479
|
read() {
|
|
472
480
|
if (this.paused) {
|
|
473
481
|
this.resume()
|
|
@@ -1,25 +1,20 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
error: {
|
|
3
3
|
default: 'Could not generate question from provided content.',
|
|
4
|
-
default_support:
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
default_support: 'Please try again or contact support if the issue persists.',
|
|
5
|
+
|
|
7
6
|
insufficient_content: 'More content needed to generate questions.',
|
|
8
|
-
insufficient_content_support:
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
"The current content isn't suitable for this type of question. Consider adding more specific examples or comparable items.",
|
|
14
|
-
|
|
7
|
+
insufficient_content_support: 'Please add more text, examples, or explanations to this section. We recommend at least 2-3 paragraphs of content.',
|
|
8
|
+
|
|
9
|
+
content_mismatch: 'Content doesn\'t match question type.',
|
|
10
|
+
content_mismatch_support: 'The current content isn\'t suitable for this type of question. Consider adding more specific examples or comparable items.',
|
|
11
|
+
|
|
15
12
|
llm_unavailable: 'Question generation temporarily unavailable.',
|
|
16
|
-
llm_unavailable_support:
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
llm_unavailable_support: 'We\'re unable to connect to our AI service at the moment. Please try again in a few minutes.',
|
|
14
|
+
|
|
19
15
|
technical: 'Unable to process request.',
|
|
20
|
-
technical_support:
|
|
21
|
-
'Something went wrong. Please try again or contact support if this continues.',
|
|
16
|
+
technical_support: 'Something went wrong. Please try again or contact support if this continues.'
|
|
22
17
|
},
|
|
23
18
|
button_label: 'Generate Question',
|
|
24
|
-
selected_pages: 'Selected Page'
|
|
19
|
+
selected_pages: 'Selected Page'
|
|
25
20
|
}
|