新增: F-260619-03 PhaseA AI工具文件访问动态权限白名单
- state.rs: AllowedDirs(persistent HashSet + is_authorized workspace_root+starts_with + canonicalize) + AppState allowed_dirs Arc + reload/set/get Settings KV - tool_registry.rs: resolve_workspace_path 多目录白名单双校验(词法+canonicalize) + handler闭包引入AllowedDirs Arc(9文件工具) + run_command不走白名单 - commands/config.rs: ai_get/set_allowed_dirs IPC + lib.rs注册 - 前端: api/ai.ts + AllowedDirsPanel.vue(Settings授权目录UI) + i18n - 测试: 5 AllowedDirs单测 + 基线适配(29工具不变) workspace_root始终授权(零回归); Phase A仅持久化(不含B弹窗/C写约束) 主代兜底: cargo check devflow 0 + test 129 + vue-tsc 0
This commit is contained in:
@@ -40,6 +40,9 @@
|
||||
|
||||
<!-- ═══ 知识库配置(后端 IPC,embedding provider 依赖 ProviderPanel 列表)═══ -->
|
||||
<KnowledgePanel :ai-providers="aiProviders" />
|
||||
|
||||
<!-- ═══ F-260619-03 Phase A: AI 工具授权目录(白名单持久化)═══ -->
|
||||
<AllowedDirsPanel />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -51,6 +54,7 @@ import ProviderPanel from '@/components/settings/ProviderPanel.vue'
|
||||
import ConnectionPanel from '@/components/settings/ConnectionPanel.vue'
|
||||
import GeneralPanel from '@/components/settings/GeneralPanel.vue'
|
||||
import KnowledgePanel from '@/components/settings/KnowledgePanel.vue'
|
||||
import AllowedDirsPanel from '@/components/settings/AllowedDirsPanel.vue'
|
||||
import type { AiProviderConfig } from '@/api/types'
|
||||
|
||||
// ============================================================
|
||||
|
||||
Reference in New Issue
Block a user