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:
parent
6bb1d700f2
commit
ae18ff9ea3
10 changed files with 34 additions and 10 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue