Class: Llmemory::Dashboard::LongTermController

Inherits:
ApplicationController show all
Defined in:
app/controllers/llmemory/dashboard/long_term_controller.rb

Instance Method Summary collapse

Instance Method Details

#categoriesObject



14
15
16
17
18
19
20
21
# File 'app/controllers/llmemory/dashboard/long_term_controller.rb', line 14

def categories
  @user_id = params[:user_id]
  @category_names = file_based_storage.list_categories(@user_id)
  @categories_content = {}
  @category_names.each do |name|
    @categories_content[name] = file_based_storage.load_category(@user_id, name)
  end
end

#indexObject



8
9
10
11
12
# File 'app/controllers/llmemory/dashboard/long_term_controller.rb', line 8

def index
  @user_id = params[:user_id]
  @items = file_based_storage.list_items(user_id: @user_id, limit: 100)
  @resources = file_based_storage.list_resources(user_id: @user_id, limit: 50)
end