foobara-agent-cli 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 022f075a6a285b82c16fe16b9b275d408420b64a4536bfec012dde9accdf96b5
4
- data.tar.gz: 265bb11c607742f5c49313786d3ebc7f131e20ca13653f0fdeac734391a5602f
3
+ metadata.gz: ec206db778ad18c2a54abe667f5f008bedc9c7e29d4dd380f5dab800993a5092
4
+ data.tar.gz: 608aac583d84f28e30aac7da763281cb3631dc1bb35d70cbe4e3cf2082e5ee9d
5
5
  SHA512:
6
- metadata.gz: e7bbffda354cfee3922569a507944c0b392ac4a1f0b4c123b7a581b3b074fed6a7beb09b70c155f5005f01c0a3bc5293f8188edbccb01bb044b1e95c7d398d1c
7
- data.tar.gz: db97a6f637ea354ce4133a445ab587e73b6f697d528ab7015784977dded8f603d4a89cf9b933d8e84fa77fceb81daa1fb3f53ba4ed9189d3bcd94419461b48e4
6
+ metadata.gz: 0f552536d87b5350ff91331d72f8a305d0135bdb9fd0d67982bef75c8a7f03aac73ffffde1350cfe022f97095ad48e622840b3b4794cfb38990658a28833832f
7
+ data.tar.gz: ba88235162d3d3744342ee3170f30247b4fbf047e409deb399c2ae0abefa1faa3272ce94c3d9258543de55e8121b68afaeadd1a7c749eefbaf2a0b4ce3dd24ad
data/CHANGELOG.md CHANGED
@@ -1,7 +1,19 @@
1
- ## [Unreleased]
1
+ ## [0.0.4] - 2025-06-19
2
2
 
3
- - Move version.rb.erb to top-level
3
+ - Support cuter ways to exit
4
4
 
5
- ## [0.0.1] - 2025-05-21
5
+ ## [0.0.3] - 2025-05-30
6
+
7
+ - Decompose #run_cli a bit, add a way to quit, and improve output
8
+
9
+ ## [0.0.2] - 2025-05-30
10
+
11
+ - Improve test concurrency issues, test ollama, extract #run_cli to CliRunner and add improvements
12
+
13
+ ## [0.0.1] - 2025-06-19
6
14
 
7
15
  - Initial release
16
+
17
+ ## [0.0.0] - 2025-05-19
18
+
19
+ - Project birth
@@ -28,8 +28,8 @@ module Foobara
28
28
 
29
29
  goal = line.strip
30
30
 
31
- if goal =~ /\A\/?(exit|quit|bye)\z/i
32
- print_agent_message("Goodbye for now!")
31
+ if user_wants_to_quit?(goal)
32
+ print_agent_message("Goodbye for now!\n")
33
33
  agent.kill!
34
34
  break
35
35
  end
@@ -83,6 +83,20 @@ module Foobara
83
83
  Util.pipe_writeline(stream, "\n#{name} says: #{message}\n")
84
84
  end
85
85
 
86
+ def user_wants_to_quit?(goal)
87
+ if goal =~ /\/?(exit|quit|(good)?.?bye)/i
88
+ remainder = "#{::Regexp.last_match.pre_match}#{::Regexp.last_match.post_match}."
89
+ remainder.strip!
90
+
91
+ remainder.gsub!(/thanks?.?(you)?[\.!]*/i, "")
92
+ remainder.gsub!(/\A\s*\w+[\.!]*/i, "")
93
+ remainder.gsub!(/[\.!]*\z/i, "")
94
+
95
+ remainder.strip!
96
+ remainder.empty?
97
+ end
98
+ end
99
+
86
100
  def agent_name
87
101
  name = agent.agent_name
88
102
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foobara-agent-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Georgi
@@ -59,7 +59,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  requirements: []
62
- rubygems_version: 3.6.7
62
+ rubygems_version: 3.6.9
63
63
  specification_version: 4
64
64
  summary: Enables a Foobara::Agent to be ran as a CLI tool
65
65
  test_files: []