Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
fix(taskprocessing): move LAZY_CONFIG_KEYS constant to the private na…
…mespace

Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed Aug 4, 2025
commit be7ef439cf92a1447c99727f47be009e7540556d
2 changes: 1 addition & 1 deletion apps/settings/lib/Controller/AISettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function update($settings) {
if (!isset($settings[$key])) {
continue;
}
$this->appConfig->setValueString('core', $key, json_encode($settings[$key]), lazy: in_array($key, \OCP\TaskProcessing\IManager::LAZY_CONFIG_KEYS, true));
$this->appConfig->setValueString('core', $key, json_encode($settings[$key]), lazy: in_array($key, \OC\TaskProcessing\Manager::LAZY_CONFIG_KEYS, true));
}

return new DataResponse();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public function getForm() {
];
foreach ($settings as $key => $defaultValue) {
$value = $defaultValue;
$json = $this->appConfig->getValueString('core', $key, '', lazy: in_array($key, \OCP\TaskProcessing\IManager::LAZY_CONFIG_KEYS, true));
$json = $this->appConfig->getValueString('core', $key, '', lazy: in_array($key, \OC\TaskProcessing\Manager::LAZY_CONFIG_KEYS, true));
if ($json !== '') {
try {
$value = json_decode($json, true, flags: JSON_THROW_ON_ERROR);
Expand Down
5 changes: 5 additions & 0 deletions lib/private/TaskProcessing/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ class Manager implements IManager {
public const LEGACY_PREFIX_TEXTTOIMAGE = 'legacy:TextToImage:';
public const LEGACY_PREFIX_SPEECHTOTEXT = 'legacy:SpeechToText:';

public const LAZY_CONFIG_KEYS = [
'ai.taskprocessing_type_preferences',
'ai.taskprocessing_provider_preferences',
];

/** @var list<IProvider>|null */
private ?array $providers = null;

Expand Down
10 changes: 0 additions & 10 deletions lib/public/TaskProcessing/IManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@
*/
interface IManager {

/**
* Task processing config keys that can be stored and loaded lazily
*
* @since 32.0.0
*/
public const LAZY_CONFIG_KEYS = [
'ai.taskprocessing_type_preferences',
'ai.taskprocessing_provider_preferences',
];

/**
* @since 30.0.0
*/
Expand Down
Loading