mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-11-23 23:48:56 +01:00
Provide in-line rendering when output matches certain views
This commit is contained in:
parent
ec06d2c446
commit
a0b12b001a
2 changed files with 24 additions and 0 deletions
|
@ -139,6 +139,8 @@
|
|||
newHTML = newHTML.replace(/__([\s\S]*?)__/g, '<u>$1</u>');
|
||||
// Remove any text between <s>[INST] and </s> tags. These are spurious instructions for the AI chat model.
|
||||
newHTML = newHTML.replace(/<s>\[INST\].+(<\/s>)?/g, '');
|
||||
// For any text that has single backticks, replace them with <code> tags
|
||||
newHTML = newHTML.replace(/`([^`]+)`/g, '<code class="chat-response">$1</code>');
|
||||
return newHTML;
|
||||
}
|
||||
|
||||
|
@ -573,6 +575,16 @@
|
|||
margin: 10px;
|
||||
}
|
||||
|
||||
code.chat-response {
|
||||
background: var(--primary-hover);
|
||||
color: var(--primary-inverse);
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
font-size: 14px;
|
||||
font-weight: 300;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
button.reference-button {
|
||||
background: var(--background-color);
|
||||
color: var(--main-text-color);
|
||||
|
|
|
@ -148,6 +148,8 @@ To get started, just start typing below. You can also type / to see a list of co
|
|||
newHTML = newHTML.replace(/__([\s\S]*?)__/g, '<u>$1</u>');
|
||||
// Remove any text between <s>[INST] and </s> tags. These are spurious instructions for the AI chat model.
|
||||
newHTML = newHTML.replace(/<s>\[INST\].+(<\/s>)?/g, '');
|
||||
// For any text that has single backticks, replace them with <code> tags
|
||||
newHTML = newHTML.replace(/`([^`]+)`/g, '<code class="chat-response">$1</code>');
|
||||
return newHTML;
|
||||
}
|
||||
|
||||
|
@ -490,6 +492,16 @@ To get started, just start typing below. You can also type / to see a list of co
|
|||
background: var(--primary-hover);
|
||||
}
|
||||
|
||||
code.chat-response {
|
||||
background: var(--primary-hover);
|
||||
color: var(--primary-inverse);
|
||||
border-radius: 5px;
|
||||
padding: 5px;
|
||||
font-size: 14px;
|
||||
font-weight: 300;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
#chat-body {
|
||||
font-size: medium;
|
||||
margin: 0px;
|
||||
|
|
Loading…
Reference in a new issue