From 0bb6ce33beafeeae9e2f146563ec56786477da34 Mon Sep 17 00:00:00 2001
From: Weirui Kuang <39145382+rayrayraykk@users.noreply.github.com>
Date: Fri, 25 Oct 2024 18:06:30 +0800
Subject: [PATCH] linter (#44)
---
.eslintrc | 17 +
.pre-commit-config.yaml | 14 +
.stylelintrc | 6 +
docs/sphinx_doc/en/source/_static/custom.css | 4 +-
.../zh_CN/source/_static/custom.css | 4 +-
src/agentscope/studio/static/css/base.css | 128 +-
.../static/css/dashboard-detail-code.css | 138 +-
.../static/css/dashboard-detail-dialogue.css | 620 +-
.../css/dashboard-detail-invocation.css | 60 +-
.../studio/static/css/dashboard-detail.css | 100 +-
.../studio/static/css/dashboard-runs.css | 126 +-
.../studio/static/css/dashboard.css | 46 +-
src/agentscope/studio/static/css/font.css | 8 +-
src/agentscope/studio/static/css/gallery.css | 88 +-
src/agentscope/studio/static/css/index.css | 398 +-
src/agentscope/studio/static/css/login.css | 198 +-
src/agentscope/studio/static/css/server.css | 154 +-
.../css/workstation-drag-components.css | 186 +-
.../studio/static/css/workstation.css | 1432 ++---
.../studio/static/js/dashboard-detail-code.js | 114 +-
.../static/js/dashboard-detail-dialogue.js | 1008 ++--
.../static/js/dashboard-detail-invocation.js | 134 +-
.../studio/static/js/dashboard-detail.js | 144 +-
.../studio/static/js/dashboard-runs.js | 194 +-
src/agentscope/studio/static/js/dashboard.js | 194 +-
src/agentscope/studio/static/js/gallery.js | 482 +-
src/agentscope/studio/static/js/index.js | 512 +-
src/agentscope/studio/static/js/server.js | 808 +--
.../studio/static/js/workstation.js | 5349 ++++++++---------
.../studio/static/js/workstation_iframe.js | 4 +-
30 files changed, 6360 insertions(+), 6310 deletions(-)
create mode 100644 .eslintrc
create mode 100644 .stylelintrc
diff --git a/.eslintrc b/.eslintrc
new file mode 100644
index 000000000..dcd27a36f
--- /dev/null
+++ b/.eslintrc
@@ -0,0 +1,17 @@
+{
+ "env": {
+ "browser": true,
+ "es2021": true
+ },
+ "rules": {
+ "semi": ["error", "always"],
+ "quotes": ["error", "double"],
+ "indent": ["error", 2],
+ "linebreak-style": ["error", "unix"],
+ "brace-style": ["error", "1tbs"],
+ "curly": ["error", "all"],
+ "no-eval": ["error"],
+ "prefer-const": ["error"],
+ "arrow-spacing": ["error", { "before": true, "after": true }]
+ }
+}
\ No newline at end of file
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index fbd2fb365..3bc9b261f 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -99,6 +99,20 @@ repos:
--disable=W0201,
--disable=C0302,
]
+ - repo: https://github.com/pre-commit/mirrors-eslint
+ rev: v7.32.0
+ hooks:
+ - id: eslint
+ files: \.(js|jsx)$
+ exclude: '.*js_third_party.*'
+ args: ['--fix']
+ - repo: https://github.com/thibaudcolas/pre-commit-stylelint
+ rev: v14.4.0
+ hooks:
+ - id: stylelint
+ files: \.(css|scss|sass|less)$
+ exclude: '.*css_third_party.*'
+ args: ['--fix']
- repo: https://github.com/regebro/pyroma
rev: "4.0"
hooks:
diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 000000000..52759563b
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,6 @@
+{
+ "rules": {
+ "indentation": 2,
+ "string-quotes": "single"
+ }
+}
\ No newline at end of file
diff --git a/docs/sphinx_doc/en/source/_static/custom.css b/docs/sphinx_doc/en/source/_static/custom.css
index 68f11ceed..02b7f4cbe 100644
--- a/docs/sphinx_doc/en/source/_static/custom.css
+++ b/docs/sphinx_doc/en/source/_static/custom.css
@@ -1,4 +1,4 @@
.language-selector a {
- color: white;
- width: 20px;
+ color: white;
+ width: 20px;
}
\ No newline at end of file
diff --git a/docs/sphinx_doc/zh_CN/source/_static/custom.css b/docs/sphinx_doc/zh_CN/source/_static/custom.css
index 68f11ceed..02b7f4cbe 100644
--- a/docs/sphinx_doc/zh_CN/source/_static/custom.css
+++ b/docs/sphinx_doc/zh_CN/source/_static/custom.css
@@ -1,4 +1,4 @@
.language-selector a {
- color: white;
- width: 20px;
+ color: white;
+ width: 20px;
}
\ No newline at end of file
diff --git a/src/agentscope/studio/static/css/base.css b/src/agentscope/studio/static/css/base.css
index c6ea9a188..cc1340378 100644
--- a/src/agentscope/studio/static/css/base.css
+++ b/src/agentscope/studio/static/css/base.css
@@ -1,31 +1,31 @@
:root {
- --tab-btn-icon-length: 20px;
+ --tab-btn-icon-length: 20px;
- --body-bg: #ffffff;
+ --body-bg: #ffffff;
- --main-color: #59AC80;
- --main-color-light: #A0D9C4;
- --main-color-light-light: #D1E9DC;
- --main-color-very-light: #F3F9F1;
- --main-color-dark: #3D7D5A;
- --base-color: #F3F9F1;
+ --main-color: #59AC80;
+ --main-color-light: #A0D9C4;
+ --main-color-light-light: #D1E9DC;
+ --main-color-very-light: #F3F9F1;
+ --main-color-dark: #3D7D5A;
+ --base-color: #F3F9F1;
- --border-color: #EBEBF0;
+ --border-color: #EBEBF0;
- /*Titlebar for each page*/
- --page-titlebar-height: 60px;
- --page-content-height: calc(100% - var(--page-titlebar-height));
+ /*Titlebar for each page*/
+ --page-titlebar-height: 60px;
+ --page-content-height: calc(100% - var(--page-titlebar-height));
- /*Navigation bar*/
- --page-sidebar-width: 250px;
+ /*Navigation bar*/
+ --page-sidebar-width: 250px;
}
/*Text cannot be selected*/
.unselectable-text {
- -webkit-user-select: none; /* Safari */
- -moz-user-select: none; /* Firefox */
- -ms-user-select: none; /* IE10+/Edge */
- user-select: none; /* Standard */
+ -webkit-user-select: none; /* Safari */
+ -moz-user-select: none; /* Firefox */
+ -ms-user-select: none; /* IE10+/Edge */
+ user-select: none; /* Standard */
}
a {
@@ -33,78 +33,78 @@ a {
}
.page-titlebar {
- display: flex;
- justify-content: space-between;
- width: 100%;
- height: var(--page-titlebar-height);
- flex-direction: row;
- align-items: center;
- border-bottom: 1px solid var(--border-color);
- box-sizing: border-box;
- padding: 0 20px;
+ display: flex;
+ justify-content: space-between;
+ width: 100%;
+ height: var(--page-titlebar-height);
+ flex-direction: row;
+ align-items: center;
+ border-bottom: 1px solid var(--border-color);
+ box-sizing: border-box;
+ padding: 0 20px;
}
.github-user-content{
- display: flex;
- align-items: center;
+ display: flex;
+ align-items: center;
}
.user-detail{
- display: flex;
- position: relative;
- cursor: pointer;
+ display: flex;
+ position: relative;
+ cursor: pointer;
}
.user-option{
- position: relative;
- display: flex;;
- margin-right: 5px;
+ position: relative;
+ display: flex;;
+ margin-right: 5px;
}
.user-option a{
- color: black;
- text-decoration: none;
- font-weight: normal;
+ color: black;
+ text-decoration: none;
+ font-weight: normal;
}
.triangle-down {
- width: 0;
- height: 0;
- border-left: 5px solid transparent;
- border-right: 5px solid transparent;
- border-top: 5px solid gray;
- position: relative;
- transform: translateY(10px);
- margin-left: 5px;
+ width: 0;
+ height: 0;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid gray;
+ position: relative;
+ transform: translateY(10px);
+ margin-left: 5px;
}
.user-detail:hover .dropdown {
- display: block;
+ display: block;
}
.dropdown {
- display: none;
- position: absolute;
- width: 100%;
- top:100%;
- left: 0;
- background-color: #f9f9f9;
- box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
- z-index: 1;
- white-space: nowrap;
- border-radius: 0 0px 5px 5px;
- overflow: hidden;
+ display: none;
+ position: absolute;
+ width: 100%;
+ top:100%;
+ left: 0;
+ background-color: #f9f9f9;
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
+ z-index: 1;
+ white-space: nowrap;
+ border-radius: 0 0px 5px 5px;
+ overflow: hidden;
}
.dropdown a {
- color: black;
- padding: 4px 8px;
- text-decoration: none;
- display: block;
+ color: black;
+ padding: 4px 8px;
+ text-decoration: none;
+ display: block;
}
.dropdown a:hover {
- background-color: #f1f1f1;
+ background-color: #f1f1f1;
}
.triangle-down:hover {
- border-top: 5px solid #000;
+ border-top: 5px solid #000;
}
diff --git a/src/agentscope/studio/static/css/dashboard-detail-code.css b/src/agentscope/studio/static/css/dashboard-detail-code.css
index fb1e7c748..cc2fdcb72 100644
--- a/src/agentscope/studio/static/css/dashboard-detail-code.css
+++ b/src/agentscope/studio/static/css/dashboard-detail-code.css
@@ -1,101 +1,101 @@
:root {
- --code-list-width: 350px;
- --code-content-width: calc(100% - var(--code-list-width));
+ --code-list-width: 350px;
+ --code-content-width: calc(100% - var(--code-list-width));
}
#code-body {
- display: flex;
- flex-direction: row;
- height: 100%;
- width: 100%;
+ display: flex;
+ flex-direction: row;
+ height: 100%;
+ width: 100%;
}
#code-list {
- display: flex;
- flex-direction: column;
- height: 100%;
- width: var(--code-list-width);
- box-sizing: border-box;
- border: 0;
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ width: var(--code-list-width);
+ box-sizing: border-box;
+ border: 0;
}
#code-list ul {
- display: block;
- flex-direction: column;
- align-items: flex-start;
- justify-content: center;
- width: 100%;
- height: 35px;
- box-sizing: border-box;
- border-bottom: 1px solid var(--border-color);
- padding: 5px;
- margin: 0 0 3px 0;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
+ display: block;
+ flex-direction: column;
+ align-items: flex-start;
+ justify-content: center;
+ width: 100%;
+ height: 35px;
+ box-sizing: border-box;
+ border-bottom: 1px solid var(--border-color);
+ padding: 5px;
+ margin: 0 0 3px 0;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
#code-filename {
- display: block;
- flex-direction: column;
- align-items: flex-start;
- justify-content: center;
- width: 100%;
- height: 35px;
- box-sizing: border-box;
- border-bottom: 1px solid var(--border-color);
- padding: 5px;
- margin: 0;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
+ display: block;
+ flex-direction: column;
+ align-items: flex-start;
+ justify-content: center;
+ width: 100%;
+ height: 35px;
+ box-sizing: border-box;
+ border-bottom: 1px solid var(--border-color);
+ padding: 5px;
+ margin: 0;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
#code-list li {
- display: flex;
- flex-direction: column;
- align-items: flex-start;
- justify-content: center;
- width: 100%;
- height: 35px;
- padding: 3px 15px;
- margin: 0;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ align-items: flex-start;
+ justify-content: center;
+ width: 100%;
+ height: 35px;
+ padding: 3px 15px;
+ margin: 0;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ box-sizing: border-box;
}
#code-list li:hover {
- background-color: var(--main-color-light-light);
- cursor: pointer;
+ background-color: var(--main-color-light-light);
+ cursor: pointer;
}
#code-list li.selected {
- background-color: var(--main-color-light);
+ background-color: var(--main-color-light);
}
#code-list ul:hover {
- background-color: var(--main-color-light);
- overflow: visible;
- width: fit-content;
- border-radius: 5px;
- z-index: 10;
+ background-color: var(--main-color-light);
+ overflow: visible;
+ width: fit-content;
+ border-radius: 5px;
+ z-index: 10;
}
#code-content {
- display: flex;
- flex-direction: column;
- width: var(--code-content-width);
- height: 100%;
- box-sizing: border-box;
- border: 1px solid var(--border-color);
+ display: flex;
+ flex-direction: column;
+ width: var(--code-content-width);
+ height: 100%;
+ box-sizing: border-box;
+ border: 1px solid var(--border-color);
}
#code-editor {
- display: flex;
- width: 100%;
- height: 100%;
- overflow: auto;
- white-space: pre;
+ display: flex;
+ width: 100%;
+ height: 100%;
+ overflow: auto;
+ white-space: pre;
}
diff --git a/src/agentscope/studio/static/css/dashboard-detail-dialogue.css b/src/agentscope/studio/static/css/dashboard-detail-dialogue.css
index e7912f5b7..255fc6fc0 100644
--- a/src/agentscope/studio/static/css/dashboard-detail-dialogue.css
+++ b/src/agentscope/studio/static/css/dashboard-detail-dialogue.css
@@ -1,484 +1,484 @@
:root {
- --chat-bubble-border-radius: 5px;
+ --chat-bubble-border-radius: 5px;
- --chat-icon-width: 50px;
- --chat-icon-height: 50px;
- --chat-icon-horizontal-margin: 10px;
- /*TODO: not used here*/
- --chat-icon-total-width: calc(var(--chat-icon-width) + var(--chat-icon-horizontal-margin) * 2);
+ --chat-icon-width: 50px;
+ --chat-icon-height: 50px;
+ --chat-icon-horizontal-margin: 10px;
+ /*TODO: not used here*/
+ --chat-icon-total-width: calc(var(--chat-icon-width) + var(--chat-icon-horizontal-margin) * 2);
- --chat-detail-width: 350px;
+ --chat-detail-width: 350px;
- /*Switch bar*/
- --chat-detail-switch-width: 50px;
- --chat-detail-swtich-btn-length: 40px;
- --chat-detail-switch-svg-length: 20px;
+ /*Switch bar*/
+ --chat-detail-switch-width: 50px;
+ --chat-detail-swtich-btn-length: 40px;
+ --chat-detail-switch-svg-length: 20px;
- --chat-panel-width: calc(100% - var(--chat-detail-width) - var(--chat-detail-switch-width));
+ --chat-panel-width: calc(100% - var(--chat-detail-width) - var(--chat-detail-switch-width));
- /*Input area*/
- --chat-input-panel-height: 100px;
- --chat-control-panel-height: 56px;
- --chat-control-btn-margin-top: 6px;
+ /*Input area*/
+ --chat-input-panel-height: 100px;
+ --chat-control-panel-height: 56px;
+ --chat-control-btn-margin-top: 6px;
- /*Delete button*/
- --chat-control-file-delete-length: 16px;
- --chat-control-file-delete-position: -5px;
+ /*Delete button*/
+ --chat-control-file-delete-length: 16px;
+ --chat-control-file-delete-position: -5px;
- /*List item*/
- --chat-control-file-item-length: calc(var(--chat-control-panel-height) - var(--chat-control-btn-margin-top));
+ /*List item*/
+ --chat-control-file-item-length: calc(var(--chat-control-panel-height) - var(--chat-control-btn-margin-top));
- /*Should be smaller than --chat-control-file-item-length--*/
- --chat-control-file-svg-length: 35px;
- --chat-control-file-svg-margin: calc((var(--chat-control-file-item-length) - var(--chat-control-file-svg-length)) / 2);
+ /*Should be smaller than --chat-control-file-item-length--*/
+ --chat-control-file-svg-length: 35px;
+ --chat-control-file-svg-margin: calc((var(--chat-control-file-item-length) - var(--chat-control-file-svg-length)) / 2);
- --chat-input-panel-font-size: 15px;
+ --chat-input-panel-font-size: 15px;
}
#chat-body {
- display: flex;
- flex-direction: row;
- width: 100%;
- height: 100%;
+ display: flex;
+ flex-direction: row;
+ width: 100%;
+ height: 100%;
}
#chat-panel {
- display: flex;
- flex-direction: column;
- width: var(--chat-panel-width);
- height: 100%;
- padding: 50px 50px;
- box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ width: var(--chat-panel-width);
+ height: 100%;
+ padding: 50px 50px;
+ box-sizing: border-box;
}
#chat-detail {
- display: flex;
- flex-direction: column;
- height: 100%;
- max-height: 100%;
- width: var(--chat-detail-width);
- box-sizing: border-box;
- border-left: 1px solid var(--border-color);
- padding: 50px 20px;
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ max-height: 100%;
+ width: var(--chat-detail-width);
+ box-sizing: border-box;
+ border-left: 1px solid var(--border-color);
+ padding: 50px 20px;
}
#chat-detail-switch {
- display: flex;
- flex-direction: column;
- align-items: center;
- height: 100%;
- width: var(--chat-detail-switch-width);
- box-sizing: border-box;
- border-left: 1px solid var(--border-color);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ height: 100%;
+ width: var(--chat-detail-switch-width);
+ box-sizing: border-box;
+ border-left: 1px solid var(--border-color);
}
.chat-detail-switch-btn {
- display: flex;
- flex-direction: column;
- width: var(--chat-detail-swtich-btn-length);
- height: var(--chat-detail-swtich-btn-length);
- align-items: center;
- justify-content: center;
- cursor: pointer;
- box-sizing: border-box;
- border-radius: 10px;
- margin-top: 10px;
- fill: #000000;
+ display: flex;
+ flex-direction: column;
+ width: var(--chat-detail-swtich-btn-length);
+ height: var(--chat-detail-swtich-btn-length);
+ align-items: center;
+ justify-content: center;
+ cursor: pointer;
+ box-sizing: border-box;
+ border-radius: 10px;
+ margin-top: 10px;
+ fill: #000000;
}
.chat-detail-switch-btn svg {
- display: flex;
- width: var(--chat-detail-switch-svg-length);
- height: var(--chat-detail-switch-svg-length);
- align-items: center;
- justify-content: center;
+ display: flex;
+ width: var(--chat-detail-switch-svg-length);
+ height: var(--chat-detail-switch-svg-length);
+ align-items: center;
+ justify-content: center;
}
.chat-detail-switch-btn:hover {
- background-color: var(--main-color-light);
- fill: var(--base-color);
+ background-color: var(--main-color-light);
+ fill: var(--base-color);
}
.chat-detail-switch-btn:active {
- background-color: var(--main-color-dark);
- fill: var(--base-color);
+ background-color: var(--main-color-dark);
+ fill: var(--base-color);
}
.chat-detail-switch-btn.selected {
- background-color: var(--main-color);
- fill: var(--base-color);
+ background-color: var(--main-color);
+ fill: var(--base-color);
}
#dialogue-detail-content {
- display: flex;
- height: 100%;
- width: 100%;
- flex-direction: column;
- max-height: 100%;
- max-width: 100%;
- box-sizing: border-box;
- white-space: normal;
- word-wrap: break-word;
- overflow-wrap: break-word;
+ display: flex;
+ height: 100%;
+ width: 100%;
+ flex-direction: column;
+ max-height: 100%;
+ max-width: 100%;
+ box-sizing: border-box;
+ white-space: normal;
+ word-wrap: break-word;
+ overflow-wrap: break-word;
}
#dialogue-info-title {
- display: flex;
- flex-direction: column;
- justify-content: center;
- font-weight: bold;
- width: 100%;
- height: 50px;
- font-size: 18px;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ font-weight: bold;
+ width: 100%;
+ height: 50px;
+ font-size: 18px;
}
.dialogue-info-key {
- display: flex;
- width: 100%;
- height: 30px;
- align-items: center;
- font-size: 15px;
- font-weight: bold;
+ display: flex;
+ width: 100%;
+ height: 30px;
+ align-items: center;
+ font-size: 15px;
+ font-weight: bold;
}
.dialogue-info-value {
- display: flex;
- background-color: var(--border-color);
- height: fit-content;
- width: 100%;
- max-width: 100%;
- align-items: center;
- padding: 5px 10px;
- border-radius: 2px;
- min-height: 33px;
- box-sizing: border-box;
- word-break: break-word;
- overflow-wrap: break-word;
- white-space: pre-wrap;
+ display: flex;
+ background-color: var(--border-color);
+ height: fit-content;
+ width: 100%;
+ max-width: 100%;
+ align-items: center;
+ padding: 5px 10px;
+ border-radius: 2px;
+ min-height: 33px;
+ box-sizing: border-box;
+ word-break: break-word;
+ overflow-wrap: break-word;
+ white-space: pre-wrap;
}
.dialogue-info-row {
- display: flex;
- flex-direction: column;
- width: 100%;
- height: fit-content;
- margin: 5px 0;
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: fit-content;
+ margin: 5px 0;
}
#chat-box {
- display: flex;
- box-sizing: border-box;
- flex-direction: column;
- width: 100%;
- flex-grow: 1;
- margin-bottom: 50px;
- max-height: 100%;
- border: 1px solid var(--border-color);
- border-radius: 8px;
+ display: flex;
+ box-sizing: border-box;
+ flex-direction: column;
+ width: 100%;
+ flex-grow: 1;
+ margin-bottom: 50px;
+ max-height: 100%;
+ border: 1px solid var(--border-color);
+ border-radius: 8px;
}
#chat-box-content {
- display: flex;
- width: 100%;
- height: 100%;
- flex-direction: column;
- max-height: 100%;
+ display: flex;
+ width: 100%;
+ height: 100%;
+ flex-direction: column;
+ max-height: 100%;
}
.chat-row {
- display: flex;
- flex-direction: row;
- box-sizing: border-box;
- width: 100%;
- height: fit-content;
- padding: 10px 0;
+ display: flex;
+ flex-direction: row;
+ box-sizing: border-box;
+ width: 100%;
+ height: fit-content;
+ padding: 10px 0;
}
.chat-row:hover {
- background-color: var(--main-color-very-light);
+ background-color: var(--main-color-very-light);
}
.user.chat-row {
- justify-content: flex-end;
+ justify-content: flex-end;
}
.text-right-align {
- text-align: right;
+ text-align: right;
}
.chat-icon {
- display: flex;
- justify-content: center;
- box-sizing: border-box;
- width: var(--chat-icon-width);
- height: var(--chat-icon-height);
- border-radius: 5px;
- margin: 0 var(--chat-icon-horizontal-margin);
- padding: 10px;
- background-color: var(--main-color);
- fill: #ffffff;
+ display: flex;
+ justify-content: center;
+ box-sizing: border-box;
+ width: var(--chat-icon-width);
+ height: var(--chat-icon-height);
+ border-radius: 5px;
+ margin: 0 var(--chat-icon-horizontal-margin);
+ padding: 10px;
+ background-color: var(--main-color);
+ fill: #ffffff;
}
.chat-content {
- display: flex;
- flex-direction: column;
- width: calc(100% - 140px);
- /*TODO: for test*/
- box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ width: calc(100% - 140px);
+ /*TODO: for test*/
+ box-sizing: border-box;
}
.user.chat-content {
- align-items: flex-end;
+ align-items: flex-end;
}
.chat-name {
- display: flex;
- margin-bottom: 5px;
+ display: flex;
+ margin-bottom: 5px;
}
.chat-bubble {
- display: flex;
- flex-direction: column;
- border: 1px solid var(--main-color-light);
- background-color: #ffffff;
- flex-grow: 1;
- box-sizing: border-box;
- padding: 10px;
- width: fit-content;
- max-width: 100%;
- min-width: 100px;
- word-wrap: break-word;
- overflow-wrap: break-word;
+ display: flex;
+ flex-direction: column;
+ border: 1px solid var(--main-color-light);
+ background-color: #ffffff;
+ flex-grow: 1;
+ box-sizing: border-box;
+ padding: 10px;
+ width: fit-content;
+ max-width: 100%;
+ min-width: 100px;
+ word-wrap: break-word;
+ overflow-wrap: break-word;
}
.user.chat-bubble {
- border-radius: var(--chat-bubble-border-radius) 0 var(--chat-bubble-border-radius) var(--chat-bubble-border-radius);
- white-space: pre-wrap;
+ border-radius: var(--chat-bubble-border-radius) 0 var(--chat-bubble-border-radius) var(--chat-bubble-border-radius);
+ white-space: pre-wrap;
}
.other.chat-bubble {
- border-radius: 0 var(--chat-bubble-border-radius) var(--chat-bubble-border-radius) var(--chat-bubble-border-radius);
+ border-radius: 0 var(--chat-bubble-border-radius) var(--chat-bubble-border-radius) var(--chat-bubble-border-radius);
}
.chat-bubble p {
- display: inline;
- flex-direction: row;
- align-items: center;
- margin: 0;
+ display: inline;
+ flex-direction: row;
+ align-items: center;
+ margin: 0;
}
.chat-bubble-multimodal-item {
- display: flex;
- max-height: 200px;
- max-width: 100%;
- width: auto;
- height: auto;
- min-height: 50px;
- min-width: 50px;
- margin-top: 5px;
+ display: flex;
+ max-height: 200px;
+ max-width: 100%;
+ width: auto;
+ height: auto;
+ min-height: 50px;
+ min-width: 50px;
+ margin-top: 5px;
}
#chat-input {
- display: flex;
- height: fit-content;
- width: 100%;
- box-sizing: border-box;
- border: 1px solid var(--border-color);
- border-radius: 8px;
- flex-direction: column;
- padding: 10px;
+ display: flex;
+ height: fit-content;
+ width: 100%;
+ box-sizing: border-box;
+ border: 1px solid var(--border-color);
+ border-radius: 8px;
+ flex-direction: column;
+ padding: 10px;
}
#chat-input:focus {
- border-color: var(--main-color);
+ border-color: var(--main-color);
}
#chat-input-name {
- display: flex;
- flex-direction: column;
- width: fit-content;
- max-width: 100px;
- height: fit-content;
- margin-right: 5px;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- padding: 2px;
- font-size: var(--chat-input-panel-font-size);
+ display: flex;
+ flex-direction: column;
+ width: fit-content;
+ max-width: 100px;
+ height: fit-content;
+ margin-right: 5px;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ padding: 2px;
+ font-size: var(--chat-input-panel-font-size);
}
#chat-input-textarea {
- display: flex;
- flex-grow: 1;
- height: 100%;
- resize: none;
- box-sizing: border-box;
- padding: 2px;
- font-size: var(--chat-input-panel-font-size);
- font-family: source-sans, sans-serif;
+ display: flex;
+ flex-grow: 1;
+ height: 100%;
+ resize: none;
+ box-sizing: border-box;
+ padding: 2px;
+ font-size: var(--chat-input-panel-font-size);
+ font-family: source-sans, sans-serif;
- /*remove border*/
- border-color: transparent;
- border-width: 0;
- outline: none;
+ /*remove border*/
+ border-color: transparent;
+ border-width: 0;
+ outline: none;
}
#chat-control-panel {
- display: flex;
- flex-direction: row;
- justify-content: flex-end;
- align-items: center;
- height: var(--chat-control-panel-height);
- width: 100%;
- box-sizing: border-box;
+ display: flex;
+ flex-direction: row;
+ justify-content: flex-end;
+ align-items: center;
+ height: var(--chat-control-panel-height);
+ width: 100%;
+ box-sizing: border-box;
}
#chat-control-url-btn svg {
- display: flex;
- height: 20px;
- width: 20px;
- align-items: center;
- justify-content: center;
+ display: flex;
+ height: 20px;
+ width: 20px;
+ align-items: center;
+ justify-content: center;
}
#chat-input-panel {
- display: flex;
- width: 100%;
- height: var(--chat-input-panel-height);
- flex-direction: row;
+ display: flex;
+ width: 100%;
+ height: var(--chat-input-panel-height);
+ flex-direction: row;
}
.chat-control-btn {
- display: flex;
- flex-direction: row;
- align-items: center;
- height: calc(100% - var(--chat-control-btn-margin-top));
- border-radius: 5px;
- padding: 0 15px;
- border: none;
- font-size: 15px;
- cursor: pointer;
- background-color: var(--main-color-light-light);
- color: var(--main-color-dark);
- fill: var(--main-color-dark);
- margin-top: var(--chat-control-btn-margin-top);
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ height: calc(100% - var(--chat-control-btn-margin-top));
+ border-radius: 5px;
+ padding: 0 15px;
+ border: none;
+ font-size: 15px;
+ cursor: pointer;
+ background-color: var(--main-color-light-light);
+ color: var(--main-color-dark);
+ fill: var(--main-color-dark);
+ margin-top: var(--chat-control-btn-margin-top);
}
.chat-control-btn:disabled, .chat-control-btn:disabled:hover, .chat-control-btn:disabled:active {
- background-color: var(--border-color);
- color: var(--base-color);
- fill: var(--base-color);
- cursor: not-allowed;
+ background-color: var(--border-color);
+ color: var(--base-color);
+ fill: var(--base-color);
+ cursor: not-allowed;
}
#chat-control-url-btn {
- width: fit-content;
- margin-left: 10px;
+ width: fit-content;
+ margin-left: 10px;
}
#chat-control-send-btn {
- width: fit-content;
- margin-left: 10px;
+ width: fit-content;
+ margin-left: 10px;
}
#chat-control-file-list {
- display: flex;
- flex-direction: row;
- align-items: flex-end;
- height: 100%;
- flex-grow: 1;
- padding: 0 15px;
- border: none;
- font-size: 15px;
- overflow-x: auto;
+ display: flex;
+ flex-direction: row;
+ align-items: flex-end;
+ height: 100%;
+ flex-grow: 1;
+ padding: 0 15px;
+ border: none;
+ font-size: 15px;
+ overflow-x: auto;
}
.chat-control-file-item {
- position: relative;
- display: inline-block;
- border-radius: 5px;
- align-items: center;
- justify-content: center;
- height: var(--chat-control-file-item-length);
- width: var(--chat-control-file-item-length);
- margin: 0 5px;
- vertical-align: center;
- text-align: center;
+ position: relative;
+ display: inline-block;
+ border-radius: 5px;
+ align-items: center;
+ justify-content: center;
+ height: var(--chat-control-file-item-length);
+ width: var(--chat-control-file-item-length);
+ margin: 0 5px;
+ vertical-align: center;
+ text-align: center;
}
.chat-control-file-item:hover {
- background-color: var(--main-color-light);
+ background-color: var(--main-color-light);
}
.chat-control-file-delete {
- position: absolute;
- top: var(--chat-control-file-delete-position);
- right: var(--chat-control-file-delete-position);
- height: var(--chat-control-file-delete-length);
- width: var(--chat-control-file-delete-length);
- background-color: white;
- fill: var(--main-color-dark);
- border: 2px solid var(--main-color-dark);
- border-radius: 50%;
- cursor: pointer;
- box-sizing: border-box;
- display: none;
+ position: absolute;
+ top: var(--chat-control-file-delete-position);
+ right: var(--chat-control-file-delete-position);
+ height: var(--chat-control-file-delete-length);
+ width: var(--chat-control-file-delete-length);
+ background-color: white;
+ fill: var(--main-color-dark);
+ border: 2px solid var(--main-color-dark);
+ border-radius: 50%;
+ cursor: pointer;
+ box-sizing: border-box;
+ display: none;
}
.chat-control-file-delete > svg {
- display: flex;
- width: calc(var(--chat-control-file-delete-length) - 4px);
- height: calc(var(--chat-control-file-delete-length) - 4px);
+ display: flex;
+ width: calc(var(--chat-control-file-delete-length) - 4px);
+ height: calc(var(--chat-control-file-delete-length) - 4px);
}
.chat-control-file-item:hover .chat-control-file-delete {
- display: block;
+ display: block;
}
.chat-control-file-item > svg {
- display: block;
- margin: var(--chat-control-file-svg-margin);
- height: var(--chat-control-file-svg-length);
- width: var(--chat-control-file-svg-length);
+ display: block;
+ margin: var(--chat-control-file-svg-margin);
+ height: var(--chat-control-file-svg-length);
+ width: var(--chat-control-file-svg-length);
}
.chat-control-btn:hover {
- background-color: var(--main-color);
- color: var(--base-color);
- fill: var(--base-color);
+ background-color: var(--main-color);
+ color: var(--base-color);
+ fill: var(--base-color);
}
.chat-control-btn:active {
- background-color: var(--main-color-dark);
- color: var(--base-color);
- fill: var(--base-color);
+ background-color: var(--main-color-dark);
+ color: var(--base-color);
+ fill: var(--base-color);
}
.chat-control-send-btn-svg {
- display: flex;
- width: 20px;
- height: 25px;
- margin-left: 5px;
+ display: flex;
+ width: 20px;
+ height: 25px;
+ margin-left: 5px;
}
#hidden-file-input {
- display: none;
+ display: none;
}
#agentSwitchBtn {
- display: none;
+ display: none;
}
.chat-bubble pre code {
- white-space: pre-wrap;
- word-wrap: break-word;
+ white-space: pre-wrap;
+ word-wrap: break-word;
}
#chat-box-content .clusterize-no-data {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100%;
- width: 100%;
- color: var(--main-color-light);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100%;
+ width: 100%;
+ color: var(--main-color-light);
}
\ No newline at end of file
diff --git a/src/agentscope/studio/static/css/dashboard-detail-invocation.css b/src/agentscope/studio/static/css/dashboard-detail-invocation.css
index 6a7f1782e..29ec10ccb 100644
--- a/src/agentscope/studio/static/css/dashboard-detail-invocation.css
+++ b/src/agentscope/studio/static/css/dashboard-detail-invocation.css
@@ -1,44 +1,44 @@
#invocation-body {
- display: flex;
- flex-direction: row;
- align-items: flex-end;
- height: 100%;
- width: 100%;
+ display: flex;
+ flex-direction: row;
+ align-items: flex-end;
+ height: 100%;
+ width: 100%;
}
#invocation-list {
- display: flex;
- flex-direction: column;
- height: 100%;
- width: 350px;
- box-sizing: border-box;
- border: 0;
- background-color: #ffffff;
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ width: 350px;
+ box-sizing: border-box;
+ border: 0;
+ background-color: #ffffff;
}
#invocation-content {
- display: flex;
- flex-direction: column;
- width: calc(100% - 350px);
- height: 100%;
- box-sizing: border-box;
- border-left: 1px solid var(--border-color);
+ display: flex;
+ flex-direction: column;
+ width: calc(100% - 350px);
+ height: 100%;
+ box-sizing: border-box;
+ border-left: 1px solid var(--border-color);
}
#invocation-content .monaco-editor {
- display: flex;
- height: 100%;
- width: 100%;
- flex-grow: 1;
- min-width: 100%;
+ display: flex;
+ height: 100%;
+ width: 100%;
+ flex-grow: 1;
+ min-width: 100%;
}
.content-placeholder {
- display: flex;
- color: var(--main-color-light-light);
- width: 100%;
- height: 100%;
- align-items: center;
- justify-content: center;
- font-size: 18px;
+ display: flex;
+ color: var(--main-color-light-light);
+ width: 100%;
+ height: 100%;
+ align-items: center;
+ justify-content: center;
+ font-size: 18px;
}
\ No newline at end of file
diff --git a/src/agentscope/studio/static/css/dashboard-detail.css b/src/agentscope/studio/static/css/dashboard-detail.css
index 7681cfd14..aa8851c30 100644
--- a/src/agentscope/studio/static/css/dashboard-detail.css
+++ b/src/agentscope/studio/static/css/dashboard-detail.css
@@ -1,82 +1,82 @@
:root {
- --detail-sidebar-padding-vertical: 5px;
- --detail-content-width: calc(100% - var(--page-sidebar-width));
+ --detail-sidebar-padding-vertical: 5px;
+ --detail-content-width: calc(100% - var(--page-sidebar-width));
}
#detail-body {
- display: flex;
- flex-direction: row;
- height: 100%;
- width: 100%;
+ display: flex;
+ flex-direction: row;
+ height: 100%;
+ width: 100%;
}
#detail-sidebar {
- display: flex;
- box-sizing: border-box;
- height: 100%;
- flex-direction: column;
- width: var(--page-sidebar-width);
- background-color: #ffffff;
+ display: flex;
+ box-sizing: border-box;
+ height: 100%;
+ flex-direction: column;
+ width: var(--page-sidebar-width);
+ background-color: #ffffff;
- border-right-color: var(--border-color);
- border-right-width: 1px;
- border-right-style: solid;
- padding: var(--detail-sidebar-padding-vertical) 0;
+ border-right-color: var(--border-color);
+ border-right-width: 1px;
+ border-right-style: solid;
+ padding: var(--detail-sidebar-padding-vertical) 0;
}
.detail-sidebar-tabs {
- display: flex;
- flex-direction: column;
- width: 100%;
- height: 100%;
- padding: 45px 10px;
- box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ padding: 45px 10px;
+ box-sizing: border-box;
}
.detail-sidebar-tab {
- display: flex;
- flex-direction: row;
- height: var(--navigation-bar-item-height);
- width: 100%;
- box-sizing: border-box;
- align-items: center;
- border-radius: 10px;
- padding-left: 20px;
- margin: 5px 0;
- cursor: pointer;
+ display: flex;
+ flex-direction: row;
+ height: var(--navigation-bar-item-height);
+ width: 100%;
+ box-sizing: border-box;
+ align-items: center;
+ border-radius: 10px;
+ padding-left: 20px;
+ margin: 5px 0;
+ cursor: pointer;
}
.detail-sidebar-tab:hover {
- background-color: var(--main-color-light);
- fill: var(--base-color);
- color: var(--base-color);
+ background-color: var(--main-color-light);
+ fill: var(--base-color);
+ color: var(--base-color);
}
.detail-sidebar-tab:active {
- background-color: var(--main-color-dark);
- fill: var(--base-color);
- color: var(--base-color);
+ background-color: var(--main-color-dark);
+ fill: var(--base-color);
+ color: var(--base-color);
}
.detail-sidebar-tab.selected {
- background-color: var(--main-color);
- fill: var(--base-color);
- color: var(--base-color);
+ background-color: var(--main-color);
+ fill: var(--base-color);
+ color: var(--base-color);
}
.detail-sidebar-tab-svg {
- display: flex;
- width: var(--tab-btn-icon-length);
- height: var(--tab-btn-icon-length);
- margin-right: 10px;
+ display: flex;
+ width: var(--tab-btn-icon-length);
+ height: var(--tab-btn-icon-length);
+ margin-right: 10px;
}
#detail-content {
- display: flex;
- background-color: #ffffff;
- flex-direction: row;
- height: 100%;
- width: var(--detail-content-width);
+ display: flex;
+ background-color: #ffffff;
+ flex-direction: row;
+ height: 100%;
+ width: var(--detail-content-width);
}
diff --git a/src/agentscope/studio/static/css/dashboard-runs.css b/src/agentscope/studio/static/css/dashboard-runs.css
index 73e7712dd..2cc2cd5a7 100644
--- a/src/agentscope/studio/static/css/dashboard-runs.css
+++ b/src/agentscope/studio/static/css/dashboard-runs.css
@@ -1,72 +1,72 @@
:root {
- --runs-content-padding-vertical: 50px;
- --runs-content-padding-horizontal: 80px;
- --runs-content-control-panel-height: 55px;
- --runs-search-input-height: 35px;
- --runs-table-height: calc(100% - var(--runs-content-control-panel-height));
+ --runs-content-padding-vertical: 50px;
+ --runs-content-padding-horizontal: 80px;
+ --runs-content-control-panel-height: 55px;
+ --runs-search-input-height: 35px;
+ --runs-table-height: calc(100% - var(--runs-content-control-panel-height));
}
#runs-content {
- display: flex;
- flex-direction: column;
- height: 100%;
- width: 100%;
- padding: var(--runs-content-padding-vertical) var(--runs-content-padding-horizontal);
- box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ height: 100%;
+ width: 100%;
+ padding: var(--runs-content-padding-vertical) var(--runs-content-padding-horizontal);
+ box-sizing: border-box;
}
#runs-control-panel {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- height: var(--runs-content-control-panel-height);
- width: 100%;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
+ align-items: center;
+ height: var(--runs-content-control-panel-height);
+ width: 100%;
}
#runs-table {
- flex-grow: 1;
- overflow-y: auto;
- width: 100%;
- height: var(--runs-table-height);
- max-height: var(--runs-table-height);
- background-color: #ffffff;
- border: 1px solid var(--border-color);
+ flex-grow: 1;
+ overflow-y: auto;
+ width: 100%;
+ height: var(--runs-table-height);
+ max-height: var(--runs-table-height);
+ background-color: #ffffff;
+ border: 1px solid var(--border-color);
}
#runs-search-input {
- display: flex;
- height: var(--runs-search-input-height);
- flex-grow: 1;
- align-items: center;
- border: 1px solid var(--border-color);
- padding: 0 10px;
+ display: flex;
+ height: var(--runs-search-input-height);
+ flex-grow: 1;
+ align-items: center;
+ border: 1px solid var(--border-color);
+ padding: 0 10px;
}
#runs-search-input:focus {
- border-color: var(--main-color);
- outline: none; /* 移除默认的焦点轮廓样式 */
+ border-color: var(--main-color);
+ outline: none; /* 移除默认的焦点轮廓样式 */
}
/* Remove border from tabulator */
.tabulator .tabulator-cell,
.tabulator .tabulator-col,
.tabulator .tabulator-header .tabulator-col {
- border: none !important;
+ border: none !important;
}
.tabulator .tabulator-cell {
- height: 45px;
+ height: 45px;
}
/* Remove the bottom border from table header */
.tabulator .tabulator-header {
- border-bottom: none !important;
+ border-bottom: none !important;
}
.tabulator-col-sorter-element.tabulator-sortable.tabulator-col {
- background-color: var(--main-color-light);
- color: var(--main-color-dark);
+ background-color: var(--main-color-light);
+ color: var(--main-color-dark);
}
/* Set the same color for all rows */
@@ -80,45 +80,45 @@
/*}*/
.runs-table-status-tag {
- display: flex;
- flex-direction: row;
- align-items: center;
- height: 26px;
- width: fit-content;
- border-radius: 13px;
- color: var(--base-color);
- box-sizing: border-box;
- margin: 0 5px;
- padding: 0 14px;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ height: 26px;
+ width: fit-content;
+ border-radius: 13px;
+ color: var(--base-color);
+ box-sizing: border-box;
+ margin: 0 5px;
+ padding: 0 14px;
}
.running.runs-table-status-tag {
- background-color: #d1e7fa;
- color: #58c1ef;
- fill: #58c1ef;
+ background-color: #d1e7fa;
+ color: #58c1ef;
+ fill: #58c1ef;
}
.finished.runs-table-status-tag {
- background-color: var(--main-color-light);
- color: var(--main-color-dark);
- fill: var(--main-color-dark);
+ background-color: var(--main-color-light);
+ color: var(--main-color-dark);
+ fill: var(--main-color-dark);
}
.waiting.runs-table-status-tag {
- background-color: #f8efba;
- color: #f6b93b;
- fill: #f6b93b;
+ background-color: #f8efba;
+ color: #f6b93b;
+ fill: #f6b93b;
}
.unknown.runs-table-status-tag {
- background-color: #e1e1e1;
- color: #3d4047;
- fill: #3d4047;
+ background-color: #e1e1e1;
+ color: #3d4047;
+ fill: #3d4047;
}
.runs-table-status-svg {
- display: flex;
- width: 15px;
- height: 15px;
- margin-right: 7px;
+ display: flex;
+ width: 15px;
+ height: 15px;
+ margin-right: 7px;
}
diff --git a/src/agentscope/studio/static/css/dashboard.css b/src/agentscope/studio/static/css/dashboard.css
index d5e71c3c7..4078883c1 100644
--- a/src/agentscope/studio/static/css/dashboard.css
+++ b/src/agentscope/studio/static/css/dashboard.css
@@ -1,37 +1,37 @@
#dashboard-panel {
- display: flex;
- height: 100%;
- width: 100%;
- flex-direction: column;
+ display: flex;
+ height: 100%;
+ width: 100%;
+ flex-direction: column;
}
.dashboard-titlebar-span {
- display: flex;
- height: 50px;
- width: fit-content;
- align-items: center;
- cursor: pointer;
+ display: flex;
+ height: 50px;
+ width: fit-content;
+ align-items: center;
+ cursor: pointer;
}
.dashboard-subtitlebar-span {
- display: flex;
- height: 50px;
- width: fit-content;
- align-items: center;
+ display: flex;
+ height: 50px;
+ width: fit-content;
+ align-items: center;
}
.dashboard-titlebar-svg {
- display: flex;
- width: 15px;
- height: 15px;
- align-items: center;
- justify-content: center;
- margin: 0 10px;
+ display: flex;
+ width: 15px;
+ height: 15px;
+ align-items: center;
+ justify-content: center;
+ margin: 0 10px;
}
#dashboard-content {
- display: flex;
- height: var(--page-content-height);
- width: 100%;
- flex-direction: row;
+ display: flex;
+ height: var(--page-content-height);
+ width: 100%;
+ flex-direction: row;
}
\ No newline at end of file
diff --git a/src/agentscope/studio/static/css/font.css b/src/agentscope/studio/static/css/font.css
index 5b151527f..5d87f16ea 100644
--- a/src/agentscope/studio/static/css/font.css
+++ b/src/agentscope/studio/static/css/font.css
@@ -1,9 +1,9 @@
@font-face {
- font-family: 'krypton';
- src: url('/static/fonts/KRYPTON.ttf') format('truetype');
+ font-family: 'krypton';
+ src: url('/static/fonts/KRYPTON.ttf') format('truetype');
}
@font-face {
- font-family: 'source-sans';
- src: url('/static/fonts/SourceSans3-Regular.ttf') format('truetype');
+ font-family: 'source-sans';
+ src: url('/static/fonts/SourceSans3-Regular.ttf') format('truetype');
}
\ No newline at end of file
diff --git a/src/agentscope/studio/static/css/gallery.css b/src/agentscope/studio/static/css/gallery.css
index 5024161e4..8bdc6ccc8 100644
--- a/src/agentscope/studio/static/css/gallery.css
+++ b/src/agentscope/studio/static/css/gallery.css
@@ -1,88 +1,88 @@
.two-column-layout {
- display: flex;
- width: 100%;
- height: var(--page-content-height);
+ display: flex;
+ width: 100%;
+ height: var(--page-content-height);
}
.sidebar {
- flex-basis: var(--page-sidebar-width);
- box-sizing: border-box;
- padding: 50px 10px;
- border-right: 1px solid var(--border-color);
- overflow-y: auto;
- width: 100%;
+ flex-basis: var(--page-sidebar-width);
+ box-sizing: border-box;
+ padding: 50px 10px;
+ border-right: 1px solid var(--border-color);
+ overflow-y: auto;
+ width: 100%;
}
.tabs {
- display: block;
- padding: 0;
- margin: 50px 0 20px 0;
+ display: block;
+ padding: 0;
+ margin: 50px 0 20px 0;
}
.tab-button {
- cursor: pointer;
- padding: 10px;
- border: none;
- margin-right: 20px;
- border-radius: 15px;
+ cursor: pointer;
+ padding: 10px;
+ border: none;
+ margin-right: 20px;
+ border-radius: 15px;
}
.tab-button.active {
- background-color: var(--main-color-light);
+ background-color: var(--main-color-light);
}
.tab {
- display: none;
+ display: none;
}
.tab.active {
- display: block;
+ display: block;
}
.grid-container {
- grid-template-columns: repeat(6, 1fr);
- gap: 1rem;
- padding: 1rem;
- display: flex;
- flex-wrap: wrap;
- gap: 1rem;
- padding: 1rem;
+ grid-template-columns: repeat(6, 1fr);
+ gap: 1rem;
+ padding: 1rem;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 1rem;
+ padding: 1rem;
}
.grid-item {
- background-color: #f0f0f0;
- border-radius: 4px;
- overflow: hidden;
- width: 200px;
- height: 200px;
- position: relative;
- display: flex;
- flex-direction: column;
+ background-color: #f0f0f0;
+ border-radius: 4px;
+ overflow: hidden;
+ width: 200px;
+ height: 200px;
+ position: relative;
+ display: flex;
+ flex-direction: column;
}
.grid-item :hover {
- transform: scale(1.05);
+ transform: scale(1.05);
}
.grid-item img {
- width: 100%;
- height: 61.8%;
- object-fit: cover;
+ width: 100%;
+ height: 61.8%;
+ object-fit: cover;
}
.grid-item .caption {
- width: 100%;
- height: 38.2%;
+ width: 100%;
+ height: 38.2%;
}
.thumbnail {
- width: 100%;
- flex-grow: 1;
+ width: 100%;
+ flex-grow: 1;
}
.caption {
- text-align: center;
+ text-align: center;
}
diff --git a/src/agentscope/studio/static/css/index.css b/src/agentscope/studio/static/css/index.css
index 99d227392..0ab164015 100644
--- a/src/agentscope/studio/static/css/index.css
+++ b/src/agentscope/studio/static/css/index.css
@@ -1,315 +1,315 @@
:root {
- --navigation-bar-background-color: #ffffff;
- --logo-font-color: #000000;
- --tab-font-color: #000000;
+ --navigation-bar-background-color: #ffffff;
+ --logo-font-color: #000000;
+ --tab-font-color: #000000;
- --navigation-bar-width: 240px;
- --content-width: calc(100% - var(--navigation-bar-width));
+ --navigation-bar-width: 240px;
+ --content-width: calc(100% - var(--navigation-bar-width));
- /*To ensure the collapsed navigation bar fit the icon*/
- --navigation-bar-item-icon-length: var(--tab-btn-icon-length);
- --navigation-bar-item-icon-margin: 10px;
- --navigation-bar-item-padding: 10px;
- --navigation-bar-width-collapsed: calc(var(--navigation-bar-item-icon-length) + 2 * var(--navigation-bar-item-icon-margin) + 2 * var(--navigation-bar-item-padding));
- --navigation-bar-item-height: calc(var(--navigation-bar-item-icon-length) + 2 * var(--navigation-bar-item-icon-margin))
+ /*To ensure the collapsed navigation bar fit the icon*/
+ --navigation-bar-item-icon-length: var(--tab-btn-icon-length);
+ --navigation-bar-item-icon-margin: 10px;
+ --navigation-bar-item-padding: 10px;
+ --navigation-bar-width-collapsed: calc(var(--navigation-bar-item-icon-length) + 2 * var(--navigation-bar-item-icon-margin) + 2 * var(--navigation-bar-item-padding));
+ --navigation-bar-item-height: calc(var(--navigation-bar-item-icon-length) + 2 * var(--navigation-bar-item-icon-margin))
}
html {
- height: 100%; /* Fill the entire screen height */
- width: 100%; /* Fill the entire screen width */
- margin: 0; /* Eliminate default html margin */
- padding: 0;
+ height: 100%; /* Fill the entire screen height */
+ width: 100%; /* Fill the entire screen width */
+ margin: 0; /* Eliminate default html margin */
+ padding: 0;
}
body {
- display: flex; /* Allows body to be a flex container */
- height: 100%; /* Fill the entire screen height */
- width: 100%; /* Fill the entire screen width */
- margin: 0; /* Eliminate default body margin */
- flex-direction: row;
- padding: 0;
- background: var(--body-bg);
- font-family: source-sans, sans-serif;
- box-sizing: border-box;
+ display: flex; /* Allows body to be a flex container */
+ height: 100%; /* Fill the entire screen height */
+ width: 100%; /* Fill the entire screen width */
+ margin: 0; /* Eliminate default body margin */
+ flex-direction: row;
+ padding: 0;
+ background: var(--body-bg);
+ font-family: source-sans, sans-serif;
+ box-sizing: border-box;
}
#workstation-iframe {
- display: flex;
- width: 100%;
- height: 100%;
- border: 0;
+ display: flex;
+ width: 100%;
+ height: 100%;
+ border: 0;
}
#navigation-bar {
- display: flex;
- position: relative;
- flex-direction: column;
- width: var(--navigation-bar-width);
- height: 100%;
- justify-content: space-between;
- align-items: center;
- padding: 50px 0 50px 0;
- box-sizing: border-box;
- background-color: var(--navigation-bar-background-color);
- border-right: 1px solid var(--border-color);
+ display: flex;
+ position: relative;
+ flex-direction: column;
+ width: var(--navigation-bar-width);
+ height: 100%;
+ justify-content: space-between;
+ align-items: center;
+ padding: 50px 0 50px 0;
+ box-sizing: border-box;
+ background-color: var(--navigation-bar-background-color);
+ border-right: 1px solid var(--border-color);
- /*Animation*/
- transition: width 0.5s;
+ /*Animation*/
+ transition: width 0.5s;
}
#navigation-bar.collapsed {
- width: var(--navigation-bar-width-collapsed);
+ width: var(--navigation-bar-width-collapsed);
}
.navigation-bar-item-label {
- display: flex;
- white-space: nowrap;
+ display: flex;
+ white-space: nowrap;
}
#navigation-bar.collapsed .navigation-bar-item-label {
- display: none;
+ display: none;
}
#content {
- display: flex;
- box-sizing: border-box;
- width: var(--content-width);
- height: 100%;
- flex-grow: 1;
+ display: flex;
+ box-sizing: border-box;
+ width: var(--content-width);
+ height: 100%;
+ flex-grow: 1;
}
#guide {
- display: flex;
- flex-direction: column;
- width: 100%;
- height: 100%;
- box-sizing: border-box;
- padding: 50px
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ height: 100%;
+ box-sizing: border-box;
+ padding: 50px
}
.guide-block {
- display: flex;
- flex-direction: column;
- height: 150px;
- width: 500px;
- min-width: 200px;
- background-color: var(--main-color);
- border-radius: 10px;
- justify-content: flex-end;
- padding: 25px;
- color: #ffffff;
- cursor: pointer;
+ display: flex;
+ flex-direction: column;
+ height: 150px;
+ width: 500px;
+ min-width: 200px;
+ background-color: var(--main-color);
+ border-radius: 10px;
+ justify-content: flex-end;
+ padding: 25px;
+ color: #ffffff;
+ cursor: pointer;
}
/*when guide-block and right are all in class*/
.guide-block.left {
- margin-right: 10px;
+ margin-right: 10px;
}
.guide-block.right {
- margin-left: 10px;
+ margin-left: 10px;
}
.guide-entry {
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- width: 100%;
- height: fit-content;
- margin: 25px 0;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-around;
+ width: 100%;
+ height: fit-content;
+ margin: 25px 0;
}
.empty.guide-block {
- background-color: #ffffff;
+ background-color: #ffffff;
}
.guide-block-title {
- display: flex;
- height: fit-content;
- width: 100%;
- justify-content: flex-start;
- align-items: center;
- font-size: 25px;
- font-weight: bold;
+ display: flex;
+ height: fit-content;
+ width: 100%;
+ justify-content: flex-start;
+ align-items: center;
+ font-size: 25px;
+ font-weight: bold;
}
.guide-block-detail {
- display: flex;
- height: fit-content;
- width: 100%;
- justify-content: flex-start;
- align-items: center;
- font-size: 15px;
+ display: flex;
+ height: fit-content;
+ width: 100%;
+ justify-content: flex-start;
+ align-items: center;
+ font-size: 15px;
}
#navigation-bar-logo {
- font-family: 'krypton', sans-serif;
- font-size: 20px;
- color: var(--logo-font-color);
- white-space: nowrap;
+ font-family: 'krypton', sans-serif;
+ font-size: 20px;
+ color: var(--logo-font-color);
+ white-space: nowrap;
}
#navigation-bar.collapsed .navigation-bar-logo-text {
- display: none;
+ display: none;
}
.navigation-bar-items {
- display: flex;
- justify-content: center;
- flex-grow: 1; /* 使得 .navigation-bar-items 占据可用空间 */
- width: 100%;
- flex-direction: column;
+ display: flex;
+ justify-content: center;
+ flex-grow: 1; /* 使得 .navigation-bar-items 占据可用空间 */
+ width: 100%;
+ flex-direction: column;
- padding: var(--navigation-bar-item-padding);
- box-sizing: border-box;
+ padding: var(--navigation-bar-item-padding);
+ box-sizing: border-box;
}
.navigation-bar-item {
- display: flex;
- flex-direction: row;
- align-items: center;
- background-color: var(--navigation-bar-background-color);
- width: 100%;
- height: var(--navigation-bar-item-height);
- border-radius: 10px;
- color: var(--tab-font-color);
- box-sizing: border-box;
- margin: 5px 0;
- cursor: pointer;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ background-color: var(--navigation-bar-background-color);
+ width: 100%;
+ height: var(--navigation-bar-item-height);
+ border-radius: 10px;
+ color: var(--tab-font-color);
+ box-sizing: border-box;
+ margin: 5px 0;
+ cursor: pointer;
}
.navigation-bar-item:hover {
- background-color: var(--main-color-light);
- fill: var(--base-color);
- color: var(--base-color);
+ background-color: var(--main-color-light);
+ fill: var(--base-color);
+ color: var(--base-color);
}
.navigation-bar-item:active {
- background-color: var(--main-color-dark);
- fill: var(--base-color);
- color: var(--base-color);
+ background-color: var(--main-color-dark);
+ fill: var(--base-color);
+ color: var(--base-color);
}
.navigation-bar-item.selected {
- background-color: var(--main-color);
- fill: var(--base-color);
- color: var(--base-color);
+ background-color: var(--main-color);
+ fill: var(--base-color);
+ color: var(--base-color);
}
.navigation-bar-item-icon {
- display: flex;
- width: var(--navigation-bar-item-icon-length);
- height: var(--navigation-bar-item-icon-length);
- margin: 0 var(--navigation-bar-item-icon-margin);
- min-height: var(--navigation-bar-item-icon-length);
- min-width: var(--navigation-bar-item-icon-length);
+ display: flex;
+ width: var(--navigation-bar-item-icon-length);
+ height: var(--navigation-bar-item-icon-length);
+ margin: 0 var(--navigation-bar-item-icon-margin);
+ min-height: var(--navigation-bar-item-icon-length);
+ min-width: var(--navigation-bar-item-icon-length);
}
.navigation-bar-hr {
- display: flex;
- height: 1px;
- background-color: var(--border-color);
- border: none;
- margin: 10px 0;
+ display: flex;
+ height: 1px;
+ background-color: var(--border-color);
+ border: none;
+ margin: 10px 0;
}
.coming-soon-hint {
- display: flex;
- height: 100%;
- width: 100%;
- justify-content: center;
- align-items: center;
- color: var(--main-color-light);
+ display: flex;
+ height: 100%;
+ width: 100%;
+ justify-content: center;
+ align-items: center;
+ color: var(--main-color-light);
}
.navbar,.navbar ul{
- display: flex;
- justify-content: center;
- align-items: center;
- margin: 0;
- padding: 0;
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin: 0;
+ padding: 0;
}
.navbar{
- position: absolute;
- /* padding: 10px; */
- background-color: #fff;
- border-radius: 50px;
- background-color: var(--main-color);
- top: 90%;
- left: 2%;
+ position: absolute;
+ /* padding: 10px; */
+ background-color: #fff;
+ border-radius: 50px;
+ background-color: var(--main-color);
+ top: 90%;
+ left: 2%;
}
.navbar input{
- width: 40px;
- height: 40px;
- opacity: 0;
- cursor: pointer;
+ width: 40px;
+ height: 40px;
+ opacity: 0;
+ cursor: pointer;
}
.navbar span{
- position: absolute;
- left:11px;
- width: 25px;
- height: 4px;
- top: calc(50% - 10px);
- border-radius: 15px;
- background-color: #fff;
- pointer-events: none;
- transition: transform 0.3s ease-in-out,top 0.3s ease-in-out 0.3s;
+ position: absolute;
+ left:11px;
+ width: 25px;
+ height: 4px;
+ top: calc(50% - 10px);
+ border-radius: 15px;
+ background-color: #fff;
+ pointer-events: none;
+ transition: transform 0.3s ease-in-out,top 0.3s ease-in-out 0.3s;
}
.navbar span:nth-child(3){
- top: calc(50% + 6px);
+ top: calc(50% + 6px);
}
.navbar ul{
- width: 0;
- overflow: hidden;
- transition: all 0.5s;
- white-space: nowrap;
+ width: 0;
+ overflow: hidden;
+ transition: all 0.5s;
+ white-space: nowrap;
}
.navbar ul li{
- list-style: none;
- margin: 0px 15px;
+ list-style: none;
+ margin: 0px 15px;
}
.navbar ul li a{
- text-decoration: none;
- font-size: 20px;
- font-weight: 700;
- color:#fff;
+ text-decoration: none;
+ font-size: 20px;
+ font-weight: 700;
+ color:#fff;
}
.navbar ul li a:hover{
- color:#000;
+ color:#000;
}
.navbar input:checked ~ ul{
- width: 100px;
+ width: 100px;
}
.navbar input:checked ~ span:nth-child(2){
- top: calc(50% - 2px);
- transform: rotate(-45deg);
- background-color: #fff;
- transition: top 0.3s ease-in-out,transform 0.3s ease-in-out 0.3s;
+ top: calc(50% - 2px);
+ transform: rotate(-45deg);
+ background-color: #fff;
+ transition: top 0.3s ease-in-out,transform 0.3s ease-in-out 0.3s;
}
.navbar input:checked ~ span:nth-child(3){
- top: calc(50% - 2px);
- transform: rotate(45deg);
- background-color: #fff;
- transition: top 0.3s ease-in-out,transform 0.3s ease-in-out 0.3s;
+ top: calc(50% - 2px);
+ transform: rotate(45deg);
+ background-color: #fff;
+ transition: top 0.3s ease-in-out,transform 0.3s ease-in-out 0.3s;
}
.close{
- position: absolute;
- display: none;
- top: -20%;
- left: 70%;
- width: 20px;
- height: 20px;
- border: 1px solid #999;
- border-radius: 50%;
- justify-content: center;
- align-items: end;
- background: #999;
- color: #fff;
- cursor: pointer;
+ position: absolute;
+ display: none;
+ top: -20%;
+ left: 70%;
+ width: 20px;
+ height: 20px;
+ border: 1px solid #999;
+ border-radius: 50%;
+ justify-content: center;
+ align-items: end;
+ background: #999;
+ color: #fff;
+ cursor: pointer;
}
.navbar:hover .close{
- display: flex;
+ display: flex;
}
.navbar input:checked ~ .close{
- display: none;
+ display: none;
}
\ No newline at end of file
diff --git a/src/agentscope/studio/static/css/login.css b/src/agentscope/studio/static/css/login.css
index 4e5317275..93988b23d 100644
--- a/src/agentscope/studio/static/css/login.css
+++ b/src/agentscope/studio/static/css/login.css
@@ -1,158 +1,158 @@
body {
- font-family: 'Arial', sans-serif;
- background-color: #f0f0f0;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- height: 100vh;
- margin: 0;
+ font-family: 'Arial', sans-serif;
+ background-color: #f0f0f0;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ margin: 0;
}
.login-container {
- padding: 2rem;
- background: #fff;
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
- border-radius: 8px;
- text-align: center;
- width: 100%;
- max-width: 80%;
+ padding: 2rem;
+ background: #fff;
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
+ border-radius: 8px;
+ text-align: center;
+ width: 100%;
+ max-width: 80%;
}
#loginButton {
- background-color: #2ea44f;
- color: white;
- font-size: 18px;
- padding: 15px 24px;
- border: none;
- border-radius: 5px;
- cursor: pointer;
- box-shadow: 0px 4px 14px -3px rgba(0, 0, 0, 0.4);
- transition: background-color 0.3s, transform 0.2s;
- margin-top: 1rem;
- display: inline-block;
- width: 100%;
+ background-color: #2ea44f;
+ color: white;
+ font-size: 18px;
+ padding: 15px 24px;
+ border: none;
+ border-radius: 5px;
+ cursor: pointer;
+ box-shadow: 0px 4px 14px -3px rgba(0, 0, 0, 0.4);
+ transition: background-color 0.3s, transform 0.2s;
+ margin-top: 1rem;
+ display: inline-block;
+ width: 100%;
}
#loginButton:hover {
- background-color: #2c974b;
- transform: scale(1.05);
+ background-color: #2c974b;
+ transform: scale(1.05);
}
#loginButton:active {
- background-color: #258741;
- transform: scale(1);
+ background-color: #258741;
+ transform: scale(1);
}
#loginButton:disabled {
- background-color: #94d3a2;
- cursor: not-allowed;
+ background-color: #94d3a2;
+ cursor: not-allowed;
}
#loginGuestButton {
- color: #a0a0a0;
- font-size: 12px;
- padding: 5px 8px;
- cursor: pointer;
- box-shadow: none;
- transition: transform 0.2s;
- margin-top: 0.5rem;
- display: inline-block;
- width: auto;
- background: none;
- border: none;
- text-decoration: underline;
- opacity: 0.001;
+ color: #a0a0a0;
+ font-size: 12px;
+ padding: 5px 8px;
+ cursor: pointer;
+ box-shadow: none;
+ transition: transform 0.2s;
+ margin-top: 0.5rem;
+ display: inline-block;
+ width: auto;
+ background: none;
+ border: none;
+ text-decoration: underline;
+ opacity: 0.001;
}
#loginGuestButton:hover {
- transform: scale(1.01);
- text-decoration: underline;
- cursor: default;
+ transform: scale(1.01);
+ text-decoration: underline;
+ cursor: default;
}
#loginGuestButton:disabled {
- color: #d3d3d3;
- text-decoration: none;
- transform: none;
+ color: #d3d3d3;
+ text-decoration: none;
+ transform: none;
}
.terms {
- background: #fff;
- padding: 20px;
- margin: 1rem auto;
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
- border-radius: 8px;
- max-width: 600px;
+ background: #fff;
+ padding: 20px;
+ margin: 1rem auto;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
+ border-radius: 8px;
+ max-width: 600px;
}
.terms ul {
- margin-left: 20px;
+ margin-left: 20px;
}
.terms li {
- margin-bottom: 10px;
+ margin-bottom: 10px;
}
.checkbox {
- margin-bottom: 1rem;
+ margin-bottom: 1rem;
}
.brand-gif {
- background: #fff;
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
- width: 50%;
- height: auto;
- border-radius: 8px;
+ background: #fff;
+ box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
+ width: 50%;
+ height: auto;
+ border-radius: 8px;
}
.link-like {
- color: #707070;
- text-decoration: underline;
- cursor: pointer;
- opacity: 0.15;
+ color: #707070;
+ text-decoration: underline;
+ cursor: pointer;
+ opacity: 0.15;
}
.link-like:hover {
- opacity: 1.0;
+ opacity: 1.0;
}
.waiting {
- position: fixed;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- display: flex;
- align-items: center;
- justify-content: center;
- z-index: 1000;
- background-color: rgba(255, 255, 255, 0.8);
- border-radius: 10px;
- padding: 20px 40px;
- box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
- flex-direction: column;
+ position: fixed;
+ top: 50%;
+ left: 50%;
+ transform: translate(-50%, -50%);
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ z-index: 1000;
+ background-color: rgba(255, 255, 255, 0.8);
+ border-radius: 10px;
+ padding: 20px 40px;
+ box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.25);
+ flex-direction: column;
}
.css-spinner {
- border: 4px solid rgba(0, 0, 0, .1);
- border-radius: 50%;
- border-top: 4px solid #3498db;
- width: 40px;
- height: 40px;
- animation: spin 2s linear infinite;
+ border: 4px solid rgba(0, 0, 0, .1);
+ border-radius: 50%;
+ border-top: 4px solid #3498db;
+ width: 40px;
+ height: 40px;
+ animation: spin 2s linear infinite;
}
@keyframes spin {
- 0% {
- transform: rotate(0deg);
- }
- 100% {
- transform: rotate(360deg);
- }
+ 0% {
+ transform: rotate(0deg);
+ }
+ 100% {
+ transform: rotate(360deg);
+ }
}
.waiting b {
- color: #555;
- font-weight: normal;
- font-size: 1.5em;
+ color: #555;
+ font-weight: normal;
+ font-size: 1.5em;
}
diff --git a/src/agentscope/studio/static/css/server.css b/src/agentscope/studio/static/css/server.css
index 285e151f2..a916730ad 100644
--- a/src/agentscope/studio/static/css/server.css
+++ b/src/agentscope/studio/static/css/server.css
@@ -1,132 +1,132 @@
:root {
- --server-content-padding-vertical: 20px;
- --server-content-padding-horizontal: 30px;
- --server-table-height: calc(100% - var(--runs-content-control-panel-height));
+ --server-content-padding-vertical: 20px;
+ --server-content-padding-horizontal: 30px;
+ --server-table-height: calc(100% - var(--runs-content-control-panel-height));
}
#server-panel {
- display: flex;
- height: 100%;
- width: 100%;
- flex-direction: column;
+ display: flex;
+ height: 100%;
+ width: 100%;
+ flex-direction: column;
}
#server-content {
- display: flex;
- flex-direction: column;
- width: 100%;
- padding: var(--server-content-padding-vertical) var(--server-content-padding-horizontal);
- box-sizing: border-box;
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ padding: var(--server-content-padding-vertical) var(--server-content-padding-horizontal);
+ box-sizing: border-box;
}
.collapsed {
- display: none;
+ display: none;
}
#server-table {
- flex-grow: 1;
- overflow-y: auto;
- max-height: 30vh;
- width: 100%;
- background-color: #ffffff;
- border: 1px solid var(--border-color);
+ flex-grow: 1;
+ overflow-y: auto;
+ max-height: 30vh;
+ width: 100%;
+ background-color: #ffffff;
+ border: 1px solid var(--border-color);
}
#agent-memory-content {
- display: flex;
- flex-direction: row;
- height: 200px;
- width: 100%;
- border: 1px solid var(--border-color);
+ display: flex;
+ flex-direction: row;
+ height: 200px;
+ width: 100%;
+ border: 1px solid var(--border-color);
}
#agent-memory-table {
- display: flex;
- flex-direction: column;
- width: 350px;
- box-sizing: border-box;
- border: 0;
- background-color: #ffffff;
+ display: flex;
+ flex-direction: column;
+ width: 350px;
+ box-sizing: border-box;
+ border: 0;
+ background-color: #ffffff;
}
#agent-memory-raw {
- display: flex;
- flex-direction: column;
- width: calc(100% - 350px);
- height: 100%;
- box-sizing: border-box;
- border-left: 1px solid var(--border-color);
+ display: flex;
+ flex-direction: column;
+ width: calc(100% - 350px);
+ height: 100%;
+ box-sizing: border-box;
+ border-left: 1px solid var(--border-color);
}
#agent-memory-raw .monaco-editor {
- display: flex;
- height: 100%;
- width: 100%;
- min-width: 100%;
+ display: flex;
+ height: 100%;
+ width: 100%;
+ min-width: 100%;
}
.server-section-title-bar {
- display: flex;
- justify-content: flex-start;
- font-size: 20px;
- padding: 6px 0px;
+ display: flex;
+ justify-content: flex-start;
+ font-size: 20px;
+ padding: 6px 0px;
}
.align-right-btn {
- margin-left: auto;
+ margin-left: auto;
}
#server-content .icon {
- display: flex;
- height: 20px;
- padding: 4px 15px;
- cursor: pointer;
+ display: flex;
+ height: 20px;
+ padding: 4px 15px;
+ cursor: pointer;
}
#agent-table {
- flex-grow: 1;
- overflow-y: auto;
- max-height: 30vh;
- width: 100%;
- background-color: #ffffff;
- border: 1px solid var(--border-color);
+ flex-grow: 1;
+ overflow-y: auto;
+ max-height: 30vh;
+ width: 100%;
+ background-color: #ffffff;
+ border: 1px solid var(--border-color);
}
.status-tag {
- display: flex;
- flex-direction: row;
- align-items: center;
- height: 26px;
- width: fit-content;
- border-radius: 13px;
- color: var(--base-color);
- box-sizing: border-box;
- margin: 0 5px;
- padding: 0 14px;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ height: 26px;
+ width: fit-content;
+ border-radius: 13px;
+ color: var(--base-color);
+ box-sizing: border-box;
+ margin: 0 5px;
+ padding: 0 14px;
}
.running.status-tag {
- background-color: #ccf4dd;
- color: #27ae60;
- fill: #27ae60;
+ background-color: #ccf4dd;
+ color: #27ae60;
+ fill: #27ae60;
}
.dead.status-tag {
- background-color: #f5d5d1;
- color: #c0392b;
- fill: #c0392b;
+ background-color: #f5d5d1;
+ color: #c0392b;
+ fill: #c0392b;
}
.loading.status-tag {
- background-color: #e1e1e1;
- color: #3d4047;
- fill: #3d4047;
+ background-color: #e1e1e1;
+ color: #3d4047;
+ fill: #3d4047;
}
.unknown.status-tag {
- background-color: #e1e1e1;
- color: #3d4047;
- fill: #3d4047;
+ background-color: #e1e1e1;
+ color: #3d4047;
+ fill: #3d4047;
}
\ No newline at end of file
diff --git a/src/agentscope/studio/static/css/workstation-drag-components.css b/src/agentscope/studio/static/css/workstation-drag-components.css
index 128f39999..2a67c7cf6 100644
--- a/src/agentscope/studio/static/css/workstation-drag-components.css
+++ b/src/agentscope/studio/static/css/workstation-drag-components.css
@@ -1,165 +1,165 @@
.title-box {
- display: flex;
- flex-direction: row;
- align-items: center;
- justify-content: space-between;
- overflow: hidden;
- text-overflow: ellipsis;
- width: 100%;
- height: 50px;
- box-sizing: border-box;
- border-radius: 5px;
- background: var(--background-box-title);
- padding: 0 10px;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ justify-content: space-between;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ width: 100%;
+ height: 50px;
+ box-sizing: border-box;
+ border-radius: 5px;
+ background: var(--background-box-title);
+ padding: 0 10px;
}
.drawflow-node.selected .title-box {
- background-color: #ffffff;
+ background-color: #ffffff;
}
.title-box-left-items {
- display: flex;
- flex-direction: row;
- align-items: center;
- overflow-x: auto;
- height: 100%;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ overflow-x: auto;
+ height: 100%;
}
.title-box-svg {
- display: flex;
- align-items: center;
- justify-content: center;
- height: 25px;
- width: 25px;
- background-color: var(--main-color);
- border-radius: 5px;
- fill: #ffffff;
- margin-right: 8px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ height: 25px;
+ width: 25px;
+ background-color: var(--main-color);
+ border-radius: 5px;
+ fill: #ffffff;
+ margin-right: 8px;
}
/*TODO: 没有生效*/
.drawflow-node.selected input, .drawflow-node.selected textarea {
- border: 1px solid var(--main-color-light);
+ border: 1px solid var(--main-color-light);
}
.drawflow-node.selected input:focus, .drawflow-node.selected textarea:focus {
- outline: 1px solid var(--main-color);
+ outline: 1px solid var(--main-color);
}
.drawflow-node .input:hover {
- background: #43b993;
+ background: #43b993;
}
.drawflow-node .output:hover {
- background: #43b993;
+ background: #43b993;
}
.drawflow > .drawflow-delete {
- border: 2px solid #43b993;
- background: white;
- color: #43b993;
- -webkit-box-shadow: 0 2px 20px 2px #43b993;
- box-shadow: 0 2px 20px 2px #43b993;
+ border: 2px solid #43b993;
+ background: white;
+ color: #43b993;
+ -webkit-box-shadow: 0 2px 20px 2px #43b993;
+ box-shadow: 0 2px 20px 2px #43b993;
}
.toggle-arrow {
- display: flex;
- height: 10px;
- width: 10px;
- margin-right: 5px;
- transform: translateY(-50%);
- cursor: pointer;
- box-sizing: border-box;
+ display: flex;
+ height: 10px;
+ width: 10px;
+ margin-right: 5px;
+ transform: translateY(-50%);
+ cursor: pointer;
+ box-sizing: border-box;
}
.box {
- display: flex;
- flex-direction: column;
- font-size: 14px;
- margin-top: 10px;
- height: fit-content;
+ display: flex;
+ flex-direction: column;
+ font-size: 14px;
+ margin-top: 10px;
+ height: fit-content;
}
.box.hidden {
- display: none;
+ display: none;
}
.hidden {
- display: none;
+ display: none;
}
.box input, .box select, .box textarea {
- display: flex;
- flex-direction: column;
- align-items: center;
- justify-content: center;
- box-sizing: border-box;
- width: 100%;
- height: 40px;
- min-height: 40px;
- padding: 0 10px;
- border: 1px solid var(--border-color);
- border-radius: 5px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ justify-content: center;
+ box-sizing: border-box;
+ width: 100%;
+ height: 40px;
+ min-height: 40px;
+ padding: 0 10px;
+ border: 1px solid var(--border-color);
+ border-radius: 5px;
}
.box label {
- display: flex;
- flex-direction: row;
- align-items: center;
- margin-top: 5px;
- margin-bottom: 5px;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ margin-top: 5px;
+ margin-bottom: 5px;
}
.box a {
- target: "_blank";
+ target: '_blank';
}
.readme {
- display: flex;
- flex-direction: column;
- background-color: #ADD8E6;
- font-size: 14px;
- border: 1px solid #ddd;
- border-radius: 5px;
- width: 100%;
- height: fit-content;
- box-sizing: border-box;
- padding: 10px;
+ display: flex;
+ flex-direction: column;
+ background-color: #ADD8E6;
+ font-size: 14px;
+ border: 1px solid #ddd;
+ border-radius: 5px;
+ width: 100%;
+ height: fit-content;
+ box-sizing: border-box;
+ padding: 10px;
}
.drawflow-node .box-highlight {
- padding: 10px 20px 20px 20px;
- color: #555555;
- font-size: 16px;
- background-color: rgba(173, 216, 230, 0.5);
- overflow: auto;
+ padding: 10px 20px 20px 20px;
+ color: #555555;
+ font-size: 16px;
+ background-color: rgba(173, 216, 230, 0.5);
+ overflow: auto;
}
.drawflow-node.welcome {
- width: 250px;
- min-width: 250px;
+ width: 250px;
+ min-width: 250px;
}
.drawflow .connection .point {
- stroke: var(--border-color);
- stroke-width: 2;
- fill: white;
+ stroke: var(--border-color);
+ stroke-width: 2;
+ fill: white;
}
.drawflow .connection .point.selected, .drawflow .connection .point:hover {
- fill: #4ea9ff;
+ fill: #4ea9ff;
}
.drawflow .drawflow-node.GROUP {
- width: 500px;
- z-index: 0;
+ width: 500px;
+ z-index: 0;
}
.placeholder {
- height: 300px;
- z-index: 0;
+ height: 300px;
+ z-index: 0;
}
.drawflow .drawflow-node.GROUP.hover-drop {
- background: hsl(225, 100%, 96%);
+ background: hsl(225, 100%, 96%);
}
\ No newline at end of file
diff --git a/src/agentscope/studio/static/css/workstation.css b/src/agentscope/studio/static/css/workstation.css
index ab1ca0cb7..32cc47c2f 100644
--- a/src/agentscope/studio/static/css/workstation.css
+++ b/src/agentscope/studio/static/css/workstation.css
@@ -1,1162 +1,1162 @@
:root {
- --background-color: #ffffff;
- --background-box-title: #f7f7f7;
- --scale-factor: 2;
+ --background-color: #ffffff;
+ --background-box-title: #f7f7f7;
+ --scale-factor: 2;
- --menu-height: 48px;
- --menu-btn-height: 35px;
- --menu-btn-width: 50px;
+ --menu-height: 48px;
+ --menu-btn-height: 35px;
+ --menu-btn-width: 50px;
- --drawflow-height: calc(100% - var(--menu-height));
+ --drawflow-height: calc(100% - var(--menu-height));
- --workstation-sidebar-item-font-size: 18px;
- --workstation-sidebar-subitem-font-size: 15px;
+ --workstation-sidebar-item-font-size: 18px;
+ --workstation-sidebar-subitem-font-size: 15px;
- --logo-font-color: #000000;
+ --logo-font-color: #000000;
}
html {
- height: 100%; /* Fill the entire screen height */
- width: 100%; /* Fill the entire screen width */
- margin: 0; /* Eliminate default html margin */
- padding: 0;
+ height: 100%; /* Fill the entire screen height */
+ width: 100%; /* Fill the entire screen width */
+ margin: 0; /* Eliminate default html margin */
+ padding: 0;
}
body {
- display: flex; /* Allows body to be a flex container */
- height: 100%; /* Fill the entire screen height */
- width: 100%; /* Fill the entire screen width */
- margin: 0; /* Eliminate default body margin */
- flex-direction: row;
- padding: 0;
- background: var(--body-bg);
- font-family: sans-serif;
- box-sizing: border-box;
+ display: flex; /* Allows body to be a flex container */
+ height: 100%; /* Fill the entire screen height */
+ width: 100%; /* Fill the entire screen width */
+ margin: 0; /* Eliminate default body margin */
+ flex-direction: row;
+ padding: 0;
+ background: var(--body-bg);
+ font-family: sans-serif;
+ box-sizing: border-box;
}
#workstation-panel {
- display: flex;
- height: 100%;
- width: 100%;
- flex-direction: column;
+ display: flex;
+ height: 100%;
+ width: 100%;
+ flex-direction: column;
}
.them-edit-link {
- position: absolute;
- top: 10px;
- right: 100px;
- color: black;
- font-size: 40px;
+ position: absolute;
+ top: 10px;
+ right: 100px;
+ color: black;
+ font-size: 40px;
}
.them-edit-link a {
- text-decoration: none;
+ text-decoration: none;
}
.wrapper {
- display: flex;
- flex-direction: row;
- width: 100%;
- box-sizing: border-box;
- height: var(--page-content-height);
+ display: flex;
+ flex-direction: row;
+ width: 100%;
+ box-sizing: border-box;
+ height: var(--page-content-height);
}
.col {
- display: flex;
- flex-direction: column;
- width: var(--page-sidebar-width);
- min-width: var(--page-sidebar-width);
- max-width: var(--page-sidebar-width);
- box-sizing: border-box;
- height: 100%;
- border-right: 1px solid var(--border-color);
- padding: 50px 10px;
- overflow-y: auto;
+ display: flex;
+ flex-direction: column;
+ width: var(--page-sidebar-width);
+ min-width: var(--page-sidebar-width);
+ max-width: var(--page-sidebar-width);
+ box-sizing: border-box;
+ height: 100%;
+ border-right: 1px solid var(--border-color);
+ padding: 50px 10px;
+ overflow-y: auto;
}
.col ul {
- margin: 0;
+ margin: 0;
}
.col ul {
- padding-left: 0;
+ padding-left: 0;
}
.col ul, li {
- list-style-type: none;
+ list-style-type: none;
}
.col-right {
- display: flex;
- flex-direction: column;
- width: calc(100% - var(--page-sidebar-width));
- height: 100%;
+ display: flex;
+ flex-direction: column;
+ width: calc(100% - var(--page-sidebar-width));
+ height: 100%;
}
.menu {
- display: flex;
- flex-direction: row;
- height: var(--menu-height);
- width: 100%;
- box-sizing: border-box;
- align-items: center;
+ display: flex;
+ flex-direction: row;
+ height: var(--menu-height);
+ width: 100%;
+ box-sizing: border-box;
+ align-items: center;
}
.menu-btn {
- display: flex;
- height: var(--menu-btn-height);
- width: var(--menu-btn-width);
- white-space: nowrap;
- align-items: center;
- justify-content: center;
- background-color: var(--main-color-light);
- border-radius: 10px;
- margin: 0 5px;
- cursor: pointer;
- position: relative;
- position: relative;
+ display: flex;
+ height: var(--menu-btn-height);
+ width: var(--menu-btn-width);
+ white-space: nowrap;
+ align-items: center;
+ justify-content: center;
+ background-color: var(--main-color-light);
+ border-radius: 10px;
+ margin: 0 5px;
+ cursor: pointer;
+ position: relative;
+ position: relative;
}
.menu-btn:hover {
- background-color: var(--main-color);
- fill: #ffffff;
+ background-color: var(--main-color);
+ fill: #ffffff;
}
.menu-btn:active {
- background-color: var(--main-color-dark);
- fill: #ffffff;
+ background-color: var(--main-color-dark);
+ fill: #ffffff;
}
.menu-btn-svg {
- display: flex;
- width: 20px;
- height: 20px;
+ display: flex;
+ width: 20px;
+ height: 20px;
}
.menu-btn:hover .tooltip {
- display: flex;
- flex-direction: column;
- align-items: center;
- height: fit-content;
- width: fit-content;
- padding: 10px;
- background-color: var(--main-color-light);
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ height: fit-content;
+ width: fit-content;
+ padding: 10px;
+ background-color: var(--main-color-light);
}
.btn-cover {
- position: relative;
- cursor: not-allowed;
- background: transparent;
- z-index: 15000;
- margin-left: 10px;
+ position: relative;
+ cursor: not-allowed;
+ background: transparent;
+ z-index: 15000;
+ margin-left: 10px;
}
.btn-cover::after {
- content: attr(data-title);
- pointer-events: none;
- visibility: hidden;
- opacity: 0;
- transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
-
- position: absolute;
- left: 50%;
- top: 100%;
- transform: translateX(-50%);
- white-space: normal;
- max-width: 200px;
- text-align: center;
- word-wrap: break-word;
- background-color: #000;
- color: #fff;
- padding: 1px 1px;
- border-radius: 3px;
- font-size: 0.75rem;
- z-index: 15000;
-
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
- margin-top: 8px;
- min-width: 100px;
+ content: attr(data-title);
+ pointer-events: none;
+ visibility: hidden;
+ opacity: 0;
+ transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
+
+ position: absolute;
+ left: 50%;
+ top: 100%;
+ transform: translateX(-50%);
+ white-space: normal;
+ max-width: 200px;
+ text-align: center;
+ word-wrap: break-word;
+ background-color: #000;
+ color: #fff;
+ padding: 1px 1px;
+ border-radius: 3px;
+ font-size: 0.75rem;
+ z-index: 15000;
+
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
+ margin-top: 8px;
+ min-width: 100px;
}
.btn-cover[data-title]:hover::after {
- visibility: visible;
- opacity: 1;
- min-width: 100px;
+ visibility: visible;
+ opacity: 1;
+ min-width: 100px;
}
.btn-cover:hover + .btn-disabled:hover::after {
- visibility: visible;
- opacity: 1;
+ visibility: visible;
+ opacity: 1;
}
.btn-disabled {
- pointer-events: none;
- opacity: 0.6;
- background-color: #ccc;
- color: #666;
- border: 1px solid #999;
+ pointer-events: none;
+ opacity: 0.6;
+ background-color: #ccc;
+ color: #666;
+ border: 1px solid #999;
}
.btn-enabled + .btn-cover {
- display: block;
+ display: block;
}
.swal-wide {
- width: 80% !important;
+ width: 80% !important;
}
.control-bar {
- display: flex;
- flex-direction: row;
- float: right;
- position: absolute;
- bottom: 10px;
- right: 10px;
- padding: 5px 10px;
+ display: flex;
+ flex-direction: row;
+ float: right;
+ position: absolute;
+ bottom: 10px;
+ right: 10px;
+ padding: 5px 10px;
}
.lock-btn {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 5px;
- background: #555555;
- border-radius: 4px;
- z-index: 10000;
- margin-right: 10px;
- height: fit-content;
- width: fit-content;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ padding: 5px;
+ background: #555555;
+ border-radius: 4px;
+ z-index: 10000;
+ margin-right: 10px;
+ height: fit-content;
+ width: fit-content;
}
.zoom-bar {
- display: flex;
- float: right;
- bottom: 10px;
- right: 10px;
- padding: 5px 10px;
- background: #555555;
- border-radius: 4px;
- z-index: 10000;
+ display: flex;
+ float: right;
+ bottom: 10px;
+ right: 10px;
+ padding: 5px 10px;
+ background: #555555;
+ border-radius: 4px;
+ z-index: 10000;
}
.control-bar svg {
- display: flex;
- height: 25px;
- width: 25px;
- justify-content: center;
- align-items: center;
- fill: white;
- margin: 5px;
+ display: flex;
+ height: 25px;
+ width: 25px;
+ justify-content: center;
+ align-items: center;
+ fill: white;
+ margin: 5px;
}
.zoom-bar svg:nth-child(1) {
- padding-left: 0px;
+ padding-left: 0px;
}
#drawflow {
- display: flex;
- width: 100%;
- height: var(--drawflow-height);
- top: 40px;
- background: var(--background-color);
- background-size: 25px 25px;
- background-image: linear-gradient(to right, #f1f1f1 1px, transparent 1px),
+ display: flex;
+ width: 100%;
+ height: var(--drawflow-height);
+ top: 40px;
+ background: var(--background-color);
+ background-size: 25px 25px;
+ background-image: linear-gradient(to right, #f1f1f1 1px, transparent 1px),
linear-gradient(to bottom, #f1f1f1 1px, transparent 1px);
}
@media only screen and (max-width: 768px) {
- .col {
- width: 50px;
- }
+ .col {
+ width: 50px;
+ }
- .col .workstation-sidebar-dragitem span {
- display: none;
- }
+ .col .workstation-sidebar-dragitem span {
+ display: none;
+ }
- #drawflow {
- width: calc(100vw - 51px);
- }
+ #drawflow {
+ width: calc(100vw - 51px);
+ }
}
/* Modal */
.modal {
- display: none;
- position: fixed;
- z-index: 10000;
- left: 0;
- top: 0;
- width: 100vw;
- height: 100vh;
- overflow: auto;
- background-color: rgb(0, 0, 0);
- background-color: rgba(0, 0, 0, 0.7);
+ display: none;
+ position: fixed;
+ z-index: 10000;
+ left: 0;
+ top: 0;
+ width: 100vw;
+ height: 100vh;
+ overflow: auto;
+ background-color: rgb(0, 0, 0);
+ background-color: rgba(0, 0, 0, 0.7);
}
.modal-content {
- position: relative;
- background-color: #fefefe;
- margin: 15% auto;
- padding: 20px;
- border: 1px solid #888;
- width: 400px;
+ position: relative;
+ background-color: #fefefe;
+ margin: 15% auto;
+ padding: 20px;
+ border: 1px solid #888;
+ width: 400px;
}
.modal .close {
- color: #aaa;
- float: right;
- font-size: 28px;
- font-weight: bold;
- cursor: pointer;
+ color: #aaa;
+ float: right;
+ font-size: 28px;
+ font-weight: bold;
+ cursor: pointer;
}
@media only screen and (max-width: 768px) {
- .modal-content {
- width: 80%;
- }
+ .modal-content {
+ width: 80%;
+ }
}
.workstation-sidebar-item {
- display: flex;
- flex-direction: column;
- justify-content: center;
- cursor: pointer;
- font-size: var(--workstation-sidebar-item-font-size);
- font-weight: bold;
- box-sizing: border-box;
- width: 100%;
- height: 45px;
- border-radius: 10px;
- padding: 0 10px;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ cursor: pointer;
+ font-size: var(--workstation-sidebar-item-font-size);
+ font-weight: bold;
+ box-sizing: border-box;
+ width: 100%;
+ height: 45px;
+ border-radius: 10px;
+ padding: 0 10px;
}
.workstation-sidebar-subitem {
- display: flex;
- flex-direction: row;
- align-items: center;
- cursor: pointer;
- font-size: var(--workstation-sidebar-subitem-font-size);
- box-sizing: border-box;
- width: 100%;
- height: 40px;
- border-radius: 10px;
- padding: 0 10px;
- font-weight: bold;
- color: #808080;
+ display: flex;
+ flex-direction: row;
+ align-items: center;
+ cursor: pointer;
+ font-size: var(--workstation-sidebar-subitem-font-size);
+ box-sizing: border-box;
+ width: 100%;
+ height: 40px;
+ border-radius: 10px;
+ padding: 0 10px;
+ font-weight: bold;
+ color: #808080;
}
.workstation-sidebar-subitem:hover {
- background-color: var(--main-color-light);
- color: #ffffff;
+ background-color: var(--main-color-light);
+ color: #ffffff;
}
.workstation-sidebar-placeholder {
- display: flex;
- height: 20px;
- width: 100%;
+ display: flex;
+ height: 20px;
+ width: 100%;
}
.workstation-sidebar-sub-content {
- display: none;
+ display: none;
}
.active + .workstation-sidebar-sub-content {
- display: block;
+ display: block;
}
.workstation-sidebar-dragitem {
- display: flex;
- flex-direction: column;
- justify-content: center;
- font-size: var(--workstation-sidebar-subitem-font-size);
- box-sizing: border-box;
- width: calc(100% - 10px);
- cursor: move;
- height: 40px;
- border-radius: 10px;
- padding: 0 10px;
- margin-left: 10px;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ font-size: var(--workstation-sidebar-subitem-font-size);
+ box-sizing: border-box;
+ width: calc(100% - 10px);
+ cursor: move;
+ height: 40px;
+ border-radius: 10px;
+ padding: 0 10px;
+ margin-left: 10px;
}
.workstation-sidebar-dragitem:hover {
- background-color: var(--main-color-light);
- color: #ffffff;
+ background-color: var(--main-color-light);
+ color: #ffffff;
}
.workstation-sidebar-subitem-arrow {
- display: flex;
- height: 10px;
- width: 10px;
- align-items: center;
- justify-content: center;
- fill: #000;
- margin-right: 5px;
+ display: flex;
+ height: 10px;
+ width: 10px;
+ align-items: center;
+ justify-content: center;
+ fill: #000;
+ margin-right: 5px;
}
.highlighted-tab {
- cursor: pointer;
- color: #ffffff;
- background-color: rgba(255, 167, 38, 0.8);
- user-select: none;
- transition: background-color 0.3s ease;
- text-align: center;
+ cursor: pointer;
+ color: #ffffff;
+ background-color: rgba(255, 167, 38, 0.8);
+ user-select: none;
+ transition: background-color 0.3s ease;
+ text-align: center;
}
.highlighted-tab:hover {
- background-color: rgba(251, 140, 0, 0.9);
+ background-color: rgba(251, 140, 0, 0.9);
}
.toggle-sub-title {
- cursor: pointer;
- background-color: var(--main-color-light);
- padding: 10px;
- margin-top: 0;
- margin-bottom: 0;
- user-select: none;
- transition: background-color 0.3s ease;
- text-align: center;
- border-radius: 10px;
- flex-grow: 1;
+ cursor: pointer;
+ background-color: var(--main-color-light);
+ padding: 10px;
+ margin-top: 0;
+ margin-bottom: 0;
+ user-select: none;
+ transition: background-color 0.3s ease;
+ text-align: center;
+ border-radius: 10px;
+ flex-grow: 1;
}
.toggle-sub-title:hover {
- background-color: #e2e2e2;
+ background-color: #e2e2e2;
}
.draggable-content {
- display: flex;
- flex-direction: column;
- max-height: 0;
- opacity: 0;
- overflow: auto;
- transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
+ display: flex;
+ flex-direction: column;
+ max-height: 0;
+ opacity: 0;
+ overflow: auto;
+ transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease, margin 0.3s ease;
}
.draggable-content.visible {
- margin-top: 5px;
- padding: 10px;
- height: fit-content;
- opacity: 1;
+ margin-top: 5px;
+ padding: 10px;
+ height: fit-content;
+ opacity: 1;
}
-pre[class*="language-"] {
- font-size: 0.5em;
- max-height: 60vh;
- overflow: auto;
- margin: 1rem 0;
+pre[class*='language-'] {
+ font-size: 0.5em;
+ max-height: 60vh;
+ overflow: auto;
+ margin: 1rem 0;
}
.swal2-title {
- font-size: 20px;
+ font-size: 20px;
}
.resize-handle-se {
- position: absolute;
- width: 18px;
- height: 18px;
- bottom: 0;
- fill: var(--border-color);
- right: 0;
- cursor: nwse-resize;
- z-index: 10;
+ position: absolute;
+ width: 18px;
+ height: 18px;
+ bottom: 0;
+ fill: var(--border-color);
+ right: 0;
+ cursor: nwse-resize;
+ z-index: 10;
}
.drawflow .drawflow-node.selected .resize-handle-se {
- fill: var(--main-color-light);
+ fill: var(--main-color-light);
}
.if-placeholder, .else-placeholder {
- border: 1px dashed #ccc;
- height: 30%;
- margin: 5px;
+ border: 1px dashed #ccc;
+ height: 30%;
+ margin: 5px;
}
.cases-container {
- margin-top: 10px;
- min-height: 50px;
+ margin-top: 10px;
+ min-height: 50px;
}
.case-placeholder {
- border: 1px dashed #ccc;
- height: 100px;
- padding: 5px;
- margin-bottom: 5px;
+ border: 1px dashed #ccc;
+ height: 100px;
+ padding: 5px;
+ margin-bottom: 5px;
}
.case-placeholder:last-child {
- height: 100px;
- border-bottom: 1px dashed #ccc;
+ height: 100px;
+ border-bottom: 1px dashed #ccc;
}
.button {
- display: inline-block;
- padding: 6px 12px;
- margin: 5px;
- font-size: 10px;
- font-weight: bold;
- color: #ffffff;
- background-image: linear-gradient(to right, #6e48aa, #9d50bb);
- border: 2px solid transparent;
- border-radius: 30px;
- cursor: pointer;
- text-align: center;
- text-decoration: none;
- transition: all 0.3s ease;
- box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
+ display: inline-block;
+ padding: 6px 12px;
+ margin: 5px;
+ font-size: 10px;
+ font-weight: bold;
+ color: #ffffff;
+ background-image: linear-gradient(to right, #6e48aa, #9d50bb);
+ border: 2px solid transparent;
+ border-radius: 30px;
+ cursor: pointer;
+ text-align: center;
+ text-decoration: none;
+ transition: all 0.3s ease;
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.button:hover {
- background-image: linear-gradient(to left, #6e48aa, #9d50bb);
- box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
- transform: translateY(-2px);
+ background-image: linear-gradient(to left, #6e48aa, #9d50bb);
+ box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
+ transform: translateY(-2px);
}
.add-case {
- background-image: linear-gradient(to right, #56ab2f, #a8e063);
+ background-image: linear-gradient(to right, #56ab2f, #a8e063);
}
.remove-case {
- background-image: linear-gradient(to right, #f85032, #e73827);
+ background-image: linear-gradient(to right, #f85032, #e73827);
}
.button:disabled,
.button:disabled:hover,
.button:disabled:active {
- background-color: #cccccc;
- color: #666666;
- cursor: not-allowed;
- box-shadow: none;
- border: 2px solid #cccccc;
+ background-color: #cccccc;
+ color: #666666;
+ cursor: not-allowed;
+ box-shadow: none;
+ border: 2px solid #cccccc;
}
.code-snippet {
- display: inline;
- margin-bottom: 4px;
- line-height: 1.4;
- padding: 2px 4px;
- background-color: #f0f0f0;
- font-family: 'Courier New', monospace;
- border-radius: 3px;
- border: 1px solid #eee;
- color: #d63384;
+ display: inline;
+ margin-bottom: 4px;
+ line-height: 1.4;
+ padding: 2px 4px;
+ background-color: #f0f0f0;
+ font-family: 'Courier New', monospace;
+ border-radius: 3px;
+ border: 1px solid #eee;
+ color: #d63384;
}
.iframe-container {
- display: none;
- position: fixed;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- z-index: 20000;
- background: rgba(0, 0, 0, 0.5);
- justify-content: center;
- align-items: center;
+ display: none;
+ position: fixed;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ z-index: 20000;
+ background: rgba(0, 0, 0, 0.5);
+ justify-content: center;
+ align-items: center;
}
.copilot-iframe {
- width: 100%;
- height: 100%;
- border: 1px solid #ddd;
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
- transition: all 0.3s;
- background: #ffffff;
- border-radius: 10px;
+ width: 100%;
+ height: 100%;
+ border: 1px solid #ddd;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+ transition: all 0.3s;
+ background: #ffffff;
+ border-radius: 10px;
}
#close-iframe {
- position: absolute;
- top: 10px;
- right: 10px;
- padding: 5px 10px;
- border: none;
- background: rgba(0, 123, 255, 0.4);
- color: white;
- cursor: pointer;
- border-radius: 0 0 0 5px;
- font-size: 16px;
- z-index: 10000;
+ position: absolute;
+ top: 10px;
+ right: 10px;
+ padding: 5px 10px;
+ border: none;
+ background: rgba(0, 123, 255, 0.4);
+ color: white;
+ cursor: pointer;
+ border-radius: 0 0 0 5px;
+ font-size: 16px;
+ z-index: 10000;
}
#iframe-wrapper {
- position: relative;
- width: 90%;
- height: 90%;
+ position: relative;
+ width: 90%;
+ height: 90%;
}
#close-iframe .fas {
- pointer-events: none;
+ pointer-events: none;
}
.tools-placeholder {
- border: 2px dashed #ccc;
- padding: 30px;
- text-align: center;
- margin-top: 10px;
- color: #888;
+ border: 2px dashed #ccc;
+ padding: 30px;
+ text-align: center;
+ margin-top: 10px;
+ color: #888;
}
.swal2-container {
- z-index: 20000 !important;
+ z-index: 20000 !important;
}
.modules-info {
- background-color: rgba(128, 128, 128, 0.2);
- padding: 2px;
- margin-bottom: 10px;
+ background-color: rgba(128, 128, 128, 0.2);
+ padding: 2px;
+ margin-bottom: 10px;
}
.modules-info h4 {
- margin: 0 0 10px 0;
- font-size: 18px;
- color: #444;
+ margin: 0 0 10px 0;
+ font-size: 18px;
+ color: #444;
}
.modules-info ul {
- margin: 0;
- padding: 0 0 0 20px;
+ margin: 0;
+ padding: 0 0 0 20px;
}
.modules-info li {
- font-size: 14px;
- color: #555;
- margin-bottom: 10px;
+ font-size: 14px;
+ color: #555;
+ margin-bottom: 10px;
}
.highlight-module {
- font-weight: bold;
- color: #2a6496;
- cursor: pointer;
+ font-weight: bold;
+ color: #2a6496;
+ cursor: pointer;
}
.highlight-module:hover {
- text-decoration: underline;
- color: #1d5b8f;
+ text-decoration: underline;
+ color: #1d5b8f;
}
.advanced-title-box {
- cursor: pointer;
- color: #333;
- margin-top: 20px;
+ cursor: pointer;
+ color: #333;
+ margin-top: 20px;
}
.advanced-box {
- margin: 10px 0;
+ margin: 10px 0;
}
.swal2-textarea {
- height: 400px;
- font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace; /* 设置等宽字体 */
+ height: 400px;
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace; /* 设置等宽字体 */
}
.swal2-textarea.code {
- padding: 15px;
- background-color: #f5f5f5;
- border: 1px solid #eee;
- box-shadow: inset 0 1px 8px rgba(0, 0, 0, .1);
- border-radius: 4px;
+ padding: 15px;
+ background-color: #f5f5f5;
+ border: 1px solid #eee;
+ box-shadow: inset 0 1px 8px rgba(0, 0, 0, .1);
+ border-radius: 4px;
}
.example-wrapper {
- display: flex;
- align-items: center;
- justify-content: space-between;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
}
.new-action {
- cursor: pointer;
- padding: 8px;
- margin-left: auto;
- border: none;
- border-radius: 20px;
- background-color: var(--main-color);
- color: white;
- transition: all 0.3s ease;
- font-size: 14px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
- max-width: 30px;
- overflow: hidden;
- white-space: nowrap;
- display: flex;
- justify-content: center;
- align-items: center;
+ cursor: pointer;
+ padding: 8px;
+ margin-left: auto;
+ border: none;
+ border-radius: 20px;
+ background-color: var(--main-color);
+ color: white;
+ transition: all 0.3s ease;
+ font-size: 14px;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+ max-width: 30px;
+ overflow: hidden;
+ white-space: nowrap;
+ display: flex;
+ justify-content: center;
+ align-items: center;
}
.new-action:hover, .new-action:focus {
- width: auto;
- padding: 8px 16px;
- background-color: var(--main-color);
- box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
+ width: auto;
+ padding: 8px 16px;
+ background-color: var(--main-color);
+ box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}
.new-action:active {
- background-color: var(--main-color);
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
+ background-color: var(--main-color);
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
#import-buttons {
- display: flex;
- flex-direction: column;
- align-items: center;
- position: absolute;
- top: 30%;
- right: 50px;
- z-index: 10;
- padding: 5px;
- border-radius: 10px;
- background-color: #ffffff;
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
- font-family: 'Poppins', sans-serif;
- transition: all 0.3s ease;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ position: absolute;
+ top: 30%;
+ right: 50px;
+ z-index: 10;
+ padding: 5px;
+ border-radius: 10px;
+ background-color: #ffffff;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
+ font-family: 'Poppins', sans-serif;
+ transition: all 0.3s ease;
}
#import-buttons:hover {
- box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.25);
- transform: translateY(-2px);
+ box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.25);
+ transform: translateY(-2px);
}
#step-info {
- margin-bottom: 10px;
- padding: 10px;
- border-radius: 4px;
- text-align: center;
- width: 150px;
- font-family: 'Poppins', sans-serif;
- font-size: 14px;
- font-weight: 500;
- letter-spacing: 0.05em;
- line-height: 1.6;
- color: #333;
- background-color: rgba(173, 216, 230, 0.5);
- box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
- cursor: pointer;
+ margin-bottom: 10px;
+ padding: 10px;
+ border-radius: 4px;
+ text-align: center;
+ width: 150px;
+ font-family: 'Poppins', sans-serif;
+ font-size: 14px;
+ font-weight: 500;
+ letter-spacing: 0.05em;
+ line-height: 1.6;
+ color: #333;
+ background-color: rgba(173, 216, 230, 0.5);
+ box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
+ cursor: pointer;
}
#step-warning {
- position: absolute;
- top: 8%;
- right: 25.5%;
- padding: 10px;
- text-align: center;
- /*font-family: 'Poppins', sans-serif;*/
- font-size: 14px;
- letter-spacing: 0.05em;
- line-height: 1.6;
- color: #333;
- margin: 10px;
- border-radius: 5px;
- border: 1px solid #ffcc00;
- background-color: rgba(255, 255, 0, 0.15);
- box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
- cursor: pointer;
+ position: absolute;
+ top: 8%;
+ right: 25.5%;
+ padding: 10px;
+ text-align: center;
+ /*font-family: 'Poppins', sans-serif;*/
+ font-size: 14px;
+ letter-spacing: 0.05em;
+ line-height: 1.6;
+ color: #333;
+ margin: 10px;
+ border-radius: 5px;
+ border: 1px solid #ffcc00;
+ background-color: rgba(255, 255, 0, 0.15);
+ box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
+ cursor: pointer;
}
#step-info:hover, #step-warning:hover {
- box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.25);
- transform: translateY(-2px);
+ box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.25);
+ transform: translateY(-2px);
}
#import-prev, #import-next, #import-skip, #import-quit {
- padding: 8px 12px;
- margin: 4px;
- border: none;
- border-radius: 4px;
- background-color: var(--main-color);
- color: white;
- cursor: pointer;
- font-size: 16px;
+ padding: 8px 12px;
+ margin: 4px;
+ border: none;
+ border-radius: 4px;
+ background-color: var(--main-color);
+ color: white;
+ cursor: pointer;
+ font-size: 16px;
}
#import-prev:hover, #import-next:hover, #import-skip:hover, #import-quit:hover {
- background-color: var(--main-color);
- transform: translateY(-2px);
+ background-color: var(--main-color);
+ transform: translateY(-2px);
}
#import-prev i, #import-next i, #import-skip i, #import-quit i {
- margin-right: 5px;
+ margin-right: 5px;
}
#import-next:disabled, #import-prev:disabled, #import-skip:disabled {
- background-color: #ccc;
- cursor: not-allowed;
+ background-color: #ccc;
+ cursor: not-allowed;
}
#surveyModal {
- display: none;
- position: fixed;
- bottom: 60px;
- right: 20px;
- background-color: white;
- box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
- z-index: 1000;
- border-radius: 10px;
- overflow: hidden;
- animation: fadeIn 0.3s;
+ display: none;
+ position: fixed;
+ bottom: 60px;
+ right: 20px;
+ background-color: white;
+ box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
+ z-index: 1000;
+ border-radius: 10px;
+ overflow: hidden;
+ animation: fadeIn 0.3s;
}
#surveyContent {
- position: relative;
- padding: 20px;
- text-align: center;
+ position: relative;
+ padding: 20px;
+ text-align: center;
}
#surveyButton {
- padding: 10px 20px;
- background-color: #2ea44f;
- color: white;
- border: none;
- border-radius: 5px;
- cursor: pointer;
- transition: background-color 0.3s, transform 0.2s;
+ padding: 10px 20px;
+ background-color: #2ea44f;
+ color: white;
+ border: none;
+ border-radius: 5px;
+ cursor: pointer;
+ transition: background-color 0.3s, transform 0.2s;
}
#surveyButton:hover {
- background-color: #258741;
- transform: scale(1.05);
+ background-color: #258741;
+ transform: scale(1.05);
}
#surveyClose {
- position: absolute;
- top: 10px;
- right: 15px;
- color: #aaaaaa;
- font-size: 25px;
- cursor: pointer;
+ position: absolute;
+ top: 10px;
+ right: 15px;
+ color: #aaaaaa;
+ font-size: 25px;
+ cursor: pointer;
}
#surveyClose:hover {
- color: #777;
+ color: #777;
}
@keyframes fadeIn {
- from {
- opacity: 0;
- }
- to {
- opacity: 1;
- }
+ from {
+ opacity: 0;
+ }
+ to {
+ opacity: 1;
+ }
}
.text-input {
- font-family: Arial, sans-serif;
- font-size: 16px;
- line-height: 1.2;
- resize: vertical;
+ font-family: Arial, sans-serif;
+ font-size: 16px;
+ line-height: 1.2;
+ resize: vertical;
}
.tour-guide {
- display: none;
- z-index: 3;
+ display: none;
+ z-index: 3;
}
.tour-step {
- position: relative;
- display: flex;
- flex-direction: column;
- align-items: center;
- padding: 10px;
- border: 1px solid #ccc;
- border-radius: 5px;
- background-color: #fff;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ padding: 10px;
+ border: 1px solid #ccc;
+ border-radius: 5px;
+ background-color: #fff;
}
.tour-arrow {
- position: absolute;
- top: 50%;
- left: -10px;
- width: 0;
- height: 0;
- border-style: solid;
- border-width: 10px 10px 10px 0;
- border-color: transparent #ccc transparent transparent;
- transform: translateY(-50%);
+ position: absolute;
+ top: 50%;
+ left: -10px;
+ width: 0;
+ height: 0;
+ border-style: solid;
+ border-width: 10px 10px 10px 0;
+ border-color: transparent #ccc transparent transparent;
+ transform: translateY(-50%);
}
.tour-content {
- display: flex;
- flex-direction: column;
- align-items: center;
- border-radius: 5px;
- background-color: #fff;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ border-radius: 5px;
+ background-color: #fff;
}
.overlay {
- position: absolute;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- background-color: rgba(0, 0, 0, 0.5);
- display: flex;
- justify-content: center;
- align-items: center;
- z-index: 1;
- display: none;
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba(0, 0, 0, 0.5);
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ z-index: 1;
+ display: none;
}
.guide-Example {
- background: #fff;
- height: fit-content;
- border-radius: 4px;
- border: 1px solid #fff;
- color: #000;
- z-index: 2;
+ background: #fff;
+ height: fit-content;
+ border-radius: 4px;
+ border: 1px solid #fff;
+ color: #000;
+ z-index: 2;
}
.guide-skip {
- padding: 8px 12px;
- margin: 4px;
- border: none;
- border-radius: 4px;
- background-color: var(--main-color);
- color: white;
- cursor: pointer;
- font-size: 16px;
- margin-top: 10px;
+ padding: 8px 12px;
+ margin: 4px;
+ border: none;
+ border-radius: 4px;
+ background-color: var(--main-color);
+ color: white;
+ cursor: pointer;
+ font-size: 16px;
+ margin-top: 10px;
}
.notification {
- position: fixed;
- flex-direction: column;
- padding: 10px 30px;
- border: 1px solid #ccc;
- border-radius: 10px;
- background-color: #fff;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
- font-size: 14px;
- line-height: 1.5;
- z-index: 1000;
- overflow: hidden;
- box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
- transition: right 0.5s ease-out, left 0.5s ease-out;
+ position: fixed;
+ flex-direction: column;
+ padding: 10px 30px;
+ border: 1px solid #ccc;
+ border-radius: 10px;
+ background-color: #fff;
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+ font-size: 14px;
+ line-height: 1.5;
+ z-index: 1000;
+ overflow: hidden;
+ box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
+ transition: right 0.5s ease-out, left 0.5s ease-out;
}
.notification-arrow {
- position: absolute;
- width: 10px;
- height: 10px;
- background-color: #ccc;
- transform: rotate(45deg);
+ position: absolute;
+ width: 10px;
+ height: 10px;
+ background-color: #ccc;
+ transform: rotate(45deg);
}
.notification-title {
- display: flex;
- justify-content: space-between;
- align-items: center;
- font-weight: bold;
- margin-bottom: 5px;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ font-weight: bold;
+ margin-bottom: 5px;
}
.notification-content {
- margin-bottom: 5px;
+ margin-bottom: 5px;
}
.notification-close {
- cursor: pointer;
- color: #ccc;
- font-size: 12px;
- font-weight: bold;
- transition: transform 0.5s, color 0.5s;
+ cursor: pointer;
+ color: #ccc;
+ font-size: 12px;
+ font-weight: bold;
+ transition: transform 0.5s, color 0.5s;
}
.notification-close:hover {
- color: #000;
- transform: rotate(180deg);
+ color: #000;
+ transform: rotate(180deg);
}
.notification-close:mouseout {
- color: #ccc;
- transform: rotate(0deg);
+ color: #ccc;
+ transform: rotate(0deg);
}
.notification-clickBotton-box {
- align-self: end;
- display: flex;
- gap: 5px;
+ align-self: end;
+ display: flex;
+ gap: 5px;
}
.notification-btn {
- padding: 8px 12px;
- margin: 4px;
- border: none;
- border-radius: 4px;
- cursor: pointer;
- font-size: 16px;
+ padding: 8px 12px;
+ margin: 4px;
+ border: none;
+ border-radius: 4px;
+ cursor: pointer;
+ font-size: 16px;
}
.notification-btn:hover {
- transform: translateY(-2px);
+ transform: translateY(-2px);
}
.notification-btn.confirmBotton {
- background-color: var(--main-color);
- color: white;
+ background-color: var(--main-color);
+ color: white;
}
.notification-btn.cancelBotton {
- background-color: #ccc;
+ background-color: #ccc;
}
.notification-progress {
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- height: 4px;
- background-color: #4CAF50;
- transition: width 0.1s linear;
+ position: absolute;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+ height: 4px;
+ background-color: #4CAF50;
+ transition: width 0.1s linear;
}
.code-content {
- display: flex;
- width: var(--code-content-width);
- min-height: 200px;
- height: 100%;
- overflow: auto;
- white-space: pre;
+ display: flex;
+ width: var(--code-content-width);
+ min-height: 200px;
+ height: 100%;
+ overflow: auto;
+ white-space: pre;
}
.two-column-layout {
- display: flex;
- width: 100%;
- height: var(--page-content-height);
+ display: flex;
+ width: 100%;
+ height: var(--page-content-height);
}
.sidebar {
- flex-basis: var(--page-sidebar-width);
- box-sizing: border-box;
- padding: 50px 10px;
- border-right: 1px solid var(--border-color);
- overflow-y: auto;
- width: 100%;
+ flex-basis: var(--page-sidebar-width);
+ box-sizing: border-box;
+ padding: 50px 10px;
+ border-right: 1px solid var(--border-color);
+ overflow-y: auto;
+ width: 100%;
}
.tabs {
- display: block;
- padding: 0;
- margin: 50px 0 20px 0;
+ display: block;
+ padding: 0;
+ margin: 50px 0 20px 0;
}
.tab-button {
- cursor: pointer;
- padding: 10px;
- border: none;
- margin-right: 20px;
- border-radius: 15px;
+ cursor: pointer;
+ padding: 10px;
+ border: none;
+ margin-right: 20px;
+ border-radius: 15px;
}
.tab-button.active {
- background-color: var(--main-color-light);
+ background-color: var(--main-color-light);
}
.tab {
- display: none;
+ display: none;
}
.tab.active {
- display: block;
+ display: block;
}
.grid-container {
- grid-template-columns: repeat(6, 1fr);
- gap: 1rem;
- padding: 1rem;
- display: flex;
- flex-wrap: wrap;
- gap: 1rem;
- padding: 1rem;
+ grid-template-columns: repeat(6, 1fr);
+ gap: 1rem;
+ padding: 1rem;
+ display: flex;
+ flex-wrap: wrap;
+ gap: 1rem;
+ padding: 1rem;
}
.grid-item {
- background-color: #f0f0f0;
- border-radius: 15px;
- overflow: hidden;
- width: 200px;
- height: 200px;
- position: relative;
- display: flex;
- flex-direction: column;
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
- transition: transform 0.2s ease-in-out;
+ background-color: #f0f0f0;
+ border-radius: 15px;
+ overflow: hidden;
+ width: 200px;
+ height: 200px;
+ position: relative;
+ display: flex;
+ flex-direction: column;
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
+ transition: transform 0.2s ease-in-out;
}
.grid-item:hover {
- transform: scale(1.05);
+ transform: scale(1.05);
}
.thumbnail {
- width: 100%;
- flex-grow: 1;
- background-size: cover;
- background-position: center;
+ width: 100%;
+ flex-grow: 1;
+ background-size: cover;
+ background-position: center;
}
.caption {
- width: 100%;
- height: auto;
- text-align: center;
- background-color: white;
+ width: 100%;
+ height: auto;
+ text-align: center;
+ background-color: white;
}
.caption h6, .caption p {
- margin: 1px 0;
- font-size: 10px;
+ margin: 1px 0;
+ font-size: 10px;
}
.caption .button {
- background-color: #007aff;
- color: white;
- padding: 2px 7px;
- border: none;
- border-radius: 8px;
- font-size: 12px;
- cursor: pointer;
- transition: background 0.3s;
+ background-color: #007aff;
+ color: white;
+ padding: 2px 7px;
+ border: none;
+ border-radius: 8px;
+ font-size: 12px;
+ cursor: pointer;
+ transition: background 0.3s;
}
.caption .load-button {
- margin-top: 5px;
+ margin-top: 5px;
}
.caption .delete-button {
- margin-top: 5px;
- padding: 2px 3px;
+ margin-top: 5px;
+ padding: 2px 3px;
}
.tooltip {
- visibility: hidden;
- width: 120px;
- background-color: black;
- color: rgb(0, 0, 0);
- text-align: center;
- border-radius: 5px;
- padding: 5px;
- position: absolute;
- z-index: 1;
- top: 100%;
- left: 50%;
- margin-left: -30px;
- opacity: 0;
- transition: opacity 0.3s;
+ visibility: hidden;
+ width: 120px;
+ background-color: black;
+ color: rgb(0, 0, 0);
+ text-align: center;
+ border-radius: 5px;
+ padding: 5px;
+ position: absolute;
+ z-index: 1;
+ top: 100%;
+ left: 50%;
+ margin-left: -30px;
+ opacity: 0;
+ transition: opacity 0.3s;
}
.menu-btn:hover .tooltip {
- visibility: visible;
- opacity: 1;
+ visibility: visible;
+ opacity: 1;
}
#navigation-bar-logo {
- font-family: 'krypton', sans-serif;
- font-size: 20px;
- color: var(--logo-font-color);
- white-space: nowrap;
+ font-family: 'krypton', sans-serif;
+ font-size: 20px;
+ color: var(--logo-font-color);
+ white-space: nowrap;
}
#navigation-bar-logo:hover {
- cursor: pointer;
+ cursor: pointer;
}
\ No newline at end of file
diff --git a/src/agentscope/studio/static/js/dashboard-detail-code.js b/src/agentscope/studio/static/js/dashboard-detail-code.js
index e43c779cf..747fc69c7 100644
--- a/src/agentscope/studio/static/js/dashboard-detail-code.js
+++ b/src/agentscope/studio/static/js/dashboard-detail-code.js
@@ -2,76 +2,76 @@ let currentCode = null;
let editorInstance = null;
function initializeDashboardDetailCodePage(codeUrl) {
- initializeMonacoEditor();
+ initializeMonacoEditor();
- fetch("/api/code?run_dir=" + codeUrl)
- .then((response) => {
- if (!response.ok) {
- throw new Error("Connection error, cannot load the web page.");
- }
- return response.json();
- })
- .then((data) => {
- console.log("Get ", data);
- currentCode = data;
- constructCodeFileList(codeUrl, data);
- })
- .catch((error) => {
- console.error("Error encountered while loading page: ", error);
- });
+ fetch("/api/code?run_dir=" + codeUrl)
+ .then((response) => {
+ if (!response.ok) {
+ throw new Error("Connection error, cannot load the web page.");
+ }
+ return response.json();
+ })
+ .then((data) => {
+ console.log("Get ", data);
+ currentCode = data;
+ constructCodeFileList(codeUrl, data);
+ })
+ .catch((error) => {
+ console.error("Error encountered while loading page: ", error);
+ });
}
function constructCodeFileList(codeUrl, code) {
- let codeFileRows = [`
`];
+ let codeFileRows = [``];
- if (code !== null && code !== undefined) {
- if (Object.keys(code).length === 0) {
- codeFileRows = [
- 'No code available
',
- ];
- } else {
- Object.keys(code).forEach((key) =>
- codeFileRows.push(
- `${key}`
- )
- );
- }
+ if (code !== null && code !== undefined) {
+ if (Object.keys(code).length === 0) {
+ codeFileRows = [
+ "No code available
",
+ ];
+ } else {
+ Object.keys(code).forEach((key) =>
+ codeFileRows.push(
+ `${key}`
+ )
+ );
}
+ }
- document.getElementById("code-list").innerHTML = codeFileRows.join("\n");
+ document.getElementById("code-list").innerHTML = codeFileRows.join("\n");
}
function initializeMonacoEditor() {
- require.config({
- paths: {
- vs: "https://cdn.jsdelivr.net/npm/monaco-editor@latest/min/vs",
- },
- });
- require(["vs/editor/editor.main"], function () {
- editorInstance = monaco.editor.create(
- document.getElementById("code-editor"),
- {
- language: "python",
- theme: "vs-light",
- scrollBeyondLastLine: false,
- readOnly: true,
- }
- );
- }, function (error) {
- console.error("Error encountered while loading monaco editor: ", error);
- });
+ require.config({
+ paths: {
+ vs: "https://cdn.jsdelivr.net/npm/monaco-editor@latest/min/vs",
+ },
+ });
+ require(["vs/editor/editor.main"], function () {
+ editorInstance = monaco.editor.create(
+ document.getElementById("code-editor"),
+ {
+ language: "python",
+ theme: "vs-light",
+ scrollBeyondLastLine: false,
+ readOnly: true,
+ }
+ );
+ }, function (error) {
+ console.error("Error encountered while loading monaco editor: ", error);
+ });
}
function displayCode(codeFileName) {
- document.getElementById("code-filename").innerHTML = codeFileName;
+ document.getElementById("code-filename").innerHTML = codeFileName;
- if (editorInstance) {
- editorInstance.setValue(currentCode[codeFileName]);
- } else {
- console.log(
- "Monaco editor instance is not available, set text content"
- );
- document.getElementById("code-editor").textContent =
+ if (editorInstance) {
+ editorInstance.setValue(currentCode[codeFileName]);
+ } else {
+ console.log(
+ "Monaco editor instance is not available, set text content"
+ );
+ document.getElementById("code-editor").textContent =
currentCode[codeFileName];
- }
+ }
}
diff --git a/src/agentscope/studio/static/js/dashboard-detail-dialogue.js b/src/agentscope/studio/static/js/dashboard-detail-dialogue.js
index a13520ceb..5fa87622c 100644
--- a/src/agentscope/studio/static/js/dashboard-detail-dialogue.js
+++ b/src/agentscope/studio/static/js/dashboard-detail-dialogue.js
@@ -1,7 +1,7 @@
let chatRowOtherTemplate,
- chatRowUserTemplate,
- chatRowSystemTemplate,
- infoRowTemplate;
+ chatRowUserTemplate,
+ chatRowSystemTemplate,
+ infoRowTemplate;
let currentRuntimeInfo, currentMsgInfo, currentAgentInfo;
@@ -9,18 +9,18 @@ let randomNumberGenerator;
let infoClusterize;
-let inputFileList = document.getElementById("chat-control-file-list");
+const inputFileList = document.getElementById("chat-control-file-list");
let waitForUserInput = false;
let userInputRequest = null;
const agentIcons = [
- '',
- '',
- '',
- '',
- '',
- '',
+ "",
+ "",
+ "",
+ "",
+ "",
+ "",
];
let nameToIconAndColor = {};
@@ -28,625 +28,627 @@ let nameToIconAndColor = {};
hljs.highlightAll();
const marked_options = {
- gfm: true,
- breaks: true,
- pedantic: false,
+ gfm: true,
+ breaks: true,
+ pedantic: false,
};
marked.use({
- renderer: {
- code(code, infostring, escaped) {
- const language = infostring
- ? hljs.getLanguage(infostring)
- ? infostring
- : "plaintext"
- : "plaintext";
- // Use Highlight.js to highlight code blocks
- return `${
- hljs.highlight(code, {language}).value
- }
`;
- },
+ renderer: {
+ code(code, infostring, escaped) {
+ const language = infostring
+ ? hljs.getLanguage(infostring)
+ ? infostring
+ : "plaintext"
+ : "plaintext";
+ // Use Highlight.js to highlight code blocks
+ return `${
+ hljs.highlight(code, {language}).value
+ }
`;
},
+ },
});
function randomSelectAgentIcon() {
- return agentIcons[Math.floor(randomNumberGenerator.nextFloat() * agentIcons.length)];
+ return agentIcons[Math.floor(randomNumberGenerator.nextFloat() * agentIcons.length)];
}
function randomIntFromInterval(min, max) {
- return Math.floor(randomNumberGenerator.nextFloat() * (max - min + 1) + min);
+ return Math.floor(randomNumberGenerator.nextFloat() * (max - min + 1) + min);
}
function hslToHex(h, s, l) {
- l /= 100;
- const a = (s * Math.min(l, 1 - l)) / 100;
- const f = (n) => {
- const k = (n + h / 30) % 12;
- const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
- return Math.round(255 * color)
- .toString(16)
- .padStart(2, "0"); // 转换为16进制并补零
- };
- return `#${f(0)}${f(8)}${f(4)}`;
+ l /= 100;
+ const a = (s * Math.min(l, 1 - l)) / 100;
+ const f = (n) => {
+ const k = (n + h / 30) % 12;
+ const color = l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);
+ return Math.round(255 * color)
+ .toString(16)
+ .padStart(2, "0"); // 转换为16进制并补零
+ };
+ return `#${f(0)}${f(8)}${f(4)}`;
}
function randomSelectColor() {
- const h = randomIntFromInterval(0, 360); // 色相:0°到360°
- const s = randomIntFromInterval(50, 100); // 饱和度:50%到100%
- const l = randomIntFromInterval(25, 75); // 亮度:25%到75%
- return hslToHex(h, s, l);
+ const h = randomIntFromInterval(0, 360); // 色相:0°到360°
+ const s = randomIntFromInterval(50, 100); // 饱和度:50%到100%
+ const l = randomIntFromInterval(25, 75); // 亮度:25%到75%
+ return hslToHex(h, s, l);
}
async function loadChatTemplate() {
- const response = await fetch("static/html/template.html");
- const htmlText = await response.text();
- const parser = new DOMParser();
- const doc = parser.parseFromString(htmlText, "text/html");
-
- // save
- chatRowOtherTemplate = doc.querySelector(
- "#chat-row-other-template"
- ).content;
- chatRowUserTemplate = doc.querySelector("#chat-row-user-template").content;
- chatRowSystemTemplate = doc.querySelector(
- "#chat-row-system-template"
- ).content;
- infoRowTemplate = doc.querySelector("#dialogue-info-row-template").content;
+ const response = await fetch("static/html/template.html");
+ const htmlText = await response.text();
+ const parser = new DOMParser();
+ const doc = parser.parseFromString(htmlText, "text/html");
+
+ // save
+ chatRowOtherTemplate = doc.querySelector(
+ "#chat-row-other-template"
+ ).content;
+ chatRowUserTemplate = doc.querySelector("#chat-row-user-template").content;
+ chatRowSystemTemplate = doc.querySelector(
+ "#chat-row-system-template"
+ ).content;
+ infoRowTemplate = doc.querySelector("#dialogue-info-row-template").content;
}
// Add a chat row according to the role field in the message
function addChatRow(index, pMsg) {
- switch (pMsg.role.toLowerCase()) {
- case "user":
- return _addUserChatRow(index, pMsg);
- case "system":
- return _addSystemChatRow(index, pMsg);
- case "assistant":
- return _addAssistantChatRow(index, pMsg);
- default:
- console.error("Unknown role: " + pMsg.role);
- return _addAssistantChatRow(index, pMsg);
- }
+ switch (pMsg.role.toLowerCase()) {
+ case "user":
+ return _addUserChatRow(index, pMsg);
+ case "system":
+ return _addSystemChatRow(index, pMsg);
+ case "assistant":
+ return _addAssistantChatRow(index, pMsg);
+ default:
+ console.error("Unknown role: " + pMsg.role);
+ return _addAssistantChatRow(index, pMsg);
+ }
}
function _determineFileType(url) {
- // Image
- let img_suffix = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".svg", ".webp"];
- // Video
- let video_suffix = [
- ".mp4",
- ".webm",
- ".avi",
- ".mov",
- ".wmv",
- ".flv",
- ".f4v",
- ".m4v",
- ".rmvb",
- ".rm",
- ".3gp",
- ".dat",
- ".ts",
- ".mts",
- ".vob",
- ];
+ // Image
+ const img_suffix = [".jpg", ".jpeg", ".png", ".gif", ".bmp", ".svg", ".webp"];
+ // Video
+ const video_suffix = [
+ ".mp4",
+ ".webm",
+ ".avi",
+ ".mov",
+ ".wmv",
+ ".flv",
+ ".f4v",
+ ".m4v",
+ ".rmvb",
+ ".rm",
+ ".3gp",
+ ".dat",
+ ".ts",
+ ".mts",
+ ".vob",
+ ];
// Audio
- let audio_suffix = [".mp3", ".wav", ".wma", ".ogg", ".aac", ".flac"];
+ const audio_suffix = [".mp3", ".wav", ".wma", ".ogg", ".aac", ".flac"];
- const parsed_url = new URL(url);
- const path = parsed_url.pathname;
+ const parsed_url = new URL(url);
+ const path = parsed_url.pathname;
- const extension = path.split('.').pop().toLowerCase();
+ const extension = path.split(".").pop().toLowerCase();
- if (img_suffix.includes('.' + extension)) {
- return "image";
- } else if (video_suffix.includes('.' + extension)) {
- return "video";
- } else if (audio_suffix.includes('.' + extension)) {
- return "audio";
- }
- return "file";
+ if (img_suffix.includes("." + extension)) {
+ return "image";
+ } else if (video_suffix.includes("." + extension)) {
+ return "video";
+ } else if (audio_suffix.includes("." + extension)) {
+ return "audio";
+ }
+ return "file";
}
function _getMultiModalComponent(url) {
- // Determine the type of the file
- let urlType = _determineFileType(url);
-
- // If we need to fetch the url from the backend
- let src = null;
- if (url.startsWith("http://") || url.startsWith("https://")) {
- // Obtain the url from the backend
- src = url;
- } else {
- src = "/api/file?path=" + url;
- }
-
- switch (urlType) {
- case "image":
- return ``;
- case "audio":
- return ``;
- case "video":
- return ``;
- default:
- return `${url}`;
- }
+ // Determine the type of the file
+ const urlType = _determineFileType(url);
+
+ // If we need to fetch the url from the backend
+ let src = null;
+ if (url.startsWith("http://") || url.startsWith("https://")) {
+ // Obtain the url from the backend
+ src = url;
+ } else {
+ src = "/api/file?path=" + url;
+ }
+
+ switch (urlType) {
+ case "image":
+ return ``;
+ case "audio":
+ return ``;
+ case "video":
+ return ``;
+ default:
+ return `${url}`;
+ }
}
// Render multiple urls in a chat bubble
function _renderMultiModalUrls(urls) {
- if (urls == null || urls === "") {
- return ""
- }
-
- if (typeof urls === "string") {
- urls = [urls]
- }
-
- if (Array.isArray(urls) && urls.length > 0) {
- let innerHtml = "";
- for (let i = 0; i < urls.length; i++) {
- innerHtml += _getMultiModalComponent(urls[i]);
- }
- return innerHtml;
- } else {
- return ""
+ if (urls == null || urls === "") {
+ return "";
+ }
+
+ if (typeof urls === "string") {
+ urls = [urls];
+ }
+
+ if (Array.isArray(urls) && urls.length > 0) {
+ let innerHtml = "";
+ for (let i = 0; i < urls.length; i++) {
+ innerHtml += _getMultiModalComponent(urls[i]);
}
+ return innerHtml;
+ } else {
+ return "";
+ }
}
function _addUserChatRow(index, pMsg) {
- const template = chatRowUserTemplate.cloneNode(true);
- // template.querySelector('.chat-icon').
- template.querySelector(".chat-name").textContent = pMsg.name;
- let chatBubble = template.querySelector(".chat-bubble");
- chatBubble.textContent += pMsg.content;
- chatBubble.innerHTML += _renderMultiModalUrls(pMsg.url);
- template.querySelector(".chat-row").setAttribute("data-index", index);
- template
- .querySelector(".chat-row")
- .setAttribute("data-msg", JSON.stringify(pMsg));
- return template.firstElementChild;
+ const template = chatRowUserTemplate.cloneNode(true);
+ // template.querySelector('.chat-icon').
+ template.querySelector(".chat-name").textContent = pMsg.name;
+ const chatBubble = template.querySelector(".chat-bubble");
+ chatBubble.textContent += pMsg.content;
+ chatBubble.innerHTML += _renderMultiModalUrls(pMsg.url);
+ template.querySelector(".chat-row").setAttribute("data-index", index);
+ template
+ .querySelector(".chat-row")
+ .setAttribute("data-msg", JSON.stringify(pMsg));
+ return template.firstElementChild;
}
function _addAssistantChatRow(index, pMsg) {
- const template = chatRowOtherTemplate.cloneNode(true);
-
- // If not record
- let svg_html, color;
- if (pMsg.name in nameToIconAndColor) {
- svg_html = nameToIconAndColor[pMsg.name][0];
- color = nameToIconAndColor[pMsg.name][1];
- } else {
- // First choose a svg icon
- svg_html = randomSelectAgentIcon();
- color = randomSelectColor();
- // Record the color and icon
- nameToIconAndColor[pMsg.name] = [svg_html, color];
- }
- template.querySelector(".chat-icon").innerHTML = svg_html;
- // change the background color randomly
- template.querySelector(".chat-icon").style.backgroundColor = color;
-
- template.querySelector(".chat-name").textContent = pMsg.name;
- let chatBubble = template.querySelector(".chat-bubble");
- chatBubble.innerHTML += marked.parse(pMsg.content, marked_options);
- chatBubble.innerHTML += _renderMultiModalUrls(pMsg.url);
- template.querySelector(".chat-row").setAttribute("data-index", index);
- template
- .querySelector(".chat-row")
- .setAttribute("data-msg", JSON.stringify(pMsg));
- return template.firstElementChild;
+ const template = chatRowOtherTemplate.cloneNode(true);
+
+ // If not record
+ let svg_html, color;
+ if (pMsg.name in nameToIconAndColor) {
+ svg_html = nameToIconAndColor[pMsg.name][0];
+ color = nameToIconAndColor[pMsg.name][1];
+ } else {
+ // First choose a svg icon
+ svg_html = randomSelectAgentIcon();
+ color = randomSelectColor();
+ // Record the color and icon
+ nameToIconAndColor[pMsg.name] = [svg_html, color];
+ }
+ template.querySelector(".chat-icon").innerHTML = svg_html;
+ // change the background color randomly
+ template.querySelector(".chat-icon").style.backgroundColor = color;
+
+ template.querySelector(".chat-name").textContent = pMsg.name;
+ const chatBubble = template.querySelector(".chat-bubble");
+ chatBubble.innerHTML += marked.parse(pMsg.content, marked_options);
+ chatBubble.innerHTML += _renderMultiModalUrls(pMsg.url);
+ template.querySelector(".chat-row").setAttribute("data-index", index);
+ template
+ .querySelector(".chat-row")
+ .setAttribute("data-msg", JSON.stringify(pMsg));
+ return template.firstElementChild;
}
function _addSystemChatRow(index, pMsg) {
- const template = chatRowSystemTemplate.cloneNode(true);
- template.querySelector(".chat-name").textContent = pMsg.name;
- let chatBubble = template.querySelector(".chat-bubble");
- chatBubble.innerHTML += marked.parse(pMsg.content, marked_options);
- chatBubble.innerHTML += _renderMultiModalUrls(pMsg.url);
- template.querySelector(".chat-row").setAttribute("data-index", index);
- template
- .querySelector(".chat-row")
- .setAttribute("data-msg", JSON.stringify(pMsg));
-
- return template.firstElementChild;
+ const template = chatRowSystemTemplate.cloneNode(true);
+ template.querySelector(".chat-name").textContent = pMsg.name;
+ const chatBubble = template.querySelector(".chat-bubble");
+ chatBubble.innerHTML += marked.parse(pMsg.content, marked_options);
+ chatBubble.innerHTML += _renderMultiModalUrls(pMsg.url);
+ template.querySelector(".chat-row").setAttribute("data-index", index);
+ template
+ .querySelector(".chat-row")
+ .setAttribute("data-msg", JSON.stringify(pMsg));
+
+ return template.firstElementChild;
}
function _addKeyValueInfoRow(pKey, pValue) {
- const template = infoRowTemplate.cloneNode(true);
- template.querySelector(".dialogue-info-key").textContent =
+ const template = infoRowTemplate.cloneNode(true);
+ template.querySelector(".dialogue-info-key").textContent =
pKey.toUpperCase();
- // Not null
- if (pValue !== null) {
- let infoValue = template.querySelector(".dialogue-info-value");
- if (pKey.toLowerCase() === "url") {
- infoValue.style.wordBreak = "break-all";
- }
-
- if (typeof pValue === "object") {
- infoValue.textContent = JSON.stringify(pValue);
- } else {
- infoValue.textContent = pValue;
- }
+ // Not null
+ if (pValue !== null) {
+ const infoValue = template.querySelector(".dialogue-info-value");
+ if (pKey.toLowerCase() === "url") {
+ infoValue.style.wordBreak = "break-all";
+ }
+
+ if (typeof pValue === "object") {
+ infoValue.textContent = JSON.stringify(pValue);
+ } else {
+ infoValue.textContent = pValue;
}
- return template.firstElementChild.outerHTML;
+ }
+ return template.firstElementChild.outerHTML;
}
function disableInput() {
- document.getElementById("chat-control-url-btn").disabled = true;
- document.getElementById("chat-control-send-btn").disabled = true;
+ document.getElementById("chat-control-url-btn").disabled = true;
+ document.getElementById("chat-control-send-btn").disabled = true;
}
function activateInput() {
- document.getElementById("chat-control-url-btn").disabled = false;
- document.getElementById("chat-control-send-btn").disabled = false;
+ document.getElementById("chat-control-url-btn").disabled = false;
+ document.getElementById("chat-control-send-btn").disabled = false;
}
function _showInfoInDialogueDetailContent(data) {
- if (data === null) {
- infoClusterize.clear();
- return;
- }
-
- let priorityKeys = [
- "run_id",
- "id",
- "project",
- "name",
- "timestamp",
- "role",
- "url",
- "metadata",
- "content",
- ];
+ if (data === null) {
+ infoClusterize.clear();
+ return;
+ }
+
+ const priorityKeys = [
+ "run_id",
+ "id",
+ "project",
+ "name",
+ "timestamp",
+ "role",
+ "url",
+ "metadata",
+ "content",
+ ];
// Deal with the priority keys first
- let infoRows = priorityKeys
- .filter((key) => key in data)
- .map((key) => _addKeyValueInfoRow(key, data[key]));
+ const infoRows = priorityKeys
+ .filter((key) => key in data)
+ .map((key) => _addKeyValueInfoRow(key, data[key]));
// Handle the rest of the keys
- Object.keys(data)
- .filter((key) => !priorityKeys.includes(key)) // Skip the priority keys
- .forEach((key) => infoRows.push(_addKeyValueInfoRow(key, data[key])));
+ Object.keys(data)
+ .filter((key) => !priorityKeys.includes(key)) // Skip the priority keys
+ .forEach((key) => infoRows.push(_addKeyValueInfoRow(key, data[key])));
- // Create table
- infoClusterize.update(infoRows);
+ // Create table
+ infoClusterize.update(infoRows);
}
function _obtainAllUrlFromFileList() {
- let urls = [];
- for (let i = 0; i < inputFileList.children.length; i++) {
- // obtain from the title attribute
- urls.push(inputFileList.children[i].title);
- }
- return urls;
+ const urls = [];
+ for (let i = 0; i < inputFileList.children.length; i++) {
+ // obtain from the title attribute
+ urls.push(inputFileList.children[i].title);
+ }
+ return urls;
}
function addFileListItem(url) {
- let svg;
- switch (_determineFileType(url)) {
- case "image":
- svg = `