5
5
use OCA \Assistant \AppInfo \Application ;
6
6
use OCP \AppFramework \Http \TemplateResponse ;
7
7
use OCP \AppFramework \Services \IInitialState ;
8
- use OCP \IConfig ;
8
+ use OCP \IAppConfig ;
9
9
use OCP \Settings \ISettings ;
10
10
use OCP \TaskProcessing \IManager as ITaskProcessingManager ;
11
11
use OCP \TaskProcessing \TaskTypes \AudioToText ;
15
15
class Admin implements ISettings {
16
16
17
17
public function __construct (
18
- private IConfig $ config ,
18
+ private IAppConfig $ appConfig ,
19
19
private IInitialState $ initialStateService ,
20
20
private ITaskProcessingManager $ taskProcessingManager ,
21
21
) {
@@ -33,15 +33,15 @@ public function getForm(): TemplateResponse {
33
33
$ speechToTextAvailable = array_key_exists (AudioToText::ID , $ availableTaskTypes );
34
34
$ textToImageAvailable = array_key_exists (TextToImage::ID , $ availableTaskTypes );
35
35
36
- $ assistantEnabled = $ this ->config -> getAppValue (Application::APP_ID , 'assistant_enabled ' , '1 ' ) === '1 ' ;
36
+ $ assistantEnabled = $ this ->appConfig -> getValueString (Application::APP_ID , 'assistant_enabled ' , '1 ' ) === '1 ' ;
37
37
38
- $ freePromptPickerEnabled = $ this ->config -> getAppValue (Application::APP_ID , 'free_prompt_picker_enabled ' , '1 ' ) === '1 ' ;
39
- $ textToImagePickerEnabled = $ this ->config -> getAppValue (Application::APP_ID , 'text_to_image_picker_enabled ' , '1 ' ) === '1 ' ;
38
+ $ freePromptPickerEnabled = $ this ->appConfig -> getValueString (Application::APP_ID , 'free_prompt_picker_enabled ' , '1 ' ) === '1 ' ;
39
+ $ textToImagePickerEnabled = $ this ->appConfig -> getValueString (Application::APP_ID , 'text_to_image_picker_enabled ' , '1 ' ) === '1 ' ;
40
40
41
- $ speechToTextEnabled = $ this ->config -> getAppValue (Application::APP_ID , 'speech_to_text_picker_enabled ' , '1 ' ) === '1 ' ;
42
- $ chattyLLMUserInstructions = $ this ->config -> getAppValue (Application::APP_ID , 'chat_user_instructions ' , Application::CHAT_USER_INSTRUCTIONS );
43
- $ chattyLLMUserInstructionsTitle = $ this ->config -> getAppValue (Application::APP_ID , 'chat_user_instructions_title ' , Application::CHAT_USER_INSTRUCTIONS_TITLE );
44
- $ chattyLLMLastNMessages = (int ) $ this ->config -> getAppValue (Application::APP_ID , 'chat_last_n_messages ' , '10 ' );
41
+ $ speechToTextEnabled = $ this ->appConfig -> getValueString (Application::APP_ID , 'speech_to_text_picker_enabled ' , '1 ' ) === '1 ' ;
42
+ $ chattyLLMUserInstructions = $ this ->appConfig -> getValueString (Application::APP_ID , 'chat_user_instructions ' , Application::CHAT_USER_INSTRUCTIONS );
43
+ $ chattyLLMUserInstructionsTitle = $ this ->appConfig -> getValueString (Application::APP_ID , 'chat_user_instructions_title ' , Application::CHAT_USER_INSTRUCTIONS_TITLE );
44
+ $ chattyLLMLastNMessages = (int ) $ this ->appConfig -> getValueString (Application::APP_ID , 'chat_last_n_messages ' , '10 ' );
45
45
46
46
$ adminConfig = [
47
47
'text_processing_available ' => $ taskProcessingAvailable ,
0 commit comments