ruby_todo 1.0.3 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +60 -75
- data/ai_assistant_implementation.md +1 -1
- data/lib/ruby_todo/ai_assistant/command_processor.rb +127 -0
- data/lib/ruby_todo/ai_assistant/openai_integration.rb +178 -183
- data/lib/ruby_todo/ai_assistant/param_extractor.rb +64 -0
- data/lib/ruby_todo/ai_assistant/prompt_builder.rb +95 -0
- data/lib/ruby_todo/ai_assistant/task_creator.rb +161 -0
- data/lib/ruby_todo/cli.rb +128 -469
- data/lib/ruby_todo/commands/ai_assistant.rb +870 -302
- data/lib/ruby_todo/commands/ai_commands.rb +20 -0
- data/lib/ruby_todo/commands/notebook_commands.rb +39 -0
- data/lib/ruby_todo/commands/template_commands.rb +139 -0
- data/lib/ruby_todo/concerns/import_export.rb +138 -0
- data/lib/ruby_todo/concerns/statistics.rb +166 -0
- data/lib/ruby_todo/concerns/task_filters.rb +39 -0
- data/lib/ruby_todo/formatters/display_formatter.rb +80 -0
- data/lib/ruby_todo/models/task.rb +0 -7
- data/lib/ruby_todo/version.rb +1 -1
- data/lib/ruby_todo.rb +9 -0
- metadata +13 -8
- data/.env.template +0 -2
- data/lib/ruby_todo/ai_assistant/common_query_handler.rb +0 -378
- data/lib/ruby_todo/ai_assistant/task_management.rb +0 -331
- data/lib/ruby_todo/ai_assistant/task_search.rb +0 -365
- data/test_ai_assistant.rb +0 -55
- data/test_migration.rb +0 -55
data/test_ai_assistant.rb
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require_relative "lib/ruby_todo"
|
5
|
-
|
6
|
-
# Create notebooks and tasks
|
7
|
-
puts "Creating test notebooks and tasks..."
|
8
|
-
notebook = RubyTodo::Notebook.create(name: "Test Notebook")
|
9
|
-
notebook.update!(is_default: true)
|
10
|
-
|
11
|
-
notebook.tasks.create(
|
12
|
-
title: "Migrate to the barracua org",
|
13
|
-
status: "todo",
|
14
|
-
description: "Migration task for repository"
|
15
|
-
)
|
16
|
-
|
17
|
-
notebook.tasks.create(
|
18
|
-
title: "Task 2",
|
19
|
-
status: "todo"
|
20
|
-
)
|
21
|
-
|
22
|
-
notebook.tasks.create(
|
23
|
-
title: "Regular task not related to migrations",
|
24
|
-
status: "in_progress"
|
25
|
-
)
|
26
|
-
|
27
|
-
# Create the AI Assistant
|
28
|
-
ai_command = RubyTodo::AIAssistantCommand.new([], { verbose: true })
|
29
|
-
|
30
|
-
# Test the problematic case
|
31
|
-
puts "\n\n=== Testing problematic case ==="
|
32
|
-
prompt = "move all migrate to the barracua org tasks to in porgress"
|
33
|
-
|
34
|
-
puts "Running test with prompt: '#{prompt}'"
|
35
|
-
context = {}
|
36
|
-
|
37
|
-
ai_command.send(:handle_task_request, prompt, context)
|
38
|
-
|
39
|
-
# Display results
|
40
|
-
puts "\n=== Results ==="
|
41
|
-
if context[:matching_tasks]&.any?
|
42
|
-
puts "Found #{context[:matching_tasks].size} matching tasks:"
|
43
|
-
context[:matching_tasks].each do |task|
|
44
|
-
puts "- #{task[:title]} (ID: #{task[:task_id]}, Notebook: #{task[:notebook]})"
|
45
|
-
end
|
46
|
-
puts "Target status: #{context[:target_status]}"
|
47
|
-
else
|
48
|
-
puts "No matching tasks found"
|
49
|
-
end
|
50
|
-
|
51
|
-
# Clean up
|
52
|
-
puts "\n=== Cleaning up ==="
|
53
|
-
RubyTodo::Task.delete_all
|
54
|
-
RubyTodo::Notebook.delete_all
|
55
|
-
puts "Test completed"
|
data/test_migration.rb
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# frozen_string_literal: true
|
3
|
-
|
4
|
-
require_relative "lib/ruby_todo"
|
5
|
-
|
6
|
-
# Create notebooks and tasks
|
7
|
-
puts "Creating test notebooks and tasks..."
|
8
|
-
notebook = RubyTodo::Notebook.create(name: "Test Notebook")
|
9
|
-
notebook.update!(is_default: true)
|
10
|
-
|
11
|
-
notebook.tasks.create(
|
12
|
-
title: "Migrate to the barracua org",
|
13
|
-
status: "todo",
|
14
|
-
description: "Migration task for repository"
|
15
|
-
)
|
16
|
-
|
17
|
-
notebook.tasks.create(
|
18
|
-
title: "Task 2",
|
19
|
-
status: "todo"
|
20
|
-
)
|
21
|
-
|
22
|
-
notebook.tasks.create(
|
23
|
-
title: "Regular task not related to migrations",
|
24
|
-
status: "in_progress"
|
25
|
-
)
|
26
|
-
|
27
|
-
# Create the AI Assistant
|
28
|
-
ai_command = RubyTodo::AIAssistantCommand.new([], { verbose: true })
|
29
|
-
|
30
|
-
# Test the problematic case
|
31
|
-
puts "\n\n=== Testing problematic case ==="
|
32
|
-
prompt = "move all migrate to the barracua org tasks to in porgress"
|
33
|
-
|
34
|
-
puts "Running test with prompt: '#{prompt}'"
|
35
|
-
context = {}
|
36
|
-
|
37
|
-
ai_command.send(:handle_task_request, prompt, context)
|
38
|
-
|
39
|
-
# Display results
|
40
|
-
puts "\n=== Results ==="
|
41
|
-
if context[:matching_tasks]&.any?
|
42
|
-
puts "Found #{context[:matching_tasks].size} matching tasks:"
|
43
|
-
context[:matching_tasks].each do |task|
|
44
|
-
puts "- #{task[:title]} (ID: #{task[:task_id]}, Notebook: #{task[:notebook]})"
|
45
|
-
end
|
46
|
-
puts "Target status: #{context[:target_status]}"
|
47
|
-
else
|
48
|
-
puts "No matching tasks found or no target status detected"
|
49
|
-
end
|
50
|
-
|
51
|
-
# Clean up
|
52
|
-
puts "\n=== Cleaning up ==="
|
53
|
-
RubyTodo::Task.delete_all
|
54
|
-
RubyTodo::Notebook.delete_all
|
55
|
-
puts "Test completed"
|