Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/Capabilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public function getCapabilities(): array {
$url = str_replace($this->urlGenerator->getBaseUrl(), '', $url);
$url = str_replace('123456789', '{fileId}', $url);
$endpoint = [
'name' => $this->l->t('Summarize'),
'name' => $this->l->t('Summarize using AI'),
'url' => $url,
'method' => 'POST',
'mimetype_filters' => implode(', ', $textMimeTypes),
Expand All @@ -121,7 +121,7 @@ public function getCapabilities(): array {
$url = str_replace($this->urlGenerator->getBaseUrl(), '', $url);
$url = str_replace('123456789', '{fileId}', $url);
$endpoint = [
'name' => $this->l->t('Transcribe audio'),
'name' => $this->l->t('Transcribe audio using AI'),
'url' => $url,
'method' => 'POST',
'mimetype_filters' => 'audio/',
Expand All @@ -139,7 +139,7 @@ public function getCapabilities(): array {
$url = str_replace($this->urlGenerator->getBaseUrl(), '', $url);
$url = str_replace('123456789', '{fileId}', $url);
$endpoint = [
'name' => $this->l->t('Text to speech'),
'name' => $this->l->t('Text-To-Speech using AI'),
'url' => $url,
'method' => 'POST',
'mimetype_filters' => implode(', ', $textMimeTypes),
Expand Down
5 changes: 1 addition & 4 deletions src/components/AssistantFormOutputs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@ export default {
return false
},
hasInitialOutput() {
if (typeof this.outputs?.output === 'string') {
return !!this.outputs.output?.trim()
}
return false
return Object.keys(this.outputs).filter(key => typeof this.outputs[key] !== 'undefined').length
},
},
}
Expand Down
3 changes: 2 additions & 1 deletion src/components/FilesNewMenu/GenerateImageDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
<NcDialog can-close
class="assistant__generate-image-dialog"
:close-on-click-outside="false"
:name="t('assistant', 'Generate new image')"
:name="t('assistant', 'Generate new image using AI')"
size="normal">
<template v-if="isFeatureAvailable">
<NcNoteCard type="info" :text="t('assistant', 'The result image would be placed in the current folder.')" />
<NcNoteCard type="warning" :text="t('assistant', 'The resulting images are generated by AI. Make sure to double-check and adjust.')" />
<form ref="form"
class="assistant__generate-image-dialog__form"
:aria-label="t('assistant', 'Generate new image')"
Expand Down
2 changes: 1 addition & 1 deletion src/components/FilesNewMenu/generateImageEntry.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const EntryId = 'assistant-generate-image'

export const entry = {
id: EntryId,
displayName: t('assistant', 'Generate image'),
displayName: t('assistant', 'Generate image using AI'),
iconSvgInline: Creation,
order: 100,
enabled() {
Expand Down
14 changes: 7 additions & 7 deletions src/files/fileActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function registerGroupAction(mimeTypes) {
const groupAction = new FileAction({
id: 'assistant-group',
displayName: (nodes) => {
return t('assistant', 'Assistant')
return t('assistant', 'AI Assistant')
},
enabled(nodes, view) {
return !actionIgnoreLists.includes(view.id)
Expand All @@ -44,7 +44,7 @@ function registerSummarizeAction() {
id: 'assistant-summarize',
parent: 'assistant-group',
displayName: (nodes) => {
return t('approval', 'Summarize')
return t('approval', 'Summarize using AI')
},
enabled(nodes, view) {
return !actionIgnoreLists.includes(view.id)
Expand All @@ -63,7 +63,7 @@ function registerSummarizeAction() {
try {
await axios.post(url)
showSuccess(
t('assistant', 'Summarization task submitted successfully.') + '\n'
t('assistant', 'Summarization AI task submitted successfully.') + '\n'
+ t('assistant', 'You will be notified when it is ready.') + '\n'
+ t('assistant', 'It can also be checked in the Assistant in the "Work with text -> Summarize" menu.'),
)
Expand All @@ -82,7 +82,7 @@ function registerTtsAction() {
id: 'assistant-tts',
parent: 'assistant-group',
displayName: (nodes) => {
return t('approval', 'Text to speech')
return t('assistant', 'Text-To-Speech using AI')
},
enabled(nodes, view) {
return !actionIgnoreLists.includes(view.id)
Expand All @@ -101,7 +101,7 @@ function registerTtsAction() {
try {
await axios.post(url)
showSuccess(
t('assistant', 'Text-to-speech task submitted successfully.') + '\n'
t('assistant', 'Text-to-Speech AI task submitted successfully.') + '\n'
+ t('assistant', 'You will be notified when it is ready.') + '\n'
+ t('assistant', 'It can also be checked in the Assistant in the "Work with audio -> Generate speech" menu.'),
)
Expand All @@ -120,7 +120,7 @@ function registerSttAction() {
id: 'assistant-stt',
parent: 'assistant-group',
displayName: (nodes) => {
return t('approval', 'Transcribe audio')
return t('assistant', 'Transcribe audio using AI')
},
enabled(nodes, view) {
return !actionIgnoreLists.includes(view.id)
Expand All @@ -139,7 +139,7 @@ function registerSttAction() {
try {
await axios.post(url)
showSuccess(
t('assistant', 'Transcription task submitted successfully.') + '\n'
t('assistant', 'Transcription AI task submitted successfully.') + '\n'
+ t('assistant', 'You will be notified when it is ready.') + '\n'
+ t('assistant', 'It can also be checked in the Assistant in the "Work with audio -> Transcribe audio" menu.'),
)
Expand Down