优化: 前端DRY收敛与命名对齐
审批等待格式化与阈值沉 utils/time 正典 相对时间阶梯三套收敛 formatRelative 参数化 灵感状态表沉 constants,透传通道退役 aggText/clearOwn 等命名对齐,IPC 参数名统一 conversation_id
This commit is contained in:
+10
-5
@@ -103,8 +103,8 @@ export const aiApi = {
|
||||
|
||||
/** 查询某对话积压的待审批工具(重启后恢复 toolCard pending_approval 态用)。
|
||||
* 返 kind 字段(risk/path),前端按 kind 渲染不同决策按钮。 */
|
||||
pendingToolCalls(convId: string): Promise<{ tool_call_id: string; conversation_id: string | null; kind: 'risk' | 'path' }[]> {
|
||||
return invoke('ai_pending_tool_calls', { convId })
|
||||
pendingToolCalls(conversationId: string): Promise<{ tool_call_id: string; conversation_id: string | null; kind: 'risk' | 'path' }[]> {
|
||||
return invoke('ai_pending_tool_calls', { conversationId })
|
||||
},
|
||||
|
||||
/** 清空对话 */
|
||||
@@ -251,9 +251,14 @@ export const aiApi = {
|
||||
return invoke('ai_set_agent_max_retries', { value })
|
||||
},
|
||||
|
||||
/** 列出本机 Claude 技能(skills + commands + plugins) */
|
||||
listSkills(): Promise<SkillInfo[]> {
|
||||
return invoke('ai_list_skills')
|
||||
/**
|
||||
* 列出本机 Claude 技能(project + skills + commands + plugins)。
|
||||
* @param projectPath 当前项目根目录(可选)。传入时后端额外扫项目级
|
||||
* `.claude/skills` 各技能目录下的 SKILL.md(source="project",同名覆盖 home 级);
|
||||
* 不传沿用已设项目根(无则仅 home 级)。
|
||||
*/
|
||||
listSkills(projectPath?: string): Promise<SkillInfo[]> {
|
||||
return invoke('ai_list_skills', { projectPath: projectPath ?? null })
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -38,6 +38,6 @@ export const settingsApi = {
|
||||
|
||||
/** 读取多 ReAct Plan 执行开关 */
|
||||
getPlanExecution(): Promise<boolean> {
|
||||
return invoke<boolean>('get_plan_execution')
|
||||
return invoke<boolean>('is_plan_execution_enabled')
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user