新增: 技能注入反馈闭环与项目扫描前端接线

技能注入成功/失败 toast 与事件类型监听接线
项目级技能扫描前端传参点就绪
This commit is contained in:
lxy
2026-10-01 19:35:19 +08:00
parent 75c5e23523
commit 6ef15a0940
5 changed files with 33 additions and 2 deletions
+5 -1
View File
@@ -418,6 +418,10 @@ export type AiChatEvent = ({
// AE-2025-04 会话级信任:同会话已批准过同类操作(同工具+同目录)自动放行,前端显示轻量 toast。
// 不写消息/不动 pending(Started/Completed 仍独立发),仅提示性事件。
type: 'AiToolAutoApproved'; id: string; tool: string; dir: string
} | {
// 技能注入反馈闭环:/ 技能 resolve 成功(ok=true)/失败(ok=false,未找到或读失败)通知,
// 前端轻 toast(成功「已注入技能《name》」/失败「技能 name 未找到」)。仅提示,不改消息流。
type: 'AiSkillInjected'; name: string; ok: boolean
} | {
// path_auth 审批链阶段3b(统一审批模型):AiApprovalRequired 携带 kind 字段区分
// 'path'(F-260619-03 Phase B 路径授权挂起,走 once/session/always/deny)vs 'risk'(普通 RiskLevel 审批,
@@ -772,7 +776,7 @@ export interface SkillInfo {
name: string
description: string
argument_hint?: string
/** skill | command | plugin */
/** skill | project | command | plugin(project 为项目级 .claude/skills 扫描来源) */
source: string
/** SKILL.md 绝对路径(后端注入时读全文) */
path: string