Skip to content

Commit 93b8ef5

Browse files
committed
feat: More warnings about AI
* Files:GenerateImage dialog * All web file actions * All file client-side actions * All task types that were previously lacking a warning Signed-off-by: Marcel Klehr <mklehr@gmx.net>
1 parent d0c4f7c commit 93b8ef5

5 files changed

Lines changed: 14 additions & 16 deletions

File tree

lib/Capabilities.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public function getCapabilities(): array {
103103
$url = str_replace($this->urlGenerator->getBaseUrl(), '', $url);
104104
$url = str_replace('123456789', '{fileId}', $url);
105105
$endpoint = [
106-
'name' => $this->l->t('Summarize'),
106+
'name' => $this->l->t('Summarize using AI'),
107107
'url' => $url,
108108
'method' => 'POST',
109109
'mimetype_filters' => implode(', ', $textMimeTypes),
@@ -121,7 +121,7 @@ public function getCapabilities(): array {
121121
$url = str_replace($this->urlGenerator->getBaseUrl(), '', $url);
122122
$url = str_replace('123456789', '{fileId}', $url);
123123
$endpoint = [
124-
'name' => $this->l->t('Transcribe audio'),
124+
'name' => $this->l->t('Transcribe audio using AI'),
125125
'url' => $url,
126126
'method' => 'POST',
127127
'mimetype_filters' => 'audio/',
@@ -139,7 +139,7 @@ public function getCapabilities(): array {
139139
$url = str_replace($this->urlGenerator->getBaseUrl(), '', $url);
140140
$url = str_replace('123456789', '{fileId}', $url);
141141
$endpoint = [
142-
'name' => $this->l->t('Text to speech'),
142+
'name' => $this->l->t('Text-To-Speech using AI'),
143143
'url' => $url,
144144
'method' => 'POST',
145145
'mimetype_filters' => implode(', ', $textMimeTypes),

src/components/AssistantFormOutputs.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,7 @@ export default {
8888
return false
8989
},
9090
hasInitialOutput() {
91-
if (typeof this.outputs?.output === 'string') {
92-
return !!this.outputs.output?.trim()
93-
}
94-
return false
91+
return Object.keys(this.outputs).filter(key => typeof this.outputs[key] !== 'undefined').length
9592
},
9693
},
9794
}

src/components/FilesNewMenu/GenerateImageDialog.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,11 @@
77
<NcDialog can-close
88
class="assistant__generate-image-dialog"
99
:close-on-click-outside="false"
10-
:name="t('assistant', 'Generate new image')"
10+
:name="t('assistant', 'Generate new image using AI')"
1111
size="normal">
1212
<template v-if="isFeatureAvailable">
1313
<NcNoteCard type="info" :text="t('assistant', 'The result image would be placed in the current folder.')" />
14+
<NcNoteCard type="info" :text="t('assistant', 'This resulting images are generated by AI. Make sure to double-check and adjust.')" />
1415
<form ref="form"
1516
class="assistant__generate-image-dialog__form"
1617
:aria-label="t('assistant', 'Generate new image')"

src/components/FilesNewMenu/generateImageEntry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export const EntryId = 'assistant-generate-image'
1414

1515
export const entry = {
1616
id: EntryId,
17-
displayName: t('assistant', 'Generate image'),
17+
displayName: t('assistant', 'Generate image using AI'),
1818
iconSvgInline: Creation,
1919
order: 100,
2020
enabled() {

src/files/fileActions.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function registerGroupAction(mimeTypes) {
2121
const groupAction = new FileAction({
2222
id: 'assistant-group',
2323
displayName: (nodes) => {
24-
return t('assistant', 'Assistant')
24+
return t('assistant', 'AI Assistant')
2525
},
2626
enabled(nodes, view) {
2727
return !actionIgnoreLists.includes(view.id)
@@ -44,7 +44,7 @@ function registerSummarizeAction() {
4444
id: 'assistant-summarize',
4545
parent: 'assistant-group',
4646
displayName: (nodes) => {
47-
return t('approval', 'Summarize')
47+
return t('approval', 'Summarize using AI')
4848
},
4949
enabled(nodes, view) {
5050
return !actionIgnoreLists.includes(view.id)
@@ -63,7 +63,7 @@ function registerSummarizeAction() {
6363
try {
6464
await axios.post(url)
6565
showSuccess(
66-
t('assistant', 'Summarization task submitted successfully.') + '\n'
66+
t('assistant', 'Summarization AI task submitted successfully.') + '\n'
6767
+ t('assistant', 'You will be notified when it is ready.') + '\n'
6868
+ t('assistant', 'It can also be checked in the Assistant in the "Work with text -> Summarize" menu.'),
6969
)
@@ -82,7 +82,7 @@ function registerTtsAction() {
8282
id: 'assistant-tts',
8383
parent: 'assistant-group',
8484
displayName: (nodes) => {
85-
return t('approval', 'Text to speech')
85+
return t('assistant', 'Text-To-Speech using AI')
8686
},
8787
enabled(nodes, view) {
8888
return !actionIgnoreLists.includes(view.id)
@@ -101,7 +101,7 @@ function registerTtsAction() {
101101
try {
102102
await axios.post(url)
103103
showSuccess(
104-
t('assistant', 'Text-to-speech task submitted successfully.') + '\n'
104+
t('assistant', 'Text-to-Speech AI task submitted successfully.') + '\n'
105105
+ t('assistant', 'You will be notified when it is ready.') + '\n'
106106
+ t('assistant', 'It can also be checked in the Assistant in the "Work with audio -> Generate speech" menu.'),
107107
)
@@ -120,7 +120,7 @@ function registerSttAction() {
120120
id: 'assistant-stt',
121121
parent: 'assistant-group',
122122
displayName: (nodes) => {
123-
return t('approval', 'Transcribe audio')
123+
return t('assistant', 'Transcribe audio using AI')
124124
},
125125
enabled(nodes, view) {
126126
return !actionIgnoreLists.includes(view.id)
@@ -139,7 +139,7 @@ function registerSttAction() {
139139
try {
140140
await axios.post(url)
141141
showSuccess(
142-
t('assistant', 'Transcription task submitted successfully.') + '\n'
142+
t('assistant', 'Transcription AI task submitted successfully.') + '\n'
143143
+ t('assistant', 'You will be notified when it is ready.') + '\n'
144144
+ t('assistant', 'It can also be checked in the Assistant in the "Work with audio -> Transcribe audio" menu.'),
145145
)

0 commit comments

Comments
 (0)