kanna-code 0.1.2 → 0.1.3

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.
@@ -5,7 +5,7 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
6
  <link rel="icon" type="image/png" href="/favicon.png" />
7
7
  <title>Kanna</title>
8
- <script type="module" crossorigin src="/assets/index-BSJWGJKC.js"></script>
8
+ <script type="module" crossorigin src="/assets/index-DelZ0MyD.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="/assets/index-BRiM6Nxc.css">
10
10
  </head>
11
11
  <body>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "kanna-code",
3
3
  "type": "module",
4
- "version": "0.1.2",
4
+ "version": "0.1.3",
5
5
  "description": "Local-only project chat UI",
6
6
  "repository": {
7
7
  "type": "git",
@@ -1,6 +1,6 @@
1
1
  import { query, type CanUseTool, type PermissionResult, type Query } from "@anthropic-ai/claude-agent-sdk"
2
2
  import type { ClientCommand } from "../shared/protocol"
3
- import { SDK_CLIENT_APP } from "../shared/branding"
3
+
4
4
  import type { KannaStatus, PendingToolSnapshot } from "../shared/types"
5
5
  import { EventStore } from "./event-store"
6
6
  import { generateTitleForChat } from "./generate-title"
package/src/server/cli.ts CHANGED
@@ -1,10 +1,12 @@
1
1
  import process from "node:process"
2
2
  import { spawn, spawnSync } from "node:child_process"
3
- import { APP_NAME, CLI_COMMAND, getDataDirDisplay, LOG_PREFIX, SDK_CLIENT_APP } from "../shared/branding"
3
+ import { APP_NAME, CLI_COMMAND, getDataDirDisplay, LOG_PREFIX } from "../shared/branding"
4
4
  import { PROD_SERVER_PORT } from "../shared/ports"
5
5
  import { startKannaServer } from "./server"
6
6
 
7
- const VERSION = SDK_CLIENT_APP.split("/")[1] ?? "0.0.0"
7
+ // Read version from package.json at the package root
8
+ const pkg = await Bun.file(new URL("../../package.json", import.meta.url)).json()
9
+ const VERSION: string = pkg.version ?? "0.0.0"
8
10
 
9
11
  interface CliOptions {
10
12
  port: number
@@ -2,7 +2,9 @@ export const APP_NAME = "Kanna"
2
2
  export const CLI_COMMAND = "kanna"
3
3
  export const DATA_ROOT_NAME = ".kanna"
4
4
  export const PACKAGE_NAME = "kanna-code"
5
- export const SDK_CLIENT_APP = "kanna/0.1.0"
5
+ // Read version from package.json — JSON import works in both Bun and Vite
6
+ import pkg from "../../package.json"
7
+ export const SDK_CLIENT_APP = `kanna/${pkg.version}`
6
8
  export const LOG_PREFIX = "[kanna]"
7
9
  export const DEFAULT_NEW_PROJECT_ROOT = `~/${APP_NAME}`
8
10