feat(a2ui): Implement A2UI backend with question handling and WebSocket support

- Added A2UITypes for defining question structures and answers.
- Created A2UIWebSocketHandler for managing WebSocket connections and message handling.
- Developed ask-question tool for interactive user questions via A2UI.
- Introduced platformUtils for platform detection and shell command handling.
- Centralized TypeScript types in index.ts for better organization.
- Implemented compatibility checks for hook templates based on platform requirements.
This commit is contained in:
catlog22
2026-01-31 15:27:12 +08:00
parent 4e009bb03a
commit 715ef12c92
163 changed files with 19495 additions and 715 deletions

View File

@@ -0,0 +1,79 @@
{
"title": "规则管理器",
"description": "管理 Claude Code 记忆规则和配置",
"severity": {
"error": "错误",
"warning": "警告",
"info": "信息"
},
"location": {
"project": "项目",
"user": "用户"
},
"actions": {
"edit": "编辑",
"delete": "删除",
"create": "创建规则",
"update": "更新规则",
"toggle": "切换启用状态",
"enable": "启用规则",
"disable": "禁用规则"
},
"filters": {
"all": "全部",
"enabled": "已启用",
"disabled": "已禁用",
"location": "位置",
"category": "类别"
},
"searchPlaceholder": "搜索规则...",
"emptyState": {
"title": "未找到规则",
"message": "没有规则匹配当前的筛选条件。",
"createFirst": "创建您的第一个规则以开始使用"
},
"card": {
"pattern": "模式",
"subdirectory": "目录"
},
"dialog": {
"addTitle": "创建新规则",
"editTitle": "编辑规则: {name}",
"deleteTitle": "删除规则",
"deleteConfirm": "确定要删除此规则吗?此操作无法撤销。",
"description": "配置 Claude Code 记忆规则以指导 AI 行为",
"form": {
"name": "规则名称",
"namePlaceholder": "例如:代码风格指南",
"description": "描述",
"descriptionPlaceholder": "简要描述此规则的作用",
"category": "类别",
"severity": "严重程度",
"fileName": "文件名",
"fileNamePlaceholder": "rule-name.md",
"location": "位置",
"subdirectory": "子目录(可选)",
"subdirectoryPlaceholder": "例如coding/security",
"pattern": "文件模式(可选)",
"patternPlaceholder": "例如src/**/*.ts",
"content": "规则内容",
"contentPlaceholder": "以 markdown 格式输入规则内容...",
"enabled": "已启用"
},
"validation": {
"nameRequired": "规则名称为必填项",
"fileNameRequired": "文件名为必填项",
"fileNameMd": "文件名必须以 .md 结尾",
"locationRequired": "位置为必填项",
"contentRequired": "规则内容为必填项"
},
"actions": {
"saving": "保存中..."
}
},
"status": {
"creating": "创建中...",
"updating": "更新中...",
"deleting": "删除中..."
}
}