Class: ClaudeMemory::Commands::Checks::DistillCheck

Inherits:
Object
  • Object
show all
Defined in:
lib/claude_memory/commands/checks/distill_check.rb

Overview

Checks for content items missing distillation metrics

Instance Method Summary collapse

Constructor Details

#initialize(db_path, label) ⇒ DistillCheck

Returns a new instance of DistillCheck.



8
9
10
11
# File 'lib/claude_memory/commands/checks/distill_check.rb', line 8

def initialize(db_path, label)
  @db_path = db_path
  @label = label
end

Instance Method Details

#callObject



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'lib/claude_memory/commands/checks/distill_check.rb', line 13

def call
  unless File.exist?(@db_path)
    return {
      status: :ok,
      label: "#{@label}_distill",
      message: "#{@label.capitalize} database not found (skipping distill check)",
      details: {}
    }
  end

  check_undistilled_content
rescue => e
  {
    status: :error,
    label: "#{@label}_distill",
    message: "#{@label.capitalize} distill check error: #{e.message}",
    details: {}
  }
end