mirror of
https://github.com/carey314/mio-plugin-clipper.git
synced 2026-08-09 23:34:32 +00:00
Quick AI actions on clipboard or selected text. Four actions: - 翻译 (中/英/日) - 总结 (3-bullet Chinese) - 改语气 (正式/口语/友好/严谨) - 邮件回复 Powered by DeepSeek with Server-Sent Events streaming for typewriter feedback (~600ms first byte). Two source modes: clipboard (no permission) and selected-text via NSAccessibility (graceful fallback to clipboard + permission banner if denied). Five-state UI machine: idle → input → loading (cancellable) → result → missing-config. Last 20 actions persisted to UserDefaults. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
19 lines
477 B
Swift
19 lines
477 B
Swift
//
|
|
// MioPlugin.swift
|
|
// Mio Island Plugin SDK (verbatim copy from host).
|
|
// Runtime conformance is by ObjC selector, not module identity.
|
|
//
|
|
|
|
import AppKit
|
|
|
|
@objc protocol MioPlugin: AnyObject {
|
|
var id: String { get }
|
|
var name: String { get }
|
|
var icon: String { get }
|
|
var version: String { get }
|
|
func activate()
|
|
func deactivate()
|
|
func makeView() -> NSView
|
|
@objc optional func viewForSlot(_ slot: String, context: [String: Any]) -> NSView?
|
|
}
|