sync update from LAN repo (source dhk-1 @ fc974e93)
This commit is contained in:
1 parent
a1fa13a238
commit
e2fea6a801
432 files changed
+68707
-2270
No files matched your search
@@ -15,6 +15,7 @@ import {
|
||||
CheckCircle,
|
||||
} from 'lucide-react';
|
||||
import { useTheme } from '../../../contexts/ThemeContext';
|
||||
import { toast } from '@/core/ui/feedback';
|
||||
import { ChatMessage, EmptyChatState, QAComposer, TypingIndicator } from './QACommon';
|
||||
|
||||
interface Agent {
|
||||
@@ -184,14 +185,14 @@ const AgentQA: React.FC = () => {
|
||||
* 保存问答记录
|
||||
*/
|
||||
const handleSaveRecord = () => {
|
||||
alert('问答记录已保存');
|
||||
toast.success('问答记录已保存');
|
||||
};
|
||||
|
||||
/**
|
||||
* 收藏当前对话
|
||||
*/
|
||||
const handleCollect = () => {
|
||||
alert('已添加到收藏');
|
||||
toast.success('已添加到收藏');
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import React, { useState } from 'react';
|
||||
import { CheckCircle, ChevronLeft, ChevronRight, History, MessageCircle, Users } from 'lucide-react';
|
||||
import { useTheme } from '../../../contexts/ThemeContext';
|
||||
import { toast } from '@/core/ui/feedback';
|
||||
import { ChatMessage, EmptyChatState, QAComposer, TypingIndicator } from './QACommon';
|
||||
|
||||
interface CollaborativeQAProps {}
|
||||
@@ -170,8 +171,8 @@ const CollaborativeQA: React.FC<CollaborativeQAProps> = () => {
|
||||
onKeyDown={handleKeyDown}
|
||||
onSubmit={handleSend}
|
||||
onStop={handleStop}
|
||||
onSave={() => alert('问答记录已保存')}
|
||||
onCollect={() => alert('已添加到收藏')}
|
||||
onSave={() => toast.success('问答记录已保存')}
|
||||
onCollect={() => toast.success('已添加到收藏')}
|
||||
isLoading={isLoading}
|
||||
placeholder="输入协同研判主题或任务背景..."
|
||||
showUpload={false}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import React, { useState, useRef, useEffect } from 'react';
|
||||
import { toast } from '@/core/ui/feedback';
|
||||
import {
|
||||
Send,
|
||||
Upload,
|
||||
@@ -613,15 +614,15 @@ const QA: React.FC<QAProps> = ({ initialMode }) => {
|
||||
};
|
||||
|
||||
const handleExportReport = () => {
|
||||
alert('报告导出功能开发中...');
|
||||
toast.info('报告导出功能开发中...');
|
||||
};
|
||||
|
||||
const handleSaveMultiAgentRecord = () => {
|
||||
alert('协同分析记录已保存');
|
||||
toast.success('协同分析记录已保存');
|
||||
};
|
||||
|
||||
const handleTransferToScene = () => {
|
||||
alert('转场景任务功能开发中...');
|
||||
toast.info('转场景任务功能开发中...');
|
||||
};
|
||||
|
||||
const handleMultiAgentFollowUp = (agentId: string) => {
|
||||
@@ -759,7 +760,7 @@ const QA: React.FC<QAProps> = ({ initialMode }) => {
|
||||
};
|
||||
|
||||
const handleSaveRecord = () => {
|
||||
alert('问答记录已保存');
|
||||
toast.success('问答记录已保存');
|
||||
};
|
||||
|
||||
// 新建问答 - 通用/智能体模式
|
||||
@@ -1306,7 +1307,7 @@ const QA: React.FC<QAProps> = ({ initialMode }) => {
|
||||
保存记录
|
||||
</button>
|
||||
<button
|
||||
onClick={() => alert('分析已结束')}
|
||||
onClick={() => toast.success('分析已结束')}
|
||||
className={`px-4 py-2 rounded-lg text-sm font-medium transition-all flex items-center gap-2 ${
|
||||
isDark ? 'bg-red-600/80 hover:bg-red-600 text-white' : 'bg-red-500 hover:bg-red-600 text-white'
|
||||
}`}
|
||||
|
||||
@@ -2,6 +2,7 @@ import React, { useState, useEffect, useMemo } from 'react';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import { useTheme } from '../../../contexts/ThemeContext';
|
||||
import { toast } from '@/core/ui/feedback';
|
||||
import {
|
||||
Edit2, Plus, Trash2, Check, X, ChevronDown, ChevronRight,
|
||||
Target, Users, Activity, BookOpen, Zap, AlertTriangle,
|
||||
@@ -641,7 +642,7 @@ export default function Template6BEditor() {
|
||||
|
||||
console.log('[Template6BEditor 保存结果]', result);
|
||||
console.log('[Template6BEditor 保存 JSON]', JSON.stringify(template, null, 2));
|
||||
window.alert(result.message + ' 详情已打印到控制台。');
|
||||
toast.info(result.message + ' 详情已打印到控制台。');
|
||||
if (valid) setDirty(false);
|
||||
};
|
||||
|
||||
@@ -767,7 +768,7 @@ export default function Template6BEditor() {
|
||||
}}
|
||||
onDelete={() => {
|
||||
if (template.agents.length <= 1) {
|
||||
window.alert('智能体最少必须保留 1 个');
|
||||
toast.warning('智能体最少必须保留 1 个');
|
||||
return;
|
||||
}
|
||||
update('agents', template.agents.filter((_, j) => j !== i));
|
||||
|
||||
@@ -2,6 +2,7 @@ import React, { useState, useEffect, useMemo } from 'react';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import { useTheme } from '../../../contexts/ThemeContext';
|
||||
import { toast } from '@/core/ui/feedback';
|
||||
import {
|
||||
Edit2, Plus, Trash2, Check, X, ChevronDown, ChevronRight,
|
||||
Target, Package, Globe, BookOpen, MessageSquare, Zap,
|
||||
@@ -479,7 +480,7 @@ function MultiSelectModal({
|
||||
const toggle = (value: string) => {
|
||||
const has = draft.includes(value);
|
||||
if (has && draft.length <= minKeep) {
|
||||
window.alert(`最少必须保留 ${minKeep} 个`);
|
||||
toast.warning(`最少必须保留 ${minKeep} 个`);
|
||||
return;
|
||||
}
|
||||
setDraft(prev => has ? prev.filter(v => v !== value) : [...prev, value]);
|
||||
@@ -519,7 +520,7 @@ function MultiSelectModal({
|
||||
<button
|
||||
onClick={() => {
|
||||
if (draft.length < minKeep) {
|
||||
window.alert(`最少必须保留 ${minKeep} 个`);
|
||||
toast.warning(`最少必须保留 ${minKeep} 个`);
|
||||
return;
|
||||
}
|
||||
onSave(draft);
|
||||
@@ -878,7 +879,7 @@ function AgentEditModal({
|
||||
|
||||
const removeRelevantField = (field: string) => {
|
||||
if (form.relevant_fields.length <= 1) {
|
||||
window.alert('关联字段最少必须保留 1 个');
|
||||
toast.warning('关联字段最少必须保留 1 个');
|
||||
return;
|
||||
}
|
||||
set('relevant_fields', form.relevant_fields.filter(x => x !== field));
|
||||
@@ -886,7 +887,7 @@ function AgentEditModal({
|
||||
|
||||
const removeExpertiseField = (field: string) => {
|
||||
if (expertiseFields.length <= 1) {
|
||||
window.alert('专业能力服务字段最少必须保留 1 个');
|
||||
toast.warning('专业能力服务字段最少必须保留 1 个');
|
||||
return;
|
||||
}
|
||||
setExpertiseFields(prev => prev.filter(x => x !== field));
|
||||
@@ -1131,7 +1132,7 @@ function FieldRequirementCard({
|
||||
const removeRequiredItem = (key: 'dependencies' | 'preferred_agents', value: string) => {
|
||||
const current = req[key];
|
||||
if (current.length <= 1) {
|
||||
window.alert(key === 'dependencies' ? '依赖字段最少必须保留 1 个' : '推荐智能体最少必须保留 1 个');
|
||||
toast.warning(key === 'dependencies' ? '依赖字段最少必须保留 1 个' : '推荐智能体最少必须保留 1 个');
|
||||
return;
|
||||
}
|
||||
setField(key, current.filter(x => x !== value));
|
||||
@@ -1283,7 +1284,7 @@ export default function TemplateEditor() {
|
||||
|
||||
console.log('[TemplateEditor 保存结果]', result);
|
||||
console.log('[TemplateEditor 保存 JSON]', JSON.stringify(template, null, 2));
|
||||
window.alert(result.message + ' 详情已打印到控制台。');
|
||||
toast.info(result.message + ' 详情已打印到控制台。');
|
||||
|
||||
if (valid) setDirty(false);
|
||||
};
|
||||
@@ -1420,7 +1421,7 @@ export default function TemplateEditor() {
|
||||
}}
|
||||
onDelete={() => {
|
||||
if (template.agents.length <= 1) {
|
||||
window.alert('智能体最少必须保留 1 个');
|
||||
toast.warning('智能体最少必须保留 1 个');
|
||||
return;
|
||||
}
|
||||
update('agents', template.agents.filter((_, j) => j !== i));
|
||||
|
||||
Reference in new issue
Block a user