Cite Wide: A Research focused LLM-based Obsidian Plugin using Perplexity and Perplexica APIs

Cite Wide: A Research focused LLM-based Obsidian Plugin

using Perplexity and Perplexica APIs

Objective

✅ New Interactive Commands:
🔹 "Ask Perplexity" Command: • Modal Interface with: • Large text area for questions • Model selection dropdown (sonar-pro, sonar-small, etc.) • Stream toggle (defaults to ON) • Validates API key is set • Auto-inserts formatted results directly into the editor with timestamps • Handles streaming responses in real-time • Error handling with detailed feedback
🔹 "Ask Perplexica" Command: • Modal Interface with: • Large text area for questions• Focus mode dropdown (webSearch, academicSearch, etc.) • Optimization dropdown (speed, balanced, quality) • Stream toggle (defaults to OFF) • Uses defaults from settings • Fallback logic - tries primary endpoint, then Docker fallback • Auto-inserts formatted results with all query parameters • Comprehensive error handling
✅ User Experience:
  1. User runs "Ask Perplexity" or "Ask Perplexica" from command palette (Ctrl/Cmd+P)
  2. Modal opens with focused text area ready for typing
  3. User enters question, selects options
  4. Plugin handles the API call and inserts formatted results
  5. No code blocks or manual JSON editing needed!
✅ Output Format:
markdown
## Perplexity Query (2025-01-19T18:19:31.000Z)
**Question:** What are the benefits of self-hosting?
**Model:** sonar-pro

[Response content here]

---
This is much cleaner than asking users to edit JavaScript code or JSON templates. The commands are discoverable, the interface is intuitive, and the results are automatically formatted in the editor. Users just need to:
  1. Set their API keys in settings
  2. Run the commands
  3. Ask their questions!
The plugin now provides a seamless AI-powered research experience directly in Obsidian! 🎉