Skip to content

feat: add process group cleanup and drag-and-drop file support - #11

Merged
hlibkoval merged 2 commits into
mainfrom
feat/process-cleanup-and-drag-drop
Jan 29, 2026
Merged

hlibkoval merged 2 commits into
mainfrom
feat/process-cleanup-and-drag-drop

Conversation

@hlibkoval

@hlibkoval hlibkoval commented Jan 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • PTY wrapper now kills entire process tree on terminal close using os.setpgrp() and os.killpg() for proper cleanup
  • Add drag-and-drop support for files and folders onto terminal:
    • Obsidian internal files: uses vault-relative path (matches context menu behavior)
    • Obsidian folders: uses vault-relative path (folders don't use obsidian:// URLs)
    • External files from Finder: uses absolute path
    • Plain text: writes directly to stdin
  • Resolve Obsidian URLs through metadataCache to restore .md extension
  • Focus terminal automatically after drop

Test plan

  • Close terminal tab → verify Claude Code and shell processes are killed
  • Drag Obsidian file onto terminal → file sent via MCP with relative path
  • Drag Obsidian folder onto terminal → folder sent via MCP with relative path
  • Drag external file from Finder → absolute path sent
  • Drag plain text → text pasted at cursor
  • Verify .md extension is preserved for markdown files
  • With MCP disabled → @path written to stdin with appropriate paths

🤖 Generated with Claude Code

hlibkoval and others added 2 commits January 29, 2026 15:08
- PTY wrapper now kills entire process tree on terminal close using
  os.setpgrp() and os.killpg() for proper cleanup
- Add drag-and-drop support for files onto terminal:
  - Obsidian internal files: MCP sends absolute path, stdin fallback
    uses vault-relative path
  - External files: uses absolute path for both MCP and stdin
  - Plain text: writes directly to stdin
- Resolve Obsidian URLs through metadataCache to restore .md extension
- Focus terminal automatically after drop

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Match context menu behavior by using relative paths for internal vault
files and folders. External files from Finder still use absolute paths.
Also adds folder drag-and-drop support and auto-focus after drop.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@hlibkoval
hlibkoval merged commit ed3b533 into main Jan 29, 2026
1 check passed
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