diff --git a/examples/deployments/basic-ollama/miscellanea.list b/examples/deployments/basic-ollama/miscellanea.list index eed23186b..0967cde30 100644 --- a/examples/deployments/basic-ollama/miscellanea.list +++ b/examples/deployments/basic-ollama/miscellanea.list @@ -1,6 +1,6 @@ # PPC -# https://ppc.mit.edu/ +https://ppc.mit.edu/ # A2 -# https://ppc.mit.edu/a2/ +https://ppc.mit.edu/a2/ # git -# git-https://github.com/archi-physics/archi.git \ No newline at end of file +git-https://github.com/archi-physics/archi.git \ No newline at end of file diff --git a/src/cli/templates/dockerfiles/Dockerfile-chat b/src/cli/templates/dockerfiles/Dockerfile-chat index 06e699f40..e16128793 100644 --- a/src/cli/templates/dockerfiles/Dockerfile-chat +++ b/src/cli/templates/dockerfiles/Dockerfile-chat @@ -10,29 +10,15 @@ COPY LICENSE LICENSE # ensure this directory is present for prod-801 deployment # RUN if [ "$BUILD_ENV" = "prod-801" ] ; then mkdir /root/data/801-content ; fi -# Install Firefox and Geckodriver for Selenium RUN apt-get update && apt-get install -y \ - firefox-esr \ + ca-certificates \ + git \ wget \ gnupg \ - git \ - ca-certificates \ --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# Install Geckodriver (architecture-aware) -ARG TARGETARCH -RUN GECKO_VERSION="v0.36.0" && \ - if [ "$TARGETARCH" = "arm64" ]; then \ - GECKO_ARCH="linux-aarch64"; \ - else \ - GECKO_ARCH="linux64"; \ - fi && \ - wget -q "https://github.com/mozilla/geckodriver/releases/download/${GECKO_VERSION}/geckodriver-${GECKO_VERSION}-${GECKO_ARCH}.tar.gz" \ - && tar -xzf "geckodriver-${GECKO_VERSION}-${GECKO_ARCH}.tar.gz" -C /usr/local/bin \ - && chmod +x /usr/local/bin/geckodriver \ - && rm "geckodriver-${GECKO_VERSION}-${GECKO_ARCH}.tar.gz" COPY archi_code src COPY configs configs diff --git a/src/cli/templates/dockerfiles/Dockerfile-data-manager b/src/cli/templates/dockerfiles/Dockerfile-data-manager index 176d1c158..992b5df32 100644 --- a/src/cli/templates/dockerfiles/Dockerfile-data-manager +++ b/src/cli/templates/dockerfiles/Dockerfile-data-manager @@ -5,29 +5,15 @@ WORKDIR /root/archi COPY LICENSE LICENSE -# Install Firefox and Geckodriver for Selenium RUN apt-get update && apt-get install -y \ - firefox-esr \ + ca-certificates \ + git \ wget \ gnupg \ - git \ - ca-certificates \ --no-install-recommends \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# Install Geckodriver (architecture-aware) -ARG TARGETARCH -RUN GECKO_VERSION="v0.36.0" && \ - if [ "$TARGETARCH" = "arm64" ]; then \ - GECKO_ARCH="linux-aarch64"; \ - else \ - GECKO_ARCH="linux64"; \ - fi && \ - wget -q "https://github.com/mozilla/geckodriver/releases/download/${GECKO_VERSION}/geckodriver-${GECKO_VERSION}-${GECKO_ARCH}.tar.gz" \ - && tar -xzf "geckodriver-${GECKO_VERSION}-${GECKO_ARCH}.tar.gz" -C /usr/local/bin \ - && chmod +x /usr/local/bin/geckodriver \ - && rm "geckodriver-${GECKO_VERSION}-${GECKO_ARCH}.tar.gz" COPY archi_code src COPY configs configs diff --git a/src/interfaces/chat_app/static/chat.css b/src/interfaces/chat_app/static/chat.css index 775d0772c..87bd7dae5 100644 --- a/src/interfaces/chat_app/static/chat.css +++ b/src/interfaces/chat_app/static/chat.css @@ -779,6 +779,19 @@ body { background: var(--code-bg); } +.code-block-wrapper { + margin: 16px 0; + border-radius: 8px; + overflow: hidden; + background: var(--code-bg); +} + +.message-content .code-block-wrapper pre { + margin: 0; + border-radius: 0; + background: transparent; +} + .code-block-header { display: flex; align-items: center; @@ -2118,9 +2131,6 @@ body { opacity: 0.5; cursor: not-allowed; } - border-radius: 4px; - border: 1px solid var(--border-color); -} /* ----------------------------------------------------------------------------- Scrollbar Styling diff --git a/src/interfaces/chat_app/static/chat.js b/src/interfaces/chat_app/static/chat.js index 187f7b4dc..41f0b0370 100644 --- a/src/interfaces/chat_app/static/chat.js +++ b/src/interfaces/chat_app/static/chat.js @@ -530,7 +530,7 @@ const Markdown = { return html.replace( /
/g,
(match, lang) => `
-
+
${lang}
- `
+ `
).replace(
//g,
- `
+ `
code
- `
- );
+ `
+ )
+ .replace(/<\/code><\/pre>/g, `
`);
},
copyCode(button) {
- const pre = button.closest('pre');
- const code = pre.querySelector('code');
+ const wrapper = button.closest('.code-block-wrapper');
+ const code = wrapper.querySelector('code');
const text = code.textContent;
navigator.clipboard.writeText(text).then(() => {