Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/deployments/basic-ollama/miscellanea.list
Original file line number Diff line number Diff line change
@@ -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
git-https://github.com/archi-physics/archi.git
18 changes: 2 additions & 16 deletions src/cli/templates/dockerfiles/Dockerfile-chat
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 2 additions & 16 deletions src/cli/templates/dockerfiles/Dockerfile-data-manager
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 13 additions & 3 deletions src/interfaces/chat_app/static/chat.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -2118,9 +2131,6 @@ body {
opacity: 0.5;
cursor: not-allowed;
}
border-radius: 4px;
border: 1px solid var(--border-color);
}

/* -----------------------------------------------------------------------------
Scrollbar Styling
Expand Down
15 changes: 8 additions & 7 deletions src/interfaces/chat_app/static/chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ const Markdown = {
return html.replace(
/<pre><code class="language-(\w+)">/g,
(match, lang) => `
<pre>
<div class="code-block-wrapper">
<div class="code-block-header">
<span class="code-block-lang">${lang}</span>
<button class="code-block-copy" onclick="Markdown.copyCode(this)">
Expand All @@ -541,10 +541,10 @@ const Markdown = {
<span>Copy</span>
</button>
</div>
<code class="language-${lang}">`
<pre><code class="language-${lang}">`
).replace(
/<pre><code>/g,
`<pre>
`<div class="code-block-wrapper">
<div class="code-block-header">
<span class="code-block-lang">code</span>
<button class="code-block-copy" onclick="Markdown.copyCode(this)">
Expand All @@ -555,13 +555,14 @@ const Markdown = {
<span>Copy</span>
</button>
</div>
<code>`
);
<pre><code>`
)
.replace(/<\/code><\/pre>/g, `</code></pre></div>`);
},

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(() => {
Expand Down