Skip to content

[Final - swk] Claude Lens: macOS AI Overlay Assistant#68

Open
swkim9111 wants to merge 13 commits into
mainfrom
final-swk
Open

[Final - swk] Claude Lens: macOS AI Overlay Assistant#68
swkim9111 wants to merge 13 commits into
mainfrom
final-swk

Conversation

@swkim9111

Copy link
Copy Markdown

Summary

  • Claude Lens — macOS 네이티브 오버레이 AI 어시스턴트 (Swift 6 + SwiftUI + SwiftData)
  • 글로벌 단축키로 텍스트/스크린샷 캡처 → Claude API 스트리밍 응답
  • MVVM + Protocol-based DI 아키텍처, 52개 유닛 테스트
  • Multi-Agent Pipeline 개발 (Architecture Reviewer → Feature Implementer → Test Writer → Code Refactor)

Key Features

  • Text Quick Capture (Cmd+Shift+L) & Screenshot Capture (Cmd+Ctrl+Shift+4)
  • 4가지 응답 모드: 자유 질문, 번역, 설명, 코드 분석
  • Tool Use: fetch_url, web_search, dictionary
  • SSE 스트리밍 + Markdown 렌더링
  • Onboarding, Token Tracking, Keychain API Key 저장

Performance Fixes

  • 스트리밍 토큰 업데이트 50ms throttle (CPU 100% → ~10-20%)
  • sortedMessages 캐싱으로 ForEach 재평가 방지
  • MarkdownUI 스트리밍 중 plain text 렌더링 (메모리 누수 수정)
  • screencapture Task.detached + 중복 실행 가드

Test plan

  • 앱 빌드 및 온보딩 플로우 확인
  • 텍스트/스크린샷 캡처 단축키 동작 확인
  • 스트리밍 응답 시 CPU/메모리 사용량 확인
  • Tool Use (web search, fetch url, dictionary) 동작 확인
  • 유닛 테스트 통과 확인

🤖 Generated with Claude Code

swkim9111 and others added 13 commits April 6, 2026 10:52
- PLAN.md: Claude Lens macOS overlay app feature specification
  (Quick Capture, streaming, response modes, onboarding wizard, settings)
- CLAUDE.md: Project-specific dev guide for Swift/SwiftUI/MVVM
- 4 agents reconfigured for Swift/macOS development
  (architecture-reviewer, feature-implementer, test-writer, code-refactor)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add usage instructions for XcodeBuildMCP, SwiftUI Expert,
Swift Concurrency, Swift Testing Expert, Swift LSP, and
Oh My Claude Code plugins with per-agent usage rules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Complete implementation of Claude Lens — a macOS native menu bar overlay app
that captures text/screenshots via global hotkeys and sends them to Claude API
for translation/explanation with streaming responses.

Features:
- MVVM architecture with Protocol-based DI (ServiceContainer)
- SwiftUI overlay panel (NSPanel) with menu bar integration
- Claude API streaming (SSE) with token counting
- Global hotkeys: ⌘+⇧+L (text capture), ⌘+⌃+⇧+4 (screenshot)
- SwiftData persistence for sessions and messages
- Keychain-based API key storage
- MarkdownUI for rich response rendering
- Onboarding flow with accessibility/screen recording permissions
- Multi-session support with sidebar navigation
- Image attachment support via clipboard

Includes unit tests (52 tests) for ViewModels and Services,
Protocol definitions for testability, and ARCHITECTURE.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove tracked xcuserdata and Package.resolved files
that should not be version controlled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add comprehensive README with features, architecture, setup guide
- Show overlay window automatically when app starts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add custom app icon (purple magnifying glass + sparkles)
- Fix onboarding completion by extracting RootView with @Environment(AppState.self)
- Reorder onboarding: Welcome → Permissions → API Key → Ready
- Add build/ to .gitignore

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Claude API Tool Use integration enabling three tools:
- fetch_url: fetch and parse web page content (HTML→text, 10K char limit)
- web_search: DuckDuckGo HTML search with result parsing (top 8)
- dictionary: English word lookup via DictionaryAPI.dev (definitions, pronunciation, examples)

Streaming handles tool_use content blocks, fetches results,
and re-sends tool_result for Claude to generate final response.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ortcuts

- Add detailed DMG installation instructions with Gatekeeper bypass
- Add source build option as alternative
- Fix screenshot shortcut in onboarding: ⌘+⇧+K → ⌘+⌃+⇧+4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Render plain text during streaming, Markdown only after completion
- Remove per-token scroll observer, use defaultScrollAnchor instead
- Add Message.isStreaming transient flag for render mode switching
- Run screencapture in Task.detached to avoid main thread blocking
- Fix screenshot shortcut in Settings: ⌘+⇧+K → ⌘+⌃+⇧+4

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add isCapturingScreenshot guard to prevent concurrent captures
- Remove image fallback from text capture hotkey to avoid stale clipboard images

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Throttle SwiftData model updates to 50ms intervals and cache
sortedMessages array to prevent excessive SwiftUI re-renders.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant