mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-11 02:33:51 +08:00
feat: add CLI Viewer Page with multi-pane layout and state management
- Implemented the CliViewerPage component for displaying CLI outputs in a configurable multi-pane layout. - Integrated Zustand for state management, allowing for dynamic layout changes and tab management. - Added layout options: single, split horizontal, split vertical, and 2x2 grid. - Created viewerStore for managing layout, panes, and tabs, including actions for adding/removing panes and tabs. - Added CoordinatorPage barrel export for easier imports.
This commit is contained in:
@@ -45,5 +45,7 @@
|
||||
"tokens": "令牌: {count}",
|
||||
"duration": "时长: {value}",
|
||||
"model": "模型: {name}",
|
||||
"user": "用户"
|
||||
"user": "用户",
|
||||
"popOutToPage": "在完整页面中打开",
|
||||
"openInViewer": "在 CLI 查看器中打开"
|
||||
}
|
||||
|
||||
51
ccw/frontend/src/locales/zh/cli-viewer.json
Normal file
51
ccw/frontend/src/locales/zh/cli-viewer.json
Normal file
@@ -0,0 +1,51 @@
|
||||
{
|
||||
"page": {
|
||||
"title": "CLI 查看器",
|
||||
"subtitle": "{count, plural, =0 {暂无活动会话} other {# 个活动会话}}"
|
||||
},
|
||||
"layout": {
|
||||
"title": "布局",
|
||||
"single": "单窗格",
|
||||
"splitH": "水平分割",
|
||||
"splitV": "垂直分割",
|
||||
"grid": "2x2 网格"
|
||||
},
|
||||
"pane": {
|
||||
"empty": "未选择执行",
|
||||
"selectExecution": "选择执行",
|
||||
"loading": "正在加载 {executionId} 的输出...",
|
||||
"close": "关闭",
|
||||
"maximize": "最大化",
|
||||
"minimize": "最小化"
|
||||
},
|
||||
"toolbar": {
|
||||
"refresh": "刷新",
|
||||
"clearAll": "清空所有",
|
||||
"settings": "设置"
|
||||
},
|
||||
"emptyState": {
|
||||
"title": "暂无 CLI 执行",
|
||||
"description": "从侧边栏选择一个执行或启动新的 CLI 会话以在此查看输出。",
|
||||
"action": "查看执行列表"
|
||||
},
|
||||
"tabs": {
|
||||
"noTabs": "暂无标签页",
|
||||
"addTab": "添加标签页",
|
||||
"closeTab": "关闭标签页",
|
||||
"pinTab": "固定标签页",
|
||||
"unpinTab": "取消固定"
|
||||
},
|
||||
"picker": {
|
||||
"selectExecution": "选择执行",
|
||||
"searchExecutions": "搜索执行...",
|
||||
"noExecutions": "暂无可用执行",
|
||||
"noMatchingExecutions": "未找到匹配的执行",
|
||||
"alreadyOpen": "已打开",
|
||||
"executionCount": "{available}/{total} 个执行可用"
|
||||
},
|
||||
"paneActions": {
|
||||
"splitHorizontal": "水平分割",
|
||||
"splitVertical": "垂直分割",
|
||||
"closePane": "关闭窗格"
|
||||
}
|
||||
}
|
||||
@@ -63,12 +63,16 @@
|
||||
"inactive": "未激活",
|
||||
"pending": "待处理",
|
||||
"inProgress": "进行中",
|
||||
"running": "运行中",
|
||||
"initializing": "初始化中",
|
||||
"planning": "规划中",
|
||||
"completed": "已完成",
|
||||
"failed": "失败",
|
||||
"blocked": "已阻塞",
|
||||
"cancelled": "已取消",
|
||||
"paused": "已暂停",
|
||||
"archived": "已归档",
|
||||
"idle": "空闲",
|
||||
"unknown": "未知",
|
||||
"draft": "草稿",
|
||||
"published": "已发布",
|
||||
@@ -76,7 +80,7 @@
|
||||
"deleting": "删除中...",
|
||||
"label": "状态",
|
||||
"openIssues": "开放问题",
|
||||
"enabled": "Enabled",
|
||||
"enabled": "已启用",
|
||||
"disabled": "已禁用"
|
||||
},
|
||||
"priority": {
|
||||
@@ -95,7 +99,10 @@
|
||||
"months": "月",
|
||||
"years": "年",
|
||||
"ago": "前",
|
||||
"justNow": "刚刚"
|
||||
"justNow": "刚刚",
|
||||
"minutesAgo": "{count}分钟前",
|
||||
"hoursAgo": "{count}小时前",
|
||||
"daysAgo": "{count}天前"
|
||||
},
|
||||
"buttons": {
|
||||
"new": "新建",
|
||||
@@ -168,7 +175,11 @@
|
||||
"todayActivity": "今日活动",
|
||||
"totalCommands": "总命令数",
|
||||
"totalSkills": "总技能数",
|
||||
"categories": "分类"
|
||||
"categories": "分类",
|
||||
"total": "总计"
|
||||
},
|
||||
"labels": {
|
||||
"progress": "进度"
|
||||
},
|
||||
"dialog": {
|
||||
"createSession": "创建新会话",
|
||||
@@ -194,6 +205,15 @@
|
||||
"button": "搜索文档"
|
||||
}
|
||||
},
|
||||
"dashboard": {
|
||||
"config": {
|
||||
"title": "部件",
|
||||
"widgets": "仪表板部件",
|
||||
"hideAll": "全部隐藏",
|
||||
"showAll": "全部显示",
|
||||
"resetLayout": "重置布局"
|
||||
}
|
||||
},
|
||||
"all": "全部",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
@@ -246,78 +266,6 @@
|
||||
"no": "否",
|
||||
"required": "此问题为必填项"
|
||||
},
|
||||
"coordinator": {
|
||||
"page": {
|
||||
"title": "协调器",
|
||||
"status": "状态:{status}",
|
||||
"startButton": "启动协调器",
|
||||
"noNodeSelected": "选择节点以查看详细信息"
|
||||
},
|
||||
"modal": {
|
||||
"title": "启动协调器",
|
||||
"description": "描述您希望协调器执行的任务"
|
||||
},
|
||||
"form": {
|
||||
"taskDescription": "任务描述",
|
||||
"taskDescriptionPlaceholder": "描述协调器需要执行的任务(至少10个字符)...",
|
||||
"parameters": "参数(可选)",
|
||||
"parametersPlaceholder": "{\"key\": \"value\"}",
|
||||
"parametersHelp": "协调器执行的可选JSON参数",
|
||||
"characterCount": "{current} / {max} 字符(最少:{min})",
|
||||
"start": "启动协调器",
|
||||
"starting": "启动中..."
|
||||
},
|
||||
"validation": {
|
||||
"taskDescriptionRequired": "任务描述为必填项",
|
||||
"taskDescriptionTooShort": "任务描述至少需要10个字符",
|
||||
"taskDescriptionTooLong": "任务描述不能超过2000个字符",
|
||||
"parametersInvalidJson": "参数必须是有效的JSON格式",
|
||||
"answerRequired": "答案为必填项"
|
||||
},
|
||||
"success": {
|
||||
"started": "协调器启动成功"
|
||||
},
|
||||
"status": {
|
||||
"pending": "待执行",
|
||||
"running": "运行中",
|
||||
"completed": "已完成",
|
||||
"failed": "失败",
|
||||
"skipped": "已跳过"
|
||||
},
|
||||
"logs": "日志",
|
||||
"entries": "条日志",
|
||||
"error": "错误",
|
||||
"output": "输出",
|
||||
"startedAt": "开始时间",
|
||||
"completedAt": "完成时间",
|
||||
"retrying": "重试中...",
|
||||
"retry": "重试",
|
||||
"skipping": "跳过中...",
|
||||
"skip": "跳过",
|
||||
"logLevel": "日志级别",
|
||||
"level": {
|
||||
"all": "全部",
|
||||
"info": "信息",
|
||||
"warn": "警告",
|
||||
"error": "错误",
|
||||
"debug": "调试"
|
||||
},
|
||||
"noLogs": "无可用日志",
|
||||
"question": {
|
||||
"answer": "答案",
|
||||
"textPlaceholder": "输入您的答案...",
|
||||
"selectOne": "选择一个",
|
||||
"selectMultiple": "选择多个",
|
||||
"confirm": "确认",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"submitting": "提交中...",
|
||||
"submit": "提交"
|
||||
},
|
||||
"error": {
|
||||
"submitFailed": "提交答案失败"
|
||||
}
|
||||
},
|
||||
"feedback": {
|
||||
"error": {
|
||||
"network": "网络错误,请检查您的连接并重试。",
|
||||
|
||||
157
ccw/frontend/src/locales/zh/coordinator.json
Normal file
157
ccw/frontend/src/locales/zh/coordinator.json
Normal file
@@ -0,0 +1,157 @@
|
||||
{
|
||||
"page": {
|
||||
"title": "协调器",
|
||||
"status": "状态:{status}",
|
||||
"startButton": "启动协调器",
|
||||
"noNodeSelected": "选择节点以查看详细信息"
|
||||
},
|
||||
"taskDetail": {
|
||||
"title": "任务详情",
|
||||
"noSelection": "选择任务以查看执行详情"
|
||||
},
|
||||
"emptyState": {
|
||||
"title": "欢迎使用工作流协调器",
|
||||
"subtitle": "智能任务编排,实时执行监控,一站式管理复杂工作流",
|
||||
"startButton": "启动协调器",
|
||||
"feature1": {
|
||||
"title": "智能执行",
|
||||
"description": "依赖管理与并行执行的智能任务编排"
|
||||
},
|
||||
"feature2": {
|
||||
"title": "实时监控",
|
||||
"description": "流水线可视化,详细日志与执行指标"
|
||||
},
|
||||
"feature3": {
|
||||
"title": "灵活控制",
|
||||
"description": "支持重试、跳过和暂停的交互式控制"
|
||||
},
|
||||
"quickStart": {
|
||||
"title": "快速开始",
|
||||
"step1": "点击「启动协调器」按钮开始",
|
||||
"step2": "用自然语言描述您的工作流任务",
|
||||
"step3": "监控执行流水线,与运行中的任务交互"
|
||||
}
|
||||
},
|
||||
"modal": {
|
||||
"title": "启动协调器",
|
||||
"description": "描述您希望协调器执行的任务"
|
||||
},
|
||||
"multiStep": {
|
||||
"step1": {
|
||||
"title": "欢迎使用协调器",
|
||||
"subtitle": "智能工作流编排,助力任务自动化执行",
|
||||
"feature1": {
|
||||
"title": "智能执行",
|
||||
"description": "依赖管理与并行执行的智能任务编排"
|
||||
},
|
||||
"feature2": {
|
||||
"title": "实时监控",
|
||||
"description": "流水线可视化,详细日志与执行指标"
|
||||
},
|
||||
"feature3": {
|
||||
"title": "灵活控制",
|
||||
"description": "支持重试、跳过和暂停的交互式控制"
|
||||
}
|
||||
},
|
||||
"step2": {
|
||||
"title": "配置参数",
|
||||
"subtitle": "选择模板或自定义参数",
|
||||
"templateLabel": "选择模板",
|
||||
"templates": {
|
||||
"featureDev": "功能开发",
|
||||
"apiIntegration": "API 集成",
|
||||
"performanceOptimization": "性能优化",
|
||||
"documentGeneration": "文档生成"
|
||||
},
|
||||
"taskName": "任务名称",
|
||||
"taskNamePlaceholder": "输入任务名称...",
|
||||
"taskDescription": "任务描述",
|
||||
"taskDescriptionPlaceholder": "详细描述您的任务需求...",
|
||||
"customParameters": "自定义参数"
|
||||
},
|
||||
"progress": {
|
||||
"step": "步骤 {current} / {total}"
|
||||
},
|
||||
"actions": {
|
||||
"next": "下一步",
|
||||
"back": "返回",
|
||||
"cancel": "取消",
|
||||
"submit": "提交"
|
||||
}
|
||||
},
|
||||
"form": {
|
||||
"taskDescription": "任务描述",
|
||||
"taskDescriptionPlaceholder": "描述协调器需要执行的任务(至少10个字符)...",
|
||||
"parameters": "参数(可选)",
|
||||
"parametersPlaceholder": "{\"key\": \"value\"}",
|
||||
"parametersHelp": "协调器执行的可选JSON参数",
|
||||
"characterCount": "{current} / {max} 字符(最少:{min})",
|
||||
"start": "启动协调器",
|
||||
"starting": "启动中..."
|
||||
},
|
||||
"validation": {
|
||||
"taskDescriptionRequired": "任务描述为必填项",
|
||||
"taskDescriptionTooShort": "任务描述至少需要10个字符",
|
||||
"taskDescriptionTooLong": "任务描述不能超过2000个字符",
|
||||
"parametersInvalidJson": "参数必须是有效的JSON格式",
|
||||
"answerRequired": "答案为必填项"
|
||||
},
|
||||
"success": {
|
||||
"started": "协调器启动成功"
|
||||
},
|
||||
"status": {
|
||||
"pending": "待执行",
|
||||
"running": "运行中",
|
||||
"completed": "已完成",
|
||||
"failed": "失败",
|
||||
"skipped": "已跳过"
|
||||
},
|
||||
"logs": "日志",
|
||||
"entries": "条日志",
|
||||
"error": "错误",
|
||||
"output": "输出",
|
||||
"startedAt": "开始时间",
|
||||
"completedAt": "完成时间",
|
||||
"retrying": "重试中...",
|
||||
"retry": "重试",
|
||||
"skipping": "跳过中...",
|
||||
"skip": "跳过",
|
||||
"logLevel": "日志级别",
|
||||
"level": {
|
||||
"all": "全部",
|
||||
"info": "信息",
|
||||
"warn": "警告",
|
||||
"error": "错误",
|
||||
"debug": "调试"
|
||||
},
|
||||
"noLogs": "暂无日志",
|
||||
"question": {
|
||||
"answer": "回答",
|
||||
"textPlaceholder": "输入您的回答...",
|
||||
"selectOne": "单选",
|
||||
"selectMultiple": "多选",
|
||||
"confirm": "确认",
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"submitting": "提交中...",
|
||||
"submit": "提交"
|
||||
},
|
||||
"taskList": {
|
||||
"filter": {
|
||||
"all": "全部任务",
|
||||
"running": "运行中",
|
||||
"completed": "已完成",
|
||||
"failed": "失败"
|
||||
},
|
||||
"sort": {
|
||||
"time": "按时间",
|
||||
"name": "按名称"
|
||||
},
|
||||
"empty": "暂无任务"
|
||||
},
|
||||
"taskCard": {
|
||||
"nodes": "节点",
|
||||
"started": "开始"
|
||||
},
|
||||
"steps": "步"
|
||||
}
|
||||
@@ -3,6 +3,9 @@
|
||||
"title": "执行监控",
|
||||
"subtitle": "查看实时执行状态和历史记录"
|
||||
},
|
||||
"actions": {
|
||||
"openCliViewer": "CLI 监控"
|
||||
},
|
||||
"currentExecution": {
|
||||
"title": "当前执行",
|
||||
"noExecution": "当前没有正在执行的工作流",
|
||||
|
||||
@@ -17,13 +17,26 @@
|
||||
"sections": {
|
||||
"statistics": "统计",
|
||||
"recentSessions": "最近会话",
|
||||
"recentTasks": "最近任务",
|
||||
"activeLoops": "活跃循环",
|
||||
"openIssues": "开放问题",
|
||||
"quickActions": "快速操作"
|
||||
"quickActions": "快速操作",
|
||||
"taskDetails": "任务详情"
|
||||
},
|
||||
"tabs": {
|
||||
"allSessions": "全部",
|
||||
"allTasks": "全部",
|
||||
"workflow": "工作流",
|
||||
"liteTasks": "轻量任务",
|
||||
"orchestrator": "编排器",
|
||||
"inProgress": "进行中",
|
||||
"planning": "规划中",
|
||||
"completed": "已完成",
|
||||
"paused": "已暂停"
|
||||
},
|
||||
"widgets": {
|
||||
"workflowStatus": "工作流状态",
|
||||
"activity": "活动时间线",
|
||||
"activity": "活动热图",
|
||||
"taskTypes": "任务类型"
|
||||
},
|
||||
"emptyState": {
|
||||
@@ -31,6 +44,10 @@
|
||||
"title": "未找到会话",
|
||||
"message": "没有符合当前筛选条件的工作流会话。"
|
||||
},
|
||||
"noTasks": {
|
||||
"title": "暂无任务",
|
||||
"message": "没有符合当前筛选条件的任务。"
|
||||
},
|
||||
"noLoops": {
|
||||
"title": "无活跃循环",
|
||||
"message": "启动新的开发循环以开始监控进度。"
|
||||
@@ -81,5 +98,8 @@
|
||||
"errors": {
|
||||
"loadFailed": "加载仪表板数据失败",
|
||||
"retry": "重试"
|
||||
},
|
||||
"project": {
|
||||
"features": "个功能"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import sessions from './sessions.json';
|
||||
import issues from './issues.json';
|
||||
import home from './home.json';
|
||||
import orchestrator from './orchestrator.json';
|
||||
import coordinator from './coordinator.json';
|
||||
import loops from './loops.json';
|
||||
import commands from './commands.json';
|
||||
import memory from './memory.json';
|
||||
@@ -37,6 +38,7 @@ import notification from './notification.json';
|
||||
import notifications from './notifications.json';
|
||||
import workspace from './workspace.json';
|
||||
import help from './help.json';
|
||||
import cliViewer from './cli-viewer.json';
|
||||
|
||||
/**
|
||||
* Flattens nested JSON object to dot-separated keys
|
||||
@@ -69,6 +71,7 @@ export default {
|
||||
...flattenMessages(issues, 'issues'),
|
||||
...flattenMessages(home, 'home'),
|
||||
...flattenMessages(orchestrator, 'orchestrator'),
|
||||
...flattenMessages(coordinator, 'coordinator'),
|
||||
...flattenMessages(loops, 'loops'),
|
||||
...flattenMessages(commands, 'commands'),
|
||||
...flattenMessages(memory, 'memory'),
|
||||
@@ -97,4 +100,5 @@ export default {
|
||||
...flattenMessages(notifications, 'notifications'),
|
||||
...flattenMessages(workspace, 'workspace'),
|
||||
...flattenMessages(help, 'help'),
|
||||
...flattenMessages(cliViewer, 'cliViewer'),
|
||||
} as Record<string, string>;
|
||||
|
||||
@@ -61,5 +61,11 @@
|
||||
"explorations": "探索",
|
||||
"context": "上下文",
|
||||
"diagnoses": "诊断"
|
||||
},
|
||||
"status": {
|
||||
"completed": "已完成",
|
||||
"inProgress": "进行中",
|
||||
"blocked": "已阻止",
|
||||
"pending": "待处理"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@
|
||||
"project": "项目",
|
||||
"history": "历史",
|
||||
"orchestrator": "编排器",
|
||||
"coordinator": "协调器",
|
||||
"loops": "循环监控",
|
||||
"cliViewer": "CLI 查看器",
|
||||
"issues": "问题",
|
||||
"issueQueue": "问题队列",
|
||||
"issueDiscovery": "问题发现",
|
||||
@@ -75,6 +77,8 @@
|
||||
"noExecutionsHint": "启动 CLI 命令以查看流式输出",
|
||||
"noMessages": "等待消息...",
|
||||
"noMatch": "未找到匹配的消息",
|
||||
"openInViewer": "在 CLI 查看器中打开",
|
||||
"popOutToPage": "弹出到全页面",
|
||||
"statusBar": "{total} 个执行 | {active} 个活跃 | {errors} 个错误 | {lines} 行",
|
||||
"copy": "复制",
|
||||
"copied": "已复制!",
|
||||
|
||||
@@ -8,6 +8,15 @@
|
||||
"archived": "已归档",
|
||||
"paused": "已暂停"
|
||||
},
|
||||
"type": {
|
||||
"workflow": "工作流",
|
||||
"review": "审查",
|
||||
"tdd": "TDD",
|
||||
"test": "测试",
|
||||
"docs": "文档",
|
||||
"lite-plan": "轻量计划",
|
||||
"lite-fix": "轻量修复"
|
||||
},
|
||||
"actions": {
|
||||
"viewDetails": "查看详情",
|
||||
"archive": "归档",
|
||||
|
||||
Reference in New Issue
Block a user