mirror of
https://git.boos.lat/aibo/BossChat.git
synced 2026-10-30 15:16:11 +00:00
refactor: rebrand from cs-agent to BossChat
- Rename Go module: cs-agent → bosschat - Rename all import paths across 200+ Go files - Rename SDK: cs-ai-agent-sdk → bosschat-sdk - Rename message protocol: cs-agent:* → bosschat:* - Rename JS globals: CSAgentConfig → BossChatConfig - Rename CSS classes: cs-agent-* → bosschat-* - Update Makefile APP_NAME and ARCHIVE_NAME - Update logo assets - Fix display name: BoosChat → BossChat
This commit is contained in:
@@ -48,13 +48,13 @@ export function AppSidebar({ ...props }: ComponentProps<typeof Sidebar>) {
|
||||
render={<Link href="/dashboard" />}
|
||||
>
|
||||
<img
|
||||
src="/images/logo.svg"
|
||||
alt="BoosChat"
|
||||
src="/images/logo.png"
|
||||
alt="BossChat"
|
||||
width="32"
|
||||
height="32"
|
||||
className="size-7 shrink-0 object-contain"
|
||||
/>
|
||||
<span className="text-base font-semibold">BoosChat</span>
|
||||
<span className="text-base font-semibold">BossChat</span>
|
||||
</SidebarMenuButton>
|
||||
</SidebarMenuItem>
|
||||
</SidebarMenu>
|
||||
|
||||
@@ -441,9 +441,9 @@ export function SharedMessageEditor({
|
||||
|
||||
function getEditorClassName(variant: SharedMessageEditorVariant) {
|
||||
if (variant === "customer") {
|
||||
return "cs-agent-scrollbar min-h-12 max-h-40 overflow-y-auto px-1.5 py-1 text-sm leading-6 text-foreground outline-none [&_p]:m-0 [&_p+*]:mt-2 [&_.cs-agent-editor-image-wrap]:my-2 [&_.cs-agent-editor-image]:max-h-64 [&_.cs-agent-editor-image]:max-w-full [&_.cs-agent-editor-image]:rounded-lg [&_.cs-agent-editor-image]:object-contain [&_.cs-agent-editor-image-wrap-uploading_.cs-agent-editor-image]:opacity-55"
|
||||
return "bosschat-scrollbar min-h-12 max-h-40 overflow-y-auto px-1.5 py-1 text-sm leading-6 text-foreground outline-none [&_p]:m-0 [&_p+*]:mt-2 [&_.bosschat-editor-image-wrap]:my-2 [&_.bosschat-editor-image]:max-h-64 [&_.bosschat-editor-image]:max-w-full [&_.bosschat-editor-image]:rounded-lg [&_.bosschat-editor-image]:object-contain [&_.bosschat-editor-image-wrap-uploading_.bosschat-editor-image]:opacity-55"
|
||||
}
|
||||
return "h-full min-h-12 max-h-[20vh] overflow-y-auto px-1.5 py-1 text-sm leading-6 text-foreground outline-none sm:max-h-none [&_.ProseMirror-focused]:outline-none [&_p]:m-0 [&_p+.cs-agent-editor-image-wrap]:mt-2 [&_.cs-agent-editor-image-wrap]:my-2 [&_.cs-agent-editor-image]:max-h-64 [&_.cs-agent-editor-image]:max-w-full [&_.cs-agent-editor-image]:rounded-md [&_.cs-agent-editor-image]:object-contain [&_.cs-agent-editor-image-wrap-uploading_.cs-agent-editor-image]:opacity-55 [&_p.is-editor-empty:first-child]:before:text-muted-foreground"
|
||||
return "h-full min-h-12 max-h-[20vh] overflow-y-auto px-1.5 py-1 text-sm leading-6 text-foreground outline-none sm:max-h-none [&_.ProseMirror-focused]:outline-none [&_p]:m-0 [&_p+.bosschat-editor-image-wrap]:mt-2 [&_.bosschat-editor-image-wrap]:my-2 [&_.bosschat-editor-image]:max-h-64 [&_.bosschat-editor-image]:max-w-full [&_.bosschat-editor-image]:rounded-md [&_.bosschat-editor-image]:object-contain [&_.bosschat-editor-image-wrap-uploading_.bosschat-editor-image]:opacity-55 [&_p.is-editor-empty:first-child]:before:text-muted-foreground"
|
||||
}
|
||||
|
||||
function getToolbarClassName(variant: SharedMessageEditorVariant) {
|
||||
|
||||
@@ -214,7 +214,7 @@ export const KefuMessageList = forwardRef<KefuMessageListHandle, KefuMessageList
|
||||
return (
|
||||
<div
|
||||
ref={containerRef}
|
||||
className="cs-agent-scrollbar flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-4 py-4"
|
||||
className="bosschat-scrollbar flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto px-4 py-4"
|
||||
>
|
||||
<div ref={contentRef} className="flex flex-col gap-4">
|
||||
{hasMoreOlder && onLoadOlder ? (
|
||||
|
||||
@@ -6,7 +6,7 @@ import { useEffect, useMemo, useState } from "react"
|
||||
|
||||
import type { CSAgentConfig } from "@/lib/sdk/config-types"
|
||||
|
||||
const STORAGE_KEY = "cs-agent-web-widget-test-config"
|
||||
const STORAGE_KEY = "bosschat-web-widget-test-config"
|
||||
const DEFAULT_JWT_TTL_MINUTES = "30"
|
||||
const INITIAL_CONFIG: CSAgentConfig = {
|
||||
channelId: "",
|
||||
@@ -55,7 +55,7 @@ function removeMountedWidget() {
|
||||
window.CSAgentWidget?.destroy()
|
||||
document
|
||||
.querySelectorAll(
|
||||
'[data-cs-agent-widget="launcher"], [data-cs-agent-widget="frame"], [data-cs-agent-widget="script"]'
|
||||
'[data-bosschat-widget="launcher"], [data-bosschat-widget="frame"], [data-bosschat-widget="script"]'
|
||||
)
|
||||
.forEach((node) => node.remove())
|
||||
|
||||
@@ -71,8 +71,8 @@ function injectWidget(config: CSAgentConfig) {
|
||||
|
||||
const script = document.createElement("script")
|
||||
script.async = true
|
||||
script.src = `${window.location.origin}/sdk/cs-ai-agent-sdk.min.js`
|
||||
script.dataset.csAgentWidget = "script"
|
||||
script.src = `${window.location.origin}/sdk/bosschat-sdk.min.js`
|
||||
script.dataset.bossChatWidget = "script"
|
||||
document.body.appendChild(script)
|
||||
}
|
||||
|
||||
@@ -182,8 +182,8 @@ export function KefuWidgetDemo() {
|
||||
|
||||
const snippet = useMemo(() => {
|
||||
const scriptSrc = origin
|
||||
? `${origin}/sdk/cs-ai-agent-sdk.min.js`
|
||||
: "/sdk/cs-ai-agent-sdk.min.js"
|
||||
? `${origin}/sdk/bosschat-sdk.min.js`
|
||||
: "/sdk/bosschat-sdk.min.js"
|
||||
|
||||
const configLines = [` channelId: "${config.channelId || ""}"`]
|
||||
if (config.authMode === "jwt") {
|
||||
|
||||
@@ -84,9 +84,9 @@ export function LoginForm({
|
||||
<FieldGroup>
|
||||
<div className="flex flex-col gap-2 text-center">
|
||||
<span className="mx-auto inline-flex rounded-full border border-amber-300/60 bg-amber-50 px-3 py-1 text-[11px] font-medium tracking-[0.22em] text-amber-900 uppercase">
|
||||
BoosChat
|
||||
BossChat
|
||||
</span>
|
||||
<h1 className="text-3xl font-semibold tracking-tight">欢迎使用 BoosChat 客服平台</h1>
|
||||
<h1 className="text-3xl font-semibold tracking-tight">欢迎使用 BossChat 客服平台</h1>
|
||||
</div>
|
||||
<Field>
|
||||
<FieldLabel htmlFor="username">用户名</FieldLabel>
|
||||
|
||||
Reference in New Issue
Block a user