@meowlynxsea/koi 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meowlynxsea/koi",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "A coding agent built on Pi SDK with TUI + Bun runtime",
5
5
  "module": "src/main.tsx",
6
6
  "type": "module",
@@ -0,0 +1,19 @@
1
+ // 版本号统一从 package.json 读取
2
+ import { readFileSync } from "node:fs";
3
+ import { resolve } from "node:path";
4
+
5
+ interface PackageJson {
6
+ version: string;
7
+ }
8
+
9
+ function getVersion(): string {
10
+ try {
11
+ const packageJsonPath = resolve(process.cwd(), "package.json");
12
+ const packageJson = JSON.parse(readFileSync(packageJsonPath, "utf-8")) as PackageJson;
13
+ return `v${packageJson.version}`;
14
+ } catch {
15
+ return "v0.0.0";
16
+ }
17
+ }
18
+
19
+ export const VERSION = getVersion();
@@ -7,6 +7,7 @@
7
7
 
8
8
  import { createTextAttributes } from "@opentui/core";
9
9
  import { getMcpConnections, getMcpStatusSummary } from "../../services/mcp/index.js";
10
+ import { VERSION } from "../../config/version.js";
10
11
 
11
12
  const KOI_LOGO = [
12
13
  "██ ███ ███████ ██████",
@@ -16,8 +17,6 @@ const KOI_LOGO = [
16
17
  "██ ███ ███████ ██████",
17
18
  ];
18
19
 
19
- const VERSION = "v0.1.0";
20
-
21
20
  // 水墨风格渐变色:从淡蓝墨到浓墨
22
21
  const GRADIENT_STOPS = [
23
22
  "#778899", // 淡蓝灰(偏向蓝色)