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 +4 -4
- data/CHANGELOG.md +15 -3
- data/src/foobara/cli_runner.rb +16 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec206db778ad18c2a54abe667f5f008bedc9c7e29d4dd380f5dab800993a5092
|
4
|
+
data.tar.gz: 608aac583d84f28e30aac7da763281cb3631dc1bb35d70cbe4e3cf2082e5ee9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f552536d87b5350ff91331d72f8a305d0135bdb9fd0d67982bef75c8a7f03aac73ffffde1350cfe022f97095ad48e622840b3b4794cfb38990658a28833832f
|
7
|
+
data.tar.gz: ba88235162d3d3744342ee3170f30247b4fbf047e409deb399c2ae0abefa1faa3272ce94c3d9258543de55e8121b68afaeadd1a7c749eefbaf2a0b4ce3dd24ad
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,19 @@
|
|
1
|
-
## [
|
1
|
+
## [0.0.4] - 2025-06-19
|
2
2
|
|
3
|
-
-
|
3
|
+
- Support cuter ways to exit
|
4
4
|
|
5
|
-
## [0.0.
|
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
|
data/src/foobara/cli_runner.rb
CHANGED
@@ -28,8 +28,8 @@ module Foobara
|
|
28
28
|
|
29
29
|
goal = line.strip
|
30
30
|
|
31
|
-
if goal
|
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.
|
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.
|
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: []
|