新增: Phase2 阶段收尾(Sprint 1-20)
重构:删 5 零引用 crate(df-evolve/plugin/stages/task/traceability)+ 清死模块、ai.rs 拆 11 子 module、ai.ts 拆 6 composable、i18n 拆目录 功能:知识库全栈(df-project/scan + CRUD + 时间线 + 前端)、Settings 拆分、appSettings KV 迁移、模型池、LLM 并发 Semaphore 修复:审批持久化根治、ConditionEngine 默认拒绝、NodeRegistry unimplemented 清除、promote 补偿删除、工具结果截断 50KB、路径校验防 symlink 逃逸 文档:B-03 人工审批设计、决策记录三分档、规格契约自检、经验记录、todo 看板、PROGRESS 更新 详见 PROGRESS.md。src-tauri/儿童每日打卡应用/ 与本项目无关,已排除。
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { invoke } from '@tauri-apps/api/core'
|
||||
import type { ProjectRecord, CreateProjectInput } from './types'
|
||||
import type { ProjectRecord, CreateProjectInput, AiScanResult } from './types'
|
||||
|
||||
export const projectApi = {
|
||||
list(): Promise<ProjectRecord[]> {
|
||||
@@ -21,4 +21,41 @@ export const projectApi = {
|
||||
delete(id: string): Promise<boolean> {
|
||||
return invoke('delete_project', { id })
|
||||
},
|
||||
|
||||
listDeleted(): Promise<ProjectRecord[]> {
|
||||
return invoke('list_deleted_projects')
|
||||
},
|
||||
|
||||
restore(id: string): Promise<boolean> {
|
||||
return invoke('restore_project', { id })
|
||||
},
|
||||
|
||||
purge(id: string): Promise<boolean> {
|
||||
return invoke('purge_project', { id })
|
||||
},
|
||||
|
||||
/** 探测目录技术栈(选目录后实时预览) */
|
||||
scanStack(path: string): Promise<string[]> {
|
||||
return invoke('scan_project_stack', { path })
|
||||
},
|
||||
|
||||
/** 检查目录是否已被其他项目绑定(防重复,excludeId 排除自身) */
|
||||
checkBinding(path: string, excludeId?: string): Promise<ProjectRecord | null> {
|
||||
return invoke('check_path_binding', { path, excludeId })
|
||||
},
|
||||
|
||||
/** 重定位项目目录(校验+重探测 stack,返回最新记录) */
|
||||
relocatePath(id: string, newPath: string): Promise<ProjectRecord> {
|
||||
return invoke('relocate_project_path', { id, newPath })
|
||||
},
|
||||
|
||||
/** 检查目录是否存在(详情页"目录是否还在") */
|
||||
checkPathExists(path: string): Promise<boolean> {
|
||||
return invoke('check_path_exists', { path })
|
||||
},
|
||||
|
||||
/** AI 扫描目录,自动分析基础信息(description/stack/project_type) */
|
||||
scanWithAi(path: string): Promise<AiScanResult> {
|
||||
return invoke('scan_project_with_ai', { path })
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user