v0.1.4-p4

main
mula.liu 2026-04-01 17:20:17 +08:00
parent ad59bc3794
commit 0167a9bc8a
6 changed files with 34 additions and 25 deletions

View File

@ -386,7 +386,6 @@ export function ChannelConfigModal({
open={open}
onClose={onClose}
title={labels.wizardSectionTitle}
subtitle={labels.wizardSectionDesc}
size="extend"
closeLabel={labels.close}
bodyClassName="ops-config-drawer-body"
@ -418,9 +417,6 @@ export function ChannelConfigModal({
)}
>
<div className="ops-config-modal">
<div className="card" style={{ fontSize: 12, color: 'var(--muted)' }}>
{labels.wizardSectionDesc}
</div>
<div className="card">
<div className="section-mini-title">{labels.globalDeliveryTitle}</div>
<div className="field-label">{labels.globalDeliveryDesc}</div>
@ -702,7 +698,6 @@ export function TopicConfigModal({
open={open}
onClose={onClose}
title={labels.topicPanel}
subtitle={labels.topicPanelDesc}
size="extend"
closeLabel={labels.close}
bodyClassName="ops-config-drawer-body"
@ -731,9 +726,6 @@ export function TopicConfigModal({
)}
>
<div className="ops-config-modal">
<div className="card" style={{ fontSize: 12, color: 'var(--muted)' }}>
{labels.topicPanelDesc}
</div>
<div className="wizard-channel-list ops-config-list-scroll">
{topics.length === 0 ? (
<div className="ops-empty-inline">{labels.topicEmpty}</div>

View File

@ -11,3 +11,14 @@
color: var(--subtitle);
font-weight: 700;
}
.ops-model-test-btn {
margin-top: 16px;
display: inline-flex;
align-items: center;
gap: 8px;
}
.ops-model-test-result {
margin-top: 12px;
}

View File

@ -1,4 +1,4 @@
import { RefreshCw, X } from 'lucide-react';
import { PlugZap, RefreshCw, X } from 'lucide-react';
import { DrawerShell } from '../../../components/DrawerShell';
import { LucentSelect } from '../../../components/lucent/LucentSelect';
@ -370,10 +370,11 @@ export function ParamConfigModal({
<label className="field-label">API Base</label>
<input className="input" value={editForm.api_base} onChange={(e) => onEditFormChange({ api_base: e.target.value })} placeholder="API Base URL" />
<button className="btn btn-secondary" onClick={() => void onTestProviderConnection()} disabled={isTestingProvider}>
{isTestingProvider ? labels.testing : labels.testModelConnection}
<button className="btn btn-secondary ops-model-test-btn" onClick={() => void onTestProviderConnection()} disabled={isTestingProvider}>
{isTestingProvider ? <RefreshCw size={14} className="animate-spin" /> : <PlugZap size={14} />}
<span>{isTestingProvider ? labels.testing : labels.testModelConnection}</span>
</button>
{providerTestResult ? <div className="card">{providerTestResult}</div> : null}
{providerTestResult ? <div className="card ops-model-test-result">{providerTestResult}</div> : null}
<div className="slider-row">
<label className="field-label">Temperature: {Number(editForm.temperature).toFixed(2)}</label>

View File

@ -14,6 +14,7 @@
min-height: clamp(480px, 68vh, 760px);
display: flex;
flex-direction: column;
gap: 14px;
}
.ops-config-drawer-body {
@ -39,6 +40,14 @@
padding-right: 4px;
}
.ops-config-list-scroll > .wizard-channel-card {
margin: 0 0 14px;
}
.ops-config-list-scroll > .wizard-channel-card:last-child {
margin-bottom: 0;
}
.ops-config-card-header {
display: flex;
align-items: flex-start;
@ -220,6 +229,13 @@
display: inline-flex;
}
.ops-section-header {
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: 12px;
}
.ops-skill-add-bar {
display: flex;
align-items: center;

View File

@ -103,13 +103,8 @@ export function SkillsModal({
>
<div className="stack">
<div className="stack">
<div className="row-between">
<div>
<div className="section-mini-title">{isZh ? '已安装技能' : 'Installed Skills'}</div>
<div className="field-label">
{isZh ? '这里展示当前 Bot 工作区中的技能。' : 'These skills are already present in the bot workspace.'}
</div>
</div>
<div className="ops-section-header">
<div className="section-mini-title">{isZh ? '已安装技能' : 'Installed Skills'}</div>
<div className="field-label">
{isZh ? `${botSkills.length} 个已安装` : `${botSkills.length} installed`}
</div>
@ -196,7 +191,6 @@ export function McpConfigModal({
open={open}
onClose={onClose}
title={labels.mcpPanel}
subtitle={labels.mcpPanelDesc}
size="extend"
closeLabel={labels.close}
bodyClassName="ops-config-drawer-body"
@ -213,7 +207,6 @@ export function McpConfigModal({
)}
>
<div className="ops-config-modal">
<div className="field-label" style={{ marginBottom: 8 }}>{labels.mcpPanelDesc}</div>
<div className="wizard-channel-list ops-config-list-scroll">
{mcpServers.length === 0 ? (
<div className="ops-empty-inline">{labels.mcpEmpty}</div>

View File

@ -109,7 +109,6 @@ export function EnvParamsModal({
open={open}
onClose={onClose}
title={labels.envParams}
subtitle={labels.envParamsDesc}
size="standard"
bodyClassName="ops-config-drawer-body"
closeLabel={labels.close}
@ -126,9 +125,6 @@ export function EnvParamsModal({
)}
>
<div className="ops-config-modal">
<div className="card" style={{ fontSize: 12, color: 'var(--muted)' }}>
{labels.envParamsDesc}
</div>
<div className="wizard-channel-list ops-config-list-scroll">
{envEntries.length === 0 ? (
<div className="ops-empty-inline">{labels.noEnvParams}</div>