Merge pull request #47710 from nextcloud/fix/settings/admin/textprocessing2-stable30

[stable30] fix(settings): Don't display built-in task types in AI settings TextP…
This commit is contained in:
Andy Scherzinger 2024-09-03 16:45:20 +02:00 committed by GitHub
commit 7f62397f63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 9 deletions

View file

@ -90,9 +90,10 @@
<p>&nbsp;</p>
</div>
</template>
<template v-if="!hasTextProcessing">
<template v-if="tpTaskTypes.length === 0">
<NcNoteCard type="info">
{{ t('settings', 'None of your currently installed apps provide Text processing functionality') }}
<!-- TRANSLATORS Text processing is the name of a Nextcloud-internal API -->
{{ t('settings', 'None of your currently installed apps provide custom Text processing functionality.') }}
</NcNoteCard>
</template>
</NcSettingsSection>
@ -149,10 +150,10 @@ export default {
},
tpTaskTypes() {
const builtinTextProcessingTypes = [
'\\OCP\\TextProcessing\\FreePromptTaskType',
'\\OCP\\TextProcessing\\HeadlineTaskType',
'\\OCP\\TextProcessing\\SummaryTaskType',
'\\OCP\\TextProcessing\\TopicsTaskType',
'OCP\\TextProcessing\\FreePromptTaskType',
'OCP\\TextProcessing\\HeadlineTaskType',
'OCP\\TextProcessing\\SummaryTaskType',
'OCP\\TextProcessing\\TopicsTaskType',
]
return Object.keys(this.settings['ai.textprocessing_provider_preferences'])
.filter(type => !!this.getTextProcessingTaskType(type))

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long