diff --git a/.env b/.env index e8704e98..d549bf9b 100644 --- a/.env +++ b/.env @@ -1,2 +1,9 @@ # Public -PUBLIC_SERVICE_URL=https://botsharp.azurewebsites.net \ No newline at end of file +PUBLIC_SERVICE_URL=https://botsharp.azurewebsites.net +PUBLIC_LOGO_URL=/images/logo.png +PUBLIC_LOGIN_IMAGE=/images/profile-img.png +PUBLIC_FAVICON_URL=/icons/favicon.ico +PUBLIC_BRAND_NAME=BotSharp +PUBLIC_ADMIN_USERNAME=admin@gmail.com +PUBLIC_ADMIN_PASSWORD=123456 +PUBLIC_COMPANY_NAME=SciSharp STACK \ No newline at end of file diff --git a/src/app.html b/src/app.html index c1524fbf..eefdd1f2 100644 --- a/src/app.html +++ b/src/app.html @@ -2,7 +2,7 @@ - + %sveltekit.head% diff --git a/src/lib/common/HeadTitle.svelte b/src/lib/common/HeadTitle.svelte index b00b0e55..5f46456e 100644 --- a/src/lib/common/HeadTitle.svelte +++ b/src/lib/common/HeadTitle.svelte @@ -1,7 +1,9 @@ - {title} | BotSharp - Admin & Dashboard + + {title} | {PUBLIC_BRAND_NAME} - Admin & Dashboard diff --git a/src/lib/drawflow/drawflow.css b/src/lib/drawflow/drawflow.css index cc8f2e01..74f0317e 100644 --- a/src/lib/drawflow/drawflow.css +++ b/src/lib/drawflow/drawflow.css @@ -1,8 +1,8 @@ .drawflow .drawflow-node { - background: rgb(128, 0, 128); + background: var(--bs-primary); color: white; } .drawflow .drawflow-node.selected { - background: rgb(0, 200, 50); + background: var(--bs-success); } \ No newline at end of file diff --git a/src/lib/helpers/datetime.js b/src/lib/helpers/datetime.js index 369036f9..e74593ba 100644 --- a/src/lib/helpers/datetime.js +++ b/src/lib/helpers/datetime.js @@ -7,6 +7,9 @@ export function format(datetime, type = 'date') { if (type == 'date') { const options = { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }; return date.toLocaleString(undefined, options); + } else if (type == 'short-date') { + const options = { year: 'numeric', month: 'short', day: 'numeric' }; + return date.toLocaleString(undefined, options); } else if (type == 'time') { const options = { month: 'short', day: 'numeric', hour: '2-digit', minute: '2-digit' }; return date.toLocaleString(undefined, options); diff --git a/src/lib/helpers/types.js b/src/lib/helpers/types.js index 3422aca0..02b03cba 100644 --- a/src/lib/helpers/types.js +++ b/src/lib/helpers/types.js @@ -63,6 +63,7 @@ * @typedef {Object} AgentFilter * @property {boolean} [isRouter] * @property {boolean} [isEvaluator] + * @property {boolean} [allowRouting] */ /** @@ -73,6 +74,7 @@ * @property {string} instruction - System prompt * @property {boolean} disabled * @property {boolean} is_public + * @property {boolean} is_router * @property {string} icon_url - Icon * @property {boolean} allow_routing * @property {Date} created_datetime @@ -100,9 +102,9 @@ /** * @typedef {Object} ConversationFilter * @property {Pagination} pager - Pagination - * @property {string?} agentId - The agent id. - * @property {string?} channel - The conversation channel. - * @property {string?} status - The conversation status. + * @property {string?} [agentId] - The agent id. + * @property {string?} [channel] - The conversation channel. + * @property {string?} [status] - The conversation status. */ /** diff --git a/src/routes/(authentication)/login/+page.svelte b/src/routes/(authentication)/login/+page.svelte index 89626a55..c36318a2 100644 --- a/src/routes/(authentication)/login/+page.svelte +++ b/src/routes/(authentication)/login/+page.svelte @@ -15,9 +15,17 @@ import Headtitle from '$lib/common/HeadTitle.svelte'; import { getToken } from '$lib/services/auth-service.js' import { goto } from '$app/navigation'; + import { + PUBLIC_LOGO_URL, + PUBLIC_LOGIN_IMAGE, + PUBLIC_BRAND_NAME, + PUBLIC_ADMIN_USERNAME, + PUBLIC_ADMIN_PASSWORD, + PUBLIC_COMPANY_NAME + } from '$env/static/public'; - let username = 'admin@gmail.com'; - let password = '123456'; + let username = PUBLIC_ADMIN_USERNAME; + let password = PUBLIC_ADMIN_PASSWORD; let isOpen = false; let msg = ''; let status = ''; @@ -44,11 +52,11 @@
Welcome Back !
-

Sign in to continue to BotSharp.

+

Sign in to continue to {PUBLIC_BRAND_NAME}.

- + @@ -57,14 +65,14 @@
- +
- +
@@ -149,7 +157,7 @@ Signup now

- © {new Date().getFullYear()} SciSharp STACK. Crafted with + © {new Date().getFullYear()} {PUBLIC_COMPANY_NAME}. Crafted with by open source community

diff --git a/src/routes/(authentication)/recoverpw/+page.svelte b/src/routes/(authentication)/recoverpw/+page.svelte index 576c8f82..e90dbbf1 100644 --- a/src/routes/(authentication)/recoverpw/+page.svelte +++ b/src/routes/(authentication)/recoverpw/+page.svelte @@ -2,6 +2,7 @@ import Link from 'svelte-link'; import { Row, Col, CardBody, Card, Container, Form, Label, Input, Button, Alert } from '@sveltestrap/sveltestrap'; import Headtitle from '$lib/common/HeadTitle.svelte'; + import { PUBLIC_LOGO_URL, PUBLIC_COMPANY_NAME } from '$env/static/public'; @@ -29,7 +30,7 @@
- +
@@ -66,8 +67,8 @@ Sign In here

- © {new Date().getFullYear()} SciSharp STACK. Crafted with - by SciSharp STACK + © {new Date().getFullYear()} {PUBLIC_COMPANY_NAME}. Crafted with + by Open Source community

diff --git a/src/routes/(authentication)/register/+page.svelte b/src/routes/(authentication)/register/+page.svelte index 129ea9c4..62fcaf73 100644 --- a/src/routes/(authentication)/register/+page.svelte +++ b/src/routes/(authentication)/register/+page.svelte @@ -3,6 +3,7 @@ import { Row, Col, CardBody, Card, Container, Form, Label, Input, Button, Alert } from '@sveltestrap/sveltestrap'; import Headtitle from '$lib/common/HeadTitle.svelte'; import { goto } from '$app/navigation'; + import { PUBLIC_LOGO_URL, PUBLIC_COMPANY_NAME } from '$env/static/public'; let username = ''; let emailid = ''; @@ -65,7 +66,7 @@
Free Register
-

Get your free SciSharp account now.

+

Get your free account now.

@@ -78,7 +79,7 @@
- +
@@ -155,7 +156,7 @@

- By registering you agree to the SciSharp Terms of Use

@@ -170,8 +171,8 @@ Login

- © {new Date().getFullYear()} SciSharp STACK. Crafted with - by SciSharp STACK + © {new Date().getFullYear()} {PUBLIC_COMPANY_NAME}. Crafted with + by Open Source community

diff --git a/src/routes/(home)/+page.svelte b/src/routes/(home)/+page.svelte index 6b12ea9a..f7e59a55 100644 --- a/src/routes/(home)/+page.svelte +++ b/src/routes/(home)/+page.svelte @@ -2,14 +2,15 @@ import Link from "svelte-link"; import { Container, Row, Col } from '@sveltestrap/sveltestrap'; import HeadTitle from "$lib/common/HeadTitle.svelte"; + import { PUBLIC_LOGO_URL, PUBLIC_BRAND_NAME } from '$env/static/public'; - +
logo -

Let's get started with BotSharp

+

Let's get started with {PUBLIC_BRAND_NAME}

A central workspace for building, testing and evaluating your AI Agents.

diff --git a/src/routes/(pages)/agent/card-agent.svelte b/src/routes/(pages)/agent/card-agent.svelte index 1fa4f2cf..6f93e69f 100644 --- a/src/routes/(pages)/agent/card-agent.svelte +++ b/src/routes/(pages)/agent/card-agent.svelte @@ -30,6 +30,16 @@

{agent.description}

+ {#if agent.is_router} +
+ routing +
+ {/if} + {#if agent.allow_routing} +
+ routing +
+ {/if} {#each agent.functions as fn}
@@ -43,17 +53,17 @@
    -
  • - {agent.disabled ? "Disabled" : "Enabled"} +
  • + {agent.disabled ? "Disabled" : "Enabled"} +
  • +
  • + {agent.is_public ? "Public" : "Private"}
  • - {" "} -
  • +
  • - {format(agent.updated_datetime)} + {format(agent.updated_datetime, 'short-date')}
  • - {" "} -
  • +
  • Live Chat diff --git a/src/routes/(pages)/agent/router/routing-flow.svelte b/src/routes/(pages)/agent/router/routing-flow.svelte index 66f7402a..a89798fa 100644 --- a/src/routes/(pages)/agent/router/routing-flow.svelte +++ b/src/routes/(pages)/agent/router/routing-flow.svelte @@ -15,7 +15,8 @@ onMount(async () => { agents = await getAgents({ isRouter: false, - isEvaluator: false + isEvaluator: false, + allowRouting: true }); const container = document.getElementById("drawflow"); diff --git a/src/routes/(pages)/conversation/+page.svelte b/src/routes/(pages)/conversation/+page.svelte index e5cccd63..860ee2ac 100644 --- a/src/routes/(pages)/conversation/+page.svelte +++ b/src/routes/(pages)/conversation/+page.svelte @@ -25,10 +25,7 @@ /** @type {import('$types').ConversationFilter} */ let filter = { - pager: { page: 0, size: 20, count: 0 }, - agentId: '01fcc3e5-9af7-49e6-ad7a-a760bd12dc4a', - channel: null, - status: null + pager: { page: 0, size: 20, count: 0 } }; /** @type {import('$types').Pagination} */ diff --git a/src/routes/VerticalLayout/Footer.svelte b/src/routes/VerticalLayout/Footer.svelte index 280807a6..04f93725 100644 --- a/src/routes/VerticalLayout/Footer.svelte +++ b/src/routes/VerticalLayout/Footer.svelte @@ -1,5 +1,6 @@ @@ -7,7 +8,7 @@ - {new Date().getFullYear()} © SciSharp STACK. + {new Date().getFullYear()} © {PUBLIC_COMPANY_NAME}.
    diff --git a/src/routes/VerticalLayout/Header.svelte b/src/routes/VerticalLayout/Header.svelte index 9a4d352a..f7b1f7a7 100644 --- a/src/routes/VerticalLayout/Header.svelte +++ b/src/routes/VerticalLayout/Header.svelte @@ -7,6 +7,7 @@ import NotificationDropdown from '$lib/common/NotificationDropdown.svelte'; import ProfileDropdown from '$lib/common/ProfileDropdown.svelte'; import { OverlayScrollbars } from 'overlayscrollbars'; + import { PUBLIC_LOGO_URL } from '$env/static/public'; const toggleSideBar = () => { if (browser) { @@ -44,19 +45,19 @@ diff --git a/static/favicon.ico b/static/icons/favicon.ico similarity index 100% rename from static/favicon.ico rename to static/icons/favicon.ico diff --git a/static/icons/router.png b/static/icons/router.png new file mode 100644 index 00000000..6158936a Binary files /dev/null and b/static/icons/router.png differ diff --git a/static/icons/routing-1.png b/static/icons/routing-1.png new file mode 100644 index 00000000..0845a077 Binary files /dev/null and b/static/icons/routing-1.png differ diff --git a/static/icons/routing-2.png b/static/icons/routing-2.png new file mode 100644 index 00000000..bb4cd8bb Binary files /dev/null and b/static/icons/routing-2.png differ