-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/sw 63 - 링크 자동 분석 및 분류 #36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
341196e
chore: Spring AI 멀티 프로바이더 인프라 설정
jin2304 2043fab
feat(link-analysis): AI 링크 분석 백엔드 모듈 구현
jin2304 e5d77b8
feat(link-analysis): AI 링크 분석 프론트엔드 연동
jin2304 89cffef
style(ui): 폴더·링크 카드 색상 톤 조정
jin2304 a1e3ffb
Merge branch 'dev' of github.com:jin2304/SearchWeb_Spring into feat/S…
jin2304 702f7c1
refactor: config 패키지 구조 변경에 따른 import 경로 및 API 시그니처 수정
jin2304 e799a49
chore(security): 테스트 환경용 인증 우회 임시 코드 추가
jin2304 011004e
refactor(bookmark): 도메인 전용 예외 클래스(BookmarkException) 적용
jin2304 3a55a99
refactor(link-analysis): AI 분석 버튼 클릭 시 title·note 항상 최신값으로 갱신
jin2304 b747422
docs(backend): 도메인 전용 Exception 및 config 패키지 규칙 추가
jin2304 bc66852
security(link-analysis): SSRF 방어 및 프롬프트 인젝션 차단
jin2304 da61fab
refactor(link-analysis): DTO를 Requests/Responses로 분리
jin2304 89c54c4
feat(link-analysis): PageContent에 url 필드 추가 및 메타데이터 추출 개선
jin2304 6cc9f5d
fix(config): Groq 기본 활성화 및 AiConfig 개선
jin2304 610d5b4
fix(frontend): 재분석 시 AI 추천 초기화 및 접근성 개선
jin2304 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| import { useMutation } from '@tanstack/react-query'; | ||
| import { fetchClient } from './fetchClient'; | ||
| import type { LinkAnalysisResponse } from '@/lib/types/linkAnalysis'; | ||
|
|
||
| /** | ||
| * AI 링크 분석 (POST /api/link-analysis/analyze) | ||
| */ | ||
| async function analyzeLink(url: string): Promise<LinkAnalysisResponse> { | ||
| return fetchClient<LinkAnalysisResponse>('/api/link-analysis/analyze', { | ||
| method: 'POST', | ||
| body: JSON.stringify({ url }), | ||
| }); | ||
| } | ||
|
|
||
| /** | ||
| * [분석 Hook] AI로 링크를 분석하여 제목/설명/태그/폴더를 추천받습니다. | ||
| */ | ||
| export function useAnalyzeLink() { | ||
| return useMutation({ | ||
| mutationFn: analyzeLink, | ||
| }); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| export interface LinkAnalysisResponse { | ||
| title: string; | ||
| description: string | null; | ||
| suggestedTags: TagSuggestion[] | null; | ||
| suggestedFolder: FolderSuggestion | null; | ||
| } | ||
|
|
||
| export interface TagSuggestion { | ||
| tagName: string; | ||
| isExisting: boolean; | ||
| } | ||
|
|
||
| export interface FolderSuggestion { | ||
| memberFolderId: number | null; | ||
| folderName: string; | ||
| isExisting: boolean; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Lombok이 생성자 주입 시 필드의 @Qualifier 어노테이션을 생성자 파라미터로 복사하도록 설정. | ||
| lombok.copyableAnnotations += org.springframework.beans.factory.annotation.Qualifier |
17 changes: 17 additions & 0 deletions
17
src/main/java/com/web/SearchWeb/bookmark/error/BookmarkException.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| package com.web.SearchWeb.bookmark.error; | ||
|
|
||
| import com.web.SearchWeb.config.exception.BusinessException; | ||
| import com.web.SearchWeb.config.exception.ErrorCode; | ||
| import lombok.Getter; | ||
|
|
||
| @Getter | ||
| public class BookmarkException extends BusinessException { | ||
|
|
||
| private BookmarkException(ErrorCode errorCode) { | ||
| super(errorCode); | ||
| } | ||
|
|
||
| public static BookmarkException of(ErrorCode errorCode) { | ||
| return new BookmarkException(errorCode); | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
마크다운 포맷팅 수정 필요
헤딩 전후에 빈 줄이 필요합니다.
📝 수정 제안
- 예시: `linkanalysis` 도메인 → `LinkAnalysisException` + ## 6) Config 배치 규칙 - Config는 `config` 폴더 하위에 도메인 폴더를 만든 뒤 배치한다.🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 35-35: Headings should be surrounded by blank lines
Expected: 1; Actual: 0; Below
(MD022, blanks-around-headings)
🤖 Prompt for AI Agents