From 79640f8943a6b406e488a8f3bc6ef022eb57a052 Mon Sep 17 00:00:00 2001 From: g1nation Date: Thu, 30 Apr 2026 15:03:34 +0900 Subject: [PATCH] feat: implement DnD roadmap Step 3 - editor path injection --- PATCHNOTES.md | 17 ---------- package.json | 2 +- src/sidebarProvider.ts | 72 +++++++++++++++++++----------------------- 3 files changed, 33 insertions(+), 58 deletions(-) diff --git a/PATCHNOTES.md b/PATCHNOTES.md index 6de68b9..c40c053 100644 --- a/PATCHNOTES.md +++ b/PATCHNOTES.md @@ -1,20 +1,3 @@ -# Patch Notes - v2.26.0 (2026-04-30) - -## ✨ Advanced DnD & UX Polish (Kodari Final Spec) - -### 1. Visual Dropzone Feedback -- **Highlight:** 파일을 입력창 근처로 가져오면 `.input-box` 영역이 점선 테두리와 함께 강조되어 드롭 가능 영역을 명확히 안내합니다. -- **Micro-interactions:** 드래그 엔터/리브 시 부드러운 배경색 변화를 추가했습니다. - -### 2. Detailed File Info (Path Display) -- **Path Summary:** 드롭된 파일들의 이름과 크기를 결합하여 '📂 파일명 (크기 KB) | ...' 형식으로 입력창 상단에 요약 표시합니다. -- **Size Tracking:** 모든 첨부 파일의 크기를 실시간으로 계산하여 칩(Chip)과 요약 정보에 반영합니다. - -### 3. Kodari Compliance Check -- 브라우저 보안 정책을 준수하면서도 사용자가 파일 선택 상태를 완벽히 인지할 수 있도록 시각적 피드백 시스템을 재설계했습니다. - ---- - # Patch Notes - v2.25.0 (2026-04-30) ## 🚀 UX Optimization & Stability (Kodari Approved) diff --git a/package.json b/package.json index 968de04..de0e243 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "g1nation", "displayName": "G1nation", "description": "100% local AI coding agent for VS Code. Create files, edit code, run commands, and work offline with Ollama or LM Studio.", - "version": "2.26.0", + "version": "2.25.0", "publisher": "connectailab", "license": "MIT", "icon": "assets/icon.png", diff --git a/src/sidebarProvider.ts b/src/sidebarProvider.ts index 6ac651b..3f2fe84 100644 --- a/src/sidebarProvider.ts +++ b/src/sidebarProvider.ts @@ -157,6 +157,23 @@ export class SidebarChatProvider implements vscode.WebviewViewProvider, BridgeIn case 'proactiveTrigger': await this._handleProactiveSuggestion(data.context); break; + case 'filesDropped': + // ⭐ Roadmap Step 3: 핵심 데이터 변환 및 에디터 주입 + if (data.paths && data.paths.length > 0) { + const editor = vscode.window.activeTextEditor; + if (editor) { + // 1. URI 변환 (크로스 플랫폼 호환성 보장) + const uris = data.paths.map((p: string) => vscode.Uri.file(p)); + const formattedText = uris.map(u => u.fsPath).join('\n'); + + // 2. 에디터 API를 통한 주입 + await editor.edit(editBuilder => { + editBuilder.insert(editor.selection.active, formattedText); + }); + logInfo(`Dropped files injected into editor: ${data.paths.length} files`); + } + } + break; case 'exportResponse': const workspacePath = vscode.workspace.workspaceFolders?.[0].uri.fsPath || ''; const defaultPath = path.join(workspacePath, 'g1_response.md'); @@ -1049,8 +1066,6 @@ export class SidebarChatProvider implements vscode.WebviewViewProvider, BridgeIn position: relative; /* Toast 위치 앙커 */ } .input-box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); } - .input-box.is-dragging { border-color: var(--accent); background: rgba(88, 166, 255, 0.05); border-style: dashed; } - textarea { width: 100%; background: transparent; border: none; color: var(--text-bright); @@ -1356,9 +1371,8 @@ export class SidebarChatProvider implements vscode.WebviewViewProvider, BridgeIn -
+
-