From 2c4375b40219d762b66c847cb8b8abb517677c88 Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Thu, 18 Jan 2024 05:59:09 -0600 Subject: [PATCH] UI improvement --- README.md | 4 ++-- src/routes/chat/[agentId]/[conversationId]/chat-box.svelte | 2 +- .../chat/[agentId]/[conversationId]/content-log.svelte | 5 ++--- src/routes/page/agent/[agentId]/build/+page.svelte | 2 ++ src/routes/page/agent/card-agent.svelte | 7 ++++++- src/routes/page/agent/router/agent-configuration.svelte | 3 --- src/routes/page/agent/router/router-configuration.svelte | 3 --- src/routes/page/conversation/[conversationId]/+page.svelte | 4 ++-- svelte.config.js | 3 +++ 9 files changed, 18 insertions(+), 15 deletions(-) create mode 100644 src/routes/page/agent/[agentId]/build/+page.svelte diff --git a/README.md b/README.md index aad250da..0fd09ddd 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # BotSharp UI -The `BotSharp UI` is a web app used to manage agents and conversations. Through it you can use it to build new Agent, manage existing Agents and conversations. -Thie project is written in [SvelteKit v2](https://svelte.dev/) and backed by [BotSharp](https://github.com/SciSharp/BotSharp) as the [LLM](https://en.wikipedia.org/wiki/Large_language_model) services. +The `BotSharp UI` is a web app used to manage agents and conversations. Through it you can build new Agent, manage existing Agents and conversations. The Node-based Agent building experience allows you to build a brand new AI assistant in a very short time. +This project is written in [SvelteKit v2](https://svelte.dev/) and backed by [BotSharp](https://github.com/SciSharp/BotSharp) as the [LLM](https://en.wikipedia.org/wiki/Large_language_model) services. [![Discord](https://img.shields.io/discord/1106946823282761851?label=Discord)](https://discord.com/channels/1106946823282761851/1106947212459642991) [![QQ群聊](https://img.shields.io/static/v1?label=QQ&message=群聊&color=brightgreen)](http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=sN9VVMwbWjs5L0ATpizKKxOcZdEPMrp8&authKey=RLDw41bLTrEyEgZZi%2FzT4pYk%2BwmEFgFcrhs8ZbkiVY7a4JFckzJefaYNW6Lk4yPX&noverify=0&group_code=985366726) diff --git a/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte b/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte index 9d5c130c..c10fce82 100644 --- a/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte +++ b/src/routes/chat/[agentId]/[conversationId]/chat-box.svelte @@ -178,7 +178,7 @@ diff --git a/src/routes/chat/[agentId]/[conversationId]/content-log.svelte b/src/routes/chat/[agentId]/[conversationId]/content-log.svelte index 735adbeb..dfaceeb1 100644 --- a/src/routes/chat/[agentId]/[conversationId]/content-log.svelte +++ b/src/routes/chat/[agentId]/[conversationId]/content-log.svelte @@ -57,10 +57,9 @@
diff --git a/src/routes/page/agent/[agentId]/build/+page.svelte b/src/routes/page/agent/[agentId]/build/+page.svelte new file mode 100644 index 00000000..3d8b4e28 --- /dev/null +++ b/src/routes/page/agent/[agentId]/build/+page.svelte @@ -0,0 +1,2 @@ + + \ No newline at end of file diff --git a/src/routes/page/agent/card-agent.svelte b/src/routes/page/agent/card-agent.svelte index 7dcd138c..c586eed2 100644 --- a/src/routes/page/agent/card-agent.svelte +++ b/src/routes/page/agent/card-agent.svelte @@ -64,9 +64,14 @@ {format(agent.updated_datetime, 'short-date')} +
  • + + Build + +
  • - Chat Test + Test
  • diff --git a/src/routes/page/agent/router/agent-configuration.svelte b/src/routes/page/agent/router/agent-configuration.svelte index c0329a16..5bd37b96 100644 --- a/src/routes/page/agent/router/agent-configuration.svelte +++ b/src/routes/page/agent/router/agent-configuration.svelte @@ -3,9 +3,6 @@ import { getSettings } from '$lib/services/agent-service.js'; import { onMount } from 'svelte'; - /** @type {import('$types').AgentModel} */ - export let agent; - /** @type {import('$types').AgentSettings} */ let settings; diff --git a/src/routes/page/agent/router/router-configuration.svelte b/src/routes/page/agent/router/router-configuration.svelte index 2ce0b7a3..f363876f 100644 --- a/src/routes/page/agent/router/router-configuration.svelte +++ b/src/routes/page/agent/router/router-configuration.svelte @@ -3,9 +3,6 @@ import { getSettings } from '$lib/services/router-service.js'; import { onMount } from 'svelte'; - /** @type {import('$types').AgentModel} */ - export let router; - /** @type {import('$types').RouterSettings} */ let settings; diff --git a/src/routes/page/conversation/[conversationId]/+page.svelte b/src/routes/page/conversation/[conversationId]/+page.svelte index 5b27469e..c424742e 100644 --- a/src/routes/page/conversation/[conversationId]/+page.svelte +++ b/src/routes/page/conversation/[conversationId]/+page.svelte @@ -38,8 +38,8 @@ - - + + {#if conversation} diff --git a/svelte.config.js b/svelte.config.js index 59600115..1b780798 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -1,8 +1,10 @@ // import adapter from '@sveltejs/adapter-auto'; import adapter from '@sveltejs/adapter-static'; +// import { vitePreprocess } from '@sveltejs/vite-plugin-svelte'; /** @type {import('@sveltejs/kit').Config} */ const config = { + // preprocess: vitePreprocess(), kit: { alias: { $types: './src/lib/helpers/types.js', @@ -38,6 +40,7 @@ const config = { "/page/agent/router", "/page/agent/evaluator", "/page/agent/[agentId]", + "/page/agent/[agentId]/build", "/page/conversation", "/page/conversation/[conversationId]", "/page/knowledge-base",