feat: add Accordion component for UI and Zustand store for coordinator management

- Implemented Accordion component using Radix UI for collapsible sections.
- Created Zustand store to manage coordinator execution state, command chains, logs, and interactive questions.
- Added validation tests for CLI settings type definitions, ensuring type safety and correct behavior of helper functions.
This commit is contained in:
catlog22
2026-02-03 10:02:40 +08:00
parent bcb4af3ba0
commit 5483a72e9f
82 changed files with 6156 additions and 7605 deletions

View File

@@ -289,8 +289,22 @@
"descriptionPlaceholder": "Optional description for this configuration",
"selectProvider": "Select a provider",
"includeCoAuthoredBy": "Include co-authored-by in commits",
"coAuthoredBy": "Co-authored",
"availableModels": "Available Models",
"availableModelsPlaceholder": "Enter model name and press Enter",
"availableModelsHint": "Models shown in CLI dropdown menus. Click × to remove.",
"nameFormatHint": "Letters, numbers, hyphens, underscores only. Used as: ccw cli --tool [name]",
"nameTooLong": "Name must be {max} characters or less",
"settingsFile": "Settings File",
"settingsFilePlaceholder": "e.g., /path/to/settings.json",
"settingsFileHint": "Path to external Claude CLI settings file (passed via --settings parameter)",
"tags": "Tags",
"tagsDescription": "Tags for CLI tool routing and auto-selection (e.g., analysis, Debug)",
"addTag": "Add tag",
"tagInputPlaceholder": "Enter a tag...",
"predefinedTags": "Common tags",
"removeTag": "Remove tag",
"noTags": "No tags added",
"validation": {
"providerRequired": "Please select a provider",
"authOrBaseUrlRequired": "Please enter auth token or base URL"

View File

@@ -181,6 +181,8 @@
"tutorials": "Tutorials"
}
},
"yes": "Yes",
"no": "No",
"askQuestion": {
"defaultTitle": "Questions",
"description": "Please answer the following questions",
@@ -188,5 +190,71 @@
"yes": "Yes",
"no": "No",
"required": "This question is required"
},
"coordinator": {
"modal": {
"title": "Start Coordinator",
"description": "Describe the task you want the coordinator to execute"
},
"form": {
"taskDescription": "Task Description",
"taskDescriptionPlaceholder": "Describe what you want the coordinator to do (minimum 10 characters)...",
"parameters": "Parameters (Optional)",
"parametersPlaceholder": "{\"key\": \"value\"}",
"parametersHelp": "Optional JSON parameters for the coordinator execution",
"characterCount": "{current} / {max} characters (min: {min})",
"start": "Start Coordinator",
"starting": "Starting..."
},
"validation": {
"taskDescriptionRequired": "Task description is required",
"taskDescriptionTooShort": "Task description must be at least 10 characters",
"taskDescriptionTooLong": "Task description must not exceed 2000 characters",
"parametersInvalidJson": "Parameters must be valid JSON",
"answerRequired": "An answer is required"
},
"success": {
"started": "Coordinator started successfully"
},
"status": {
"pending": "Pending",
"running": "Running",
"completed": "Completed",
"failed": "Failed",
"skipped": "Skipped"
},
"logs": "Logs",
"entries": "entries",
"error": "Error",
"output": "Output",
"startedAt": "Started At",
"completedAt": "Completed At",
"retrying": "Retrying...",
"retry": "Retry",
"skipping": "Skipping...",
"skip": "Skip",
"logLevel": "Log Level",
"level": {
"all": "All",
"info": "Info",
"warn": "Warning",
"error": "Error",
"debug": "Debug"
},
"noLogs": "No logs available",
"question": {
"answer": "Answer",
"textPlaceholder": "Enter your answer...",
"selectOne": "Select One",
"selectMultiple": "Select Multiple",
"confirm": "Confirm",
"yes": "Yes",
"no": "No",
"submitting": "Submitting...",
"submit": "Submit"
},
"error": {
"submitFailed": "Failed to submit answer"
}
}
}

View File

@@ -6,10 +6,17 @@
"edit": "Edit",
"delete": "Delete",
"copy": "Copy",
"copySuccess": "Copied to clipboard",
"copyError": "Failed to copy",
"refresh": "Refresh",
"expand": "Expand",
"collapse": "Collapse"
},
"tabs": {
"memories": "Memories",
"favorites": "Favorites",
"archived": "Archived"
},
"stats": {
"totalSize": "Total Size",
"count": "Count",
@@ -43,7 +50,9 @@
"editTitle": "Edit Memory",
"labels": {
"content": "Content",
"tags": "Tags"
"tags": "Tags",
"favorite": "Favorite",
"priority": "Priority"
},
"placeholders": {
"content": "Enter memory content...",
@@ -57,6 +66,11 @@
"updating": "Updating..."
}
},
"priority": {
"low": "Low",
"medium": "Medium",
"high": "High"
},
"types": {
"coreMemory": "Core Memory",
"workflow": "Workflow",

View File

@@ -1,4 +1,12 @@
{
"groups": {
"overview": "Overview",
"workflow": "Workflow & Execution",
"knowledge": "Knowledge & Memory",
"issues": "Issue Management",
"tools": "Tools & Hooks",
"configuration": "Configuration & Support"
},
"main": {
"home": "Home",
"sessions": "Sessions",

View File

@@ -48,5 +48,7 @@
"atTime": "at {0}"
},
"markAsRead": "Mark as read",
"markAsUnread": "Mark as unread"
"markAsUnread": "Mark as unread",
"read": "Read",
"unread": "Unread"
}

View File

@@ -3,6 +3,7 @@
"description": "View and analyze your prompt history with AI insights",
"searchPlaceholder": "Search prompts...",
"filterByIntent": "Filter by intent",
"filterByProject": "Filter by project",
"intents": {
"all": "All Intents",
"intent": "Intent",
@@ -12,6 +13,10 @@
"document": "Document",
"analyze": "Analyze"
},
"projects": {
"all": "All Projects",
"project": "Project"
},
"stats": {
"totalCount": "Total Prompts",
"totalCountDesc": "All stored prompts",
@@ -19,7 +24,15 @@
"avgLengthDesc": "Mean character count",
"topIntent": "Top Intent",
"topIntentDesc": "Most used category",
"noIntent": "N/A"
"noIntent": "N/A",
"avgQuality": "Avg Quality",
"avgQualityDesc": "Quality score distribution"
},
"quality": {
"high": "High",
"medium": "Medium",
"low": "Low",
"none": "N/A"
},
"card": {
"untitled": "Untitled Prompt",
@@ -52,6 +65,24 @@
"suggestions": "Suggestions"
}
},
"insightsHistory": {
"loading": "Loading insights history...",
"patterns": "Patterns",
"suggestions": "Suggestions",
"prompts": "Prompts",
"empty": {
"title": "No analysis history",
"message": "Run an analysis to see historical insights and patterns."
}
},
"insightDetail": {
"title": "Insight Detail",
"patterns": "Patterns Found",
"suggestions": "Suggestions",
"promptsAnalyzed": "prompts analyzed",
"noContent": "No patterns or suggestions available for this insight.",
"deleting": "Deleting..."
},
"suggestions": {
"types": {
"refactor": "Refactor",
@@ -63,7 +94,15 @@
},
"dialog": {
"deleteTitle": "Delete Prompt",
"deleteConfirm": "Are you sure you want to delete this prompt? This action cannot be undone."
"deleteConfirm": "Are you sure you want to delete this prompt? This action cannot be undone.",
"batchDeleteTitle": "Delete Prompts",
"batchDeleteConfirm": "Are you sure you want to delete {count} selected prompt(s)? This action cannot be undone."
},
"batch": {
"selected": "{count} selected",
"selectAll": "Select All",
"clearSelection": "Clear Selection",
"deleteSelected": "Delete Selected"
},
"emptyState": {
"title": "No prompts found",

View File

@@ -289,8 +289,22 @@
"descriptionPlaceholder": "此配置的可选描述",
"selectProvider": "选择提供商",
"includeCoAuthoredBy": "在提交中包含 co-authored-by",
"coAuthoredBy": "共同创作",
"availableModels": "可用模型",
"availableModelsPlaceholder": "输入模型名称并按回车",
"availableModelsHint": "显示在 CLI 下拉菜单中的模型。点击 × 删除。",
"nameFormatHint": "仅限字母、数字、连字符和下划线。用作ccw cli --tool [名称]",
"nameTooLong": "名称必须在 {max} 个字符以内",
"settingsFile": "配置文件路径",
"settingsFilePlaceholder": "例如:/path/to/settings.json",
"settingsFileHint": "外部 Claude CLI 配置文件路径(通过 --settings 参数传递)",
"tags": "标签",
"tagsDescription": "CLI 工具路由和自动选择标签例如分析、Debug",
"addTag": "添加标签",
"tagInputPlaceholder": "输入标签...",
"predefinedTags": "常用标签",
"removeTag": "删除标签",
"noTags": "未添加标签",
"validation": {
"providerRequired": "请选择提供商",
"authOrBaseUrlRequired": "请输入认证令牌或基础 URL"

View File

@@ -185,6 +185,8 @@
"tutorials": "教程"
}
},
"yes": "是",
"no": "否",
"askQuestion": {
"defaultTitle": "问题",
"description": "请回答以下问题",
@@ -192,5 +194,71 @@
"yes": "是",
"no": "否",
"required": "此问题为必填项"
},
"coordinator": {
"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": "提交答案失败"
}
}
}

View File

@@ -6,10 +6,17 @@
"edit": "编辑",
"delete": "删除",
"copy": "复制",
"copySuccess": "已复制到剪贴板",
"copyError": "复制失败",
"refresh": "刷新",
"expand": "展开",
"collapse": "收起"
},
"tabs": {
"memories": "记忆",
"favorites": "收藏",
"archived": "归档"
},
"stats": {
"totalSize": "总大小",
"count": "数量",
@@ -43,7 +50,9 @@
"editTitle": "编辑记忆",
"labels": {
"content": "内容",
"tags": "标签"
"tags": "标签",
"favorite": "收藏",
"priority": "优先级"
},
"placeholders": {
"content": "输入记忆内容...",
@@ -57,6 +66,11 @@
"updating": "更新中..."
}
},
"priority": {
"low": "低",
"medium": "中",
"high": "高"
},
"types": {
"coreMemory": "核心记忆",
"workflow": "工作流",

View File

@@ -1,4 +1,12 @@
{
"groups": {
"overview": "概览",
"workflow": "工作流与执行",
"knowledge": "知识与记忆",
"issues": "问题管理",
"tools": "工具与钩子",
"configuration": "配置与支持"
},
"main": {
"home": "首页",
"sessions": "会话",

View File

@@ -48,5 +48,7 @@
"atTime": "{0}"
},
"markAsRead": "标为已读",
"markAsUnread": "标为未读"
"markAsUnread": "标为未读",
"read": "已读",
"unread": "未读"
}

View File

@@ -3,6 +3,7 @@
"description": "查看和分析您的提示历史记录,获取 AI 洞察",
"searchPlaceholder": "搜索提示...",
"filterByIntent": "按意图筛选",
"filterByProject": "按项目筛选",
"intents": {
"all": "所有意图",
"intent": "意图",
@@ -12,6 +13,10 @@
"document": "文档",
"analyze": "分析"
},
"projects": {
"all": "所有项目",
"project": "项目"
},
"stats": {
"totalCount": "总提示数",
"totalCountDesc": "所有存储的提示",
@@ -19,7 +24,15 @@
"avgLengthDesc": "平均字符数",
"topIntent": "主要意图",
"topIntentDesc": "最常用的类别",
"noIntent": "无"
"noIntent": "无",
"avgQuality": "平均质量",
"avgQualityDesc": "质量分数分布"
},
"quality": {
"high": "高",
"medium": "中",
"low": "低",
"none": "无"
},
"card": {
"untitled": "未命名提示",
@@ -52,6 +65,24 @@
"suggestions": "建议"
}
},
"insightsHistory": {
"loading": "加载洞察历史...",
"patterns": "模式",
"suggestions": "建议",
"prompts": "提示",
"empty": {
"title": "暂无分析历史",
"message": "运行分析以查看历史洞察和模式。"
}
},
"insightDetail": {
"title": "洞察详情",
"patterns": "发现的模式",
"suggestions": "建议",
"promptsAnalyzed": "个提示已分析",
"noContent": "此洞察暂无模式或建议。",
"deleting": "删除中..."
},
"suggestions": {
"types": {
"refactor": "重构",
@@ -63,7 +94,15 @@
},
"dialog": {
"deleteTitle": "删除提示",
"deleteConfirm": "确定要删除此提示吗?此操作无法撤销。"
"deleteConfirm": "确定要删除此提示吗?此操作无法撤销。",
"batchDeleteTitle": "批量删除提示",
"batchDeleteConfirm": "确定要删除 {count} 个选中的提示吗?此操作无法撤销。"
},
"batch": {
"selected": "已选 {count} 个",
"selectAll": "全选",
"clearSelection": "清除选择",
"deleteSelected": "删除选中"
},
"emptyState": {
"title": "未找到提示",