feat(ccw): Add count-based memory update strategy and fix MCP card click

- Add count-based update strategy for memory hooks (threshold-based triggering)
- Add threshold config field (default: 10, range: 3-50)
- Add i18n translations for count-based strategy (EN/ZH)
- Fix MCP card click not responding due to HTML entity encoding in JSON
- Add unescapeHtml() utility function for decoding HTML entities
- Move stopPropagation from container div to individual buttons
- Change CCW MCP install to use cmd /c npx -y format for Windows

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-12-19 11:41:21 +08:00
parent 69049e3f45
commit c7ced2bfbb
6 changed files with 95 additions and 13 deletions

View File

@@ -728,6 +728,10 @@ const i18n = {
'hook.wizard.onSessionEndDesc': 'Update documentation when Claude session ends',
'hook.wizard.periodicUpdate': 'Periodic Update',
'hook.wizard.periodicUpdateDesc': 'Update documentation at regular intervals during session',
'hook.wizard.countBasedUpdate': 'Count-Based Update',
'hook.wizard.countBasedUpdateDesc': 'Update documentation when file changes reach threshold',
'hook.wizard.fileCountThreshold': 'File Count Threshold',
'hook.wizard.fileCountThresholdDesc': 'Number of file changes to trigger update',
'hook.wizard.skillContext': 'SKILL Context Loader',
'hook.wizard.skillContextDesc': 'Automatically load SKILL packages based on keywords in user prompts',
'hook.wizard.keywordMatching': 'Keyword Matching',
@@ -1977,6 +1981,10 @@ const i18n = {
'hook.wizard.onSessionEndDesc': 'Claude 会话结束时更新文档',
'hook.wizard.periodicUpdate': '定期更新',
'hook.wizard.periodicUpdateDesc': '会话期间定期更新文档',
'hook.wizard.countBasedUpdate': '累计数量更新',
'hook.wizard.countBasedUpdateDesc': '文件变动达到阈值时更新文档',
'hook.wizard.fileCountThreshold': '文件数量阈值',
'hook.wizard.fileCountThresholdDesc': '触发更新的文件变动数量',
'hook.wizard.skillContext': 'SKILL 上下文加载器',
'hook.wizard.skillContextDesc': '根据用户提示中的关键词自动加载 SKILL 包',
'hook.wizard.keywordMatching': '关键词匹配',