-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GDB-10716: Implement Explain Response Action (#1579)
* GDB-10716: Implement Explain Response Action ## What Introduce the explain response action. ## Why Users should be able to see how an answer was generated. ## How Extend the item chat detail component to display the explain response. * Fixes visualisation of toggle-explain-response-icon * Remove bottom border from explain query header * fixes explain-response-row alignment * Changed to reuse the CONVERSATIONS_ENDPOINT * Rename copy to onCopy * Fixes javadoc * Expose getExplainResponse function * Added error message if explain response failed * Fixes name of onAskHowAnswerWasDerived function * expose getAgent function * Fixes typo * Fixes javadoc * Fixes javadocs and variable name * changed the name onOpenInSparqlEditor * simplify explain response function * Fixes the setting of the agent ID for the chat item model instances. Only the answer has the agent ID. * Removes unnecessary clone of all explain responses * Fixed collapsing of explain responses. * Replace copy functionality with using of copy directive * Disable the links that triggers executing of question. * disable dev mode * fixes MR comments * fixes after rebase --------- Co-authored-by: Svilen Velikov <51084653+svilenvelikov@users.noreply.github.com>
- Loading branch information
1 parent
b6276c9
commit 81f8c72
Showing
20 changed files
with
663 additions
and
176 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
:root { | ||
--border: 1px solid #C2C1C2; | ||
} | ||
|
||
.chat-detail .assistant { | ||
display: flex; | ||
gap: 16px; | ||
} | ||
|
||
.chat-detail .assistant-message { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 10px; | ||
width: 80%; | ||
} | ||
|
||
.chat-detail .assistant-message .answer { | ||
padding: 4px 8px; | ||
line-height: var(--line-height); | ||
} | ||
|
||
.chat-detail .assistant-icon { | ||
width: 40px; | ||
height: 40px; | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
padding: 10px; | ||
} | ||
|
||
.chat-detail .assistant-message .hidden-actions { | ||
opacity: 0 | ||
} | ||
|
||
.chat-detail .assistant-message .toggle-explain-response-icon { | ||
transform: rotate(180deg); | ||
font-size: 0.6rem; | ||
} | ||
|
||
.chat-detail .assistant-message .toggle-explain-response-icon.expanded { | ||
transform: rotate(0deg); | ||
} | ||
|
||
.chat-detail .assistant-message .actions:hover { | ||
opacity: 1; | ||
} | ||
|
||
.chat-detail .assistant-message .actions { | ||
padding-left: 6px; | ||
} | ||
|
||
.chat-detail .assistant-message .derived-answer-hint { | ||
display: flex; | ||
align-items: center; | ||
gap: 8px; | ||
} | ||
|
||
.chat-detail .assistant-message .deliver-answer-btn { | ||
background: none; | ||
border: var(--border); | ||
color: #414041 | ||
} | ||
|
||
.chat-detail .assistant-message .explain-response-wrapper { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 16px; | ||
} | ||
|
||
.chat-detail .assistant-message .explain-responses { | ||
display: flex; | ||
flex-direction: column; | ||
gap: 32px; | ||
} | ||
|
||
/* Better handling of markdown-derived HTML inside the assistant message */ | ||
.chat-detail .assistant-message li > p:has(+:not(p)) { | ||
margin-bottom: 0; | ||
} | ||
|
||
.chat-detail .explain-response { | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.chat-detail .explain-response .explain-response-row { | ||
display: flex; | ||
gap: 10px; | ||
margin: 0 !important; | ||
align-items: center; | ||
} | ||
|
||
.chat-detail .explain-response .label { | ||
color: #1E293B; | ||
font-weight: 400; | ||
} | ||
|
||
.chat-detail .explain-response .explain-query .header { | ||
display: flex; | ||
justify-content: space-between; | ||
background-color: #F3F3F3; | ||
padding: 4px 8px; | ||
} | ||
|
||
.chat-detail .explain-response .explain-query { | ||
border: var(--border); | ||
} | ||
|
||
.chat-detail .explain-response .explain-query .query { | ||
padding: 16px; | ||
} | ||
|
||
.chat-detail .copy-btn { | ||
color: var(--primary-color); | ||
border: none; | ||
background-color: transparent; | ||
cursor: pointer; | ||
padding: 0; | ||
} | ||
|
||
.chat-detail .copy-btn:hover { | ||
transform: scale(1.1); | ||
transition: all 0.1s ease-out; | ||
} | ||
|
||
.chat-detail .copy-btn:focus { | ||
outline: none; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.