Commit graph

14 commits

Author SHA1 Message Date
mpstaton
7b17b3b6e7 chore(marketplace): pass ObsidianReviewBot lint cleanly
Applies all required fixes from the bot's review of PR #12513
(obsidianmd/obsidian-releases). ESLint now passes 0 errors with the
Obsidian community ruleset; tsc passes; production build is clean.

Lint setup:

- Adopted eslint-plugin-obsidianmd@^0.2.9 in eslint.config.mjs
- Mirrored the bot's rule surface locally so violations surface in
  `pnpm lint` instead of the marketplace PR thread
- Configured the ui/sentence-case rule with a brand allowlist
  (Perplexity, Perplexica, Vane, Claude, Anthropic, LM Studio, Imgur,
  ImageKit, OpenAI, Ollama, Sonar, Llama, GPT, YAML, JSON, URL, API)
  so legitimate proper nouns aren't lowercased

Code fixes (487 → 0):

- console.log/info → console.debug across all sources (~130 sites)
- UI strings normalized to sentence case (~150 sites)
- Command IDs and names cleaned up: dropped "command" suffix, dropped
  "perplexed" plugin-name prefix
- Settings tab section headers switched from createEl('h2') to
  new Setting().setHeading() (5 sites)
- Inline element.style.color/width/minHeight/fontFamily migrated to
  a new CSS class (.perplexed-json-textarea + .is-tall / .is-extra-tall)
  in src/styles/settings-tab.css (8 textarea sites, 32 style assignments)
- Async input handlers wrapped: addEventListener('input', () => void
  (async () => { ... })()) so the listener type matches (8 sites)
- forEach((opt) => dd.addOption(...)) blocks made void-returning to
  satisfy no-misused-promises (9 modal sites)
- JSON.parse results typed as unknown then narrowed
- throw <string> → throw new Error(<string>)
- ${unknown} interpolations narrowed via instanceof Error
- Removed dotenv runtime dependency: published plugins shouldn't read
  .env at runtime; user enters API keys via the settings tab
- Replaced builtin-modules dev-dependency with node:module's
  builtinModules — same data, no extra package
- Logger console-method dispatch rewritten as a switch instead of
  dynamic console[level] indexing (which the bot rejects)

Streaming exceptions:

- src/services/{perplexityService,lmStudioService,perplexicaService}.ts
  retain `fetch()` for SSE / chunked streaming because Obsidian's
  `requestUrl` buffers the whole body. Each site has an
  `eslint-disable-next-line no-restricted-globals` with the marketplace
  `/skip` justification inline. Plan to surface these on the PR with
  a `/skip` reply.

Reference docs:

- context-v/issues/Obsidian-Review-Bot-Feedback-on-Perplexed-Submission.md
  (issue log distilled into…)
- context-v/reminders/Obsidian-Marketplace-Compliance.md (the rules
  themselves, reusable for image-gin and cite-wide submissions)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-09 02:39:06 -05:00
mpstaton
49168823f1 docs(perplexica): rename to "Perplexica / Vane" across user-facing surfaces
Background: the open-source self-hosted repo (ItzCrazyKns/Perplexica)
was renamed to Vane on 2026-03-09 by its maintainer (commit
'feat(app): rename to vane'). The hosted service at perplexica.io
remains live under the Perplexica brand — that's a separate hosted
product, not what users self-install for this plugin. The local API
surface (/api/search, focus modes, optimization modes) is unchanged
across the rename.

Updates "Perplexica" to "Perplexica / Vane" wherever a user can see
the string — command palette, modals, notice toasts, editor-injected
callouts, settings tab, README. Internal references (class names,
method names, CSS classes, command IDs, settings field names) are
left bare to avoid breaking compatibility or requiring migration.

main.ts
- Command names: 'Ask Perplexica' / 'Update Perplexica URL' /
  'Show Perplexica Settings' all gain '/ Vane'.
- Notice toasts (service not initialized, failed to open modal,
  current URL display) updated.
- Settings tab section heading 'Perplexica (Self-Hosted)' →
  'Perplexica / Vane (self-hosted)'; all 9 endpoint/model/template/
  prompt/placeholder labels and descriptions in that section
  updated to read 'Perplexica / Vane'.
- URLUpdateModal config (title + label) for the Update URL command
  updated to match the new command name.
- Default Perplexica query placeholder updated.

src/modals/PerplexicaModal.ts
- Header title, subtitle, submit button all read 'Ask Perplexica / Vane'.

src/services/perplexicaService.ts
- Editor-injected callout '**Perplexica Query**' / '### **Response
  from Perplexica**' both updated.
- Error notice prefix 'Perplexica Error:' → 'Perplexica / Vane Error:'.

README.md
- Top blurb, features bullet, network-use table row, "Using" section
  heading + TOC anchor (slug regenerated), full Commands table.
- Install section rewrite: heading marks the local-install
  requirement explicit; new rename callout points users at
  github.com/ItzCrazyKns/Vane for docs while explaining what got
  renamed and what didn't (perplexica.io is still a separate
  hosted brand).

Intentionally bare (justified):
- Example JSON content '"What is Perplexica's architecture?"'
  (sample content, not a UI label).
- Internal Error throws + console logs (dev-only surface).
- Code comments.
- Lines 98-102 of README, inside the rename callout itself —
  those sentences distinguish the two names by design.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 21:27:40 -05:00
mpstaton
14962edde1 meet(requirements): misc changes related to meeting Obsidian plugin community requirements
Six docs-derived blockers fixed in one pass; punch-list plan filed
under context-v/plans/ for traceability.

manifest.json
- description rewritten: action-verb start (was "A plugin for
  Obsidian…", which the docs call out as an anti-pattern), all four
  providers named (Perplexity, Anthropic Claude, Perplexica, LM
  Studio), 144 chars, ends with period.
- fundingUrl removed — was pointed at the company website, not a
  donation service. Docs: "If you don't accept donations, remove
  fundingUrl from your manifest."

main.ts
- Three command IDs un-prefixed: 'perplexed-debug-commands' →
  'debug-commands', 'perplexed-reset-prompts' → 'reset-prompts',
  'perplexed-reinitialize-services' → 'reinitialize-services'.
  Obsidian auto-prefixes commands with the plugin id, so the
  doubled form would have registered as 'perplexed.perplexed-…'.
- Deleted the top-level <h2>Perplexed Plugin Settings</h2> from the
  settings tab. Docs: "Avoid adding a top-level heading in the
  settings tab, such as 'General', 'Settings', or the name of your
  plugin."

README.md
- Placeholder URLs replaced with the real lossless-group/perplexed-plugin
  repo (clone command, Issues link x2, Discussions link).
- Stale "Version: 0.0.0.1" footer line deleted (manifest is the
  source of truth).
- New "## Network use and accounts" section: per-provider table with
  endpoint, account requirement, and API-key requirement, plus an
  explicit no-telemetry / no-self-update statement. Required by
  Developer Policies (network-use disclosure + paid-account
  disclosure). Key Features bullet updated to mention Claude.

context-v/plans/2026-05-02_Submission-Blockers-Punch-List.md
- New plan documenting the audit findings: six blockers fixed here,
  four will-be-flagged items (7-10: settings <h3>/<h4> → setHeading,
  sentence case, console.log hygiene, vault.adapter.write in
  logger.ts) deferred to a separate pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-02 20:34:40 -05:00
TanujKS
f0ef900a13 improve: Deep Research Streaming \nfeat: Enhance Text and Add Image from selection commands 2025-08-28 23:44:17 -07:00
mpstaton
bf8f02221f fix(streaming): fix streaming for chat query.
On branch feature/perplexity-streaming
 Changes to be committed:
	modified:   README.md
	new file:   src/docs/Understanding-the-Perplexity-Response-Object.md
	modified:   src/services/lmStudioService.ts
	modified:   src/services/perplexicaService.ts
	modified:   src/services/perplexityService.ts
	new file:   src/utils/formatDate.ts
	modified:   styles.css
	new file:   test-perplexity-api.sh
	new file:   test-perplexity-non-streaming.sh
2025-08-08 19:10:06 +02:00
TanujKS
ee286d2330 feat: Refactor plugin architecture and enhance UI/UX
- Split monolithic main.ts into modular services and modals
- Created separate service classes: PerplexityService,
  PerplexicaService, LMStudioService
  - Created modular modal classes: PerplexityModal, PerplexicaModal,
    LMStudioModal, URLUpdateModal
    - Deleted unused legacy files: CitationModal.ts, citationService.ts,
      cleanReferencesSectionService.ts

      ## New Features
      - Added ArticleGeneratorModal for one-page article generation with
	predefined prompts
	- Implemented intelligent image placement with [IMAGE n:
	  description] markers
	  - Added auto-scrolling during streaming responses for better
	    UX
	    - Created full callout formatting for query blocks with
	      multi-line support

	      ## UI/UX Improvements
	      - Moved all inline styles to dedicated CSS files for
		better maintainability
		- Created modular CSS structure: perplexity-modal.css,
		  article-generator-modal.css, etc.
		  - Added proper spacing and padding to text inputs
		    across all modals
		    - Fixed sources placement to appear after last
		      non-empty line (no more huge gaps)
		      - Enhanced modal layouts with better visual
			hierarchy

			## Build System
			- Updated esbuild.config.mjs to properly bundle
			  CSS files
			  - Created src/styles/main.css as CSS entry
			    point
			    - Implemented proper CSS build process with
			      minification support

			      ## Bug Fixes
			      - Fixed TypeScript errors from unused
				imports and parameters
				- Resolved streaming scroll issues with
				  proper cursor tracking
				  - Fixed multi-line query formatting in
				    callout blocks
				    - Corrected sources insertion logic
				      for both streaming and
				      non-streaming responses

				      ## Code Quality
				      - Improved separation of concerns
					with service/modal architecture
					- Enhanced maintainability with
					  modular CSS structure
					  - Added comprehensive error
					    handling and logging
					    - Implemented consistent
					      coding patterns across all
					      services

					      ## Technical Details
					      - Services now handle API
						calls, streaming, and
						response processing
						- Modals focus purely on
						  UI and user
						  interaction
						  - CSS uses Obsidian's
						    design system
						    variables for
						    theming
						    - All modals support
						      both streaming and
						      non-streaming
						      modes
						      - Image placement
							supports both
							inline markers
							and fallback
							sections

							Breaking
							Changes: None
							Migration:
							Existing
							functionality
							preserved,
							enhanced with
							new features
2025-07-20 16:32:36 -07:00
mpstaton
15bbc0f565 improve(settings), new(api): add new LM Studio API, improve settings
On branch development
 Your branch is up to date with 'origin/development'.
 Changes to be committed:
	modified:   README.md
	modified:   main.ts
	modified:   styles.css
2025-07-20 01:48:39 +03:00
mpstaton
0e8b4ca114 milestone(settings): settings panel is better than good enough
On branch development
 Your branch is ahead of 'origin/development' by 1 commit.
   (use "git push" to publish your local commits)
 Changes to be committed:
	modified:   README.md
	modified:   main.ts
2025-07-19 21:13:34 +03:00
mpstaton
7e6831c315 init(project): initial commit for Perplexed Obsidian Plugin with basic readme, manifest, package.json
On branch master
 Changes to be committed:
	modified:   README.md
	modified:   manifest.json
	modified:   package.json
2025-07-10 00:00:49 +03:00
mpstaton
7e2aeb7bb5 update(packages): updated packages and dependencies to latest
On branch master
 Your branch is up to date with 'origin/master'.
 Changes to be committed:
	modified:   package.json
	modified:   pnpm-lock.yaml
2025-07-09 23:34:17 +03:00
mpstaton
5de4339c6c save(state): save state of starter code for any obsidian plugin
On branch development
 Changes to be committed:
	deleted:    .cursor/mcp.json
	deleted:    .windsurfrules
	modified:   README.md
	modified:   manifest.json
	modified:   package.json
	modified:   versions.json
2025-07-09 23:18:48 +03:00
mpstaton
220876d2a5 clean(starter): clean starter code
On branch master
 Your branch is up to date with 'origin/master'.
 Changes to be committed:
	modified:   .gitignore
	modified:   .windsurfrules
	modified:   README.md
	modified:   package.json
2025-07-06 17:23:37 +03:00
mpstaton
ffc16b55e0 Initial commit for cite-wide 2025-07-06 17:09:30 +03:00
mpstaton
fbfaa55bf7 start(project): initial setup from example Obsidian plugin with our developer preferences 2025-06-07 15:37:58 +03:00