Class: Zephira::Commands::Compact

Inherits:
Object
  • Object
show all
Defined in:
lib/zephira/commands/compact.rb

Class Method Summary collapse

Class Method Details

.descriptionObject



11
12
13
# File 'lib/zephira/commands/compact.rb', line 11

def description
  "Summarize older history to free up context"
end

.nameObject



7
8
9
# File 'lib/zephira/commands/compact.rb', line 7

def name
  "compact"
end

.run(agent:, args:) ⇒ Object



15
16
17
18
# File 'lib/zephira/commands/compact.rb', line 15

def run(agent:, args:)
  compacted = agent.compact_history(force: true)
  puts "Nothing to compact." unless compacted
end