Skip to content

Commit

Permalink
Allow to customize the Plugin default icon.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oceania2018 committed Jan 13, 2024
1 parent 11c3c8d commit 4dd28b5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ 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
PUBLIC_COMPANY_NAME=SciSharp STACK
PUBLIC_PLUGIN_DEFAULT_ICON=https://avatars.githubusercontent.com/u/44989469?s=200&v=4
1 change: 1 addition & 0 deletions src/lib/helpers/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
* @property {Date} created_datetime
* @property {Date} updated_datetime
* @property {AgentLlmConfig} llm_config - LLM settings.
* @property {PluginDefModel} plugin
* @property {FunctionDef[]} functions
* @property {AgentTemplate[]} templates
* @property {Object[]} responses
Expand Down
1 change: 1 addition & 0 deletions src/routes/page/agent/card-agent.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
{agent.name}
</Link>
</h5>
<p>Provided by {agent.plugin.name}</p>
<p class="text-muted mb-4" style="height: 35px;">{agent.description}</p>
<div class="avatar-group" style="height:35px;">
{#if agent.is_router}
Expand Down
3 changes: 2 additions & 1 deletion src/routes/page/plugin/plugin-list.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
} from '@sveltestrap/sveltestrap';
import { enablePlugin, disablePlugin } from '$lib/services/plugin-service';
import { goto } from '$app/navigation';
import { PUBLIC_PLUGIN_DEFAULT_ICON } from '$env/static/public';
/** @type {import('$types').PluginDefModel[]} */
export let plugins;
Expand Down Expand Up @@ -42,7 +43,7 @@
<div class="favorite-icon">
<Link href="#"><i class="uil uil-heart-alt fs-18" /></Link>
</div>
<img src="{item.icon_url}" alt="{item.name}" height="35" class="mb-3" />
<img src={item.icon_url ? item.icon_url : PUBLIC_PLUGIN_DEFAULT_ICON} alt="{item.name}" height="35" class="mb-3" />
<h5 class="fs-17 mb-2">
<Link href="#" class="text-dark">{item.name}</Link>
<small class="text-muted fw-normal">plugin</small>
Expand Down

0 comments on commit 4dd28b5

Please sign in to comment.