+
+
+
+
+
+ Agent
+
+
+
+
+ {#if !!selectedAgentId}
+
+
+
+ {#if ADMIN_ROLES.includes(user?.role || '')}
+
+
+
+
+
-
-
-
-{#if !!selectedAgentId}
-
-
-
-{#if ADMIN_ROLES.includes(user?.role || '')}
-
-
-
-
-
-
-{/if}
-{/if}
+ {/if}
+ {/if}
+
\ No newline at end of file
diff --git a/src/routes/page/conversation/[conversationId]/+page.svelte b/src/routes/page/conversation/[conversationId]/+page.svelte
index 30c6813c..d4d68e8d 100644
--- a/src/routes/page/conversation/[conversationId]/+page.svelte
+++ b/src/routes/page/conversation/[conversationId]/+page.svelte
@@ -1,23 +1,34 @@
\ No newline at end of file
diff --git a/src/lib/helpers/http.js b/src/lib/helpers/http.js
index f33c447f..8e49d548 100644
--- a/src/lib/helpers/http.js
+++ b/src/lib/helpers/http.js
@@ -31,7 +31,7 @@ const retryQueue = {
/** @param {{config: import('axios').InternalAxiosRequestConfig, resolve: (value: any) => void, reject: (reason?: any) => void}} item */
enqueue(item) {
this.queue.push(item);
-
+ console.log('queue', this.queue.length);
if (!this.isRefreshingToken) {
const user = getUserStore();
if (!isTokenExired(user.expires)) {
@@ -130,7 +130,7 @@ axios.interceptors.response.use(
loaderStore.set(false);
const originalRequest = error?.config || {};
const user = getUserStore();
- console.log("renew token count.", user.renew_token_count);
+
if (!user?.token || user.renew_token_count >= retryQueue.maxRenewTokenCount) {
retryQueue.queue = [];
redirectToLogin();
@@ -209,7 +209,6 @@ function skipLoader(config) {
/** @type {RegExp[]} */
const getRegexes = [
new RegExp('http(s*)://(.*?)/plugin/menu', 'g'),
- new RegExp('http(s*)://(.*?)/settings', 'g'),
new RegExp('http(s*)://(.*?)/setting/(.*?)', 'g'),
new RegExp('http(s*)://(.*?)/roles', 'g'),
new RegExp('http(s*)://(.*?)/role/options', 'g'),
@@ -222,9 +221,6 @@ function skipLoader(config) {
new RegExp('http(s*)://(.*?)/agent/labels', 'g'),
new RegExp('http(s*)://(.*?)/agent/tasks', 'g'),
new RegExp('http(s*)://(.*?)/agent/(.*?)/code-scripts', 'g'),
- new RegExp('http(s*)://(.*?)/conversation', 'g'),
- new RegExp('http(s*)://(.*?)/conversations/(.*?)/dialogs', 'g'),
- new RegExp('http(s*)://(.*?)/conversations', 'g'),
new RegExp('http(s*)://(.*?)/conversation/state/keys', 'g'),
new RegExp('http(s*)://(.*?)/conversation/(.*?)/files/(.*?)', 'g'),
new RegExp('http(s*)://(.*?)/llm-configs', 'g'),
@@ -235,8 +231,7 @@ function skipLoader(config) {
new RegExp('http(s*)://(.*?)/logger/instruction/log/keys', 'g'),
new RegExp('http(s*)://(.*?)/logger/conversation/(.*?)/content-log', 'g'),
new RegExp('http(s*)://(.*?)/logger/conversation/(.*?)/state-log', 'g'),
- new RegExp('http(s*)://(.*?)/mcp/server-configs', 'g'),
-
+ new RegExp('http(s*)://(.*?)/mcp/server-configs', 'g')
];
if (config.method === 'post' && postRegexes.some(regex => regex.test(config.url || ''))) {
@@ -287,7 +282,9 @@ function skipGlobalError(config) {
];
/** @type {RegExp[]} */
- const getRegexes = [];
+ const getRegexes = [
+ new RegExp('http(s*)://(.*?)/agents', 'g')
+ ];
if (config.method === 'post' && postRegexes.some(regex => regex.test(config.url || ''))) {
return true;
diff --git a/src/lib/helpers/utils/common.js b/src/lib/helpers/utils/common.js
index e6170626..75c13a82 100644
--- a/src/lib/helpers/utils/common.js
+++ b/src/lib/helpers/utils/common.js
@@ -175,6 +175,19 @@ export function splitTextByCase(str) {
return text;
}
+/**
+ * @param {string} url
+ */
+export function getCleanUrl(url) {
+ if (!url) return url;
+
+ if (url.startsWith('/')) {
+ url = url.substring(1);
+ }
+
+ return url;
+}
+
/**
* @param {string} timeRange
* @returns {{ startTime: string | null, endTime: string | null }}
diff --git a/src/lib/scss/custom/common/_common.scss b/src/lib/scss/custom/common/_common.scss
index f23a183f..e4230d5d 100644
--- a/src/lib/scss/custom/common/_common.scss
+++ b/src/lib/scss/custom/common/_common.scss
@@ -204,3 +204,17 @@ button:focus {
text-overflow: ellipsis;
}
}
+
+.text-btn {
+ background: none;
+ border: none;
+ padding: 0;
+ color: inherit;
+ font-weight: 500;
+ cursor: pointer;
+
+ &:hover {
+ text-decoration: none;
+ background: none;
+ }
+}
\ No newline at end of file
diff --git a/src/lib/scss/custom/components/_loader.scss b/src/lib/scss/custom/components/_loader.scss
index 39c7979d..a095d4ce 100644
--- a/src/lib/scss/custom/components/_loader.scss
+++ b/src/lib/scss/custom/components/_loader.scss
@@ -1,5 +1,5 @@
.loader {
- position: fixed;
+ position: absolute;
z-index: 9999;
background-color: rgba(255, 255, 255, 0.8);
top: 0;
diff --git a/src/lib/services/agent-service.js b/src/lib/services/agent-service.js
index 4b6d0995..caa9e172 100644
--- a/src/lib/services/agent-service.js
+++ b/src/lib/services/agent-service.js
@@ -16,9 +16,10 @@ export async function getSettings() {
* Get agent list
* @param {import('$agentTypes').AgentFilter} filter
* @param {boolean} checkAuth
+ * @param {AbortSignal | null} signal
* @returns {Promise