prompt_engine 1.0.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 +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +67 -0
- data/Rakefile +22 -0
- data/app/assets/stylesheets/prompt_engine/application.css +22 -0
- data/app/assets/stylesheets/prompt_engine/buttons.css +124 -0
- data/app/assets/stylesheets/prompt_engine/cards.css +63 -0
- data/app/assets/stylesheets/prompt_engine/comparison.css +244 -0
- data/app/assets/stylesheets/prompt_engine/components/_test_runs.css +144 -0
- data/app/assets/stylesheets/prompt_engine/dashboard.css +343 -0
- data/app/assets/stylesheets/prompt_engine/evaluations.css +124 -0
- data/app/assets/stylesheets/prompt_engine/forms.css +198 -0
- data/app/assets/stylesheets/prompt_engine/foundation.css +182 -0
- data/app/assets/stylesheets/prompt_engine/layout.css +75 -0
- data/app/assets/stylesheets/prompt_engine/loading.css +229 -0
- data/app/assets/stylesheets/prompt_engine/notifications.css +78 -0
- data/app/assets/stylesheets/prompt_engine/overrides.css +42 -0
- data/app/assets/stylesheets/prompt_engine/prompts.css +237 -0
- data/app/assets/stylesheets/prompt_engine/sidebar.css +90 -0
- data/app/assets/stylesheets/prompt_engine/tables.css +250 -0
- data/app/assets/stylesheets/prompt_engine/utilities.css +52 -0
- data/app/assets/stylesheets/prompt_engine/versions.css +370 -0
- data/app/clients/prompt_engine/open_ai_evals_client.rb +135 -0
- data/app/controllers/prompt_engine/admin/base_controller.rb +7 -0
- data/app/controllers/prompt_engine/application_controller.rb +4 -0
- data/app/controllers/prompt_engine/dashboard_controller.rb +24 -0
- data/app/controllers/prompt_engine/eval_runs_controller.rb +23 -0
- data/app/controllers/prompt_engine/eval_sets_controller.rb +200 -0
- data/app/controllers/prompt_engine/evaluations_controller.rb +32 -0
- data/app/controllers/prompt_engine/playground_controller.rb +57 -0
- data/app/controllers/prompt_engine/playground_run_results_controller.rb +41 -0
- data/app/controllers/prompt_engine/prompts_controller.rb +70 -0
- data/app/controllers/prompt_engine/settings_controller.rb +28 -0
- data/app/controllers/prompt_engine/test_cases_controller.rb +231 -0
- data/app/controllers/prompt_engine/versions_controller.rb +90 -0
- data/app/helpers/prompt_engine/application_helper.rb +4 -0
- data/app/jobs/prompt_engine/application_job.rb +4 -0
- data/app/mailers/prompt_engine/application_mailer.rb +6 -0
- data/app/models/prompt_engine/application_record.rb +5 -0
- data/app/models/prompt_engine/eval_result.rb +19 -0
- data/app/models/prompt_engine/eval_run.rb +40 -0
- data/app/models/prompt_engine/eval_set.rb +97 -0
- data/app/models/prompt_engine/parameter.rb +126 -0
- data/app/models/prompt_engine/parameter_parser.rb +39 -0
- data/app/models/prompt_engine/playground_run_result.rb +20 -0
- data/app/models/prompt_engine/prompt.rb +192 -0
- data/app/models/prompt_engine/prompt_version.rb +72 -0
- data/app/models/prompt_engine/setting.rb +45 -0
- data/app/models/prompt_engine/test_case.rb +29 -0
- data/app/services/prompt_engine/evaluation_runner.rb +258 -0
- data/app/services/prompt_engine/playground_executor.rb +124 -0
- data/app/services/prompt_engine/variable_detector.rb +97 -0
- data/app/views/layouts/prompt_engine/admin.html.erb +65 -0
- data/app/views/layouts/prompt_engine/application.html.erb +17 -0
- data/app/views/prompt_engine/dashboard/index.html.erb +230 -0
- data/app/views/prompt_engine/eval_runs/show.html.erb +204 -0
- data/app/views/prompt_engine/eval_sets/compare.html.erb +229 -0
- data/app/views/prompt_engine/eval_sets/edit.html.erb +111 -0
- data/app/views/prompt_engine/eval_sets/index.html.erb +63 -0
- data/app/views/prompt_engine/eval_sets/metrics.html.erb +371 -0
- data/app/views/prompt_engine/eval_sets/new.html.erb +113 -0
- data/app/views/prompt_engine/eval_sets/show.html.erb +235 -0
- data/app/views/prompt_engine/evaluations/index.html.erb +194 -0
- data/app/views/prompt_engine/playground/result.html.erb +58 -0
- data/app/views/prompt_engine/playground/show.html.erb +129 -0
- data/app/views/prompt_engine/playground_run_results/index.html.erb +99 -0
- data/app/views/prompt_engine/playground_run_results/show.html.erb +123 -0
- data/app/views/prompt_engine/prompts/_form.html.erb +224 -0
- data/app/views/prompt_engine/prompts/edit.html.erb +9 -0
- data/app/views/prompt_engine/prompts/index.html.erb +80 -0
- data/app/views/prompt_engine/prompts/new.html.erb +9 -0
- data/app/views/prompt_engine/prompts/show.html.erb +297 -0
- data/app/views/prompt_engine/settings/edit.html.erb +93 -0
- data/app/views/prompt_engine/shared/_form_errors.html.erb +16 -0
- data/app/views/prompt_engine/test_cases/edit.html.erb +72 -0
- data/app/views/prompt_engine/test_cases/import.html.erb +92 -0
- data/app/views/prompt_engine/test_cases/import_preview.html.erb +103 -0
- data/app/views/prompt_engine/test_cases/new.html.erb +79 -0
- data/app/views/prompt_engine/versions/_version_card.html.erb +56 -0
- data/app/views/prompt_engine/versions/compare.html.erb +82 -0
- data/app/views/prompt_engine/versions/index.html.erb +96 -0
- data/app/views/prompt_engine/versions/show.html.erb +98 -0
- data/config/routes.rb +61 -0
- data/db/migrate/20250124000001_create_eval_tables.rb +43 -0
- data/db/migrate/20250124000002_add_open_ai_fields_to_evals.rb +11 -0
- data/db/migrate/20250125000001_add_grader_fields_to_eval_sets.rb +8 -0
- data/db/migrate/20250723161909_create_prompts.rb +17 -0
- data/db/migrate/20250723184757_create_prompt_engine_versions.rb +24 -0
- data/db/migrate/20250723203838_create_prompt_engine_parameters.rb +20 -0
- data/db/migrate/20250724160623_create_prompt_engine_playground_run_results.rb +30 -0
- data/db/migrate/20250724165118_create_prompt_engine_settings.rb +14 -0
- data/lib/prompt_engine/engine.rb +25 -0
- data/lib/prompt_engine/version.rb +3 -0
- data/lib/prompt_engine.rb +33 -0
- data/lib/tasks/active_prompt_tasks.rake +32 -0
- data/lib/tasks/eval_demo.rake +149 -0
- metadata +293 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: ff080a302295b4fa4c7e44073f35e9063d347189e1735a17b12f939592dd666d
|
4
|
+
data.tar.gz: 67120aafde4e7f86942aa7e1cda951fa2a1360ec29cbad463dc1e800c91c2100
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: d3ca1b299754fa4d91f2160a8b77da940fdc4e40eb3a10f56338d32bfa993b07650cd0cea463353e39dd8ccb59aabbc7526a9b5e624e8d9419e8edee0a5ce37c
|
7
|
+
data.tar.gz: 17bfa392e4971b830082ff6c70c18a2b56a19d7f3581eeae5111c43b7e34f3d9a2696a9daff72d3eacd81bcb23a5743f0c8b1f4c78e64744f9ddde859c73d920
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright Avi Flombaum
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# PromptEngine
|
2
|
+
|
3
|
+
A Rails engine for managing AI prompts with version control and secure API key storage.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
Add this line to your application's Gemfile:
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
gem "prompt_engine"
|
10
|
+
```
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
```bash
|
14
|
+
$ bundle
|
15
|
+
$ rails prompt_engine:install:migrations
|
16
|
+
$ rails db:migrate
|
17
|
+
```
|
18
|
+
|
19
|
+
## Setup
|
20
|
+
|
21
|
+
### Configure Encryption
|
22
|
+
|
23
|
+
PromptEngine uses Rails encryption to secure API keys. Add to your environment files:
|
24
|
+
|
25
|
+
```ruby
|
26
|
+
# config/environments/development.rb
|
27
|
+
config.active_record.encryption.primary_key = 'development' * 4
|
28
|
+
config.active_record.encryption.deterministic_key = 'development' * 4
|
29
|
+
config.active_record.encryption.key_derivation_salt = 'development' * 4
|
30
|
+
```
|
31
|
+
|
32
|
+
For production, use `rails db:encryption:init` to generate secure keys.
|
33
|
+
|
34
|
+
### Configure API Keys
|
35
|
+
|
36
|
+
PromptEngine requires API keys for AI providers. See [API Credentials Setup](docs/API_CREDENTIALS.md) for detailed configuration instructions.
|
37
|
+
|
38
|
+
Quick setup:
|
39
|
+
```bash
|
40
|
+
rails credentials:edit
|
41
|
+
```
|
42
|
+
|
43
|
+
Add your API keys:
|
44
|
+
```yaml
|
45
|
+
openai:
|
46
|
+
api_key: sk-your-openai-api-key
|
47
|
+
anthropic:
|
48
|
+
api_key: sk-ant-your-anthropic-api-key
|
49
|
+
```
|
50
|
+
|
51
|
+
### Mount the Engine
|
52
|
+
|
53
|
+
In your `config/routes.rb`:
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
mount PromptEngine::Engine => "/prompt_engine"
|
57
|
+
```
|
58
|
+
|
59
|
+
## Usage
|
60
|
+
|
61
|
+
Visit `/prompt_engine` to access the admin interface.
|
62
|
+
|
63
|
+
## Contributing
|
64
|
+
Contribution directions go here.
|
65
|
+
|
66
|
+
## License
|
67
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
require "bundler/setup"
|
2
|
+
|
3
|
+
APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
|
4
|
+
load "rails/tasks/engine.rake"
|
5
|
+
|
6
|
+
load "rails/tasks/statistics.rake"
|
7
|
+
|
8
|
+
require "bundler/gem_tasks"
|
9
|
+
|
10
|
+
require "rspec/core"
|
11
|
+
require "rspec/core/rake_task"
|
12
|
+
|
13
|
+
desc "Run all specs in spec directory"
|
14
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
15
|
+
t.pattern = "spec/**{,/*/**}/*_spec.rb"
|
16
|
+
end
|
17
|
+
|
18
|
+
# Add setup task shortcut
|
19
|
+
desc "Setup PromptEngine dummy app for development and testing"
|
20
|
+
task setup: "app:prompt_engine:setup"
|
21
|
+
|
22
|
+
task default: :spec
|
@@ -0,0 +1,22 @@
|
|
1
|
+
/* PromptEngine Admin Styles
|
2
|
+
*
|
3
|
+
* Import all component styles in the correct order
|
4
|
+
*/
|
5
|
+
|
6
|
+
@import url("foundation.css");
|
7
|
+
@import url("layout.css");
|
8
|
+
@import url("sidebar.css");
|
9
|
+
@import url("buttons.css");
|
10
|
+
@import url("forms.css");
|
11
|
+
@import url("tables.css");
|
12
|
+
@import url("cards.css");
|
13
|
+
@import url("dashboard.css");
|
14
|
+
@import url("prompts.css");
|
15
|
+
@import url("versions.css");
|
16
|
+
@import url("notifications.css");
|
17
|
+
@import url("loading.css");
|
18
|
+
@import url("comparison.css");
|
19
|
+
@import url("evaluations.css");
|
20
|
+
@import url("utilities.css");
|
21
|
+
@import url("overrides.css");
|
22
|
+
@import url("components/_test_runs.css");
|
@@ -0,0 +1,124 @@
|
|
1
|
+
/* Button Component */
|
2
|
+
.btn {
|
3
|
+
display: inline-flex;
|
4
|
+
align-items: center;
|
5
|
+
justify-content: center;
|
6
|
+
font-family: inherit;
|
7
|
+
font-weight: 500;
|
8
|
+
text-decoration: none;
|
9
|
+
border: 1px solid transparent;
|
10
|
+
border-radius: var(--radius-md);
|
11
|
+
cursor: pointer;
|
12
|
+
transition: all var(--transition-fast);
|
13
|
+
white-space: nowrap;
|
14
|
+
user-select: none;
|
15
|
+
vertical-align: middle;
|
16
|
+
-webkit-appearance: none;
|
17
|
+
-moz-appearance: none;
|
18
|
+
appearance: none;
|
19
|
+
min-height: 2.25rem;
|
20
|
+
gap: 0.5rem;
|
21
|
+
}
|
22
|
+
|
23
|
+
.btn:focus {
|
24
|
+
outline: 2px solid transparent;
|
25
|
+
outline-offset: 2px;
|
26
|
+
}
|
27
|
+
|
28
|
+
.btn:focus-visible {
|
29
|
+
box-shadow:
|
30
|
+
0 0 0 2px var(--color-gray-50),
|
31
|
+
0 0 0 4px var(--color-primary-500);
|
32
|
+
}
|
33
|
+
|
34
|
+
/* Button Sizes */
|
35
|
+
.btn--small {
|
36
|
+
padding: 0.375rem 0.75rem;
|
37
|
+
font-size: var(--font-size-sm);
|
38
|
+
line-height: 1.5;
|
39
|
+
}
|
40
|
+
|
41
|
+
.btn--medium {
|
42
|
+
padding: 0.5rem 1rem;
|
43
|
+
font-size: var(--font-size-sm);
|
44
|
+
line-height: 1.5;
|
45
|
+
}
|
46
|
+
|
47
|
+
.btn--large {
|
48
|
+
padding: 0.625rem 1.25rem;
|
49
|
+
font-size: var(--font-size-base);
|
50
|
+
line-height: 1.5;
|
51
|
+
}
|
52
|
+
|
53
|
+
/* Primary Button */
|
54
|
+
.btn--primary {
|
55
|
+
background-color: var(--color-primary-600);
|
56
|
+
color: white;
|
57
|
+
border-color: var(--color-primary-600);
|
58
|
+
padding: var(--spacing-sm);
|
59
|
+
}
|
60
|
+
|
61
|
+
.btn--primary:hover {
|
62
|
+
background-color: var(--color-primary-700);
|
63
|
+
border-color: var(--color-primary-700);
|
64
|
+
color: white;
|
65
|
+
text-decoration: none;
|
66
|
+
}
|
67
|
+
|
68
|
+
.btn--primary:active {
|
69
|
+
background-color: var(--color-primary-800);
|
70
|
+
border-color: var(--color-primary-800);
|
71
|
+
color: white;
|
72
|
+
}
|
73
|
+
|
74
|
+
/* Secondary Button */
|
75
|
+
.btn--secondary {
|
76
|
+
background-color: white;
|
77
|
+
color: var(--color-gray-700);
|
78
|
+
border-color: var(--color-gray-300);
|
79
|
+
}
|
80
|
+
|
81
|
+
.btn--secondary:hover {
|
82
|
+
background-color: var(--color-gray-50);
|
83
|
+
color: var(--color-gray-900);
|
84
|
+
text-decoration: none;
|
85
|
+
}
|
86
|
+
|
87
|
+
.btn--secondary:active {
|
88
|
+
background-color: var(--color-gray-100);
|
89
|
+
}
|
90
|
+
|
91
|
+
/* Danger Button */
|
92
|
+
.btn--danger {
|
93
|
+
background-color: var(--color-danger);
|
94
|
+
color: white;
|
95
|
+
border-color: var(--color-danger);
|
96
|
+
}
|
97
|
+
|
98
|
+
.btn--danger:hover {
|
99
|
+
background-color: var(--color-danger-hover);
|
100
|
+
border-color: var(--color-danger-hover);
|
101
|
+
color: white;
|
102
|
+
text-decoration: none;
|
103
|
+
}
|
104
|
+
|
105
|
+
.btn--danger:active {
|
106
|
+
background-color: #b91c1c;
|
107
|
+
border-color: #b91c1c;
|
108
|
+
color: white;
|
109
|
+
}
|
110
|
+
|
111
|
+
/* Disabled State */
|
112
|
+
.btn:disabled,
|
113
|
+
.btn--disabled {
|
114
|
+
opacity: 0.5;
|
115
|
+
cursor: not-allowed;
|
116
|
+
pointer-events: none;
|
117
|
+
}
|
118
|
+
|
119
|
+
/* Button Group */
|
120
|
+
.btn-group {
|
121
|
+
display: inline-flex;
|
122
|
+
gap: var(--spacing-sm);
|
123
|
+
align-items: center;
|
124
|
+
}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
/* Card Components */
|
2
|
+
.card {
|
3
|
+
background-color: white;
|
4
|
+
border: 1px solid var(--color-gray-200);
|
5
|
+
border-radius: var(--radius-lg);
|
6
|
+
box-shadow: var(--shadow-sm);
|
7
|
+
overflow: hidden;
|
8
|
+
}
|
9
|
+
|
10
|
+
.card--shadowed {
|
11
|
+
box-shadow: var(--shadow-md);
|
12
|
+
border: none;
|
13
|
+
}
|
14
|
+
|
15
|
+
/* Card Header */
|
16
|
+
.card__header {
|
17
|
+
padding: var(--spacing-lg);
|
18
|
+
border-bottom: 1px solid var(--color-gray-200);
|
19
|
+
background-color: var(--color-gray-50);
|
20
|
+
display: flex;
|
21
|
+
justify-content: space-between;
|
22
|
+
align-items: center;
|
23
|
+
}
|
24
|
+
|
25
|
+
.card__title {
|
26
|
+
font-size: var(--font-size-lg);
|
27
|
+
font-weight: 600;
|
28
|
+
color: var(--color-gray-900);
|
29
|
+
margin: 0;
|
30
|
+
}
|
31
|
+
|
32
|
+
.card__actions {
|
33
|
+
flex-shrink: 0;
|
34
|
+
margin-left: var(--spacing-md);
|
35
|
+
}
|
36
|
+
|
37
|
+
|
38
|
+
/* Card Body */
|
39
|
+
.card__body {
|
40
|
+
padding: var(--spacing-lg);
|
41
|
+
}
|
42
|
+
|
43
|
+
.card__body--compact {
|
44
|
+
padding: var(--spacing-md);
|
45
|
+
}
|
46
|
+
|
47
|
+
|
48
|
+
/* Card Sections */
|
49
|
+
.card__section {
|
50
|
+
padding: var(--spacing-lg) 0;
|
51
|
+
}
|
52
|
+
|
53
|
+
.card__section:first-child {
|
54
|
+
padding-top: 0;
|
55
|
+
}
|
56
|
+
|
57
|
+
.card__section:last-child {
|
58
|
+
padding-bottom: 0;
|
59
|
+
}
|
60
|
+
|
61
|
+
.card__section + .card__section {
|
62
|
+
border-top: 1px solid var(--color-gray-200);
|
63
|
+
}
|
@@ -0,0 +1,244 @@
|
|
1
|
+
/* Comparison View Styles */
|
2
|
+
|
3
|
+
/* Comparison Grid */
|
4
|
+
.comparison-grid {
|
5
|
+
display: grid;
|
6
|
+
grid-template-columns: 1fr auto 1fr;
|
7
|
+
gap: var(--spacing-lg);
|
8
|
+
align-items: start;
|
9
|
+
}
|
10
|
+
|
11
|
+
@media (max-width: 1024px) {
|
12
|
+
.comparison-grid {
|
13
|
+
grid-template-columns: 1fr;
|
14
|
+
gap: var(--spacing-xl);
|
15
|
+
}
|
16
|
+
|
17
|
+
.comparison-divider {
|
18
|
+
display: none;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
/* Comparison Column */
|
23
|
+
.comparison-column {
|
24
|
+
flex: 1;
|
25
|
+
min-width: 0;
|
26
|
+
}
|
27
|
+
|
28
|
+
.comparison-header {
|
29
|
+
display: flex;
|
30
|
+
flex-direction: column;
|
31
|
+
gap: var(--spacing-sm);
|
32
|
+
margin-bottom: var(--spacing-lg);
|
33
|
+
padding-bottom: var(--spacing-md);
|
34
|
+
border-bottom: 1px solid var(--color-gray-200);
|
35
|
+
}
|
36
|
+
|
37
|
+
.comparison-header h4 {
|
38
|
+
margin: 0;
|
39
|
+
font-size: var(--font-size-lg);
|
40
|
+
font-weight: 600;
|
41
|
+
color: var(--color-gray-900);
|
42
|
+
}
|
43
|
+
|
44
|
+
/* Comparison Divider */
|
45
|
+
.comparison-divider {
|
46
|
+
width: 1px;
|
47
|
+
background-color: var(--color-gray-200);
|
48
|
+
align-self: stretch;
|
49
|
+
position: relative;
|
50
|
+
display: flex;
|
51
|
+
align-items: center;
|
52
|
+
justify-content: center;
|
53
|
+
}
|
54
|
+
|
55
|
+
/* Comparison Indicator */
|
56
|
+
.comparison-indicator {
|
57
|
+
position: absolute;
|
58
|
+
background: white;
|
59
|
+
padding: var(--spacing-md);
|
60
|
+
border-radius: var(--radius-full);
|
61
|
+
box-shadow: var(--shadow-md);
|
62
|
+
}
|
63
|
+
|
64
|
+
.indicator {
|
65
|
+
display: flex;
|
66
|
+
align-items: center;
|
67
|
+
gap: var(--spacing-xs);
|
68
|
+
font-weight: 600;
|
69
|
+
font-size: var(--font-size-lg);
|
70
|
+
}
|
71
|
+
|
72
|
+
.indicator__icon {
|
73
|
+
width: 1.5rem;
|
74
|
+
height: 1.5rem;
|
75
|
+
}
|
76
|
+
|
77
|
+
.indicator--success {
|
78
|
+
color: var(--color-success);
|
79
|
+
}
|
80
|
+
|
81
|
+
.indicator--danger {
|
82
|
+
color: var(--color-danger);
|
83
|
+
}
|
84
|
+
|
85
|
+
.indicator--neutral {
|
86
|
+
color: var(--color-gray-500);
|
87
|
+
}
|
88
|
+
|
89
|
+
/* Comparison Metrics */
|
90
|
+
.comparison-metrics {
|
91
|
+
display: flex;
|
92
|
+
flex-direction: column;
|
93
|
+
gap: var(--spacing-lg);
|
94
|
+
}
|
95
|
+
|
96
|
+
.metric {
|
97
|
+
text-align: center;
|
98
|
+
}
|
99
|
+
|
100
|
+
.metric__label {
|
101
|
+
font-size: var(--font-size-sm);
|
102
|
+
color: var(--color-gray-600);
|
103
|
+
margin-bottom: var(--spacing-xs);
|
104
|
+
}
|
105
|
+
|
106
|
+
.metric__value {
|
107
|
+
font-size: var(--font-size-lg);
|
108
|
+
font-weight: 600;
|
109
|
+
color: var(--color-gray-900);
|
110
|
+
}
|
111
|
+
|
112
|
+
.metric__value--large {
|
113
|
+
font-size: var(--font-size-2xl);
|
114
|
+
}
|
115
|
+
|
116
|
+
/* Comparison Content */
|
117
|
+
.comparison-content {
|
118
|
+
display: flex;
|
119
|
+
flex-direction: column;
|
120
|
+
gap: var(--spacing-lg);
|
121
|
+
}
|
122
|
+
|
123
|
+
.comparison-section {
|
124
|
+
display: flex;
|
125
|
+
flex-direction: column;
|
126
|
+
gap: var(--spacing-sm);
|
127
|
+
}
|
128
|
+
|
129
|
+
.comparison-section__title {
|
130
|
+
font-size: var(--font-size-sm);
|
131
|
+
font-weight: 600;
|
132
|
+
color: var(--color-gray-700);
|
133
|
+
margin: 0;
|
134
|
+
}
|
135
|
+
|
136
|
+
/* Prompt Content for Comparison */
|
137
|
+
.prompt-content--comparison {
|
138
|
+
background-color: var(--color-gray-50);
|
139
|
+
border: 1px solid var(--color-gray-200);
|
140
|
+
border-radius: var(--radius-md);
|
141
|
+
padding: var(--spacing-md);
|
142
|
+
font-family: var(--font-mono);
|
143
|
+
font-size: var(--font-size-sm);
|
144
|
+
line-height: 1.6;
|
145
|
+
white-space: pre-wrap;
|
146
|
+
word-break: break-word;
|
147
|
+
max-height: 400px;
|
148
|
+
overflow-y: auto;
|
149
|
+
margin: 0;
|
150
|
+
}
|
151
|
+
|
152
|
+
/* Comparison List */
|
153
|
+
.comparison-list {
|
154
|
+
display: grid;
|
155
|
+
grid-template-columns: auto 1fr;
|
156
|
+
gap: var(--spacing-sm) var(--spacing-md);
|
157
|
+
margin: 0;
|
158
|
+
}
|
159
|
+
|
160
|
+
.comparison-list dt {
|
161
|
+
font-weight: 500;
|
162
|
+
color: var(--color-gray-600);
|
163
|
+
font-size: var(--font-size-sm);
|
164
|
+
}
|
165
|
+
|
166
|
+
.comparison-list dd {
|
167
|
+
font-weight: 500;
|
168
|
+
color: var(--color-gray-900);
|
169
|
+
margin: 0;
|
170
|
+
}
|
171
|
+
|
172
|
+
/* Table Checkbox Column */
|
173
|
+
.table__checkbox-column {
|
174
|
+
width: 60px;
|
175
|
+
text-align: center;
|
176
|
+
padding: var(--spacing-sm);
|
177
|
+
}
|
178
|
+
|
179
|
+
.compare-checkbox {
|
180
|
+
cursor: pointer;
|
181
|
+
width: 1rem;
|
182
|
+
height: 1rem;
|
183
|
+
}
|
184
|
+
|
185
|
+
.compare-checkbox:disabled {
|
186
|
+
cursor: not-allowed;
|
187
|
+
opacity: 0.5;
|
188
|
+
}
|
189
|
+
|
190
|
+
/* Visual Diff Highlighting */
|
191
|
+
.diff-added {
|
192
|
+
background-color: rgba(34, 197, 94, 0.1);
|
193
|
+
color: var(--color-success);
|
194
|
+
padding: 0.125rem 0.25rem;
|
195
|
+
border-radius: var(--radius-sm);
|
196
|
+
}
|
197
|
+
|
198
|
+
.diff-removed {
|
199
|
+
background-color: rgba(239, 68, 68, 0.1);
|
200
|
+
color: var(--color-danger);
|
201
|
+
text-decoration: line-through;
|
202
|
+
padding: 0.125rem 0.25rem;
|
203
|
+
border-radius: var(--radius-sm);
|
204
|
+
}
|
205
|
+
|
206
|
+
.diff-changed {
|
207
|
+
background-color: rgba(251, 146, 60, 0.1);
|
208
|
+
color: var(--color-warning);
|
209
|
+
padding: 0.125rem 0.25rem;
|
210
|
+
border-radius: var(--radius-sm);
|
211
|
+
}
|
212
|
+
|
213
|
+
/* Text Utilities for Comparison */
|
214
|
+
.text-warning {
|
215
|
+
color: var(--color-warning);
|
216
|
+
}
|
217
|
+
|
218
|
+
/* Responsive Adjustments */
|
219
|
+
@media (max-width: 768px) {
|
220
|
+
.comparison-grid {
|
221
|
+
gap: var(--spacing-md);
|
222
|
+
}
|
223
|
+
|
224
|
+
.comparison-header {
|
225
|
+
flex-direction: row;
|
226
|
+
flex-wrap: wrap;
|
227
|
+
align-items: center;
|
228
|
+
gap: var(--spacing-xs);
|
229
|
+
}
|
230
|
+
|
231
|
+
.comparison-metrics {
|
232
|
+
flex-direction: row;
|
233
|
+
justify-content: space-around;
|
234
|
+
}
|
235
|
+
|
236
|
+
.metric {
|
237
|
+
flex: 1;
|
238
|
+
}
|
239
|
+
|
240
|
+
.prompt-content--comparison {
|
241
|
+
max-height: 300px;
|
242
|
+
font-size: var(--font-size-xs);
|
243
|
+
}
|
244
|
+
}
|
@@ -0,0 +1,144 @@
|
|
1
|
+
/* Test Runs List */
|
2
|
+
.test-runs-list {
|
3
|
+
display: flex;
|
4
|
+
flex-direction: column;
|
5
|
+
gap: 0;
|
6
|
+
}
|
7
|
+
|
8
|
+
.test-run-item {
|
9
|
+
display: flex;
|
10
|
+
align-items: center;
|
11
|
+
justify-content: space-between;
|
12
|
+
padding: 0.75rem 0;
|
13
|
+
border-bottom: 1px solid hsl(var(--border));
|
14
|
+
transition: all 0.2s;
|
15
|
+
}
|
16
|
+
|
17
|
+
.test-run-item:last-child {
|
18
|
+
border-bottom: none;
|
19
|
+
}
|
20
|
+
|
21
|
+
.test-run-item:hover {
|
22
|
+
background-color: hsl(var(--muted) / 0.3);
|
23
|
+
}
|
24
|
+
|
25
|
+
.test-run-item__main {
|
26
|
+
display: flex;
|
27
|
+
flex-direction: column;
|
28
|
+
gap: 0.5rem;
|
29
|
+
flex: 1;
|
30
|
+
}
|
31
|
+
|
32
|
+
.test-run-item__info {
|
33
|
+
display: flex;
|
34
|
+
align-items: center;
|
35
|
+
gap: 1rem;
|
36
|
+
flex-wrap: wrap;
|
37
|
+
}
|
38
|
+
|
39
|
+
.test-run-item__date {
|
40
|
+
font-size: 0.875rem;
|
41
|
+
color: hsl(var(--foreground));
|
42
|
+
font-weight: 500;
|
43
|
+
}
|
44
|
+
|
45
|
+
.test-run-item__version {
|
46
|
+
font-size: 0.75rem;
|
47
|
+
padding: 0.125rem 0.5rem;
|
48
|
+
background-color: hsl(var(--primary) / 0.1);
|
49
|
+
color: hsl(var(--primary));
|
50
|
+
border-radius: 0.25rem;
|
51
|
+
font-weight: 500;
|
52
|
+
}
|
53
|
+
|
54
|
+
.test-run-item__provider {
|
55
|
+
font-size: 0.75rem;
|
56
|
+
padding: 0.125rem 0.5rem;
|
57
|
+
background-color: hsl(var(--muted));
|
58
|
+
color: hsl(var(--muted-foreground));
|
59
|
+
border-radius: 0.25rem;
|
60
|
+
text-transform: capitalize;
|
61
|
+
}
|
62
|
+
|
63
|
+
.test-run-item__model {
|
64
|
+
font-size: 0.75rem;
|
65
|
+
color: hsl(var(--muted-foreground));
|
66
|
+
}
|
67
|
+
|
68
|
+
.test-run-item__metrics {
|
69
|
+
display: flex;
|
70
|
+
align-items: center;
|
71
|
+
gap: 1rem;
|
72
|
+
font-size: 0.75rem;
|
73
|
+
color: hsl(var(--muted-foreground));
|
74
|
+
}
|
75
|
+
|
76
|
+
.test-run-item__time {
|
77
|
+
display: flex;
|
78
|
+
align-items: center;
|
79
|
+
gap: 0.25rem;
|
80
|
+
}
|
81
|
+
|
82
|
+
.test-run-item__time::before {
|
83
|
+
content: "⏱";
|
84
|
+
opacity: 0.7;
|
85
|
+
}
|
86
|
+
|
87
|
+
.test-run-item__tokens {
|
88
|
+
display: flex;
|
89
|
+
align-items: center;
|
90
|
+
gap: 0.25rem;
|
91
|
+
}
|
92
|
+
|
93
|
+
.test-run-item__tokens::before {
|
94
|
+
content: "🎯";
|
95
|
+
opacity: 0.7;
|
96
|
+
}
|
97
|
+
|
98
|
+
.test-run-item__actions {
|
99
|
+
flex-shrink: 0;
|
100
|
+
}
|
101
|
+
|
102
|
+
|
103
|
+
/* Small button variant */
|
104
|
+
.btn--sm {
|
105
|
+
padding: 0.25rem 0.75rem;
|
106
|
+
font-size: 0.875rem;
|
107
|
+
height: auto;
|
108
|
+
min-height: 0;
|
109
|
+
}
|
110
|
+
|
111
|
+
/* Parameter value display */
|
112
|
+
.parameter-value {
|
113
|
+
font-family: var(--font-mono);
|
114
|
+
font-size: 0.875rem;
|
115
|
+
color: hsl(var(--foreground));
|
116
|
+
background-color: hsl(var(--muted));
|
117
|
+
padding: 0.125rem 0.5rem;
|
118
|
+
border-radius: 0.25rem;
|
119
|
+
display: inline-block;
|
120
|
+
}
|
121
|
+
|
122
|
+
/* Link styling */
|
123
|
+
.link {
|
124
|
+
color: hsl(var(--primary));
|
125
|
+
text-decoration: none;
|
126
|
+
transition: opacity 0.2s;
|
127
|
+
}
|
128
|
+
|
129
|
+
.link:hover {
|
130
|
+
opacity: 0.8;
|
131
|
+
text-decoration: underline;
|
132
|
+
}
|
133
|
+
|
134
|
+
/* Empty state */
|
135
|
+
.empty-state {
|
136
|
+
text-align: center;
|
137
|
+
padding: 3rem 1rem;
|
138
|
+
}
|
139
|
+
|
140
|
+
.empty-state__message {
|
141
|
+
color: hsl(var(--muted-foreground));
|
142
|
+
margin-bottom: 1.5rem;
|
143
|
+
font-size: 1.125rem;
|
144
|
+
}
|