mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 12:03:49 +08:00
feat: Add comprehensive tests for contentPattern and glob pattern matching
- Implemented final verification tests for contentPattern to validate behavior with empty strings, dangerous patterns, and normal patterns. - Created glob pattern matching tests to verify regex conversion and matching functionality. - Developed infinite loop risk tests using Worker threads to isolate potential blocking operations. - Introduced optimized contentPattern tests to validate improvements in the findMatches function. - Added verification tests to assess the effectiveness of contentPattern optimizations. - Conducted safety tests for contentPattern to identify edge cases and potential vulnerabilities. - Implemented unrestricted loop tests to analyze infinite loop risks without match limits. - Developed tests for zero-width pattern detection logic to ensure proper handling of dangerous regex patterns.
This commit is contained in:
@@ -38,6 +38,7 @@ import notifications from './notifications.json';
|
||||
import workspace from './workspace.json';
|
||||
import help from './help.json';
|
||||
import cliViewer from './cli-viewer.json';
|
||||
import team from './team.json';
|
||||
|
||||
/**
|
||||
* Flattens nested JSON object to dot-separated keys
|
||||
@@ -99,4 +100,5 @@ export default {
|
||||
...flattenMessages(workspace, 'workspace'),
|
||||
...flattenMessages(help, 'help'),
|
||||
...flattenMessages(cliViewer, 'cliViewer'),
|
||||
...flattenMessages(team, 'team'),
|
||||
} as Record<string, string>;
|
||||
|
||||
@@ -123,7 +123,11 @@
|
||||
},
|
||||
"read_file": {
|
||||
"name": "read_file",
|
||||
"desc": "Read file contents"
|
||||
"desc": "Read a single file with optional line pagination"
|
||||
},
|
||||
"read_many_files": {
|
||||
"name": "read_many_files",
|
||||
"desc": "Read multiple files or directories with glob filtering and content search"
|
||||
},
|
||||
"core_memory": {
|
||||
"name": "core_memory",
|
||||
@@ -136,6 +140,10 @@
|
||||
"smart_search": {
|
||||
"name": "smart_search",
|
||||
"desc": "Intelligent code search with fuzzy and semantic modes"
|
||||
},
|
||||
"team_msg": {
|
||||
"name": "team_msg",
|
||||
"desc": "Persistent JSONL message bus for Agent Team communication"
|
||||
}
|
||||
},
|
||||
"paths": {
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
"hooks": "Hooks",
|
||||
"rules": "Rules",
|
||||
"explorer": "File Explorer",
|
||||
"graph": "Graph Explorer"
|
||||
"graph": "Graph Explorer",
|
||||
"teams": "Team Execution"
|
||||
},
|
||||
"sidebar": {
|
||||
"collapse": "Collapse",
|
||||
|
||||
65
ccw/frontend/src/locales/en/team.json
Normal file
65
ccw/frontend/src/locales/en/team.json
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"title": "Team Execution",
|
||||
"description": "Visualize agent team execution status and message flow",
|
||||
"selectTeam": "Select Team",
|
||||
"noTeamSelected": "Select a team to view",
|
||||
"members": "Members",
|
||||
"messages": "Messages",
|
||||
"elapsed": "Elapsed",
|
||||
"autoRefresh": "Auto-refresh",
|
||||
"filterByType": "Filter by type",
|
||||
"filterAll": "All Types",
|
||||
"stage": "Stage",
|
||||
"empty": {
|
||||
"title": "No Active Teams",
|
||||
"description": "Use /team:coordinate to create a team and start collaborating",
|
||||
"noMessages": "No Messages Yet",
|
||||
"noMessagesHint": "Team was just created, waiting for the first message"
|
||||
},
|
||||
"pipeline": {
|
||||
"title": "Pipeline Progress",
|
||||
"plan": "Plan",
|
||||
"impl": "Implement",
|
||||
"test": "Test",
|
||||
"review": "Review",
|
||||
"completed": "Completed",
|
||||
"inProgress": "In Progress",
|
||||
"pending": "Pending",
|
||||
"blocked": "Blocked"
|
||||
},
|
||||
"membersPanel": {
|
||||
"title": "Team Members",
|
||||
"active": "Active",
|
||||
"idle": "Idle",
|
||||
"lastAction": "Last Action",
|
||||
"messageCount": "Messages",
|
||||
"lastSeen": "Last Seen",
|
||||
"ago": "ago"
|
||||
},
|
||||
"timeline": {
|
||||
"title": "Message Timeline",
|
||||
"loadMore": "Load More",
|
||||
"showing": "Showing {showing} / {total} messages",
|
||||
"filterFrom": "From",
|
||||
"filterTo": "To",
|
||||
"filterType": "Type",
|
||||
"clearFilters": "Clear Filters",
|
||||
"expandData": "Expand Data",
|
||||
"collapseData": "Collapse Data",
|
||||
"noRef": "No reference"
|
||||
},
|
||||
"messageType": {
|
||||
"plan_ready": "Plan Ready",
|
||||
"plan_approved": "Plan Approved",
|
||||
"plan_revision": "Plan Revision",
|
||||
"task_unblocked": "Task Unblocked",
|
||||
"impl_complete": "Impl Complete",
|
||||
"impl_progress": "Impl Progress",
|
||||
"test_result": "Test Result",
|
||||
"review_result": "Review Result",
|
||||
"fix_required": "Fix Required",
|
||||
"error": "Error",
|
||||
"shutdown": "Shutdown",
|
||||
"message": "Message"
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,7 @@ import notifications from './notifications.json';
|
||||
import workspace from './workspace.json';
|
||||
import help from './help.json';
|
||||
import cliViewer from './cli-viewer.json';
|
||||
import team from './team.json';
|
||||
|
||||
/**
|
||||
* Flattens nested JSON object to dot-separated keys
|
||||
@@ -99,4 +100,5 @@ export default {
|
||||
...flattenMessages(workspace, 'workspace'),
|
||||
...flattenMessages(help, 'help'),
|
||||
...flattenMessages(cliViewer, 'cliViewer'),
|
||||
...flattenMessages(team, 'team'),
|
||||
} as Record<string, string>;
|
||||
|
||||
@@ -123,7 +123,11 @@
|
||||
},
|
||||
"read_file": {
|
||||
"name": "read_file",
|
||||
"desc": "读取文件内容"
|
||||
"desc": "读取单个文件内容"
|
||||
},
|
||||
"read_many_files": {
|
||||
"name": "read_many_files",
|
||||
"desc": "批量读取多个文件或目录,支持 glob 过滤和内容搜索"
|
||||
},
|
||||
"core_memory": {
|
||||
"name": "core_memory",
|
||||
@@ -136,6 +140,10 @@
|
||||
"smart_search": {
|
||||
"name": "smart_search",
|
||||
"desc": "智能代码搜索,支持模糊和语义搜索模式"
|
||||
},
|
||||
"team_msg": {
|
||||
"name": "team_msg",
|
||||
"desc": "Agent Team 持久化消息总线,用于团队协作通信"
|
||||
}
|
||||
},
|
||||
"paths": {
|
||||
|
||||
@@ -34,7 +34,8 @@
|
||||
"hooks": "Hooks",
|
||||
"rules": "规则",
|
||||
"explorer": "文件浏览器",
|
||||
"graph": "图浏览器"
|
||||
"graph": "图浏览器",
|
||||
"teams": "团队执行"
|
||||
},
|
||||
"sidebar": {
|
||||
"collapse": "收起",
|
||||
|
||||
65
ccw/frontend/src/locales/zh/team.json
Normal file
65
ccw/frontend/src/locales/zh/team.json
Normal file
@@ -0,0 +1,65 @@
|
||||
{
|
||||
"title": "团队执行",
|
||||
"description": "可视化 Agent 团队的执行状态和消息流",
|
||||
"selectTeam": "选择团队",
|
||||
"noTeamSelected": "请选择一个团队",
|
||||
"members": "成员",
|
||||
"messages": "消息",
|
||||
"elapsed": "已用时间",
|
||||
"autoRefresh": "自动刷新",
|
||||
"filterByType": "按类型筛选",
|
||||
"filterAll": "所有类型",
|
||||
"stage": "阶段",
|
||||
"empty": {
|
||||
"title": "暂无活跃团队",
|
||||
"description": "使用 /team:coordinate 创建团队以开始协作",
|
||||
"noMessages": "暂无消息",
|
||||
"noMessagesHint": "团队刚刚创建,等待第一条消息"
|
||||
},
|
||||
"pipeline": {
|
||||
"title": "Pipeline 进度",
|
||||
"plan": "计划",
|
||||
"impl": "实现",
|
||||
"test": "测试",
|
||||
"review": "审查",
|
||||
"completed": "已完成",
|
||||
"inProgress": "进行中",
|
||||
"pending": "待处理",
|
||||
"blocked": "已阻塞"
|
||||
},
|
||||
"membersPanel": {
|
||||
"title": "团队成员",
|
||||
"active": "活跃",
|
||||
"idle": "空闲",
|
||||
"lastAction": "最后动作",
|
||||
"messageCount": "消息数",
|
||||
"lastSeen": "最后活跃",
|
||||
"ago": "前"
|
||||
},
|
||||
"timeline": {
|
||||
"title": "消息时间线",
|
||||
"loadMore": "加载更多",
|
||||
"showing": "显示 {showing} / {total} 条消息",
|
||||
"filterFrom": "发送方",
|
||||
"filterTo": "接收方",
|
||||
"filterType": "消息类型",
|
||||
"clearFilters": "清除筛选",
|
||||
"expandData": "展开数据",
|
||||
"collapseData": "折叠数据",
|
||||
"noRef": "无引用"
|
||||
},
|
||||
"messageType": {
|
||||
"plan_ready": "计划就绪",
|
||||
"plan_approved": "计划批准",
|
||||
"plan_revision": "计划修订",
|
||||
"task_unblocked": "任务解锁",
|
||||
"impl_complete": "实现完成",
|
||||
"impl_progress": "实现进度",
|
||||
"test_result": "测试结果",
|
||||
"review_result": "审查结果",
|
||||
"fix_required": "需要修复",
|
||||
"error": "错误",
|
||||
"shutdown": "关闭",
|
||||
"message": "消息"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user