feat(web/kb): 知識庫支援 AUTO_RUNBOOK + ANTI_PATTERN 類型顯示
- KnowledgeEntry type: 加入 auto_runbook + anti_pattern - TYPE_COLORS: auto_runbook (紫色) + anti_pattern (紅色) - 類型過濾器: 新增兩種類型選項 - i18n: zh-TW + en 新增 type.auto_runbook + type.anti_pattern + status.published Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -30,7 +30,8 @@ interface KnowledgeEntry {
|
||||
id: string
|
||||
title: string
|
||||
content: string
|
||||
entry_type: 'incident_case' | 'runbook' | 'best_practice' | 'postmortem'
|
||||
// 2026-04-04 Claude Code: Phase 25 P1 新增 auto_runbook + anti_pattern
|
||||
entry_type: 'incident_case' | 'runbook' | 'best_practice' | 'postmortem' | 'auto_runbook' | 'anti_pattern'
|
||||
category: string
|
||||
tags: string[]
|
||||
source: 'ai_extracted' | 'human'
|
||||
@@ -76,6 +77,9 @@ const TYPE_COLORS: Record<string, string> = {
|
||||
runbook: 'bg-claw-blue/10 text-claw-blue border-claw-blue/20',
|
||||
best_practice: 'bg-status-healthy/10 text-status-healthy border-status-healthy/20',
|
||||
postmortem: 'bg-status-critical/10 text-status-critical border-status-critical/20',
|
||||
// 2026-04-04 Claude Code: Phase 25 P1 — Auto-Harvesting 新增類型
|
||||
auto_runbook: 'bg-purple-100 text-purple-600 border-purple-200',
|
||||
anti_pattern: 'bg-red-100 text-red-600 border-red-200',
|
||||
}
|
||||
|
||||
const STATUS_COLORS: Record<string, string> = {
|
||||
@@ -307,7 +311,7 @@ export default function KnowledgeBasePage({
|
||||
className="text-xs font-body bg-nothing-gray-50 border border-nothing-gray-200 rounded-md px-2 py-1.5 text-secondary focus:outline-none"
|
||||
>
|
||||
<option value="">{t('filterByType')}</option>
|
||||
{['incident_case', 'runbook', 'best_practice', 'postmortem'].map(tp => (
|
||||
{['incident_case', 'runbook', 'best_practice', 'postmortem', 'auto_runbook', 'anti_pattern'].map(tp => (
|
||||
<option key={tp} value={tp}>{t(`type.${tp}`)}</option>
|
||||
))}
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user