Compare commits
6 commits
a8bff4e1a7
...
4987a15858
| Author | SHA1 | Date | |
|---|---|---|---|
| 4987a15858 | |||
| 785187868e | |||
| 68bb516ec2 | |||
| ea8003e213 | |||
| a3747a794f | |||
| e5796fa64c |
7 changed files with 3028 additions and 2944 deletions
|
|
@ -289,7 +289,7 @@ pub async fn serve_minimal() -> impl IntoResponse {
|
||||||
};
|
};
|
||||||
|
|
||||||
match html_res {
|
match html_res {
|
||||||
Ok(html) => (StatusCode::OK, [("content-type", "text/html")], Html(html)),
|
Ok(html) => (StatusCode::OK, [("content-type", "text/html; charset=utf-8")], Html(html)),
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("Failed to load minimal UI: {e}");
|
error!("Failed to load minimal UI: {e}");
|
||||||
(
|
(
|
||||||
|
|
@ -530,7 +530,7 @@ pub async fn serve_suite(bot_name: Option<String>) -> impl IntoResponse {
|
||||||
html = remove_section(&html, "settings");
|
html = remove_section(&html, "settings");
|
||||||
}
|
}
|
||||||
|
|
||||||
(StatusCode::OK, [("content-type", "text/html")], Html(html))
|
(StatusCode::OK, [("content-type", "text/html; charset=utf-8")], Html(html))
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
error!("Failed to load suite UI: {e}");
|
error!("Failed to load suite UI: {e}");
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="pt-br">
|
<html lang="pt-br">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<title>General Bots</title>
|
<title>General Bots</title>
|
||||||
|
|
@ -7,7 +8,7 @@
|
||||||
<script>
|
<script>
|
||||||
// BotServer URL - configurable via window.BOTSERVER_URL or defaults to same origin port 9000
|
// BotServer URL - configurable via window.BOTSERVER_URL or defaults to same origin port 9000
|
||||||
const BOTSERVER_URL =
|
const BOTSERVER_URL =
|
||||||
window.BOTSERVER_URL || "https://localhost:9000";
|
window.BOTSERVER_URL || "http://localhost:9000";
|
||||||
const BOTSERVER_WS_URL = BOTSERVER_URL.replace(
|
const BOTSERVER_WS_URL = BOTSERVER_URL.replace(
|
||||||
"https://",
|
"https://",
|
||||||
"wss://",
|
"wss://",
|
||||||
|
|
@ -37,17 +38,14 @@
|
||||||
--glass: rgba(0, 0, 0, 0.02);
|
--glass: rgba(0, 0, 0, 0.02);
|
||||||
--shadow: rgba(0, 0, 0, 0.05);
|
--shadow: rgba(0, 0, 0, 0.05);
|
||||||
--logo-url: url("https://pragmatismo.com.br/icons/general-bots.svg");
|
--logo-url: url("https://pragmatismo.com.br/icons/general-bots.svg");
|
||||||
--gradient-1: linear-gradient(
|
--gradient-1: linear-gradient(135deg,
|
||||||
135deg,
|
|
||||||
rgba(0, 102, 255, 0.05) 0%,
|
rgba(0, 102, 255, 0.05) 0%,
|
||||||
rgba(0, 102, 255, 0) 100%
|
rgba(0, 102, 255, 0) 100%);
|
||||||
);
|
--gradient-2: linear-gradient(45deg,
|
||||||
--gradient-2: linear-gradient(
|
|
||||||
45deg,
|
|
||||||
rgba(0, 0, 0, 0.02) 0%,
|
rgba(0, 0, 0, 0.02) 0%,
|
||||||
rgba(0, 0, 0, 0) 100%
|
rgba(0, 0, 0, 0) 100%);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="dark"] {
|
[data-theme="dark"] {
|
||||||
--bg: #1a1a1a;
|
--bg: #1a1a1a;
|
||||||
--fg: #ffffff;
|
--fg: #ffffff;
|
||||||
|
|
@ -55,22 +53,20 @@
|
||||||
--accent: #ffffff;
|
--accent: #ffffff;
|
||||||
--glass: rgba(255, 255, 255, 0.05);
|
--glass: rgba(255, 255, 255, 0.05);
|
||||||
--shadow: rgba(0, 0, 0, 0.5);
|
--shadow: rgba(0, 0, 0, 0.5);
|
||||||
--gradient-1: linear-gradient(
|
--gradient-1: linear-gradient(135deg,
|
||||||
135deg,
|
|
||||||
rgba(255, 255, 255, 0.08) 0%,
|
rgba(255, 255, 255, 0.08) 0%,
|
||||||
rgba(255, 255, 255, 0) 100%
|
rgba(255, 255, 255, 0) 100%);
|
||||||
);
|
--gradient-2: linear-gradient(45deg,
|
||||||
--gradient-2: linear-gradient(
|
|
||||||
45deg,
|
|
||||||
rgba(255, 255, 255, 0.03) 0%,
|
rgba(255, 255, 255, 0.03) 0%,
|
||||||
rgba(255, 255, 255, 0) 100%
|
rgba(255, 255, 255, 0) 100%);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
* {
|
* {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: "Inter", sans-serif;
|
font-family: "Inter", sans-serif;
|
||||||
background: var(--bg);
|
background: var(--bg);
|
||||||
|
|
@ -84,6 +80,7 @@
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
body::before {
|
body::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: fixed;
|
position: fixed;
|
||||||
|
|
@ -92,6 +89,7 @@
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.float-menu {
|
.float-menu {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: 20px;
|
left: 20px;
|
||||||
|
|
@ -101,6 +99,7 @@
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.float-logo {
|
.float-logo {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|
@ -112,11 +111,13 @@
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
[data-theme="dark"] .float-logo {
|
|
||||||
}
|
[data-theme="dark"] .float-logo {}
|
||||||
|
|
||||||
.float-logo:hover {
|
.float-logo:hover {
|
||||||
transform: scale(1.1) rotate(5deg);
|
transform: scale(1.1) rotate(5deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-button {
|
.menu-button {
|
||||||
width: 40px;
|
width: 40px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
|
|
@ -132,11 +133,13 @@
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.menu-button:hover {
|
.menu-button:hover {
|
||||||
transform: scale(1.1) rotate(-5deg);
|
transform: scale(1.1) rotate(-5deg);
|
||||||
background: var(--fg);
|
background: var(--fg);
|
||||||
color: var(--bg);
|
color: var(--bg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
left: -320px;
|
left: -320px;
|
||||||
|
|
@ -152,9 +155,11 @@
|
||||||
backdrop-filter: blur(20px);
|
backdrop-filter: blur(20px);
|
||||||
box-shadow: 4px 0 20px var(--shadow);
|
box-shadow: 4px 0 20px var(--shadow);
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar.open {
|
.sidebar.open {
|
||||||
left: 0;
|
left: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-header {
|
.sidebar-header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -162,18 +167,21 @@
|
||||||
margin-bottom: 30px;
|
margin-bottom: 30px;
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-logo {
|
.sidebar-logo {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
background: var(--logo-url) center/contain no-repeat;
|
background: var(--logo-url) center/contain no-repeat;
|
||||||
filter: var(--logo-filter, none);
|
filter: var(--logo-filter, none);
|
||||||
}
|
}
|
||||||
[data-theme="dark"] .sidebar-logo {
|
|
||||||
}
|
[data-theme="dark"] .sidebar-logo {}
|
||||||
|
|
||||||
.sidebar-title {
|
.sidebar-title {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-button {
|
.sidebar-button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
|
|
@ -188,14 +196,17 @@
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
text-align: left;
|
text-align: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sidebar-button:hover {
|
.sidebar-button:hover {
|
||||||
background: var(--fg);
|
background: var(--fg);
|
||||||
color: var(--bg);
|
color: var(--bg);
|
||||||
transform: translateX(4px) scale(1.02);
|
transform: translateX(4px) scale(1.02);
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-section {
|
.history-section {
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-title {
|
.history-title {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
|
|
@ -203,6 +214,7 @@
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
letter-spacing: 0.5px;
|
letter-spacing: 0.5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-item {
|
.history-item {
|
||||||
padding: 10px 14px;
|
padding: 10px 14px;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
|
|
@ -212,11 +224,13 @@
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.history-item:hover {
|
.history-item:hover {
|
||||||
background: var(--fg);
|
background: var(--fg);
|
||||||
color: var(--bg);
|
color: var(--bg);
|
||||||
transform: translateX(4px) scale(1.02);
|
transform: translateX(4px) scale(1.02);
|
||||||
}
|
}
|
||||||
|
|
||||||
#messages {
|
#messages {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
|
@ -227,16 +241,19 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.message-container {
|
.message-container {
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(10px);
|
transform: translateY(10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-message {
|
.user-message {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-message-content {
|
.user-message-content {
|
||||||
background: var(--fg);
|
background: var(--fg);
|
||||||
color: var(--bg);
|
color: var(--bg);
|
||||||
|
|
@ -249,6 +266,7 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-message-content::before {
|
.user-message-content::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
@ -257,11 +275,13 @@
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.assistant-message {
|
.assistant-message {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
}
|
}
|
||||||
|
|
||||||
.assistant-avatar {
|
.assistant-avatar {
|
||||||
width: 24px;
|
width: 24px;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
|
|
@ -271,8 +291,9 @@
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
filter: var(--logo-filter, none);
|
filter: var(--logo-filter, none);
|
||||||
}
|
}
|
||||||
[data-theme="dark"] .assistant-avatar {
|
|
||||||
}
|
[data-theme="dark"] .assistant-avatar {}
|
||||||
|
|
||||||
.assistant-message-content {
|
.assistant-message-content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
@ -285,6 +306,7 @@
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.assistant-message-content::before {
|
.assistant-message-content::before {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
@ -293,6 +315,7 @@
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.thinking-indicator {
|
.thinking-indicator {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 8px;
|
gap: 8px;
|
||||||
|
|
@ -300,10 +323,12 @@
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
opacity: 0.4;
|
opacity: 0.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
.typing-dots {
|
.typing-dots {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.typing-dot {
|
.typing-dot {
|
||||||
width: 4px;
|
width: 4px;
|
||||||
height: 4px;
|
height: 4px;
|
||||||
|
|
@ -311,24 +336,30 @@
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
animation: bounce 1.4s infinite;
|
animation: bounce 1.4s infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.typing-dot:nth-child(1) {
|
.typing-dot:nth-child(1) {
|
||||||
animation-delay: -0.32s;
|
animation-delay: -0.32s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.typing-dot:nth-child(2) {
|
.typing-dot:nth-child(2) {
|
||||||
animation-delay: -0.16s;
|
animation-delay: -0.16s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes bounce {
|
@keyframes bounce {
|
||||||
|
|
||||||
0%,
|
0%,
|
||||||
80%,
|
80%,
|
||||||
100% {
|
100% {
|
||||||
transform: scale(0);
|
transform: scale(0);
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
40% {
|
40% {
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
|
@ -341,6 +372,7 @@
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
backdrop-filter: blur(20px);
|
backdrop-filter: blur(20px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.suggestions-container {
|
.suggestions-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
|
|
@ -350,6 +382,7 @@
|
||||||
max-width: 680px;
|
max-width: 680px;
|
||||||
margin: 0 auto 8px;
|
margin: 0 auto 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.suggestion-button {
|
.suggestion-button {
|
||||||
padding: 6px 12px;
|
padding: 6px 12px;
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
|
|
@ -361,11 +394,13 @@
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.suggestion-button:hover {
|
.suggestion-button:hover {
|
||||||
background: var(--fg);
|
background: var(--fg);
|
||||||
color: var(--bg);
|
color: var(--bg);
|
||||||
transform: scale(1.05);
|
transform: scale(1.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-container {
|
.input-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 6px;
|
gap: 6px;
|
||||||
|
|
@ -373,6 +408,7 @@
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#messageInput {
|
#messageInput {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
|
|
@ -386,13 +422,16 @@
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
#messageInput:focus {
|
#messageInput:focus {
|
||||||
border-color: var(--accent);
|
border-color: var(--accent);
|
||||||
box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
|
box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
#messageInput::placeholder {
|
#messageInput::placeholder {
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sendBtn,
|
#sendBtn,
|
||||||
#voiceBtn {
|
#voiceBtn {
|
||||||
width: 36px;
|
width: 36px;
|
||||||
|
|
@ -409,28 +448,35 @@
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#sendBtn:hover,
|
#sendBtn:hover,
|
||||||
#voiceBtn:hover {
|
#voiceBtn:hover {
|
||||||
transform: scale(1.08) rotate(5deg);
|
transform: scale(1.08) rotate(5deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
#sendBtn:active,
|
#sendBtn:active,
|
||||||
#voiceBtn:active {
|
#voiceBtn:active {
|
||||||
transform: scale(0.95);
|
transform: scale(0.95);
|
||||||
}
|
}
|
||||||
|
|
||||||
#voiceBtn.recording {
|
#voiceBtn.recording {
|
||||||
animation: pulse 1.5s infinite;
|
animation: pulse 1.5s infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes pulse {
|
@keyframes pulse {
|
||||||
|
|
||||||
0%,
|
0%,
|
||||||
100% {
|
100% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
50% {
|
50% {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
transform: scale(1.1);
|
transform: scale(1.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.flash-overlay {
|
.flash-overlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
|
|
@ -439,6 +485,7 @@
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
z-index: 9999;
|
z-index: 9999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-to-bottom {
|
.scroll-to-bottom {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 80px;
|
bottom: 80px;
|
||||||
|
|
@ -457,12 +504,15 @@
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
z-index: 90;
|
z-index: 90;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-to-bottom.visible {
|
.scroll-to-bottom.visible {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-to-bottom:hover {
|
.scroll-to-bottom:hover {
|
||||||
transform: scale(1.1) rotate(180deg);
|
transform: scale(1.1) rotate(180deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.warning-message {
|
.warning-message {
|
||||||
border-radius: 12px;
|
border-radius: 12px;
|
||||||
padding: 12px 16px;
|
padding: 12px 16px;
|
||||||
|
|
@ -472,6 +522,7 @@
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.continue-button {
|
.continue-button {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
|
|
@ -484,11 +535,13 @@
|
||||||
background: var(--glass);
|
background: var(--glass);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.continue-button:hover {
|
.continue-button:hover {
|
||||||
background: var(--fg);
|
background: var(--fg);
|
||||||
color: var(--bg);
|
color: var(--bg);
|
||||||
transform: translateY(-2px);
|
transform: translateY(-2px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.context-indicator {
|
.context-indicator {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 130px;
|
bottom: 130px;
|
||||||
|
|
@ -504,9 +557,11 @@
|
||||||
display: none;
|
display: none;
|
||||||
backdrop-filter: blur(10px);
|
backdrop-filter: blur(10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
.context-indicator.visible {
|
.context-indicator.visible {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.context-progress {
|
.context-progress {
|
||||||
height: 3px;
|
height: 3px;
|
||||||
background: var(--glass);
|
background: var(--glass);
|
||||||
|
|
@ -514,12 +569,14 @@
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.context-progress-bar {
|
.context-progress-bar {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
transition: width 0.3s;
|
transition: width 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.connection-status {
|
.connection-status {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
|
|
@ -530,42 +587,52 @@
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.connection-status.connecting {
|
.connection-status.connecting {
|
||||||
background: var(--fg);
|
background: var(--fg);
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
animation: ping 1.5s infinite;
|
animation: ping 1.5s infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
.connection-status.connected {
|
.connection-status.connected {
|
||||||
background: var(--accent);
|
background: var(--accent);
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
}
|
}
|
||||||
|
|
||||||
.connection-status.disconnected {
|
.connection-status.disconnected {
|
||||||
background: var(--fg);
|
background: var(--fg);
|
||||||
opacity: 0.2;
|
opacity: 0.2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes ping {
|
@keyframes ping {
|
||||||
|
|
||||||
0%,
|
0%,
|
||||||
100% {
|
100% {
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
transform: scale(0.8);
|
transform: scale(0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
50% {
|
50% {
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
transform: scale(1.2);
|
transform: scale(1.2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content p {
|
.markdown-content p {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content ul,
|
.markdown-content ul,
|
||||||
.markdown-content ol {
|
.markdown-content ol {
|
||||||
margin-bottom: 12px;
|
margin-bottom: 12px;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content li {
|
.markdown-content li {
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content code {
|
.markdown-content code {
|
||||||
background: var(--glass);
|
background: var(--glass);
|
||||||
padding: 2px 6px;
|
padding: 2px 6px;
|
||||||
|
|
@ -573,6 +640,7 @@
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content pre {
|
.markdown-content pre {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 12px;
|
padding: 12px;
|
||||||
|
|
@ -581,10 +649,12 @@
|
||||||
background: var(--glass);
|
background: var(--glass);
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content pre code {
|
.markdown-content pre code {
|
||||||
background: none;
|
background: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content h1,
|
.markdown-content h1,
|
||||||
.markdown-content h2,
|
.markdown-content h2,
|
||||||
.markdown-content h3 {
|
.markdown-content h3 {
|
||||||
|
|
@ -592,30 +662,37 @@
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content h1 {
|
.markdown-content h1 {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content h2 {
|
.markdown-content h2 {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content h3 {
|
.markdown-content h3 {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content table {
|
.markdown-content table {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-collapse: collapse;
|
border-collapse: collapse;
|
||||||
margin-bottom: 14px;
|
margin-bottom: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content table th,
|
.markdown-content table th,
|
||||||
.markdown-content table td {
|
.markdown-content table td {
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
border: 1px solid var(--border);
|
border: 1px solid var(--border);
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content table th {
|
.markdown-content table th {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
background: var(--glass);
|
background: var(--glass);
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content blockquote {
|
.markdown-content blockquote {
|
||||||
border-left: 2px solid var(--accent);
|
border-left: 2px solid var(--accent);
|
||||||
padding-left: 14px;
|
padding-left: 14px;
|
||||||
|
|
@ -623,53 +700,65 @@
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content a {
|
.markdown-content a {
|
||||||
color: var(--accent);
|
color: var(--accent);
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
transition: all 0.3s;
|
transition: all 0.3s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-content a:hover {
|
.markdown-content a:hover {
|
||||||
opacity: 0.7;
|
opacity: 0.7;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar {
|
::-webkit-scrollbar {
|
||||||
width: 6px;
|
width: 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
background: var(--border);
|
background: var(--border);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::-webkit-scrollbar-thumb:hover {
|
::-webkit-scrollbar-thumb:hover {
|
||||||
background: var(--fg);
|
background: var(--fg);
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 768px) {
|
@media (max-width: 768px) {
|
||||||
.sidebar {
|
.sidebar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
left: -100%;
|
left: -100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
#messages {
|
#messages {
|
||||||
padding: 20px 16px 140px;
|
padding: 20px 16px 140px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.float-menu {
|
.float-menu {
|
||||||
left: 12px;
|
left: 12px;
|
||||||
top: 12px;
|
top: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.float-logo,
|
.float-logo,
|
||||||
.menu-button {
|
.menu-button {
|
||||||
width: 36px;
|
width: 36px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scroll-to-bottom {
|
.scroll-to-bottom {
|
||||||
width: 36px;
|
width: 36px;
|
||||||
height: 36px;
|
height: 36px;
|
||||||
bottom: 70px;
|
bottom: 70px;
|
||||||
right: 12px;
|
right: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.context-indicator {
|
.context-indicator {
|
||||||
bottom: 120px;
|
bottom: 120px;
|
||||||
right: 12px;
|
right: 12px;
|
||||||
|
|
@ -678,23 +767,17 @@
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="connection-status connecting" id="connectionStatus"></div>
|
<div class="connection-status connecting" id="connectionStatus"></div>
|
||||||
<div class="flash-overlay" id="flashOverlay"></div>
|
<div class="flash-overlay" id="flashOverlay"></div>
|
||||||
<div class="float-menu">
|
|
||||||
<div class="float-logo" id="floatLogo" title="Menu"></div>
|
|
||||||
<div class="menu-button" id="themeBtn" title="Theme">⚙</div>
|
|
||||||
</div>
|
|
||||||
<div class="sidebar" id="sidebar">
|
<div class="sidebar" id="sidebar">
|
||||||
<div class="sidebar-header">
|
<div class="sidebar-header">
|
||||||
<div class="sidebar-logo"></div>
|
<div class="sidebar-logo"></div>
|
||||||
<div class="sidebar-title" id="sidebarTitle">General Bots</div>
|
<div class="sidebar-title" id="sidebarTitle">General Bots</div>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button class="sidebar-button" id="voiceToggle" onclick="toggleVoiceMode()">
|
||||||
class="sidebar-button"
|
|
||||||
id="voiceToggle"
|
|
||||||
onclick="toggleVoiceMode()"
|
|
||||||
>
|
|
||||||
🎤 Voice Mode
|
🎤 Voice Mode
|
||||||
</button>
|
</button>
|
||||||
<div class="history-section">
|
<div class="history-section">
|
||||||
|
|
@ -706,12 +789,7 @@
|
||||||
<footer>
|
<footer>
|
||||||
<div class="suggestions-container" id="suggestions"></div>
|
<div class="suggestions-container" id="suggestions"></div>
|
||||||
<div class="input-container">
|
<div class="input-container">
|
||||||
<input
|
<input id="messageInput" type="text" placeholder="Message..." autofocus />
|
||||||
id="messageInput"
|
|
||||||
type="text"
|
|
||||||
placeholder="Message..."
|
|
||||||
autofocus
|
|
||||||
/>
|
|
||||||
<button id="voiceBtn" title="Voice">🎤</button>
|
<button id="voiceBtn" title="Voice">🎤</button>
|
||||||
<button id="sendBtn" title="Send">↑</button>
|
<button id="sendBtn" title="Send">↑</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -721,11 +799,7 @@
|
||||||
<div>Context</div>
|
<div>Context</div>
|
||||||
<div id="contextPercentage">0%</div>
|
<div id="contextPercentage">0%</div>
|
||||||
<div class="context-progress">
|
<div class="context-progress">
|
||||||
<div
|
<div class="context-progress-bar" id="contextProgressBar" style="width: 0%"></div>
|
||||||
class="context-progress-bar"
|
|
||||||
id="contextProgressBar"
|
|
||||||
style="width: 0%"
|
|
||||||
></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
|
@ -770,9 +844,8 @@
|
||||||
document.getElementById("connectionStatus"),
|
document.getElementById("connectionStatus"),
|
||||||
flashOverlay = document.getElementById("flashOverlay"),
|
flashOverlay = document.getElementById("flashOverlay"),
|
||||||
suggestionsContainer = document.getElementById("suggestions"),
|
suggestionsContainer = document.getElementById("suggestions"),
|
||||||
floatLogo = document.getElementById("floatLogo"),
|
|
||||||
sidebar = document.getElementById("sidebar"),
|
sidebar = document.getElementById("sidebar"),
|
||||||
themeBtn = document.getElementById("themeBtn"),
|
|
||||||
scrollToBottomBtn = document.getElementById("scrollToBottom"),
|
scrollToBottomBtn = document.getElementById("scrollToBottom"),
|
||||||
contextIndicator = document.getElementById("contextIndicator"),
|
contextIndicator = document.getElementById("contextIndicator"),
|
||||||
contextPercentage =
|
contextPercentage =
|
||||||
|
|
@ -782,7 +855,7 @@
|
||||||
sidebarTitle = document.getElementById("sidebarTitle");
|
sidebarTitle = document.getElementById("sidebarTitle");
|
||||||
marked.setOptions({ breaks: true, gfm: true });
|
marked.setOptions({ breaks: true, gfm: true });
|
||||||
|
|
||||||
floatLogo.addEventListener("click", toggleSidebar);
|
|
||||||
|
|
||||||
function toggleSidebar() {
|
function toggleSidebar() {
|
||||||
sidebar.classList.toggle("open");
|
sidebar.classList.toggle("open");
|
||||||
|
|
@ -800,8 +873,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateThemeButton() {
|
function updateThemeButton() {
|
||||||
const icons = { auto: "⚙", dark: "🌙", light: "☀️" };
|
// Theme button removed for non-logged users
|
||||||
themeBtn.textContent = icons[currentTheme] || "⚙";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function applyTheme() {
|
function applyTheme() {
|
||||||
|
|
@ -847,13 +919,12 @@
|
||||||
input.focus();
|
input.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
themeBtn.addEventListener("click", toggleTheme);
|
|
||||||
|
|
||||||
document.addEventListener("click", function (e) {
|
document.addEventListener("click", function (e) {
|
||||||
if (
|
if (
|
||||||
sidebar.classList.contains("open") &&
|
sidebar.classList.contains("open") &&
|
||||||
!sidebar.contains(e.target) &&
|
!sidebar.contains(e.target)
|
||||||
!floatLogo.contains(e.target)
|
|
||||||
) {
|
) {
|
||||||
sidebar.classList.remove("open");
|
sidebar.classList.remove("open");
|
||||||
}
|
}
|
||||||
|
|
@ -1127,8 +1198,10 @@
|
||||||
streamingMessageId = null;
|
streamingMessageId = null;
|
||||||
currentStreamingContent = "";
|
currentStreamingContent = "";
|
||||||
} else {
|
} else {
|
||||||
|
if (r.content && r.content.trim() !== "") {
|
||||||
addMessage("assistant", r.content, false);
|
addMessage("assistant", r.content, false);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!isStreaming) {
|
if (!isStreaming) {
|
||||||
isStreaming = true;
|
isStreaming = true;
|
||||||
|
|
@ -1715,4 +1788,5 @@
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -73,6 +73,7 @@
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateX(20px);
|
transform: translateX(20px);
|
||||||
}
|
}
|
||||||
|
|
||||||
to {
|
to {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: translateX(0);
|
transform: translateX(0);
|
||||||
|
|
@ -97,11 +98,13 @@
|
||||||
/* Connection Status - use shared styles from app.css */
|
/* Connection Status - use shared styles from app.css */
|
||||||
|
|
||||||
@keyframes pulse {
|
@keyframes pulse {
|
||||||
|
|
||||||
0%,
|
0%,
|
||||||
100% {
|
100% {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
50% {
|
50% {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
transform: scale(1.2);
|
transform: scale(1.2);
|
||||||
|
|
@ -216,6 +219,7 @@
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(10px);
|
transform: translateY(10px);
|
||||||
}
|
}
|
||||||
|
|
||||||
to {
|
to {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
|
|
@ -551,9 +555,9 @@ footer {
|
||||||
.suggestion-button {
|
.suggestion-button {
|
||||||
padding: 6px 12px;
|
padding: 6px 12px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
border: 2px solid var(--chat-color1, var(--suggestion-color, #4a9eff));
|
border: 2px solid var(--chat-color2, #002147);
|
||||||
background: var(--chat-color2, rgba(255, 255, 255, 0.15));
|
background: var(--chat-color2, #002147);
|
||||||
color: var(--chat-color1, #ffffff);
|
color: #ffffff;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
@ -615,8 +619,8 @@ form.input-container {
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-container:focus-within {
|
.input-container:focus-within {
|
||||||
border-color: var(--accent, var(--accent-color, #3b82f6));
|
border-color: var(--chat-color1, var(--accent, #3b82f6));
|
||||||
box-shadow: 0 0 0 3px var(--accent-glow, rgba(59, 130, 246, 0.1));
|
box-shadow: 0 0 0 3px color-mix(in srgb, var(--chat-color1, var(--accent, #3b82f6)) 20%, transparent);
|
||||||
}
|
}
|
||||||
|
|
||||||
#messageInput {
|
#messageInput {
|
||||||
|
|
@ -637,10 +641,14 @@ form.input-container {
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes cursor-blink {
|
@keyframes cursor-blink {
|
||||||
0%, 50% {
|
|
||||||
|
0%,
|
||||||
|
50% {
|
||||||
caret-color: var(--accent, #3b82f6);
|
caret-color: var(--accent, #3b82f6);
|
||||||
}
|
}
|
||||||
51%, 100% {
|
|
||||||
|
51%,
|
||||||
|
100% {
|
||||||
caret-color: transparent;
|
caret-color: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -673,7 +681,7 @@ form.input-container {
|
||||||
}
|
}
|
||||||
|
|
||||||
#sendBtn {
|
#sendBtn {
|
||||||
background: var(--accent, var(--accent-color, #3b82f6));
|
background: var(--chat-color1, var(--accent, #3b82f6));
|
||||||
}
|
}
|
||||||
|
|
||||||
#voiceBtn {
|
#voiceBtn {
|
||||||
|
|
@ -689,7 +697,7 @@ form.input-container {
|
||||||
}
|
}
|
||||||
|
|
||||||
#sendBtn:hover {
|
#sendBtn:hover {
|
||||||
background: var(--accent-hover, var(--accent, #2563eb));
|
background: var(--chat-color1, var(--accent-hover, #2563eb));
|
||||||
}
|
}
|
||||||
|
|
||||||
#voiceBtn:active,
|
#voiceBtn:active,
|
||||||
|
|
@ -700,8 +708,8 @@ form.input-container {
|
||||||
/* Dark/Sentient theme overrides */
|
/* Dark/Sentient theme overrides */
|
||||||
[data-theme="dark"] #sendBtn,
|
[data-theme="dark"] #sendBtn,
|
||||||
[data-theme="sentient"] #sendBtn {
|
[data-theme="sentient"] #sendBtn {
|
||||||
background: var(--accent, #d4f505);
|
background: var(--chat-color1, #d4f505);
|
||||||
color: #000000;
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
[data-theme="dark"] #voiceBtn,
|
[data-theme="dark"] #voiceBtn,
|
||||||
|
|
@ -784,6 +792,7 @@ form.input-container {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
to {
|
to {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
@ -1271,10 +1280,14 @@ form.input-container {
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes thinkingBounce {
|
@keyframes thinkingBounce {
|
||||||
0%, 80%, 100% {
|
|
||||||
|
0%,
|
||||||
|
80%,
|
||||||
|
100% {
|
||||||
transform: scale(0.8);
|
transform: scale(0.8);
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
40% {
|
40% {
|
||||||
transform: scale(1);
|
transform: scale(1);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
@ -1331,6 +1344,7 @@ form.input-container {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transform: translateY(20px) scale(0.95);
|
transform: translateY(20px) scale(0.95);
|
||||||
}
|
}
|
||||||
|
|
||||||
to {
|
to {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transform: translateY(0) scale(1);
|
transform: translateY(0) scale(1);
|
||||||
|
|
@ -1396,9 +1410,12 @@ form.input-container {
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes bounce {
|
@keyframes bounce {
|
||||||
0%, 100% {
|
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
transform: translateX(-50%) translateY(0);
|
transform: translateX(-50%) translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
50% {
|
50% {
|
||||||
transform: translateX(-50%) translateY(-5px);
|
transform: translateX(-50%) translateY(-5px);
|
||||||
}
|
}
|
||||||
|
|
@ -1432,9 +1449,13 @@ form.input-container {
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes typing {
|
@keyframes typing {
|
||||||
0%, 60%, 100% {
|
|
||||||
|
0%,
|
||||||
|
60%,
|
||||||
|
100% {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
30% {
|
30% {
|
||||||
transform: translateY(-8px);
|
transform: translateY(-8px);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,34 +14,21 @@
|
||||||
<div class="suggestions-container" id="suggestions"></div>
|
<div class="suggestions-container" id="suggestions"></div>
|
||||||
<div class="mention-dropdown" id="mentionDropdown">
|
<div class="mention-dropdown" id="mentionDropdown">
|
||||||
<div class="mention-header">
|
<div class="mention-header">
|
||||||
<span class="mention-title" data-i18n="chat-mention-title"
|
<span class="mention-title" data-i18n="chat-mention-title">Reference Entity</span>
|
||||||
>Reference Entity</span
|
|
||||||
>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="mention-results" id="mentionResults"></div>
|
<div class="mention-results" id="mentionResults"></div>
|
||||||
</div>
|
</div>
|
||||||
<form class="input-container" id="chatForm">
|
<form class="input-container" id="chatForm">
|
||||||
<input
|
<input name="content" id="messageInput" type="text" placeholder="Message... (type @ to mention)"
|
||||||
name="content"
|
data-i18n-placeholder="chat-placeholder" autofocus autocomplete="off" />
|
||||||
id="messageInput"
|
<button type="submit" id="sendBtn" title="Send" data-i18n-title="chat-send">
|
||||||
type="text"
|
|
||||||
placeholder="Message... (type @ to mention)"
|
|
||||||
data-i18n-placeholder="chat-placeholder"
|
|
||||||
autofocus
|
|
||||||
autocomplete="off"
|
|
||||||
/>
|
|
||||||
<button
|
|
||||||
type="submit"
|
|
||||||
id="sendBtn"
|
|
||||||
title="Send"
|
|
||||||
data-i18n-title="chat-send"
|
|
||||||
>
|
|
||||||
↑
|
↑
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
</footer>
|
</footer>
|
||||||
<button class="scroll-to-bottom" id="scrollToBottom" title="Scroll to bottom">
|
<button class="scroll-to-bottom" id="scrollToBottom" title="Scroll to bottom">
|
||||||
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
|
||||||
|
stroke-linecap="round" stroke-linejoin="round">
|
||||||
<polyline points="6 9 12 15 18 9"></polyline>
|
<polyline points="6 9 12 15 18 9"></polyline>
|
||||||
</svg>
|
</svg>
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -55,11 +42,7 @@
|
||||||
<div class="entity-card-title"></div>
|
<div class="entity-card-title"></div>
|
||||||
<div class="entity-card-details"></div>
|
<div class="entity-card-details"></div>
|
||||||
<div class="entity-card-actions">
|
<div class="entity-card-actions">
|
||||||
<button
|
<button class="entity-card-btn" data-action="view" data-i18n="action-view">
|
||||||
class="entity-card-btn"
|
|
||||||
data-action="view"
|
|
||||||
data-i18n="action-view"
|
|
||||||
>
|
|
||||||
View
|
View
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -737,8 +720,10 @@
|
||||||
if (isStreaming) {
|
if (isStreaming) {
|
||||||
finalizeStreaming();
|
finalizeStreaming();
|
||||||
} else {
|
} else {
|
||||||
|
if (data.content && data.content.trim() !== "") {
|
||||||
addMessage("bot", data.content);
|
addMessage("bot", data.content);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
isStreaming = false;
|
isStreaming = false;
|
||||||
|
|
||||||
// Render suggestions when message is complete
|
// Render suggestions when message is complete
|
||||||
|
|
@ -994,13 +979,14 @@
|
||||||
|
|
||||||
// Get the theme manager's theme for this bot to check if user selected a different theme
|
// Get the theme manager's theme for this bot to check if user selected a different theme
|
||||||
var botId = botName.toLowerCase();
|
var botId = botName.toLowerCase();
|
||||||
|
var botThemeKey = "gb-theme-" + botId;
|
||||||
var botTheme = window.ThemeManager ? (
|
var botTheme = window.ThemeManager ? (
|
||||||
// Get bot-specific theme from theme manager's mapping
|
// Get bot-specific theme from theme manager's mapping
|
||||||
(window.ThemeManager.getAvailableThemes &&
|
(window.ThemeManager.getAvailableThemes &&
|
||||||
window.ThemeManager.getAvailableThemes().find(t => t.id === botId)) ||
|
window.ThemeManager.getAvailableThemes().find(t => t.id === botId)) ||
|
||||||
// Fallback to localStorage
|
// Fallback to localStorage
|
||||||
localStorage.getItem("gb-theme")
|
localStorage.getItem(botThemeKey)
|
||||||
) : localStorage.getItem("gb-theme");
|
) : localStorage.getItem(botThemeKey);
|
||||||
|
|
||||||
// Check if bot config has a theme-base setting
|
// Check if bot config has a theme-base setting
|
||||||
var configThemeBase = config.theme_base || config["theme-base"] || "light";
|
var configThemeBase = config.theme_base || config["theme-base"] || "light";
|
||||||
|
|
@ -1008,7 +994,7 @@
|
||||||
// Only use bot config colors if:
|
// Only use bot config colors if:
|
||||||
// 1. No theme has been explicitly selected by user (localStorage empty or default)
|
// 1. No theme has been explicitly selected by user (localStorage empty or default)
|
||||||
// 2. AND the bot config's theme-base matches the current theme
|
// 2. AND the bot config's theme-base matches the current theme
|
||||||
var localStorageTheme = localStorage.getItem("gb-theme");
|
var localStorageTheme = localStorage.getItem(botThemeKey);
|
||||||
var useBotConfigColors = !localStorageTheme ||
|
var useBotConfigColors = !localStorageTheme ||
|
||||||
localStorageTheme === "default" ||
|
localStorageTheme === "default" ||
|
||||||
localStorageTheme === configThemeBase;
|
localStorageTheme === configThemeBase;
|
||||||
|
|
@ -1021,6 +1007,7 @@
|
||||||
|
|
||||||
// Only set bot config colors if user hasn't selected a different theme
|
// Only set bot config colors if user hasn't selected a different theme
|
||||||
if (useBotConfigColors) {
|
if (useBotConfigColors) {
|
||||||
|
document.documentElement.setAttribute("data-has-bot-colors", "true");
|
||||||
document.documentElement.style.setProperty("--chat-color1", color1);
|
document.documentElement.style.setProperty("--chat-color1", color1);
|
||||||
document.documentElement.style.setProperty("--chat-color2", color2);
|
document.documentElement.style.setProperty("--chat-color2", color2);
|
||||||
document.documentElement.style.setProperty("--suggestion-color", color1);
|
document.documentElement.style.setProperty("--suggestion-color", color1);
|
||||||
|
|
|
||||||
|
|
@ -48,16 +48,14 @@
|
||||||
⏩
|
⏩
|
||||||
</button>
|
</button>
|
||||||
<div class="progress-container">
|
<div class="progress-container">
|
||||||
<input type="range" class="progress-bar" id="progress-bar"
|
<input type="range" class="progress-bar" id="progress-bar" min="0" max="100" value="0"
|
||||||
min="0" max="100" value="0"
|
|
||||||
oninput="seekTo(this.value)">
|
oninput="seekTo(this.value)">
|
||||||
<span class="time-display" id="time-display">0:00 / 0:00</span>
|
<span class="time-display" id="time-display">0:00 / 0:00</span>
|
||||||
</div>
|
</div>
|
||||||
<button class="control-btn" onclick="toggleMute()" id="mute-btn" title="Mute">
|
<button class="control-btn" onclick="toggleMute()" id="mute-btn" title="Mute">
|
||||||
🔊
|
🔊
|
||||||
</button>
|
</button>
|
||||||
<input type="range" class="volume-slider" id="volume-slider"
|
<input type="range" class="volume-slider" id="volume-slider" min="0" max="100" value="100"
|
||||||
min="0" max="100" value="100"
|
|
||||||
oninput="setVolume(this.value)">
|
oninput="setVolume(this.value)">
|
||||||
<button class="control-btn" onclick="toggleLoop()" id="loop-btn" title="Loop">
|
<button class="control-btn" onclick="toggleLoop()" id="loop-btn" title="Loop">
|
||||||
🔁
|
🔁
|
||||||
|
|
@ -82,8 +80,7 @@
|
||||||
▶️
|
▶️
|
||||||
</button>
|
</button>
|
||||||
<div class="slide-nav">
|
<div class="slide-nav">
|
||||||
<input type="number" id="slide-input" min="1" value="1"
|
<input type="number" id="slide-input" min="1" value="1" onchange="goToSlide(this.value)">
|
||||||
onchange="goToSlide(this.value)">
|
|
||||||
</div>
|
</div>
|
||||||
<button class="control-btn" onclick="zoomIn()" title="Zoom In">
|
<button class="control-btn" onclick="zoomIn()" title="Zoom In">
|
||||||
🔍+
|
🔍+
|
||||||
|
|
@ -126,12 +123,7 @@
|
||||||
<button class="control-btn" onclick="toggleWordWrap()" title="Word Wrap">
|
<button class="control-btn" onclick="toggleWordWrap()" title="Word Wrap">
|
||||||
↩️
|
↩️
|
||||||
</button>
|
</button>
|
||||||
<select class="theme-select" id="theme-select" onchange="setCodeTheme(this.value)">
|
|
||||||
<option value="dark">Dark</option>
|
|
||||||
<option value="light">Light</option>
|
|
||||||
<option value="monokai">Monokai</option>
|
|
||||||
<option value="github">GitHub</option>
|
|
||||||
</select>
|
|
||||||
<button class="control-btn" onclick="copyCode()" title="Copy">
|
<button class="control-btn" onclick="copyCode()" title="Copy">
|
||||||
📋
|
📋
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -161,8 +153,13 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes fadeIn {
|
@keyframes fadeIn {
|
||||||
from { opacity: 0; }
|
from {
|
||||||
to { opacity: 1; }
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Container */
|
/* Container */
|
||||||
|
|
@ -277,7 +274,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes spin {
|
@keyframes spin {
|
||||||
to { transform: rotate(360deg); }
|
to {
|
||||||
|
transform: rotate(360deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Video Player */
|
/* Video Player */
|
||||||
|
|
|
||||||
|
|
@ -51,10 +51,7 @@
|
||||||
<!-- Right: Theme selector, Apps menu and user avatar -->
|
<!-- Right: Theme selector, Apps menu and user avatar -->
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<!-- Theme dropdown selector -->
|
<!-- Theme dropdown selector -->
|
||||||
<div
|
|
||||||
id="themeSelectorContainer"
|
|
||||||
aria-label="Theme selector"
|
|
||||||
></div>
|
|
||||||
|
|
||||||
<!-- Apps menu button -->
|
<!-- Apps menu button -->
|
||||||
<button
|
<button
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,8 @@ const ThemeManager = (() => {
|
||||||
|
|
||||||
if (!theme.file) {
|
if (!theme.file) {
|
||||||
currentThemeId = "default";
|
currentThemeId = "default";
|
||||||
localStorage.setItem("gb-theme", "default");
|
const botId = getCurrentBotId();
|
||||||
|
localStorage.setItem(`gb-theme-${botId}`, "default");
|
||||||
// Re-enable sentient theme for default
|
// Re-enable sentient theme for default
|
||||||
document.documentElement.setAttribute("data-theme", "sentient");
|
document.documentElement.setAttribute("data-theme", "sentient");
|
||||||
updateDropdown();
|
updateDropdown();
|
||||||
|
|
@ -81,7 +82,8 @@ const ThemeManager = (() => {
|
||||||
link.onload = () => {
|
link.onload = () => {
|
||||||
console.log("✓ Theme loaded:", theme.name);
|
console.log("✓ Theme loaded:", theme.name);
|
||||||
currentThemeId = id;
|
currentThemeId = id;
|
||||||
localStorage.setItem("gb-theme", id);
|
const botId = getCurrentBotId();
|
||||||
|
localStorage.setItem(`gb-theme-${botId}`, id);
|
||||||
|
|
||||||
// Keep data-theme="sentient" on html so CSS selectors work
|
// Keep data-theme="sentient" on html so CSS selectors work
|
||||||
// The inline styles will override the colors
|
// The inline styles will override the colors
|
||||||
|
|
@ -150,14 +152,16 @@ const ThemeManager = (() => {
|
||||||
document.documentElement.style.setProperty("--border", borderHex);
|
document.documentElement.style.setProperty("--border", borderHex);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update ALL color-related CSS variables to match the theme
|
// Check if config.csv already set the primary color, we shouldn't wipe it
|
||||||
// This overrides any bot config colors
|
// Only update color and suggestion variables if they aren't marked as bot-config
|
||||||
|
if (document.documentElement.getAttribute("data-has-bot-colors") !== "true") {
|
||||||
document.documentElement.style.setProperty("--chat-color1", `hsl(${primary})`);
|
document.documentElement.style.setProperty("--chat-color1", `hsl(${primary})`);
|
||||||
document.documentElement.style.setProperty("--chat-color2", `hsl(${card})`);
|
document.documentElement.style.setProperty("--chat-color2", `hsl(${card})`);
|
||||||
document.documentElement.style.setProperty("--suggestion-color", `hsl(${primary})`);
|
document.documentElement.style.setProperty("--suggestion-color", `hsl(${primary})`);
|
||||||
document.documentElement.style.setProperty("--suggestion-bg", `hsl(${card})`);
|
document.documentElement.style.setProperty("--suggestion-bg", `hsl(${card})`);
|
||||||
document.documentElement.style.setProperty("--color1", `hsl(${primary})`);
|
document.documentElement.style.setProperty("--color1", `hsl(${primary})`);
|
||||||
document.documentElement.style.setProperty("--color2", `hsl(${card})`);
|
document.documentElement.style.setProperty("--color2", `hsl(${card})`);
|
||||||
|
}
|
||||||
|
|
||||||
console.log("✓ Theme colors applied:", { bg: background, primary: primary });
|
console.log("✓ Theme colors applied:", { bg: background, primary: primary });
|
||||||
updateDropdown();
|
updateDropdown();
|
||||||
|
|
@ -169,8 +173,7 @@ const ThemeManager = (() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateDropdown() {
|
function updateDropdown() {
|
||||||
const dd = document.getElementById("themeDropdown");
|
// Dropdown removed
|
||||||
if (dd) dd.value = currentThemeId;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function createDropdown() {
|
function createDropdown() {
|
||||||
|
|
@ -199,27 +202,29 @@ const ThemeManager = (() => {
|
||||||
|
|
||||||
// Then load the UI theme (CSS theme)
|
// Then load the UI theme (CSS theme)
|
||||||
// Priority: 1) localStorage user preference, 2) bot-specific theme, 3) default
|
// Priority: 1) localStorage user preference, 2) bot-specific theme, 3) default
|
||||||
let saved = localStorage.getItem("gb-theme");
|
const botId = getCurrentBotId();
|
||||||
|
let saved = localStorage.getItem(`gb-theme-${botId}`);
|
||||||
if (!saved || !themes.find((t) => t.id === saved)) {
|
if (!saved || !themes.find((t) => t.id === saved)) {
|
||||||
// No user preference, try bot-specific theme
|
// No user preference, try bot-specific theme
|
||||||
const botId = getCurrentBotId();
|
|
||||||
saved = botThemeMap[botId] || "light";
|
saved = botThemeMap[botId] || "light";
|
||||||
// Save to localStorage so it persists
|
// Save to localStorage so it persists
|
||||||
localStorage.setItem("gb-theme", saved);
|
localStorage.setItem(`gb-theme-${botId}`, saved);
|
||||||
}
|
}
|
||||||
if (!themes.find((t) => t.id === saved)) saved = "default";
|
if (!themes.find((t) => t.id === saved)) saved = "default";
|
||||||
currentThemeId = saved;
|
currentThemeId = saved;
|
||||||
loadTheme(saved);
|
loadTheme(saved);
|
||||||
|
|
||||||
const container = document.getElementById("themeSelectorContainer");
|
// Dropdown injection removed
|
||||||
if (container) container.appendChild(createDropdown());
|
// const container = document.getElementById("themeSelectorContainer");
|
||||||
|
// if (container) container.appendChild(createDropdown());
|
||||||
|
|
||||||
console.log("✓ Theme Manager initialized");
|
console.log("✓ Theme Manager initialized");
|
||||||
}
|
}
|
||||||
|
|
||||||
function setThemeFromServer(data) {
|
function setThemeFromServer(data) {
|
||||||
// Save theme to localStorage for persistence across page loads
|
// Save theme to localStorage for persistence across page loads
|
||||||
localStorage.setItem("gb-theme-data", JSON.stringify(data));
|
const botId = getCurrentBotId();
|
||||||
|
localStorage.setItem(`gb-theme-data-${botId}`, JSON.stringify(data));
|
||||||
|
|
||||||
// Load base theme if specified
|
// Load base theme if specified
|
||||||
if (data.theme_base) {
|
if (data.theme_base) {
|
||||||
|
|
@ -263,12 +268,13 @@ const ThemeManager = (() => {
|
||||||
|
|
||||||
// Load saved theme from localStorage on page load
|
// Load saved theme from localStorage on page load
|
||||||
function loadSavedTheme() {
|
function loadSavedTheme() {
|
||||||
const savedTheme = localStorage.getItem("gb-theme-data");
|
const botId = getCurrentBotId();
|
||||||
|
const savedTheme = localStorage.getItem(`gb-theme-data-${botId}`);
|
||||||
if (savedTheme) {
|
if (savedTheme) {
|
||||||
try {
|
try {
|
||||||
const data = JSON.parse(savedTheme);
|
const data = JSON.parse(savedTheme);
|
||||||
setThemeFromServer(data);
|
setThemeFromServer(data);
|
||||||
console.log("✓ Theme loaded from localStorage");
|
console.log(`✓ Theme loaded from localStorage for ${botId}`);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.warn("Failed to load saved theme:", e);
|
console.warn("Failed to load saved theme:", e);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue