Skip to content

Ide context awareness#326

Draft
gabrielste1n wants to merge 5 commits intomainfrom
ide-context-awareness
Draft

Ide context awareness#326
gabrielste1n wants to merge 5 commits intomainfrom
ide-context-awareness

Conversation

@gabrielste1n
Copy link
Collaborator

No description provided.

Capture the active app name and window title when dictation starts,
then inject that context into the AI system prompt so responses are
more relevant to what the developer is working on.

- Swift one-shot binary (macos-context-capture) using AXUIElement API
- Parses file names from VS Code, Xcode, JetBrains, Sublime, Vim titles
- Graceful degradation: exit code 2 when Accessibility not granted
- Settings toggle (default on, macOS only) in General section
- Context flows: main → preload → useAudioRecording → audioManager → ReasoningService
- Hash-based build caching with cross-arch compilation support
- Add Windows context capture via C binary (Win32 GetForegroundWindow/
  GetWindowTextW/QueryFullProcessImageName)
- Add Linux support with auto-detected strategy: hyprctl (Hyprland),
  swaymsg (Sway), xdotool+xprop (X11/XWayland), gdbus (GNOME)
- Move filename parsing from Swift binary to shared JS (DRY across
  all 3 platforms) with IDE detection for VS Code, Xcode, JetBrains,
  Sublime Text, and Vim/Neovim
- Simplify macOS Swift binary (~80 lines removed)
- Remove macOS-only gate on Context Awareness settings toggle
Extend Swift binary to walk the Accessibility tree for VS Code family
editors (VS Code, Cursor, Windsurf) to extract open tab names and
sidebar file tree items. Add project name parsing from window titles.
Enrich system prompt with project context and @project/filename tagging.
Resolve project name to filesystem path via VS Code/Cursor/Windsurf
storage.json, then scan the directory for code files. Falls back from
AX tree walking when sidebar items are unavailable (VS Code on macOS,
all editors on Windows/Linux). Cached with TTL for zero-latency repeats.
VS Code extension panels (e.g., Claude Code) use a 2-part title format
without the app name suffix: "Panel — project". The parser now checks
if the last segment is a known app name to determine which part holds
the project name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant