How skye1349/obsidian-ai-translator works
AI Translation Assistant is an Obsidian plugin for contextual translation, bilingual note workflows, excerpts, and speech; the repository also contains substantial YouTube/local-video playback and video-chat capabilities. The principal reading workflow runs from Obsidian selection through translation orchestration and a configured AI backend, then returns translated text for display or insertion. Main excerpts establish several internal calls; README documents user-facing features whose specific implementation paths are not fully evidenced here, so uncertain feature wiring is omitted.
Main entry points: main.ts Plugin commands · video-chat-backend.ts Video chat backend · youtube.ts YouTube player · video-chat-panel.ts Video chat panel
Components 19
Reading and translation
- Plugin commands
src/main.ts - Document translation
src/document-translation.ts - Language rules
src/language.ts - Translation prompts
src/translation-prompts.ts - Shared memory
src/shared-memory.ts
AI services
- Economy models
src/economy-model.ts - Video chat backend
src/video-chat-backend.ts - Process runner
src/process-runner.ts - Claude arguments
src/claude-args.ts - AI provider
Video experience
- Web Viewer
src/web-viewer.ts - YouTube player
src/youtube.ts - Playback presentation
src/youtube-presentation.ts - Playback timing
src/youtube-timing.ts - Local video and captions
src/local-video.ts
Video chat
- Video chat context
src/video-chat.ts - Video chat panel
src/video-chat-panel.ts - Chat notes
src/video-chat-notes.ts
Other components
- Obsidian user
Connections 22
- Obsidian user → Plugin commands: invokes commands
README.md - Plugin commands → Document translation: parses translation
src/main.ts - Document translation → Language rules: uses language rules
src/document-translation.ts - Plugin commands → Process runner: resolves CLI
src/main.ts - Plugin commands → Web Viewer: polls viewer
src/main.ts - Plugin commands → YouTube player: manages playback
src/main.ts - Plugin commands → Local video and captions: captures frames
src/main.ts - YouTube player → Playback presentation: parses playback data
src/youtube.ts - YouTube player → Video chat panel: hosts panel
src/youtube.ts - YouTube player → Local video and captions: uses captions
src/youtube.ts - Video chat panel → Video chat context: builds chat context
src/video-chat-panel.ts - Video chat panel → Chat notes: exports notes
- Video chat context → YouTube player: uses video data
src/video-chat.ts - Plugin commands → Video chat backend: configures backend
src/main.ts - Video chat backend → Process runner: spawns process
src/video-chat-backend.ts - Video chat backend → Claude arguments: builds CLI args
src/video-chat-backend.ts - Video chat backend → Economy models: selects models
src/video-chat-backend.ts - Plugin commands → Translation prompts: uses prompts
src/main.ts - Plugin commands → Shared memory: uses translation memory
src/main.ts - Plugin commands → Economy models: selects models
src/main.ts - Plugin commands → AI provider: sends translation request
- Video chat backend → AI provider: requests chat answer