mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-17 01:46:07 +00:00
fix: remove internal adapter terminology from UI
This commit is contained in:
committed by
huanghuoguoguo
parent
bdc6704d88
commit
6dd296612b
@@ -138,9 +138,9 @@ export default function BotForm({
|
||||
const currentAdapter = form.watch('adapter');
|
||||
const currentAdapterConfig = form.watch('adapter_config');
|
||||
|
||||
// Group adapters by category for the Select dropdown. Legacy adapters
|
||||
// (those superseded by an EBA implementation) are split out and shown in a
|
||||
// collapsed group at the bottom so they're de-emphasized but still usable.
|
||||
// Group adapters by category for the Select dropdown. Legacy adapters are
|
||||
// split out and shown in a collapsed group at the bottom so they're
|
||||
// de-emphasized but still usable for existing configurations.
|
||||
const activeAdapters = useMemo(
|
||||
() => adapterNameList.filter((a) => !a.legacy),
|
||||
[adapterNameList],
|
||||
@@ -490,19 +490,32 @@ export default function BotForm({
|
||||
}}
|
||||
value={field.value}
|
||||
>
|
||||
<SelectTrigger className="w-[240px]">
|
||||
<SelectTrigger className="w-[240px] overflow-hidden">
|
||||
{field.value ? (
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex min-w-0 items-center gap-2">
|
||||
<img
|
||||
src={httpClient.getAdapterIconURL(field.value)}
|
||||
alt=""
|
||||
className="h-5 w-5 rounded"
|
||||
className="h-5 w-5 shrink-0 rounded"
|
||||
/>
|
||||
<span>
|
||||
{adapterNameList.find(
|
||||
{(() => {
|
||||
const selectedAdapter = adapterNameList.find(
|
||||
(a) => a.value === field.value,
|
||||
)?.label ?? field.value}
|
||||
</span>
|
||||
);
|
||||
|
||||
return (
|
||||
<>
|
||||
<span className="min-w-0 truncate">
|
||||
{selectedAdapter?.label ?? field.value}
|
||||
</span>
|
||||
{selectedAdapter?.legacy && (
|
||||
<span className="shrink-0 rounded border border-amber-200 bg-amber-50 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-300">
|
||||
{t('bots.legacyAdapterBadge')}
|
||||
</span>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
})()}
|
||||
</div>
|
||||
) : (
|
||||
<SelectValue
|
||||
@@ -525,15 +538,17 @@ export default function BotForm({
|
||||
key={`${group.categoryId ?? 'uncategorized'}:${item.value}`}
|
||||
value={item.value}
|
||||
>
|
||||
<div className="flex items-center gap-2">
|
||||
<div className="flex min-w-0 w-full items-center gap-2">
|
||||
<img
|
||||
src={httpClient.getAdapterIconURL(
|
||||
item.value,
|
||||
)}
|
||||
alt=""
|
||||
className="h-5 w-5 rounded"
|
||||
className="h-5 w-5 shrink-0 rounded"
|
||||
/>
|
||||
<span>{item.label}</span>
|
||||
<span className="min-w-0 truncate">
|
||||
{item.label}
|
||||
</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
))}
|
||||
@@ -578,15 +593,20 @@ export default function BotForm({
|
||||
key={`legacy:${item.value}`}
|
||||
value={item.value}
|
||||
>
|
||||
<div className="flex items-center gap-2 opacity-70">
|
||||
<div className="flex min-w-0 w-full items-center gap-2 opacity-70">
|
||||
<img
|
||||
src={httpClient.getAdapterIconURL(
|
||||
item.value,
|
||||
)}
|
||||
alt=""
|
||||
className="h-5 w-5 rounded grayscale"
|
||||
className="h-5 w-5 shrink-0 rounded grayscale"
|
||||
/>
|
||||
<span>{item.label}</span>
|
||||
<span className="min-w-0 truncate">
|
||||
{item.label}
|
||||
</span>
|
||||
<span className="ml-auto shrink-0 rounded border border-amber-200 bg-amber-50 px-1.5 py-0.5 text-[10px] font-medium text-amber-700 dark:border-amber-900/50 dark:bg-amber-950/30 dark:text-amber-300">
|
||||
{t('bots.legacyAdapterBadge')}
|
||||
</span>
|
||||
</div>
|
||||
</SelectItem>
|
||||
))}
|
||||
|
||||
@@ -340,8 +340,9 @@ const enUS = {
|
||||
platformAdapter: 'Platform/Adapter Selection',
|
||||
selectAdapter: 'Select Adapter',
|
||||
legacyAdapters: 'Legacy adapters',
|
||||
legacyAdapterBadge: 'Legacy',
|
||||
legacyAdaptersHint:
|
||||
'These adapters are superseded by their newer (EBA) versions. They are kept only for existing configurations and are not recommended for new bots.',
|
||||
'These adapters have newer event-driven counterparts. They are kept only for existing configurations and are not recommended for new bots.',
|
||||
adapterConfig: 'Adapter Configuration',
|
||||
viewAdapterDocs: 'View Docs',
|
||||
bindPipeline: 'Bind Pipeline',
|
||||
@@ -535,7 +536,7 @@ const enUS = {
|
||||
selectFromSidebar: 'Select an Agent or Pipeline from the sidebar',
|
||||
agentOrchestration: 'Agent Orchestration',
|
||||
agentOrchestrationDescription:
|
||||
'Event-first handling logic for messages, group members, friends, feedback, and other EBA events.',
|
||||
'Event-first handling logic for messages, group members, friends, feedback, and other platform events.',
|
||||
pipelineType: 'Pipeline',
|
||||
kindBadgeAgent: 'Agent',
|
||||
kindBadgePipeline: 'Pipeline',
|
||||
@@ -543,7 +544,7 @@ const enUS = {
|
||||
groupByKindShort: 'Group',
|
||||
pipelineTypeDescription:
|
||||
'Keep the existing no-code message pipeline for backward compatibility. It only handles message events.',
|
||||
allEvents: 'Supports all EBA events',
|
||||
allEvents: 'Supports all events',
|
||||
messageEventsOnly: 'Message events only',
|
||||
basicInfo: 'Basic Information',
|
||||
basicInfoDescription: 'Set the name, icon, description and enabled state',
|
||||
|
||||
@@ -350,6 +350,10 @@ const esES = {
|
||||
deleteConfirmation: '¿Estás seguro de que deseas eliminar este Bot?',
|
||||
platformAdapter: 'Selección de plataforma/adaptador',
|
||||
selectAdapter: 'Seleccionar adaptador',
|
||||
legacyAdapters: 'Adaptadores heredados',
|
||||
legacyAdapterBadge: 'Heredado',
|
||||
legacyAdaptersHint:
|
||||
'Estos adaptadores tienen versiones nuevas orientadas a eventos. Se mantienen solo para configuraciones existentes y no se recomiendan para Bots nuevos.',
|
||||
adapterConfig: 'Configuración del adaptador',
|
||||
viewAdapterDocs: 'Ver documentación',
|
||||
bindPipeline: 'Vincular Pipeline',
|
||||
@@ -486,7 +490,7 @@ const esES = {
|
||||
selectFromSidebar: 'Selecciona un Agent o Pipeline desde la barra lateral',
|
||||
agentOrchestration: 'Orquestación de Agent',
|
||||
agentOrchestrationDescription:
|
||||
'Lógica de procesamiento orientada a eventos EBA para mensajes, miembros de grupo, amigos, retroalimentación y otros eventos.',
|
||||
'Lógica de procesamiento orientada a eventos para mensajes, miembros de grupo, amigos, retroalimentación y otros eventos de plataforma.',
|
||||
pipelineType: 'Pipeline',
|
||||
kindBadgeAgent: 'Agent',
|
||||
kindBadgePipeline: 'Pipeline',
|
||||
@@ -494,7 +498,7 @@ const esES = {
|
||||
groupByKindShort: 'Agrupar',
|
||||
pipelineTypeDescription:
|
||||
'Mantiene el pipeline de mensajes sin código para compatibilidad con versiones anteriores. Solo procesa eventos de mensaje.',
|
||||
allEvents: 'Compatible con todos los eventos EBA',
|
||||
allEvents: 'Compatible con todos los eventos',
|
||||
messageEventsOnly: 'Solo eventos de mensaje',
|
||||
basicInfo: 'Información básica',
|
||||
basicInfoDescription:
|
||||
|
||||
@@ -345,6 +345,10 @@ const jaJP = {
|
||||
deleteConfirmation: '本当にこのボットを削除しますか?',
|
||||
platformAdapter: 'プラットフォーム/アダプター選択',
|
||||
selectAdapter: 'アダプターを選択',
|
||||
legacyAdapters: '旧式アダプター',
|
||||
legacyAdapterBadge: '旧式',
|
||||
legacyAdaptersHint:
|
||||
'これらのアダプターには新しいイベント駆動の接続方式があります。既存設定との互換性のために残しており、新規ボットには推奨されません。',
|
||||
adapterConfig: 'アダプター設定',
|
||||
viewAdapterDocs: 'ドキュメントを見る',
|
||||
bindPipeline: 'パイプラインを紐付け',
|
||||
@@ -519,7 +523,7 @@ const jaJP = {
|
||||
'サイドバーから Agent または Pipeline を選択してください',
|
||||
agentOrchestration: 'Agent 編成',
|
||||
agentOrchestrationDescription:
|
||||
'メッセージ、グループメンバー、友だち、フィードバックなどの EBA イベント向けの処理ロジックです。',
|
||||
'メッセージ、グループメンバー、友だち、フィードバックなどのプラットフォームイベント向けの処理ロジックです。',
|
||||
pipelineType: 'Pipeline',
|
||||
kindBadgeAgent: 'Agent',
|
||||
kindBadgePipeline: 'パイプライン',
|
||||
@@ -527,7 +531,7 @@ const jaJP = {
|
||||
groupByKindShort: 'グループ',
|
||||
pipelineTypeDescription:
|
||||
'既存のノーコードメッセージ Pipeline を互換性のため保持します。メッセージイベントのみ処理できます。',
|
||||
allEvents: 'すべての EBA イベントに対応',
|
||||
allEvents: 'すべてのイベントに対応',
|
||||
messageEventsOnly: 'メッセージイベントのみ',
|
||||
basicInfo: '基本情報',
|
||||
basicInfoDescription: '名前、アイコン、説明、有効状態を設定します',
|
||||
|
||||
@@ -349,6 +349,10 @@ const ruRU = {
|
||||
deleteConfirmation: 'Вы уверены, что хотите удалить этого бота?',
|
||||
platformAdapter: 'Выбор платформы/адаптера',
|
||||
selectAdapter: 'Выберите адаптер',
|
||||
legacyAdapters: 'Устаревшие адаптеры',
|
||||
legacyAdapterBadge: 'Устаревший',
|
||||
legacyAdaptersHint:
|
||||
'У этих адаптеров есть новые событийные версии. Они сохранены только для существующих конфигураций и не рекомендуются для новых ботов.',
|
||||
adapterConfig: 'Настройка адаптера',
|
||||
viewAdapterDocs: 'Документация',
|
||||
bindPipeline: 'Привязать конвейер',
|
||||
@@ -484,7 +488,7 @@ const ruRU = {
|
||||
selectFromSidebar: 'Выберите Agent или Pipeline на боковой панели',
|
||||
agentOrchestration: 'Оркестровка Agent',
|
||||
agentOrchestrationDescription:
|
||||
'Логика обработки событий EBA для сообщений, участников групп, друзей, обратной связи и других событий.',
|
||||
'Логика обработки сообщений, участников групп, друзей, обратной связи и других событий платформы.',
|
||||
pipelineType: 'Pipeline',
|
||||
kindBadgeAgent: 'Agent',
|
||||
kindBadgePipeline: 'Pipeline',
|
||||
@@ -492,7 +496,7 @@ const ruRU = {
|
||||
groupByKindShort: 'Группа',
|
||||
pipelineTypeDescription:
|
||||
'Сохраняет существующий no-code конвейер сообщений для обратной совместимости. Обрабатывает только события сообщений.',
|
||||
allEvents: 'Поддерживает все события EBA',
|
||||
allEvents: 'Поддерживает все события',
|
||||
messageEventsOnly: 'Только события сообщений',
|
||||
basicInfo: 'Основная информация',
|
||||
basicInfoDescription: 'Задайте имя, иконку, описание и статус активации',
|
||||
|
||||
@@ -335,6 +335,10 @@ const thTH = {
|
||||
deleteConfirmation: 'คุณแน่ใจหรือไม่ว่าต้องการลบ Bot นี้?',
|
||||
platformAdapter: 'การเลือกแพลตฟอร์ม/อะแดปเตอร์',
|
||||
selectAdapter: 'เลือกอะแดปเตอร์',
|
||||
legacyAdapters: 'อะแดปเตอร์รุ่นเก่า',
|
||||
legacyAdapterBadge: 'เก่า',
|
||||
legacyAdaptersHint:
|
||||
'อะแดปเตอร์เหล่านี้มีรุ่นใหม่แบบขับเคลื่อนด้วยเหตุการณ์แล้ว และเก็บไว้เพื่อความเข้ากันได้กับการตั้งค่าเดิมเท่านั้น ไม่แนะนำสำหรับ Bot ใหม่',
|
||||
adapterConfig: 'การกำหนดค่าอะแดปเตอร์',
|
||||
viewAdapterDocs: 'ดูเอกสาร',
|
||||
bindPipeline: 'ผูก Pipeline',
|
||||
@@ -470,7 +474,7 @@ const thTH = {
|
||||
selectFromSidebar: 'เลือก Agent หรือ Pipeline จากแถบด้านข้าง',
|
||||
agentOrchestration: 'การประสาน Agent',
|
||||
agentOrchestrationDescription:
|
||||
'ตรรกะการประมวลผลที่เน้นเหตุการณ์ EBA สำหรับข้อความ สมาชิกกลุ่ม เพื่อน ฟีดแบ็ก และเหตุการณ์อื่นๆ',
|
||||
'ตรรกะการประมวลผลที่เน้นเหตุการณ์สำหรับข้อความ สมาชิกกลุ่ม เพื่อน ฟีดแบ็ก และเหตุการณ์แพลตฟอร์มอื่นๆ',
|
||||
pipelineType: 'Pipeline',
|
||||
kindBadgeAgent: 'Agent',
|
||||
kindBadgePipeline: 'Pipeline',
|
||||
@@ -478,7 +482,7 @@ const thTH = {
|
||||
groupByKindShort: 'จัดกลุ่ม',
|
||||
pipelineTypeDescription:
|
||||
'คงไว้ซึ่ง pipeline ข้อความแบบไม่ต้องเขียนโค้ดเพื่อความเข้ากันได้ย้อนหลัง รองรับเฉพาะเหตุการณ์ข้อความ',
|
||||
allEvents: 'รองรับทุกเหตุการณ์ EBA',
|
||||
allEvents: 'รองรับทุกเหตุการณ์',
|
||||
messageEventsOnly: 'เฉพาะเหตุการณ์ข้อความ',
|
||||
basicInfo: 'ข้อมูลพื้นฐาน',
|
||||
basicInfoDescription: 'ตั้งชื่อ ไอคอน คำอธิบาย และสถานะการเปิดใช้งาน',
|
||||
|
||||
@@ -345,6 +345,10 @@ const viVN = {
|
||||
deleteConfirmation: 'Bạn có chắc chắn muốn xóa Bot này không?',
|
||||
platformAdapter: 'Nền tảng/Lựa chọn Adapter',
|
||||
selectAdapter: 'Chọn Adapter',
|
||||
legacyAdapters: 'Adapter cũ',
|
||||
legacyAdapterBadge: 'Cũ',
|
||||
legacyAdaptersHint:
|
||||
'Các adapter này đã có phiên bản hướng sự kiện mới hơn. Chúng chỉ được giữ lại để tương thích với cấu hình hiện có và không được khuyến nghị cho Bot mới.',
|
||||
adapterConfig: 'Cấu hình Adapter',
|
||||
viewAdapterDocs: 'Xem tài liệu',
|
||||
bindPipeline: 'Liên kết Pipeline',
|
||||
@@ -480,7 +484,7 @@ const viVN = {
|
||||
selectFromSidebar: 'Chọn một Agent hoặc Pipeline từ thanh bên',
|
||||
agentOrchestration: 'Dàn dựng Agent',
|
||||
agentOrchestrationDescription:
|
||||
'Logic xử lý hướng sự kiện cho tin nhắn, thành viên nhóm, bạn bè, phản hồi và các sự kiện EBA khác.',
|
||||
'Logic xử lý hướng sự kiện cho tin nhắn, thành viên nhóm, bạn bè, phản hồi và các sự kiện nền tảng khác.',
|
||||
pipelineType: 'Pipeline',
|
||||
kindBadgeAgent: 'Agent',
|
||||
kindBadgePipeline: 'Pipeline',
|
||||
@@ -488,7 +492,7 @@ const viVN = {
|
||||
groupByKindShort: 'Nhóm',
|
||||
pipelineTypeDescription:
|
||||
'Giữ lại pipeline tin nhắn không cần mã hiện có để tương thích ngược. Chỉ xử lý sự kiện tin nhắn.',
|
||||
allEvents: 'Hỗ trợ tất cả sự kiện EBA',
|
||||
allEvents: 'Hỗ trợ tất cả sự kiện',
|
||||
messageEventsOnly: 'Chỉ sự kiện tin nhắn',
|
||||
basicInfo: 'Thông tin cơ bản',
|
||||
basicInfoDescription: 'Đặt tên, biểu tượng, mô tả và trạng thái kích hoạt',
|
||||
|
||||
@@ -325,8 +325,9 @@ const zhHans = {
|
||||
platformAdapter: '平台/适配器选择',
|
||||
selectAdapter: '选择适配器',
|
||||
legacyAdapters: '旧版适配器',
|
||||
legacyAdapterBadge: '过时',
|
||||
legacyAdaptersHint:
|
||||
'这些适配器已被新版(EBA 架构)取代,仅为兼容存量配置保留,不建议新建机器人时使用。',
|
||||
'这些适配器已有对应的事件驱动接入版本,仅为兼容存量配置保留,不建议新建机器人时使用。',
|
||||
adapterConfig: '适配器配置',
|
||||
viewAdapterDocs: '查看文档',
|
||||
bindPipeline: '绑定流水线',
|
||||
@@ -514,7 +515,7 @@ const zhHans = {
|
||||
selectFromSidebar: '从侧边栏选择一个 Agent 或 Pipeline',
|
||||
agentOrchestration: 'Agent 编排',
|
||||
agentOrchestrationDescription:
|
||||
'面向 EBA 事件的处理逻辑,可用于消息、群成员、好友、反馈等事件。',
|
||||
'面向平台事件的处理逻辑,可用于消息、群成员、好友、反馈等事件。',
|
||||
pipelineType: 'Pipeline',
|
||||
kindBadgeAgent: 'Agent',
|
||||
kindBadgePipeline: '流水线',
|
||||
@@ -522,7 +523,7 @@ const zhHans = {
|
||||
groupByKindShort: '分组',
|
||||
pipelineTypeDescription:
|
||||
'保留现有无代码消息流水线,兼容旧配置,只能处理消息事件。',
|
||||
allEvents: '支持全部 EBA 事件',
|
||||
allEvents: '支持全部事件',
|
||||
messageEventsOnly: '仅支持消息事件',
|
||||
basicInfo: '基础信息',
|
||||
basicInfoDescription: '设置名称、图标、描述和启用状态',
|
||||
|
||||
@@ -324,6 +324,10 @@ const zhHant = {
|
||||
deleteConfirmation: '您確定要刪除這個機器人嗎?',
|
||||
platformAdapter: '平台/適配器選擇',
|
||||
selectAdapter: '選擇適配器',
|
||||
legacyAdapters: '舊版適配器',
|
||||
legacyAdapterBadge: '過時',
|
||||
legacyAdaptersHint:
|
||||
'這些適配器已有對應的事件驅動接入版本,僅為相容既有設定保留,不建議新建機器人時使用。',
|
||||
adapterConfig: '適配器設定',
|
||||
viewAdapterDocs: '查看文檔',
|
||||
bindPipeline: '綁定流程線',
|
||||
@@ -454,7 +458,7 @@ const zhHant = {
|
||||
selectFromSidebar: '從側邊欄選擇一個 Agent 或 Pipeline',
|
||||
agentOrchestration: 'Agent 編排',
|
||||
agentOrchestrationDescription:
|
||||
'面向 EBA 事件的處理邏輯,可用於訊息、群成員、好友、回饋等事件。',
|
||||
'面向平台事件的處理邏輯,可用於訊息、群成員、好友、回饋等事件。',
|
||||
pipelineType: 'Pipeline',
|
||||
kindBadgeAgent: 'Agent',
|
||||
kindBadgePipeline: '流水線',
|
||||
@@ -462,7 +466,7 @@ const zhHant = {
|
||||
groupByKindShort: '分組',
|
||||
pipelineTypeDescription:
|
||||
'保留現有無程式碼訊息流水線,相容舊設定,只能處理訊息事件。',
|
||||
allEvents: '支援全部 EBA 事件',
|
||||
allEvents: '支援全部事件',
|
||||
messageEventsOnly: '僅支援訊息事件',
|
||||
basicInfo: '基本資訊',
|
||||
basicInfoDescription: '設定名稱、圖示、描述和啟用狀態',
|
||||
|
||||
Reference in New Issue
Block a user