Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
acharneski committed Dec 8, 2024
1 parent 67d0e16 commit fc77c1f
Show file tree
Hide file tree
Showing 6 changed files with 1,405 additions and 11 deletions.
18 changes: 11 additions & 7 deletions webapp/src/components/MessageList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,13 +319,17 @@ const MessageList: React.FC<MessageListProps> = ({messages: propMessages}) => {
const filteredMessages = processMessages(messages);
return filteredMessages.map((message) => {
let content = expandMessageReferences(message.content, messages);
// Wrap verbose content in styled component
if (content.includes('class="verbose"')) {
content = content.replace(
/(<[^>]*class="[^"]*verbose[^"]*"[^>]*>)([\s\S]*?)(<\/[^>]*>)/g,
`<span class="verbose-wrapper${verboseMode ? ' verbose-visible' : ''}"">$2</span>`
);
}
// Handle verbose content using DOM manipulation
const tempDiv = document.createElement('div');
tempDiv.innerHTML = content;
const verboseElements = tempDiv.querySelectorAll('[class*="verbose"]');
verboseElements.forEach(element => {
const wrapper = document.createElement('span');
wrapper.className = `verbose-wrapper${verboseMode ? ' verbose-visible' : ''}`;
element.parentNode?.insertBefore(wrapper, element);
wrapper.appendChild(element);
});
content = tempDiv.innerHTML;
return {
...message,
content
Expand Down
6 changes: 3 additions & 3 deletions webui/src/main/resources/application/asset-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"main.css": "/static/css/main.0b4c55b7.css",
"main.js": "/static/js/main.77e58d23.js",
"main.js": "/static/js/main.99ae6882.js",
"static/js/9017.98ad007d.chunk.js": "/static/js/9017.98ad007d.chunk.js",
"static/js/5536.9c75127e.chunk.js": "/static/js/5536.9c75127e.chunk.js",
"static/js/7035.2bce51c5.chunk.js": "/static/js/7035.2bce51c5.chunk.js",
Expand Down Expand Up @@ -72,7 +72,7 @@
"static/js/5195.756798f5.chunk.js": "/static/js/5195.756798f5.chunk.js",
"index.html": "/index.html",
"main.0b4c55b7.css.map": "/static/css/main.0b4c55b7.css.map",
"main.77e58d23.js.map": "/static/js/main.77e58d23.js.map",
"main.99ae6882.js.map": "/static/js/main.99ae6882.js.map",
"9017.98ad007d.chunk.js.map": "/static/js/9017.98ad007d.chunk.js.map",
"5536.9c75127e.chunk.js.map": "/static/js/5536.9c75127e.chunk.js.map",
"7035.2bce51c5.chunk.js.map": "/static/js/7035.2bce51c5.chunk.js.map",
Expand Down Expand Up @@ -139,6 +139,6 @@
},
"entrypoints": [
"static/css/main.0b4c55b7.css",
"static/js/main.77e58d23.js"
"static/js/main.99ae6882.js"
]
}
2 changes: 1 addition & 1 deletion webui/src/main/resources/application/index.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.77e58d23.js"></script><link href="/static/css/main.0b4c55b7.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/manifest.json"/><title>React App</title><script defer="defer" src="/static/js/main.99ae6882.js"></script><link href="/static/css/main.0b4c55b7.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>
1,317 changes: 1,317 additions & 0 deletions webui/src/main/resources/application/static/js/main.99ae6882.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/*!
* Font Awesome Free 6.7.1 by @fontawesome - https://fontawesome.com
* License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
* Copyright 2024 Fonticons, Inc.
*/

/*! @license DOMPurify 3.2.2 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.2.2/LICENSE */

/*! Bundled license information:

js-yaml/dist/js-yaml.mjs:
(*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT *)
*/

/**
* @license React
* react-dom.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react-jsx-runtime.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* react.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* scheduler.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* @license React
* use-sync-external-store-with-selector.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/

Large diffs are not rendered by default.

0 comments on commit fc77c1f

Please sign in to comment.