Skip to content
This repository was archived by the owner on May 3, 2025. It is now read-only.

001 vscode integration strategy

Morgan Joyce edited this page Jan 11, 2025 · 3 revisions

ADR 001: VS Code Integration Strategy

Status

  • Status: Decided
  • Date: 2025-01-11

Context

Our Dev Notes CLI tool needs to capture rich context from VS Code, including:

  • Active file/workspace information
  • Git context
  • Editor state
  • Selected text/cursor position

We have two potential approaches:

Approach 1: Pure VS Code Extension

  • Convert entire tool to VS Code extension
  • Direct access to VS Code APIs
  • Loses CLI flexibility outside VS Code

Approach 2: Bridge Pattern

  • Keep CLI independent
  • Create VS Code extension that bridges to CLI
  • Use environment variables or IPC for communication
  • Maintains both CLI and IDE use cases

Decision Drivers

  • Need to maintain CLI functionality outside VS Code
  • Desire for rich editor context when available
  • Cross-platform compatibility requirements
  • Future extensibility to other IDEs

Open Questions

  1. How important is non-VS Code usage?
  2. Should we support other IDEs in the future?
  3. What's the performance impact of bridge vs native approach?

Notes

This decision significantly impacts our architecture. We should validate actual user needs before proceeding.

Decision

  • Date: 2025-01-11
  • Chosen Approach: Pure VS Code Extension (Approach 1)

Rationale

  • Our target users are primarily in VS Code-like environments
  • Direct access to VS Code's rich context APIs is crucial
  • Learning VS Code extension development aligns with our goals
  • CLI can be considered as a future fallback rather than core feature

Consequences

Positive

  • Deep integration with VS Code capabilities
  • Direct access to editor state and workspace context
  • Simplified architecture (no bridge pattern needed)

Negative

  • Initial CLI functionality will be lost
  • Tied more closely to VS Code ecosystem

Implementation Notes

Next steps:

  1. Convert existing note-taking logic to VS Code extension
  2. Explore VS Code's context APIs
  3. Document VS Code extension development learnings