How ai-platon/teledrop works
TeleDrop is a macOS notch drop zone that turns dragged files, images, links, or text into messages or uploads to the user’s Telegram bot. The main workflow runs from drag-and-drop handling through upload state and file preparation to Telegram; setup, settings, notch placement, Coucou awareness, localization, and sound are supporting capabilities. Edges use the provided excerpts, source-index references, or README; unsampled internals are not assumed.
Main entry points: Model.swift Send state and progress · Telegram.swift Bot API client · Setup.swift Bot setup and settings UI · Island.swift Drop island and pasteboard
Components 18
Drop Interaction
- App and drag watcher
Sources/main.swift - Drop island and pasteboard
Sources/Island.swift
Upload Delivery
- Send state and progress
Sources/Model.swift - Zip and split files
Sources/Telegram.swift - Bot API client
Sources/Telegram.swift
Setup and Preferences
- Bot setup and settings UI
Sources/Setup.swift - Credentials and preferences
Sources/Settings.swift - Localization
Sources/Lang.swift
Notch Experience
- Island placement rules
Sources/Layout.swift - Coucou detection
Sources/Coucou.swift - Island progress display
Sources/Island.swift - UI sound effects
Sources/Sound.swift - Upload engine sound
Sources/Engine.swift - Mascot artwork
Sources/Mascot.swift
Other components
- Mac user
- Telegram Bot API
- Coucou
- macOS files and pasteboard
Connections 22
- Mac user → Drop island and pasteboard: drops content
README.md - App and drag watcher → Drop island and pasteboard: hosts drop view
Sources/main.swift - Drop island and pasteboard → Send state and progress: submits content
Sources/Island.swift - Send state and progress → Zip and split files: prepares files
Sources/Model.swift - Send state and progress → Bot API client: sends uploads
Sources/Model.swift - Send state and progress → Bot API client: sends links
Sources/Model.swift - Bot API client → Telegram Bot API: calls Bot API
Sources/Telegram.swift - Telegram Bot API → Bot API client: returns API results
Sources/Telegram.swift - Send state and progress → macOS files and pasteboard: reads dropped files
README.md - Send state and progress → macOS files and pasteboard: downloads iCloud files
README.md - Mac user → Bot setup and settings UI: configures bot
README.md - Bot setup and settings UI → Bot API client: checks token and chat
Sources/Setup.swift - Bot setup and settings UI → Credentials and preferences: updates preferences
Sources/Setup.swift - Send state and progress → Credentials and preferences: loads bot config
Sources/Model.swift - Credentials and preferences → Localization: selects language
Sources/Settings.swift - App and drag watcher → Island placement rules: positions island
Sources/main.swift - App and drag watcher → Coucou detection: checks Coucou
Sources/main.swift - Coucou detection → Coucou: reads panel edges
Sources/Coucou.swift - Send state and progress → Upload engine sound: drives upload sound
Sources/Model.swift - Drop island and pasteboard → Island progress display: renders progress
Sources/Island.swift - Bot setup and settings UI → UI sound effects: plays UI sounds
Sources/Setup.swift - Island progress display → Mascot artwork: renders mascot