From 0001915cfb9a97aba6e3bbb8cb1be29e406c1a8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Sun, 22 Feb 2026 23:12:49 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[ai-config]=20Notion=20API=20=EC=84=A4?= =?UTF-8?q?=EC=A0=95=20UI=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - AI 설정 페이지에 Notion 섹션 추가 (추가/수정/삭제) - AiConfig에 API_SERVICE_PROVIDERS 상수 분리 - Notion 전용 모달 (API 키, API 버전, 활성화) --- .../Controllers/System/AiConfigController.php | 8 + app/Models/System/AiConfig.php | 7 +- .../views/system/ai-config/index.blade.php | 229 ++++++++++++++++++ 3 files changed, 243 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/System/AiConfigController.php b/app/Http/Controllers/System/AiConfigController.php index b4a6f932..d927321e 100644 --- a/app/Http/Controllers/System/AiConfigController.php +++ b/app/Http/Controllers/System/AiConfigController.php @@ -34,10 +34,18 @@ public function index(Request $request): View|Response ->orderBy('name') ->get(); + // API 서비스 설정 (notion) + $apiServiceConfigs = AiConfig::whereIn('provider', AiConfig::API_SERVICE_PROVIDERS) + ->orderBy('provider') + ->orderByDesc('is_active') + ->orderBy('name') + ->get(); + return view('system.ai-config.index', [ 'configs' => $aiConfigs, 'aiConfigs' => $aiConfigs, 'storageConfigs' => $storageConfigs, + 'apiServiceConfigs' => $apiServiceConfigs, ]); } diff --git a/app/Models/System/AiConfig.php b/app/Models/System/AiConfig.php index 66f575ac..e47bab36 100644 --- a/app/Models/System/AiConfig.php +++ b/app/Models/System/AiConfig.php @@ -69,13 +69,18 @@ class AiConfig extends Model /** * AI Provider 목록 (GCS 제외) */ - public const AI_PROVIDERS = ['gemini', 'claude', 'openai', 'notion']; + public const AI_PROVIDERS = ['gemini', 'claude', 'openai']; /** * 스토리지 Provider 목록 */ public const STORAGE_PROVIDERS = ['gcs']; + /** + * API 서비스 Provider 목록 + */ + public const API_SERVICE_PROVIDERS = ['notion']; + /** * 활성화된 Gemini 설정 조회 */ diff --git a/resources/views/system/ai-config/index.blade.php b/resources/views/system/ai-config/index.blade.php index f5fa2de9..fcc17313 100644 --- a/resources/views/system/ai-config/index.blade.php +++ b/resources/views/system/ai-config/index.blade.php @@ -19,6 +19,7 @@ .provider-gemini { background: #e8f0fe; color: #1a73e8; } .provider-claude { background: #fef3e8; color: #d97706; } .provider-openai { background: #e8f8e8; color: #16a34a; } + .provider-notion { background: #f3f0ff; color: #7c3aed; } .status-badge { display: inline-flex; @@ -239,6 +240,79 @@ + + +
+
+
+ + + +

API 서비스 설정 (Notion)

+
+ +
+ +
+ @forelse($apiServiceConfigs as $config) +
+
+
+
+

{{ $config->name }}

+ Notion + + {{ $config->status_label }} + +
+
+

API 버전: {{ $config->model }}

+

API 키: {{ $config->masked_api_key }}

+ @if($config->description) +

설명: {{ $config->description }}

+ @endif +
+
+
+ + + +
+
+
+ @empty +
+ + + +

등록된 Notion 설정이 없습니다.

+

'Notion 설정 추가' 버튼을 클릭하여 Notion API를 등록하세요.

+
+ @endforelse +
+ + +
+

Notion API 사용 안내

+
    +
  • Notion 검색 기능(추가기능 > Notion 검색)에서 사용됩니다.
  • +
  • Notion Integrations에서 Internal Integration을 생성하고 API 키를 발급받으세요.
  • +
  • 검색할 페이지/데이터베이스에 Integration을 연결(Share)해야 합니다.
  • +
  • Gemini AI 설정이 활성화되어 있어야 검색어 정제 및 AI 답변이 동작합니다.
  • +
+
+
@@ -312,6 +386,60 @@ + + +