fix: 修复TypeScript配置错误并更新项目文档

详细说明:
- 修复了@n8n/config包的TypeScript配置错误
- 移除了不存在的jest-expect-message类型引用
- 清理了所有TypeScript构建缓存
- 更新了可行性分析文档,添加了技术实施方案
- 更新了Agent prompt文档
- 添加了会展策划工作流文档
- 包含了n8n-chinese-translation子项目
- 添加了exhibition-demo展示系统框架
This commit is contained in:
Yep_Q
2025-09-08 10:49:45 +08:00
parent 8cf9d36d81
commit 3db7af209c
426 changed files with 71699 additions and 4401 deletions

View File

@@ -0,0 +1,165 @@
import { create } from 'zustand';
export interface Agent {
id: string;
name: string;
icon: string;
model: string;
role: string;
status: 'waiting' | 'thinking' | 'generating' | 'done';
input?: string;
output?: string;
prompt?: string;
}
export interface DemoState {
// 演示状态
status: 'idle' | 'running' | 'paused' | 'completed';
currentPhase: number;
currentAgent: string | null;
progress: number;
// Agent配置
agents: Agent[];
// 生成的内容
generatedContent: {
[key: string]: {
title: string;
content: string;
images: string[];
isComplete: boolean;
};
};
// 控制选项
controls: {
speed: number; // 1-5倍速
autoAdvance: boolean;
showDetails: boolean;
};
// Actions
startDemo: () => void;
pauseDemo: () => void;
resumeDemo: () => void;
setCurrentAgent: (agentId: string) => void;
updateAgentStatus: (agentId: string, status: Agent['status']) => void;
updateAgentOutput: (agentId: string, output: string) => void;
addGeneratedContent: (section: string, content: any) => void;
setProgress: (progress: number) => void;
reset: () => void;
}
const initialAgents: Agent[] = [
{
id: 'retrieval',
name: '信息检索专家',
icon: '🔍',
model: 'DeepSeek Chat Model5',
role: '市场调研、数据收集、竞品分析',
status: 'waiting',
},
{
id: 'design',
name: '设计专家',
icon: '🎨',
model: 'Google Gemini Chat Model2',
role: '视觉设计、空间布局、品牌形象',
status: 'waiting',
},
{
id: 'budget',
name: '财务预算专家',
icon: '💰',
model: 'DeepSeek Chat Model2',
role: '成本核算、预算规划、ROI分析',
status: 'waiting',
},
{
id: 'format',
name: '格式编辑专家',
icon: '📝',
model: 'DeepSeek Chat Model4',
role: '文档格式化、内容结构优化',
status: 'waiting',
},
{
id: 'execution',
name: '活动执行专家',
icon: '⚡',
model: 'DeepSeek Chat Model1',
role: '执行计划、时间线管理、任务分配',
status: 'waiting',
},
{
id: 'marketing',
name: '营销宣传专家',
icon: '📢',
model: 'DeepSeek Chat Model3',
role: '推广策略、媒体规划、品牌传播',
status: 'waiting',
},
{
id: 'coordinator',
name: '会展策划专家',
icon: '🎯',
model: 'Chat Models + Memories',
role: '中央协调、方案整合、决策支持',
status: 'waiting',
},
];
export const useDemoStore = create<DemoState>((set) => ({
status: 'idle',
currentPhase: 0,
currentAgent: null,
progress: 0,
agents: initialAgents,
generatedContent: {},
controls: {
speed: 1,
autoAdvance: true,
showDetails: true,
},
startDemo: () => set({ status: 'running', progress: 0 }),
pauseDemo: () => set({ status: 'paused' }),
resumeDemo: () => set({ status: 'running' }),
setCurrentAgent: (agentId) => set({ currentAgent: agentId }),
updateAgentStatus: (agentId, status) =>
set((state) => ({
agents: state.agents.map((agent) =>
agent.id === agentId ? { ...agent, status } : agent
),
})),
updateAgentOutput: (agentId, output) =>
set((state) => ({
agents: state.agents.map((agent) =>
agent.id === agentId ? { ...agent, output } : agent
),
})),
addGeneratedContent: (section, content) =>
set((state) => ({
generatedContent: {
...state.generatedContent,
[section]: content,
},
})),
setProgress: (progress) => set({ progress }),
reset: () =>
set({
status: 'idle',
currentPhase: 0,
currentAgent: null,
progress: 0,
agents: initialAgents,
generatedContent: {},
}),
}));