feat: webUI 文本文件编辑/保存 + 相关改动

- FileViewer 新增文本编辑模式(textarea + 保存/取消 + Ctrl+S)
- 后端 /api/files POST 新增 type=write 原子写入
- i18n 补充编辑相关文案(en/zh-CN)
- searxng-search: 加强 web_search 自动搜索条件
- worktree/next.config: 路径比较与 allowedDevOrigins 优化
This commit is contained in:
luckyyzh
2026-08-01 02:58:01 +08:00
parent 551c59413e
commit a70798e874
8 changed files with 429 additions and 12 deletions
+6 -1
View File
@@ -9,6 +9,11 @@ try {
piVersion = (JSON.parse(readFileSync(piPkgPath, "utf8")) as { version: string }).version;
} catch { /* package not found, use default */ }
const allowedDevOrigins = [
"192.168.*.*",
...(process.env.PI_WEB_ALLOWED_HOSTS?.split(",") ?? []),
].map((origin) => origin.trim()).filter(Boolean);
const nextConfig: NextConfig = {
devIndicators: false,
serverExternalPackages: [
@@ -18,7 +23,7 @@ const nextConfig: NextConfig = {
"@earendil-works/pi-ai",
"@earendil-works/pi-tui",
],
allowedDevOrigins: ['192.168.*.*'],
allowedDevOrigins,
async headers() {
return [
{