6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# File 'lib/committer/commands/output_message.rb', line 6
def self.execute(args)
commit_context = args[0]
diff = Committer::CommitGenerator.check_git_status
commit_generator = Committer::CommitGenerator.new(diff, commit_context)
commit_message = commit_generator.prepare_commit_message
summary = commit_message[:summary]
body = commit_message[:body]
puts <<~OUTPUT
#{summary}
#{body}
OUTPUT
exit 0
rescue Clients::ClaudeClient::ConfigError => e
puts "Error: #{e.message}"
exit 1
rescue StandardError
exit 0
end
|