commit 87209b77b62d25a5a8ead148ca794a988577009e
Author: root <root@hub.scroll.pub>
Date: 2024-12-27 20:28:12 +0000
Subject: Deleted index.scroll
diff --git a/index.scroll b/index.scroll
deleted file mode 100644
index 7789562..0000000
--- a/index.scroll
+++ /dev/null
@@ -1,8 +0,0 @@
-buildHtml
-baseUrl https://chatgenius.scroll.pub
-metaTags
-editButton /edit.html
-title ChatGenius - Your AI Chat Companion
-style.css
-body.html
-script.js
\ No newline at end of file
commit b49dd6438bd745240c5b547fc1b081adeb18fa59
Author: root <root@hub.scroll.pub>
Date: 2024-12-27 20:27:19 +0000
Subject: Initial commit
diff --git a/body.html b/body.html
new file mode 100644
index 0000000..d07b782
--- /dev/null
+++ b/body.html
@@ -0,0 +1,18 @@
+<header>
+ <h1>ChatGenius</h1>
+ <p>Your AI Chat Companion</p>
+</header>
+
+<main>
+ <div id="chat-container">
+ <div id="chat-history"></div>
+ <div id="input-area">
+ <textarea id="user-input" placeholder="Type your message here..." aria-label="Type your message"></textarea>
+ <button id="send-btn">Send</button>
+ </div>
+ </div>
+</main>
+
+<footer>
+ <p>Powered by AI</p>
+</footer>
\ No newline at end of file
diff --git a/index.scroll b/index.scroll
new file mode 100644
index 0000000..7789562
--- /dev/null
+++ b/index.scroll
@@ -0,0 +1,8 @@
+buildHtml
+baseUrl https://chatgenius.scroll.pub
+metaTags
+editButton /edit.html
+title ChatGenius - Your AI Chat Companion
+style.css
+body.html
+script.js
\ No newline at end of file
diff --git a/prompt.json b/prompt.json
new file mode 100644
index 0000000..a481ea2
--- /dev/null
+++ b/prompt.json
@@ -0,0 +1,25 @@
+{
+ "id": "a7ecbddf-cec8-4f18-aa82-34892a94700e",
+ "object": "chat.completion",
+ "created": 1735331224,
+ "model": "deepseek-chat",
+ "choices": [
+ {
+ "index": 0,
+ "message": {
+ "role": "assistant",
+ "content": "---domain---\nchatgenius.scroll.pub\n---index.scroll---\nbuildHtml\nbaseUrl https://chatgenius.scroll.pub\nmetaTags\neditButton /edit.html\ntitle ChatGenius - Your AI Chat Companion\nstyle.css\nbody.html\nscript.js\n---body.html---\n<header>\n <h1>ChatGenius</h1>\n <p>Your AI Chat Companion</p>\n</header>\n\n<main>\n <div id=\"chat-container\">\n <div id=\"chat-history\"></div>\n <div id=\"input-area\">\n <textarea id=\"user-input\" placeholder=\"Type your message here...\" aria-label=\"Type your message\"></textarea>\n <button id=\"send-btn\">Send</button>\n </div>\n </div>\n</main>\n\n<footer>\n <p>Powered by AI</p>\n</footer>\n---style.css---\n:root {\n --primary-color: #10a37f;\n --secondary-color: #ffffff;\n --background-color: #f7f7f7;\n --text-color: #333333;\n --border-radius: 8px;\n --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);\n}\n\nbody {\n font-family: 'Segoe UI', system-ui, sans-serif;\n margin: 0;\n padding: 0;\n background-color: var(--background-color);\n color: var(--text-color);\n line-height: 1.6;\n min-height: 100vh;\n display: flex;\n flex-direction: column;\n}\n\nheader {\n background-color: var(--primary-color);\n color: var(--secondary-color);\n padding: 2rem;\n text-align: center;\n}\n\nh1 {\n margin: 0;\n font-size: 2.5rem;\n}\n\nmain {\n flex: 1;\n padding: 2rem;\n max-width: 800px;\n margin: 0 auto;\n width: 100%;\n}\n\n#chat-container {\n background-color: var(--secondary-color);\n border-radius: var(--border-radius);\n box-shadow: var(--box-shadow);\n padding: 1.5rem;\n height: 70vh;\n display: flex;\n flex-direction: column;\n}\n\n#chat-history {\n flex: 1;\n overflow-y: auto;\n margin-bottom: 1rem;\n padding-right: 0.5rem;\n}\n\n.message {\n margin-bottom: 1rem;\n padding: 0.75rem;\n border-radius: var(--border-radius);\n max-width: 80%;\n}\n\n.user-message {\n background-color: var(--primary-color);\n color: var(--secondary-color);\n margin-left: auto;\n}\n\n.ai-message {\n background-color: #e9e9e9;\n margin-right: auto;\n}\n\n#input-area {\n display: flex;\n gap: 0.5rem;\n}\n\ntextarea {\n flex: 1;\n padding: 0.75rem;\n border: 1px solid #ddd;\n border-radius: var(--border-radius);\n resize: none;\n min-height: 50px;\n}\n\nbutton {\n background-color: var(--primary-color);\n color: var(--secondary-color);\n border: none;\n padding: 0.75rem 1.5rem;\n border-radius: var(--border-radius);\n cursor: pointer;\n transition: background-color 0.3s ease;\n}\n\nbutton:hover {\n background-color: #0e8a6a;\n}\n\nfooter {\n background-color: var(--primary-color);\n color: var(--secondary-color);\n text-align: center;\n padding: 1rem;\n}\n\n@media (max-width: 768px) {\n h1 {\n font-size: 2rem;\n }\n \n main {\n padding: 1rem;\n }\n \n #chat-container {\n height: 60vh;\n }\n}\n---script.js---\ndocument.addEventListener('DOMContentLoaded', function() {\n const chatHistory = document.getElementById('chat-history');\n const userInput = document.getElementById('user-input');\n const sendBtn = document.getElementById('send-btn');\n\n function addMessage(role, content) {\n const messageDiv = document.createElement('div');\n messageDiv.classList.add('message');\n messageDiv.classList.add(role === 'user' ? 'user-message' : 'ai-message');\n messageDiv.textContent = content;\n chatHistory.appendChild(messageDiv);\n chatHistory.scrollTop = chatHistory.scrollHeight;\n }\n\n async function sendMessage() {\n const message = userInput.value.trim();\n if (!message) return;\n\n addMessage('user', message);\n userInput.value = '';\n\n try {\n const response = await fetch('/api/chat', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({ message }),\n });\n\n const data = await response.json();\n addMessage('ai', data.response);\n } catch (error) {\n addMessage('ai', 'Sorry, something went wrong. Please try again.');\n }\n }\n\n sendBtn.addEventListener('click', sendMessage);\n userInput.addEventListener('keydown', function(e) {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n sendMessage();\n }\n });\n});\n---end---"
+ },
+ "logprobs": null,
+ "finish_reason": "stop"
+ }
+ ],
+ "usage": {
+ "prompt_tokens": 239,
+ "completion_tokens": 1164,
+ "total_tokens": 1403,
+ "prompt_cache_hit_tokens": 0,
+ "prompt_cache_miss_tokens": 239
+ },
+ "system_fingerprint": "fp_f1afce2943"
+}
\ No newline at end of file
diff --git a/readme.scroll b/readme.scroll
new file mode 100644
index 0000000..ffc5815
--- /dev/null
+++ b/readme.scroll
@@ -0,0 +1,2 @@
+# chatgenius.scroll.pub
+Website generated by DeepSeek from prompt: Fully working ChatGPT clone
\ No newline at end of file
diff --git a/script.js b/script.js
new file mode 100644
index 0000000..10fe115
--- /dev/null
+++ b/script.js
@@ -0,0 +1,45 @@
+document.addEventListener('DOMContentLoaded', function() {
+ const chatHistory = document.getElementById('chat-history');
+ const userInput = document.getElementById('user-input');
+ const sendBtn = document.getElementById('send-btn');
+
+ function addMessage(role, content) {
+ const messageDiv = document.createElement('div');
+ messageDiv.classList.add('message');
+ messageDiv.classList.add(role === 'user' ? 'user-message' : 'ai-message');
+ messageDiv.textContent = content;
+ chatHistory.appendChild(messageDiv);
+ chatHistory.scrollTop = chatHistory.scrollHeight;
+ }
+
+ async function sendMessage() {
+ const message = userInput.value.trim();
+ if (!message) return;
+
+ addMessage('user', message);
+ userInput.value = '';
+
+ try {
+ const response = await fetch('/api/chat', {
+ method: 'POST',
+ headers: {
+ 'Content-Type': 'application/json',
+ },
+ body: JSON.stringify({ message }),
+ });
+
+ const data = await response.json();
+ addMessage('ai', data.response);
+ } catch (error) {
+ addMessage('ai', 'Sorry, something went wrong. Please try again.');
+ }
+ }
+
+ sendBtn.addEventListener('click', sendMessage);
+ userInput.addEventListener('keydown', function(e) {
+ if (e.key === 'Enter' && !e.shiftKey) {
+ e.preventDefault();
+ sendMessage();
+ }
+ });
+});
\ No newline at end of file
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..223d959
--- /dev/null
+++ b/style.css
@@ -0,0 +1,124 @@
+:root {
+ --primary-color: #10a37f;
+ --secondary-color: #ffffff;
+ --background-color: #f7f7f7;
+ --text-color: #333333;
+ --border-radius: 8px;
+ --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+}
+
+body {
+ font-family: 'Segoe UI', system-ui, sans-serif;
+ margin: 0;
+ padding: 0;
+ background-color: var(--background-color);
+ color: var(--text-color);
+ line-height: 1.6;
+ min-height: 100vh;
+ display: flex;
+ flex-direction: column;
+}
+
+header {
+ background-color: var(--primary-color);
+ color: var(--secondary-color);
+ padding: 2rem;
+ text-align: center;
+}
+
+h1 {
+ margin: 0;
+ font-size: 2.5rem;
+}
+
+main {
+ flex: 1;
+ padding: 2rem;
+ max-width: 800px;
+ margin: 0 auto;
+ width: 100%;
+}
+
+#chat-container {
+ background-color: var(--secondary-color);
+ border-radius: var(--border-radius);
+ box-shadow: var(--box-shadow);
+ padding: 1.5rem;
+ height: 70vh;
+ display: flex;
+ flex-direction: column;
+}
+
+#chat-history {
+ flex: 1;
+ overflow-y: auto;
+ margin-bottom: 1rem;
+ padding-right: 0.5rem;
+}
+
+.message {
+ margin-bottom: 1rem;
+ padding: 0.75rem;
+ border-radius: var(--border-radius);
+ max-width: 80%;
+}
+
+.user-message {
+ background-color: var(--primary-color);
+ color: var(--secondary-color);
+ margin-left: auto;
+}
+
+.ai-message {
+ background-color: #e9e9e9;
+ margin-right: auto;
+}
+
+#input-area {
+ display: flex;
+ gap: 0.5rem;
+}
+
+textarea {
+ flex: 1;
+ padding: 0.75rem;
+ border: 1px solid #ddd;
+ border-radius: var(--border-radius);
+ resize: none;
+ min-height: 50px;
+}
+
+button {
+ background-color: var(--primary-color);
+ color: var(--secondary-color);
+ border: none;
+ padding: 0.75rem 1.5rem;
+ border-radius: var(--border-radius);
+ cursor: pointer;
+ transition: background-color 0.3s ease;
+}
+
+button:hover {
+ background-color: #0e8a6a;
+}
+
+footer {
+ background-color: var(--primary-color);
+ color: var(--secondary-color);
+ text-align: center;
+ padding: 1rem;
+}
+
+@media (max-width: 768px) {
+ h1 {
+ font-size: 2rem;
+ }
+
+ main {
+ padding: 1rem;
+ }
+
+ #chat-container {
+ height: 60vh;
+ }
+}
\ No newline at end of file