Skip to content

Commit f9cf8c7

Browse files
authored
chore(settings): Move settings into assistant section (#162)
* chore(settings): Move settings into assistant section Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz> * Nested settings Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz> * change to h3 Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz> --------- Signed-off-by: Lukas Schaefer <lukas@lschaefer.xyz>
1 parent ac0226f commit f9cf8c7

File tree

4 files changed

+16
-63
lines changed

4 files changed

+16
-63
lines changed

appinfo/info.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,5 @@ Refer to the [Context Chat Backend's readme](https://github.com/nextcloud/contex
6262

6363
<settings>
6464
<admin>OCA\ContextChat\Settings\AdminSettings</admin>
65-
<admin-section>OCA\ContextChat\Settings\AdminSection</admin-section>
6665
</settings>
6766
</info>

lib/Settings/AdminSection.php

Lines changed: 0 additions & 55 deletions
This file was deleted.

lib/Settings/AdminSettings.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public function getForm(): TemplateResponse {
9898
* @return string the section ID, e.g. 'sharing'
9999
*/
100100
public function getSection(): string {
101-
return 'context_chat';
101+
return 'ai';
102102
}
103103

104104
/**

src/components/ViewAdmin.vue

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@ SPDX-License-Identifier: AGPL-3.0-or-later
55

66
<template>
77
<div id="context_chat">
8-
<NcSettingsSection :name="t('context_chat', 'Status')">
8+
<NcSettingsSection :name="t('context_chat', 'Context Chat')">
9+
<h3>{{ t('context_chat', 'Indexing Status') }}</h3>
910
<NcNoteCard v-if="stats.initial_indexing_complete" show-alert type="success">
10-
{{ t('context_chat', 'The initial indexing run finished at: {date}.', {date: showDate(stats.intial_indexing_completed_at)}) }}
11+
{{
12+
t('context_chat', 'The initial indexing run finished at: {date}.', {date: showDate(stats.intial_indexing_completed_at)})
13+
}}
1114
</NcNoteCard>
1215
<NcNoteCard v-else type="warning">
1316
{{ t('context_chat', 'The initial indexing is still running.') }}
@@ -18,8 +21,15 @@ SPDX-License-Identifier: AGPL-3.0-or-later
1821
<NcNoteCard v-else type="warning">
1922
{{ t('context_chat', 'The Context Chat Backend app is not installed or not responsing.') }}
2023
</NcNoteCard>
21-
<NcNoteCard v-if="stats.initial_indexing_complete && stats.eligible_files_count > stats.vectordb_document_counts['files__default'] * 1.2" type="warning">
22-
{{ t('context_chat', 'Less files were indexed than expected. Only {percent}% files out of {eligibleCount} are in the VectorDB.', {percent: Math.round((stats.vectordb_document_counts['files__default'] / stats.eligible_files_count) * 100), eligibleCount: stats.eligible_files_count}) }}
24+
<NcNoteCard
25+
v-if="stats.initial_indexing_complete && stats.eligible_files_count > stats.vectordb_document_counts['files__default'] * 1.2"
26+
type="warning">
27+
{{
28+
t('context_chat', 'Less files were indexed than expected. Only {percent}% files out of {eligibleCount} are in the VectorDB.', {
29+
percent: Math.round((stats.vectordb_document_counts['files__default'] / stats.eligible_files_count) * 100),
30+
eligibleCount: stats.eligible_files_count
31+
})
32+
}}
2333
</NcNoteCard>
2434
<table>
2535
<thead>
@@ -47,8 +57,7 @@ SPDX-License-Identifier: AGPL-3.0-or-later
4757
<p>{{ t('context_chat', 'Eligible files for indexing: {count}', {count: stats.eligible_files_count}) }}</p>
4858
<p>{{ t('context_chat', 'Queued content update actions: {count}', {count: stats.queued_actions_count}) }}</p>
4959
<p>{{ t('context_chat', 'Queued File System events: {count}', {count: stats.queued_fs_events_count}) }}</p>
50-
</NcSettingsSection>
51-
<NcSettingsSection :name="t('context_chat', 'Context Chat Logs')">
60+
<h3>{{ t('context_chat', 'Download Logs') }}</h3>
5261
<div class="horizontal-flex">
5362
<NcButton :href="downloadURLNextcloudLogs">
5463
{{ t('context_chat', 'Download the PHP App logs') }}

0 commit comments

Comments
 (0)