How zevxn/zcue works
ZCue is a Windows global prompt-completion tool: a user types a prompt name or its pinyin initials in a compatible application, chooses a suggestion, and ZCue replaces the trigger with the full prompt. The runtime path is coordinated by AppController, from keyboard input through matching and suggestion display to text insertion. Separate branches support prompt management, settings, import/export, tray controls, and previews. The README documents capabilities beyond the sampled excerpts; those are represented where the file tree supports them, while uncertain internal wiring is omitted.
Main entry points: AppController.cs App controller · PromptManagerWindow.xaml.cs Prompt manager · PromptCatalogService.cs Prompt catalog · PromptStorageService.cs Prompt storage
Components 30
Completion runtime
- WPF application
App.xaml.cs - App controller
Services/AppController.cs - Keyboard hook
Services/KeyboardHookService.cs - Input buffer
Services/InputBufferService.cs - Prompt matching
Services/PromptMatchService.cs - Suggestion window
Views/SuggestionWindow.xaml.cs - Ghost preview
Views/GhostPreviewWindow.xaml.cs - Text insertion
Services/TextInsertionService.cs
Prompt catalog
- Prompt variables
Services/PromptVariableService.cs - Prompt catalog
Services/PromptCatalogService.cs - Pinyin aliases
Services/PinyinAliasService.cs - Prompt storage
Services/PromptStorageService.cs - User JSON config
Management UI
- Prompt manager
Views/PromptManagerWindow.xaml.cs - Manager view model
ViewModels/PromptManagerViewModel.cs - Prompt editor
Views/PromptEditorWindow.xaml.cs - Prompt export
Views/PromptExportWindow.xaml.cs
Windows integration
- Caret positioning
Services/CaretPositionService.cs - Tray controls
Infrastructure/TrayIconService.cs - Application filter
Services/ApplicationFilterService.cs - Startup service
Services/StartupService.cs - Win32 interop
Infrastructure/NativeMethods.cs
Settings and updates
- Settings view model
ViewModels/SettingsViewModel.cs - Settings service
Services/AppSettingsService.cs - Settings JSON
- Update service
Services/UpdateService.cs
Other components
- User
- Target input app
- Windows services
- Import/export files
Connections 35
- User → Target input app: types into
- WPF application → App controller: starts
- App controller → Keyboard hook: starts and handles
- Keyboard hook → App controller: dispatches keys
- App controller → Input buffer: updates input
- App controller → Prompt matching: requests matches
- Prompt matching → Prompt catalog: reads prompts
- Prompt matching → Suggestion window: provides candidates
- App controller → Suggestion window: shows choices
- App controller → Caret positioning: requests position
- Caret positioning → Win32 interop: queries caret
- App controller → Ghost preview: shows preview
- App controller → Prompt variables: resolves content
- App controller → Text insertion: requests replacement
- Text insertion → Target input app: injects text
- Text insertion → Win32 interop: uses clipboard and input APIs
- App controller → Tray controls: controls lifecycle
- Tray controls → Application filter: toggles filtering
- Tray controls → Startup service: controls startup
- App controller → Application filter: checks target app
- Prompt manager → Manager view model: invokes management
- Prompt manager → Prompt editor: opens editor
- Prompt manager → Prompt export: opens export
- Manager view model → Prompt catalog: manages prompts
- Prompt catalog → Pinyin aliases: refreshes aliases
- Prompt catalog → Prompt storage: loads and persists
- Prompt storage → User JSON config: reads and writes
- Prompt manager → Prompt storage: imports and exports
- Prompt storage → Import/export files: reads and writes
- App controller → Settings service: loads settings
- Settings view model → Settings service: updates settings
- Settings service → Settings JSON: reads and writes
- App controller → Update service: checks updates
- Keyboard hook → Windows services: installs global hook
- Win32 interop → Windows services: calls Win32 APIs