@innovastudio/contentbox 1.5.60 → 1.5.61
Sign up to get free protection for your applications and to get access to all the features.
package/package.json
CHANGED
@@ -115741,6 +115741,16 @@ class Command {
|
|
115741
115741
|
if (activeSection.classList.contains('is-box')) sectionBox = true; // A single box section
|
115742
115742
|
}
|
115743
115743
|
|
115744
|
+
if (!activeBox) {
|
115745
|
+
this.builder.selectSection();
|
115746
|
+
activeBox = this.builder.activeBox;
|
115747
|
+
activeSection = this.builder.activeSection;
|
115748
|
+
|
115749
|
+
if (activeSection) {
|
115750
|
+
if (activeSection.classList.contains('is-box')) sectionBox = true; // A single box section
|
115751
|
+
}
|
115752
|
+
}
|
115753
|
+
|
115744
115754
|
if (this.builder.enableShortCommands) {
|
115745
115755
|
// Process Short Commands
|
115746
115756
|
question = this.builder.editor.lib.processShortCommand(question); // Process the shortCommandList
|
@@ -116624,6 +116634,7 @@ ${currentHtml}`;
|
|
116624
116634
|
|
116625
116635
|
processPrompt(intent, question) {
|
116626
116636
|
const activeBox = this.builder.activeBox;
|
116637
|
+
if (!activeBox) return question;
|
116627
116638
|
|
116628
116639
|
const selectElement = row => {
|
116629
116640
|
if (!row) return;
|
@@ -118306,7 +118317,9 @@ ${currentHtml}`;
|
|
118306
118317
|
|
118307
118318
|
if (data.error) {
|
118308
118319
|
// Error response from OpenAI goes here.
|
118309
|
-
console.log('Error:\n' + data.error);
|
118320
|
+
console.log('Error:\n' + data.error); // ex. wrong API Key => Request failed with status code 401
|
118321
|
+
|
118322
|
+
this.builder.showMessage(out('Request failed.'));
|
118310
118323
|
this.dictation.finish(); // Must be called after finished
|
118311
118324
|
|
118312
118325
|
return;
|
@@ -118367,6 +118380,8 @@ ${currentHtml}`;
|
|
118367
118380
|
const data = await response.text();
|
118368
118381
|
console.log('Response:\n' + data); // Shows code error
|
118369
118382
|
}
|
118383
|
+
|
118384
|
+
this.builder.showMessage(out('Service Unavailable.'));
|
118370
118385
|
}
|
118371
118386
|
}
|
118372
118387
|
}
|