Class: TestSupportMemory

Inherits:
ActiveHarness::Memory show all
Defined in:
lib/generators/active_harness/install/templates/memory/test_support_memory.rb

Constant Summary

Constants inherited from ActiveHarness::Memory

ActiveHarness::Memory::ADAPTERS

Instance Attribute Summary

Attributes inherited from ActiveHarness::Memory

#session_id

Instance Method Summary collapse

Methods inherited from ActiveHarness::Memory

#clear, #close, #delete, #load, #record, #size, #to_messages, #turns

Constructor Details

#initialize(session_id:) ⇒ TestSupportMemory

Usage: TestSupportMemory.new(session_id: “user_42”)

Wraps ActiveHarness::Memory with project defaults so callers only need to pass a session_id.



6
7
8
9
10
11
12
13
14
15
# File 'lib/generators/active_harness/install/templates/memory/test_support_memory.rb', line 6

def initialize(session_id:)
  super(
    session_id:   session_id,
    depth:        10,
    adapter:      :file,
    path:         Rails.root.join("storage", "ai", "memory").to_s,
    storage_size: 200,
    pretty:       Rails.env.development?
  )
end