mirror of
https://github.com/ben4202121/buddybridge.git
synced 2026-07-22 07:48:01 +00:00
- 桥接 Obsidian 与本地 WorkBuddy/CodeBuddy CLI - 多轮对话管理,流式输出 - 通过 node 执行 codebuddy 脚本(Windows spawn 兼容) - 设置面板支持自定义 Gateway URL - 对话持久化到 Obsidian data.json
19 lines
645 B
JavaScript
19 lines
645 B
JavaScript
import { readFileSync, writeFileSync } from "fs";
|
|
|
|
const targetVersion = process.env.npm_package_version || process.argv[2];
|
|
|
|
// 读取 manifest.json
|
|
let manifest = JSON.parse(readFileSync("manifest.json", "utf8"));
|
|
const { minAppVersion } = manifest;
|
|
manifest.version = targetVersion;
|
|
writeFileSync("manifest.json", JSON.stringify(manifest, null, 2) + "\n");
|
|
|
|
// 更新 versions.json
|
|
let versions = {};
|
|
try {
|
|
versions = JSON.parse(readFileSync("versions.json", "utf8"));
|
|
} catch (e) {
|
|
// 文件不存在,创建新的
|
|
}
|
|
versions[targetVersion] = minAppVersion;
|
|
writeFileSync("versions.json", JSON.stringify(versions, null, 2) + "\n");
|