Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ai_evaluations
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
ai_evaluations
Commits
621478ae
Commit
621478ae
authored
3 months ago
by
Mark Jones
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3487723
: Only show evaluation interactions once message is loaded.
parent
ca6ce387
No related branches found
No related tags found
1 merge request
!5
Issue #3487723: Only show evaluation interactions once message is loaded.
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ai_evaluations.module
+2
-0
2 additions, 0 deletions
ai_evaluations.module
css/evaluations.css
+8
-0
8 additions, 0 deletions
css/evaluations.css
with
10 additions
and
0 deletions
ai_evaluations.module
+
2
−
0
View file @
621478ae
...
...
@@ -52,6 +52,7 @@ function ai_evaluations_preprocess_ai_chatbot_message(&$variables) {
'#theme'
=>
'image'
,
'#uri'
=>
\Drupal
::
moduleHandler
()
->
getModule
(
'ai_evaluations'
)
->
getPath
()
.
'/assets/dislike-button-icon.svg'
,
'#alt'
=>
new
TranslatableMarkup
(
'Downvote'
),
'#title'
=>
new
TranslatableMarkup
(
'This was an unhelpful response'
),
],
Url
::
fromRoute
(
'ai_evaluations.vote'
,
[
'assistant_id'
=>
$variables
[
'assistant_id'
]
??
NULL
,
'thread_id'
=>
$variables
[
'thread_id'
]
??
NULL
,
...
...
@@ -64,6 +65,7 @@ function ai_evaluations_preprocess_ai_chatbot_message(&$variables) {
'#theme'
=>
'image'
,
'#uri'
=>
\Drupal
::
moduleHandler
()
->
getModule
(
'ai_evaluations'
)
->
getPath
()
.
'/assets/like-button-icon.svg'
,
'#alt'
=>
new
TranslatableMarkup
(
'Upvote'
),
'#title'
=>
new
TranslatableMarkup
(
'This was a helpful response'
),
],
Url
::
fromRoute
(
'ai_evaluations.vote'
,
[
'assistant_id'
=>
$variables
[
'assistant_id'
]
??
NULL
,
'thread_id'
=>
$variables
[
'thread_id'
]
??
NULL
,
...
...
This diff is collapsed.
Click to expand it.
css/evaluations.css
+
8
−
0
View file @
621478ae
.chat-message-evaluation
{
display
:
none
;
}
.chat-message--complete
.chat-message-evaluation
{
display
:
block
;
}
.chat-message-evaluation
{
text-align
:
right
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment