aia 0.5.17 → 0.8.0
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/.envrc +1 -0
- data/.version +1 -2
- data/CHANGELOG.md +61 -22
- data/README.md +387 -227
- data/Rakefile +16 -5
- data/_notes.txt +231 -0
- data/bin/aia +3 -2
- data/examples/README.md +140 -0
- data/examples/headlines +21 -0
- data/justfile +16 -3
- data/lib/aia/ai_client_adapter.rb +210 -0
- data/lib/aia/chat_processor_service.rb +120 -0
- data/lib/aia/config.rb +473 -4
- data/lib/aia/context_manager.rb +58 -0
- data/lib/aia/directive_processor.rb +267 -0
- data/lib/aia/{tools/fzf.rb → fzf.rb} +9 -17
- data/lib/aia/history_manager.rb +85 -0
- data/lib/aia/prompt_handler.rb +178 -0
- data/lib/aia/session.rb +215 -0
- data/lib/aia/shell_command_executor.rb +109 -0
- data/lib/aia/ui_presenter.rb +110 -0
- data/lib/aia/utility.rb +24 -0
- data/lib/aia/version.rb +9 -6
- data/lib/aia.rb +57 -61
- data/lib/extensions/openstruct_merge.rb +44 -0
- metadata +43 -42
- data/LICENSE.txt +0 -21
- data/doc/aia_and_pre_compositional_prompts.md +0 -474
- data/lib/aia/clause.rb +0 -7
- data/lib/aia/cli.rb +0 -452
- data/lib/aia/directives.rb +0 -142
- data/lib/aia/dynamic_content.rb +0 -26
- data/lib/aia/logging.rb +0 -62
- data/lib/aia/main.rb +0 -265
- data/lib/aia/prompt.rb +0 -275
- data/lib/aia/tools/backend_common.rb +0 -58
- data/lib/aia/tools/client.rb +0 -197
- data/lib/aia/tools/editor.rb +0 -52
- data/lib/aia/tools/glow.rb +0 -90
- data/lib/aia/tools/llm.rb +0 -77
- data/lib/aia/tools/mods.rb +0 -100
- data/lib/aia/tools/sgpt.rb +0 -79
- data/lib/aia/tools/subl.rb +0 -68
- data/lib/aia/tools/vim.rb +0 -93
- data/lib/aia/tools.rb +0 -88
- data/lib/aia/user_query.rb +0 -21
- data/lib/core_ext/string_wrap.rb +0 -73
- data/lib/core_ext/tty-spinner_log.rb +0 -25
- data/man/aia.1 +0 -272
- data/man/aia.1.md +0 -236
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a77cfcc71cea66fafd6eb8c17666eee983f7903a60f528e3bb396d8bdac0488
|
4
|
+
data.tar.gz: c9424c2a40f886a231b10fe569276ba0b8e3e9feb435b38a0257852a91103629
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f96bdaafd932c34637cbd05415dc4a5c856ecaf386780426d10db5f1dade03a2368c7a767698c385754467b3882bf50faa972a8dedfcd0a5b040777b86d4bb7
|
7
|
+
data.tar.gz: 0cfd3aa1b9750a7ae83dbb21ef737647f64b9cf67cb2a428864b7f22edbccaf317c9dbee205e2995cfdb3809b883f792722aac281a82869477caba3e70d04d23
|
data/.envrc
CHANGED
data/.version
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
0.
|
2
|
-
|
1
|
+
0.8.0
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,48 @@
|
|
1
|
+
# Changelog
|
1
2
|
## [Unreleased]
|
2
3
|
|
3
|
-
##
|
4
|
+
## Released
|
5
|
+
|
6
|
+
### [0.8.0] WIP - 2025-04-15
|
7
|
+
- Updated PromptManager to v0.5.1 which has some of the functionality that was originally developed in the AIA.
|
8
|
+
- Enhanced README.md to include a comprehensive table of configuration options with defaults and associated environment variables.
|
9
|
+
- Added a note in README.md about the expandability of configuration options from a config file for dynamic prompt generation.
|
10
|
+
- Improved shell command protection by ensuring dangerous patterns are checked and confirmed before execution.
|
11
|
+
- Ensured version consistency across `.version`, `aia.gemspec`, and `lib/aia/version.rb`.
|
12
|
+
- Verified and updated documentation to ensure readiness for release on RubyGems.org.
|
13
|
+
|
14
|
+
### [0.7.1] WIP - 2025-03-22
|
15
|
+
- Added `UIPresenter` class for handling user interface presentation.
|
16
|
+
- Added `DirectiveProcessor` class for processing chat-based directives.
|
17
|
+
- Added `HistoryManager` class for managing conversation and variable history.
|
18
|
+
- Added `ShellCommandExecutor` class for executing shell commands.
|
19
|
+
- Added `ChatProcessorService` class for managing conversation processing logic.
|
20
|
+
- Added `PromptProcessor` class for processing prompts.
|
21
|
+
- Enhanced `Session` class to manage interactive session logic.
|
22
|
+
- Updated `Config` class to handle new configuration options and defaults.
|
23
|
+
- Improved handling of chat prompts and AI interactions.
|
24
|
+
- Added support for dynamic content processing in prompts, including shell commands and ERB.
|
25
|
+
- Improved error handling and user feedback for directive processing.
|
26
|
+
- Enhanced logging and output options for chat sessions.
|
27
|
+
|
28
|
+
### [0.7.0] WIP - 2025-03-17
|
29
|
+
- Major code refactoring for better organization and maintainability:
|
30
|
+
- Extracted `DirectiveProcessor` class to handle chat-based directives
|
31
|
+
- Extracted `HistoryManager` class for conversation and variable history management
|
32
|
+
- Extracted `UIPresenter` class for UI-related functionality
|
33
|
+
- Extracted `ChatProcessorService` class for prompt processing and AI interactions
|
34
|
+
- Significantly reduced complexity of the `Session` class by applying separation of concerns
|
35
|
+
- Enhanced the `//clear` directive to properly reset conversation context
|
36
|
+
- Improved output handling to suppress STDOUT when chat mode is off and output file is specified
|
37
|
+
- Updated spinner format in the process_prompt method for better user experience
|
38
|
+
|
39
|
+
### [0.6.?] WIP
|
40
|
+
- Implemented Tony Stark's Clean Slate Protocol on the develop branch
|
41
|
+
|
42
|
+
### [0.5.17] 2024-05-17
|
4
43
|
- removed replaced `semver` with `versionaire`
|
5
44
|
|
6
|
-
|
45
|
+
### [0.5.16] 2024-04-02
|
7
46
|
- fixed prompt pipelines
|
8
47
|
- added //next and //pipeline directives as shortcuts to //config [next,pipeline]
|
9
48
|
- Added new backend "client" as an internal OpenAI client
|
@@ -13,82 +52,82 @@
|
|
13
52
|
- Added --image_size and --image_quality (--is --iq)
|
14
53
|
|
15
54
|
|
16
|
-
|
55
|
+
### [0.5.15] 2024-03-30
|
17
56
|
- Added the ability to accept piped in text to be appeded to the end of the prompt text: curl $URL | aia ad_hoc
|
18
57
|
- Fixed bugs with entering directives as follow-up prompts during a chat session
|
19
58
|
|
20
|
-
|
59
|
+
### [0.5.14] 2024-03-09
|
21
60
|
- Directly access OpenAI to do text to speech when using the `--speak` option
|
22
61
|
- Added --voice to specify which voice to use
|
23
62
|
- Added --speech_model to specify which TTS model to use
|
24
63
|
|
25
|
-
|
64
|
+
### [0.5.13] 2024-03-03
|
26
65
|
- Added CLI-utility `llm` as a backend processor
|
27
66
|
|
28
|
-
|
67
|
+
### [0.5.12] 2024-02-24
|
29
68
|
- Happy Birthday Ruby!
|
30
69
|
- Added --next CLI option
|
31
70
|
- Added --pipeline CLI option
|
32
71
|
|
33
|
-
|
72
|
+
### [0.5.11] 2024-02-18
|
34
73
|
- allow directives to return information that is inserted into the prompt text
|
35
74
|
- added //shell command directive
|
36
75
|
- added //ruby ruby_code directive
|
37
76
|
- added //include path_to_file directive
|
38
77
|
|
39
|
-
|
78
|
+
### [0.5.10] 2024-02-03
|
40
79
|
- Added --roles_dir to isolate roles from other prompts if desired
|
41
80
|
- Changed --prompts to --prompts_dir to be consistent
|
42
81
|
- Refactored common fzf usage into its own tool class
|
43
82
|
|
44
|
-
|
83
|
+
### [0.5.9] 2024-02-01
|
45
84
|
- Added a "I'm working" spinner thing when "--verbose" is used as an indication that the backend is in the process of composing its response to the prompt.
|
46
85
|
|
47
|
-
|
86
|
+
### [0.5.8] 2024-01-17
|
48
87
|
- Changed the behavior of the --dump option. It must now be followed by path/to/file.ext where ext is a supported config file format: yml, yaml, toml
|
49
88
|
|
50
|
-
|
89
|
+
### [0.5.7] 2024-01-15
|
51
90
|
- Added ERB processing to the config_file
|
52
91
|
|
53
|
-
|
92
|
+
### [0.5.6] 2024-01-15
|
54
93
|
- Adding processing for directives, shell integration and erb to the follow up prompt in a chat session
|
55
94
|
- some code refactoring.
|
56
95
|
|
57
96
|
## [0.5.3] 2024-01-14
|
58
97
|
- adding ability to render markdown to the terminal using the "glow" CLI utility
|
59
98
|
|
60
|
-
|
99
|
+
### [0.5.2] 2024-01-13
|
61
100
|
- wrap response when its going to the terminal
|
62
101
|
|
63
|
-
|
102
|
+
### [0.5.1] 2024-01-12
|
64
103
|
- removed a wicked puts "loaded" statement
|
65
104
|
- fixed missed code when the options were changed to --out_file and --log_file
|
66
105
|
- fixed completion functions by updating $PROMPT_DIR to $AIA_PROMPTS_DIR to match the documentation.
|
67
106
|
|
68
|
-
|
107
|
+
### [0.5.0] 2024-01-05
|
69
108
|
- breaking changes:
|
70
109
|
- changed `--config` to `--config_file`
|
71
110
|
- changed `--env` to `--shell`
|
72
111
|
- changed `--output` to `--out_file`
|
73
112
|
- changed default `out_file` to `STDOUT`
|
74
113
|
|
75
|
-
|
114
|
+
### [0.4.3] 2023-12-31
|
76
115
|
- added --env to process embedded system environment variables and shell commands within a prompt.
|
77
116
|
- added --erb to process Embedded RuBy within a prompt because have embedded shell commands will only get you in a trouble. Having ERB will really get you into trouble. Remember the simple prompt is usually the best prompt.
|
78
117
|
|
79
|
-
|
118
|
+
### [0.4.2] 2023-12-31
|
80
119
|
- added the --role CLI option to pre-pend a "role" prompt to the front of a primary prompt.
|
81
120
|
|
82
|
-
|
121
|
+
### [0.4.1] 2023-12-31
|
83
122
|
- added a chat mode
|
84
123
|
- prompt directives now supported
|
85
124
|
- version bumped to match the `prompt_manager` gem
|
86
125
|
|
87
|
-
|
126
|
+
### [0.3.20] 2023-12-28
|
88
127
|
- added work around to issue with multiple context files going to the `mods` backend
|
89
128
|
- added shellwords gem to santize prompt text on the command line
|
90
129
|
|
91
|
-
|
130
|
+
### [0.3.19] 2023-12-26
|
92
131
|
- major code refactoring.
|
93
132
|
- supports config files \*.yml, \*.yaml and \*.toml
|
94
133
|
- usage implemented as a man page. --help will display the man page/
|
@@ -101,10 +140,10 @@
|
|
101
140
|
3. envar values over-rides ...
|
102
141
|
4. default values
|
103
142
|
|
104
|
-
|
143
|
+
### [0.3.0] = 2023-11-23
|
105
144
|
|
106
145
|
- Matching version to [prompt_manager](https://github.com/prompt_manager) This version allows for the user of history in the entery of values to prompt keywords. KW_HISTORY_MAX is set at 5. Changed CLI enteraction to use historical selection and editing of prior keyword values.
|
107
146
|
|
108
|
-
|
147
|
+
### [0.1.0] - 2023-11-23
|
109
148
|
|
110
149
|
- Initial release
|