From a8fdcc43c0693cf74851b3fe189323ffcaa401f8 Mon Sep 17 00:00:00 2001 From: ShaerWare Date: Wed, 25 Mar 2026 22:07:26 +0500 Subject: [PATCH] feat: Google Drive RAG management UI in Wiki page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Added tabs: Documents + Google Drive in Wiki/Knowledge view - Drive tab: create projects, browse folders, sync, delete - Drive picker with breadcrumb navigation and search - Project cards show status, file count, size, last sync time - Auto-refresh every 10s to track sync progress ## NEWS 🗂️ **Управление Google Диском в базе знаний!** В разделе Wiki появилась новая вкладка "Google Drive". Подключайте папки с Диска как источники для базы знаний — документы и таблицы автоматически индексируются, и ассистент сможет находить информацию из ваших файлов. Co-Authored-By: Claude Opus 4.6 --- admin/src/api/google.ts | 30 +++ admin/src/views/FaqView.vue | 399 ++++++++++++++++++++++++++++++++---- 2 files changed, 392 insertions(+), 37 deletions(-) diff --git a/admin/src/api/google.ts b/admin/src/api/google.ts index 5fbb4158..71d765ba 100644 --- a/admin/src/api/google.ts +++ b/admin/src/api/google.ts @@ -65,4 +65,34 @@ export const googleApi = { `/admin/google/drive/file/${fileId}/content?${params}` ) }, + + // Drive RAG projects + driveRagProjects: () => + api.get('/admin/google-drive/projects'), + + createDriveRagProject: (data: { name: string; folder_id: string; folder_name?: string }) => + api.post('/admin/google-drive/projects', data), + + syncDriveRagProject: (id: number) => + api.post<{ status: string }>(`/admin/google-drive/projects/${id}/sync`), + + deleteDriveRagProject: (id: number) => + api.delete<{ status: string }>(`/admin/google-drive/projects/${id}`), +} + +export interface GoogleDriveProject { + id: number + name: string + user_id: number + folder_id: string + folder_name: string | null + collection_id: number | null + sync_status: string + sync_error: string | null + last_synced: string | null + file_count: number + total_size_bytes: number + workspace_id: number + created: string | null + updated: string | null } diff --git a/admin/src/views/FaqView.vue b/admin/src/views/FaqView.vue index 13360572..2ce88375 100644 --- a/admin/src/views/FaqView.vue +++ b/admin/src/views/FaqView.vue @@ -1,33 +1,38 @@ @@ -76,13 +220,30 @@ watch(selectedDocId, () => {

{{ t('wiki.title') }}

- - ({{ documents.length }}) -
- -
+ +
+ + +
+ + +
-
@@ -102,26 +262,19 @@ watch(selectedDocId, () => { />
- -
{{ t('wiki.loading') }}
-
{{ t('wiki.noPages') }}
-

{{ selectedDoc?.title }}

- -
@@ -164,7 +308,6 @@ watch(selectedDocId, () => {
-
+ + +
+ +
+ +

Подключите Google аккаунт в настройках для работы с Drive

+ Перейти в настройки +
+ + + +