v0.12.9: Completion Gate 架构修复 + 工作空间文件夹选择 + 搜索/Plan 全链路加固
Fix: - Completion Gate read_file 误报消除 — 缩窄匹配为仅明确工具声明 + 写后读豁免 - Gate 阻断重试消息重写 — 待办中与 Gate 拦截匹配时明确要求调工具而非模糊修正 - FileWriteDedupHook (pre_tool) + PlanAutoTrackHook (post_tool) — Harness 插件化 - 工作空间浏览按钮修复 — openFile→openDirectory,原生文件夹选择对话框 - pre_tool Hook 执行结果可阻断 — HookResult.passed=false 时拦截工具执行 - Plan 步骤上限 6 + 动词过滤 + 阶段标题过滤 — 适配不同模型格式 - Plan Mode 任务描述固化到系统提示词 — 压缩后不丢失任务目标 - 全部完成信号去重 — system 消息不重复注入 - handleReflecting 空响应 pop() 精确定位最后 assistant 消息 Refactor: - agent-engine.ts 移除全部硬编码模块变量和函数 — 迁移到 Hook 系统 - extractPlanSteps 增加 ACTION_VERBS 动词过滤 - Plan rejection 不再重置 loopCount
This commit is contained in:
@@ -267,12 +267,11 @@ export function initSettingsModal(): void {
|
||||
btnBrowseWorkspace.addEventListener('click', async () => {
|
||||
const bridge = window.metonaDesktop;
|
||||
if (!bridge?.isDesktop) return;
|
||||
const paths = await bridge.dialog.openFile({
|
||||
filters: [{ name: '文件夹', extensions: ['*'] }]
|
||||
});
|
||||
// Electron openFile 对话框不能直接选文件夹,这里用 saveFile 代替
|
||||
// 或者让用户手动输入路径
|
||||
showToast('请在输入框中直接修改路径', 'info');
|
||||
const paths = await bridge.dialog.openDirectory();
|
||||
if (paths && paths.length > 0) {
|
||||
inputWorkspaceDir.value = paths[0];
|
||||
inputWorkspaceDir.dispatchEvent(new Event('blur'));
|
||||
}
|
||||
});
|
||||
// 双击输入框解锁编辑
|
||||
inputWorkspaceDir.addEventListener('dblclick', () => {
|
||||
|
||||
Reference in New Issue
Block a user