Feature/diff visualization#12
Merged
Merged
Conversation
- !diff 명령어: git diff를 이미지로 렌더링하여 Discord에 표시 - diff2html + puppeteer로 Fork/SourceTree 스타일의 diff 이미지 생성 - 초록/빨강 배경으로 추가/삭제 라인 시각화 - 민감 파일 필터링 (.env, credentials 등) 주요 파일: - src/utils/gitDiff.ts: Git diff 실행 및 파싱 - src/utils/diffRenderer.ts: diff → HTML → PNG 변환 - src/commands/diff.ts: !diff, !d, !changes 명령어 사용법: - !diff 전체 변경사항 - !diff --staged 스테이징된 변경사항만 - !diff <file> 특정 파일만 - !diff HEAD~1 이전 커밋과 비교 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- 첫 실행 시 Chromium이 없으면 자동으로 다운로드 - @puppeteer/browsers를 사용하여 chrome-headless-shell 설치 - 설치 경로: exe와 같은 폴더의 .chromium/ - Puppeteer 캐시 폴더도 확인하여 중복 다운로드 방지 - .gitignore에 .chromium/ 추가 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
# Conflicts: # .gitignore # src/bot.ts
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
/diff슬래시 커맨드로 Git 변경사항을 이미지로 시각화주요 변경사항
src/slashCommands/diff.ts/diff슬래시 커맨드 구현src/utils/diffRenderer.tssrc/utils/puppeteerSetup.ts.gitignore.chromium/폴더 제외사용 방법
!diff# staged 변경사항!diff unstaged# unstaged 변경사항!diff all# 모든 변경사항!diff HEAD~3# 최근 3개 커밋Test Plan
/diff명령어로 staged 변경사항 이미지 생성 확인참고
.chromium/에 설치됨 (~200MB)