feat: 合并代码后 系统设置 ui样式优化、bug修复、全局统一图标对齐等

This commit is contained in:
zhanjunhao
2026-11-10 17:27:36 +08:00
parent 23824dad32
commit 425077f94b
195 changed files with 3546 additions and 1984 deletions
+62 -34
View File
@@ -17,6 +17,20 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import {
Bot as ActionBot,
ArrowRight as ActionArrowRight,
ArrowLeft as ActionArrowLeft,
CheckCircle2 as ActionCheckCircle2,
FileUp as ActionFileUp,
X as ActionX,
Send as ActionSend,
RotateCcw as ActionRotateCcw,
Copy as ActionCopy,
ThumbsUp as ActionThumbsUp,
ThumbsDown as ActionThumbsDown,
Download as ActionDownload,
} from '@/components/common/icons/ActionIcons';
import { writeClipboardText } from '../../helpers/clipboard';
import React, {
useCallback,
@@ -39,28 +53,18 @@ import {
TextArea,
} from '@/components/ui';
import {
ArrowLeft,
ArrowRight,
Bot,
BriefcaseBusiness,
BookOpenCheck,
CheckCircle2,
CircleDashed,
Clock3,
Copy,
Download,
FileText,
FileUp,
ListChecks,
MessageSquareMore,
RotateCcw,
Send,
Sparkles,
Square,
ThumbsDown,
ThumbsUp,
TriangleAlert,
X,
} from 'lucide-react';
import ReactMarkdown from 'react-markdown';
import remarkGfm from 'remark-gfm';
@@ -1822,14 +1826,21 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
<nav className='brain-tabs' aria-label={t('云端大脑导航')}>
<button
type='button'
className={view === 'experts' ? 'is-active' : ''}
className={[
'app-action-button',
view === 'experts' ? 'is-active' : '',
]
.filter(Boolean)
.join(' ')}
onClick={() => setView('experts')}
>
<Bot size={17} /> {t('专家广场')}
<ActionBot size={17} /> {t('专家广场')}
</button>
<button
type='button'
className={view === 'runs' ? 'is-active' : ''}
className={['app-action-button', view === 'runs' ? 'is-active' : '']
.filter(Boolean)
.join(' ')}
onClick={() => setView('runs')}
>
<ListChecks size={17} /> {t('我的任务')}
@@ -2034,14 +2045,14 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
</div>
<button
type='button'
className='brain-card-action'
className='app-action-button brain-card-action'
onClick={(event) => {
// 阻断冒泡到整卡 onClick,避免同一动作双触发
event.stopPropagation();
setSelectedExpert(expert);
}}
>
{t('开始任务')} <ArrowRight size={16} />
{t('开始任务')} <ActionArrowRight size={16} />
</button>
</article>
);
@@ -2055,10 +2066,10 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
<>
<button
type='button'
className='brain-back'
className='app-action-button brain-back'
onClick={() => setSelectedExpert(null)}
>
<ArrowLeft size={16} /> {t('返回专家列表')}
<ActionArrowLeft size={16} /> {t('返回专家列表')}
</button>
<div className='brain-composer-heading'>
<span className='brain-composer-mark'>
@@ -2122,7 +2133,12 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
key={skill.skill_id}
title={skill.description}
disabled={atLimit}
className={`brain-skill-chip ${checked ? 'is-checked' : ''}`}
className={[
'app-action-button',
`brain-skill-chip ${checked ? 'is-checked' : ''}`,
]
.filter(Boolean)
.join(' ')}
onClick={() =>
setManualSkillIds((previous) =>
previous.includes(skill.skill_id)
@@ -2133,7 +2149,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
)
}
>
{checked ? <CheckCircle2 size={13} /> : null}
{checked ? <ActionCheckCircle2 size={13} /> : null}
{skill.name || skill.canonical_id}
</button>
);
@@ -2150,7 +2166,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
onChange={uploadAttachment}
/>
<Button
icon={<FileUp size={16} />}
icon={<ActionFileUp size={16} />}
loading={attachmentBusy}
disabled={attachmentBusy || attachments.length >= 5}
onClick={() => attachmentInputRef.current?.click()}
@@ -2174,11 +2190,12 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
)}
</em>
<button
className='app-action-button'
type='button'
aria-label={t('移除附件')}
onClick={() => removeAttachment(attachment)}
>
<X size={14} />
<ActionX size={14} />
</button>
</div>
))}
@@ -2194,7 +2211,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
type='primary'
size='large'
block
icon={<Send size={17} />}
icon={<ActionSend size={17} />}
loading={submitting}
disabled={
!input.trim() ||
@@ -2226,7 +2243,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
<strong>{runs.length}</strong>
</div>
<Button
icon={<RotateCcw size={15} />}
icon={<ActionRotateCcw size={15} />}
onClick={loadRuns}
aria-label={t('刷新任务')}
/>
@@ -2329,14 +2346,17 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
<Button onClick={cancelRun}>{t('取消任务')}</Button>
)}
{runDetail.artifact?.content && (
<Button icon={<Copy size={15} />} onClick={copyArtifact}>
<Button
icon={<ActionCopy size={15} />}
onClick={copyArtifact}
>
{t('复制')}
</Button>
)}
{runDetail.artifact?.content &&
terminalStatuses.has(activeRun.status) && (
<Button
icon={<RotateCcw size={15} />}
icon={<ActionRotateCcw size={15} />}
onClick={() => setRevisionOpen((open) => !open)}
>
{t('修订产物')}
@@ -2383,7 +2403,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
<Button
theme='solid'
type='primary'
icon={<Send size={15} />}
icon={<ActionSend size={15} />}
loading={revising}
disabled={!revisionInstruction.trim()}
onClick={reviseRun}
@@ -2536,7 +2556,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
size='small'
theme='light'
type='danger'
icon={<Copy size={13} />}
icon={<ActionCopy size={13} />}
onClick={copyErrorReport}
>
{t('复制报错信息')}
@@ -2583,20 +2603,28 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
</button>
)}
<button
className={feedback === 'useful' ? 'is-active' : ''}
className={[
'app-action-button',
feedback === 'useful' ? 'is-active' : '',
]
.filter(Boolean)
.join(' ')}
onClick={() => submitFeedback('useful')}
aria-label={t('有帮助')}
>
<ThumbsUp size={16} />
<ActionThumbsUp size={16} />
</button>
<button
className={
feedback === 'not_useful' ? 'is-active' : ''
}
className={[
'app-action-button',
feedback === 'not_useful' ? 'is-active' : '',
]
.filter(Boolean)
.join(' ')}
onClick={() => submitFeedback('not_useful')}
aria-label={t('没有帮助')}
>
<ThumbsDown size={16} />
<ActionThumbsDown size={16} />
</button>
</div>
</footer>
@@ -2621,7 +2649,7 @@ const CloudBrain = ({ organization = false, orgId = 0, canManage = false }) => {
</div>
<Button
theme='solid'
icon={<Download size={16} />}
icon={<ActionDownload size={16} />}
onClick={downloadArtifact}
>
{t('获取短期下载链接')}