1
0
Fork 0
mirror of https://github.com/imjasonh/cnotes synced 2026-07-09 17:39:32 +00:00

Complete git notes implementation with clean code

- Fixed git commit detection for compound commands (using contains instead of prefix)
- Fixed ToolResponse JSON parsing to extract stdout properly
- Removed debug logging and test files
- Git notes integration is now fully functional and ready for production use
This commit is contained in:
Jason Hall 2025-07-21 12:33:10 -04:00
parent 6bb1d700f2
commit ae18ff9ea3
Failed to extract signature
10 changed files with 34 additions and 10 deletions

View file

@ -117,11 +117,11 @@ func ExtractCommitHashFromOutput(output string) string {
return ""
}
// IsGitCommitCommand checks if a bash command is a git commit
// IsGitCommitCommand checks if a bash command contains a git commit
func IsGitCommitCommand(command string) bool {
command = strings.TrimSpace(command)
// Handle various git commit patterns
// Handle various git commit patterns - check if command contains any of these
patterns := []string{
"git commit",
"git commit -m",
@ -130,7 +130,7 @@ func IsGitCommitCommand(command string) bool {
}
for _, pattern := range patterns {
if strings.HasPrefix(command, pattern) {
if strings.Contains(command, pattern) {
return true
}
}