1
0
Fork 0
mirror of https://github.com/imjasonh/cnotes synced 2026-07-08 17:16:00 +00:00
Commit graph

7 commits

Author SHA1 Message Date
Jason Hall
cc4541b256
Add configurable emojis for user and assistant messages 2025-07-21 14:41:19 -04:00
Jason Hall
588abf835d
Add conversational flow to cnotes show command 2025-07-21 14:31:48 -04:00
Jason Hall
4f8189cef8
Add stdin timeout and update documentation
- Add 2-second timeout for stdin input to prevent hanging
- Update README with pronunciation guide and go install instructions
- Fix command references in documentation from ./cnotes to cnotes
- Update settings.json to use /Users/jason/go/bin/cnotes run
- Improve generated by message formatting in notes output

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-21 13:02:15 -04:00
Jason Hall
324ad33ccc
Refactor to cnotes: focused git notes tool
BREAKING CHANGE: Complete restructure from hooks to cnotes

Major Changes:
- Removed all hook handler code except git commit detection
- Simplified to focused git notes functionality only
- Renamed binary from 'hooks' to 'cnotes'
- Restructured CLI: cnotes (hook handler), cnotes show, cnotes install, etc.
- Updated module path to github.com/imjasonh/cnotes
- Rewrote README and CLAUDE.md for new focused scope

New Command Structure:
- cnotes           # Main hook handler (receives Claude Code calls)
- cnotes show      # Pretty-print conversation notes
- cnotes install   # Configure Claude Code to use cnotes
- cnotes backup    # Backup conversation notes
- cnotes restore   # Restore notes from backup
- cnotes list      # List commits with notes

This creates a much cleaner, focused tool specifically for git conversation notes.
2025-07-21 12:52:39 -04:00
Jason Hall
ad3c31ffea
Improve conversation excerpt formatting in notes show command
- Added formatConversationExcerpt function to properly unescape JSON strings
- Replaced escaped newlines (\n) with actual newlines for readability
- Unescaped quotes, backslashes, tabs, and other JSON escape sequences
- Tool interactions and conversation context now display with proper formatting
- Much more readable output with proper line breaks and structure

The conversation context is now properly formatted and easy to read instead of being one long escaped string.
2025-07-21 12:45:50 -04:00
Jason Hall
997a55970f
Add pretty-printed Markdown show command for conversation notes
- Added 'hooks notes show [commit]' command that defaults to HEAD
- Formats conversation context in readable Markdown with proper sections
- Shows commit info, session details, tools used, commit context, and conversation excerpt
- Updated documentation to recommend the show command over raw git notes
- Enhanced user experience for viewing conversation context

Usage:
  ./hooks notes show       # Show notes for latest commit
  ./hooks notes show abc123 # Show notes for specific commit
2025-07-21 12:43:34 -04:00
Jason Hall
7b6cdffa8a
Add git notes preservation system with backup/restore functionality
- Added WarnAboutGitNotesLoss hook that warns before destructive git operations
- Implemented comprehensive backup/restore system for conversation notes
- Added CLI commands: hooks notes backup/restore/list
- Configured git to automatically copy notes during rebase operations
- Created backup.go with full notes backup and restoration functionality

This ensures conversation context is never lost during rebasing, squashing, or other destructive git operations.
2025-07-21 12:39:13 -04:00