Domye (@18918045607)修复pi agent在windows下生成nul的问题 中发帖

原理就是拦截 Windows bash 命令中的 ‘> nul’ 重定向(会创建无法删除的文件) 
在拓展文件夹加上这个ts文件即可
// 自动改写为 '> /dev/null'。
// 覆盖两个入口:
// - tool_call : LLM 发起的 bash 调用
// - user_bash : 用户手动执行 !/!! 命令

import type { ExtensionAPI } from "@earendil-works/pi-coding-agent"
import {
createLocalBashOperations,
isToolCallEventType,
} from "@earendil-works/pi-coding-agent"

// 匹配 '> nul' / '2> nul' / '&> nul',排除 '/dev/null'
con...