-
Directory Structure
+
Directory Structure
-
+
-
-
+
@@ -81,11 +82,11 @@
-
Files Content
+
Files Content
-
+
diff --git a/src/server/templates/components/tailwind_components.html b/src/server/templates/components/tailwind_components.html
index f0039407..1a148a8b 100644
--- a/src/server/templates/components/tailwind_components.html
+++ b/src/server/templates/components/tailwind_components.html
@@ -1,13 +1,13 @@
diff --git a/src/server/templates/git.jinja b/src/server/templates/git.jinja
index 9d5fe653..f7da466f 100644
--- a/src/server/templates/git.jinja
+++ b/src/server/templates/git.jinja
@@ -1,7 +1,7 @@
{% extends "base.jinja" %}
{% block content %}
{% if error_message %}
-
{{ error_message }}
{% endif %}
diff --git a/src/server/templates/index.jinja b/src/server/templates/index.jinja
index d111eb8f..dd7aee24 100644
--- a/src/server/templates/index.jinja
+++ b/src/server/templates/index.jinja
@@ -15,14 +15,14 @@
This is useful for feeding a codebase into any LLM.
{% if error_message %}
-
{{ error_message }}
{% endif %}
{% with show_examples=true %}
{% include 'components/git_form.jinja' %}
{% endwith %}
-
+
You can also replace 'hub' with 'ingest' in any GitHub URL.
{% include 'components/result.jinja' %}
diff --git a/src/server/templates/swagger_ui.jinja b/src/server/templates/swagger_ui.jinja
index 02185a9e..0575139e 100644
--- a/src/server/templates/swagger_ui.jinja
+++ b/src/server/templates/swagger_ui.jinja
@@ -15,7 +15,7 @@
Turn any Git repository into a simple text digest of its codebase.
This is useful for feeding a codebase into any LLM.
-
+
-
`;
- submitButton.classList.add('bg-[#ffb14d]');
+ submitButton.classList.add('bg-[#ffb14d]', 'dark:bg-gray-700');
}
// Helper function to handle successful response
@@ -249,19 +249,19 @@ function handleSubmit(event, showLoadingSpinner = false) {
if (Array.isArray(data.detail)) {
const details = data.detail.map((d) => `
${d.msg || JSON.stringify(d)}`).join('');
- showError(`
`);
+ showError(`
`);
return;
}
// Other errors
- showError(`
${data.error || JSON.stringify(data) || 'An error occurred.'}
`);
+ showError(`
${data.error || JSON.stringify(data) || 'An error occurred.'}
`);
return;
}
// Handle error in data
if (data.error) {
- showError(`
${data.error}
`);
+ showError(`
${data.error}
`);
return;
}
@@ -270,7 +270,7 @@ function handleSubmit(event, showLoadingSpinner = false) {
})
.catch((error) => {
setButtonLoadingState(submitButton, false);
- showError(`
${error}
`);
+ showError(`
${error}
`);
});
}
@@ -403,9 +403,16 @@ document.addEventListener('DOMContentLoaded', () => {
});
+function toggleTheme() {
+ const isDark = document.documentElement.classList.toggle('dark');
+
+ localStorage.setItem('theme', isDark ? 'dark' : 'light');
+}
+
// Make sure these are available globally
window.handleSubmit = handleSubmit;
window.toggleFile = toggleFile;
window.copyText = copyText;
window.copyFullDigest = copyFullDigest;
window.downloadFullDigest = downloadFullDigest;
+window.toggleTheme = toggleTheme;