Skip to content

Commit

Permalink
Merge pull request #47710 from nextcloud/fix/settings/admin/textproce…
Browse files Browse the repository at this point in the history
…ssing2-stable30

[stable30] fix(settings): Don't display built-in task types in AI settings TextP…
  • Loading branch information
AndyScherzinger authored Sep 3, 2024
2 parents 6e98263 + 20cda48 commit 7f62397
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
13 changes: 7 additions & 6 deletions apps/settings/src/components/AdminAI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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))
Expand Down
4 changes: 2 additions & 2 deletions dist/settings-vue-settings-admin-ai.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/settings-vue-settings-admin-ai.js.map

Large diffs are not rendered by default.

0 comments on commit 7f62397

Please sign in to comment.