novacode 0.5.1 → 0.5.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/README.md +2 -9
- package/package.json +6 -4
- package/src/main.ts +4 -5
- package/src/tui/app.tsx +3 -2
- package/src/update.ts +4 -1
package/README.md
CHANGED
|
@@ -38,9 +38,9 @@ On first launch, nova walks you through a quick setup:
|
|
|
38
38
|
|
|
39
39
|
That's it. You're ready to go.
|
|
40
40
|
|
|
41
|
-
### 3.
|
|
41
|
+
### 3. Start chatting
|
|
42
42
|
|
|
43
|
-
|
|
43
|
+
Just run `nova` to start chatting:
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
nova
|
|
@@ -48,13 +48,6 @@ nova
|
|
|
48
48
|
|
|
49
49
|
You'll get a prompt where you can ask questions, give coding tasks, and use `/help` for available commands.
|
|
50
50
|
|
|
51
|
-
**Print mode** — pass a prompt as an argument (non-interactive, streams output to stdout):
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
nova "explain the auth module in this project"
|
|
55
|
-
nova "fix the type error in src/utils.ts"
|
|
56
|
-
```
|
|
57
|
-
|
|
58
51
|
### 4. Flags & commands
|
|
59
52
|
|
|
60
53
|
Available flags: `--provider`, `--model`, `--api-key`, `-s` (resume session)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "novacode",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.2",
|
|
4
4
|
"description": "Open-source multi-provider coding agent. Bun-native.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "src/main.ts",
|
|
@@ -20,8 +20,7 @@
|
|
|
20
20
|
"format": "biome format --write .",
|
|
21
21
|
"typecheck": "tsc --noEmit",
|
|
22
22
|
"build": "bun build src/main.ts --compile --outfile nova",
|
|
23
|
-
"check": "bun run typecheck && bun run lint && bun test"
|
|
24
|
-
"prepublishOnly": "bun run check"
|
|
23
|
+
"check": "bun run typecheck && bun run lint && bun test"
|
|
25
24
|
},
|
|
26
25
|
"keywords": [
|
|
27
26
|
"coding-agent",
|
|
@@ -30,7 +29,10 @@
|
|
|
30
29
|
"bun",
|
|
31
30
|
"llm"
|
|
32
31
|
],
|
|
33
|
-
"license": "
|
|
32
|
+
"license": "Apache-2.0",
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
34
36
|
"repository": {
|
|
35
37
|
"type": "git",
|
|
36
38
|
"url": "https://github.com/rwitesh/novacode"
|
package/src/main.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
|
-
import { join } from "node:path"
|
|
3
2
|
import { parseArgs } from "node:util"
|
|
4
3
|
/**
|
|
5
4
|
* Entry point for the nova CLI.
|
|
6
|
-
* Handles configuration, CLI flags, and
|
|
5
|
+
* Handles configuration, CLI flags, and runs interactive TUI mode.
|
|
7
6
|
*/
|
|
8
7
|
import chalk from "chalk"
|
|
9
8
|
import { Agent } from "./agent/agent.ts"
|
|
@@ -14,7 +13,7 @@ import { configExists, loadAuth, loadConfig } from "./config/store.ts"
|
|
|
14
13
|
import { runOnboarding } from "./onboarding/wizard.ts"
|
|
15
14
|
import { getSessionStore } from "./session/store.ts"
|
|
16
15
|
import { getAllTools } from "./tools/index.ts"
|
|
17
|
-
import { runUpdate } from "./update.ts"
|
|
16
|
+
import { getCurrentVersion, runUpdate } from "./update.ts"
|
|
18
17
|
|
|
19
18
|
// Ensure providers are registered
|
|
20
19
|
import "./provider/openai.ts"
|
|
@@ -48,8 +47,8 @@ async function main() {
|
|
|
48
47
|
const { flags, args } = parseCli()
|
|
49
48
|
|
|
50
49
|
if (flags.version) {
|
|
51
|
-
const
|
|
52
|
-
console.log(`nova ${
|
|
50
|
+
const version = await getCurrentVersion()
|
|
51
|
+
console.log(`nova ${version}`)
|
|
53
52
|
process.exit(0)
|
|
54
53
|
}
|
|
55
54
|
|
package/src/tui/app.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import type { Agent } from "../agent/agent.ts"
|
|
|
5
5
|
import { COMMANDS, dispatch } from "../commands/index.ts"
|
|
6
6
|
import type { SessionStore } from "../session/store.ts"
|
|
7
7
|
import type { Msg } from "../types.ts"
|
|
8
|
-
import { checkForUpdate } from "../update.ts"
|
|
8
|
+
import { checkForUpdate, getCurrentVersion } from "../update.ts"
|
|
9
9
|
import { formatToolArgs, makeRelative } from "../util.ts"
|
|
10
10
|
import { formatMarkdown } from "./markdown.ts"
|
|
11
11
|
export async function interactive(
|
|
@@ -15,7 +15,8 @@ export async function interactive(
|
|
|
15
15
|
): Promise<void> {
|
|
16
16
|
// Hide system cursor during session
|
|
17
17
|
process.stdout.write("\x1B[?25l")
|
|
18
|
-
|
|
18
|
+
const version = await getCurrentVersion()
|
|
19
|
+
process.stdout.write(`${chalk.cyan.bold("⚡ novacode")} ${chalk.gray(`v${version}`)}\n`)
|
|
19
20
|
|
|
20
21
|
try {
|
|
21
22
|
const { waitUntilExit } = render(<App agent={agent} store={store} sessionId={sessionId} />)
|
package/src/update.ts
CHANGED
|
@@ -2,11 +2,14 @@ import { join } from "node:path"
|
|
|
2
2
|
import { semver } from "bun"
|
|
3
3
|
|
|
4
4
|
let cachedLatest: string | null = null
|
|
5
|
+
let cachedCurrent: string | null = null
|
|
5
6
|
|
|
6
7
|
export async function getCurrentVersion(): Promise<string> {
|
|
8
|
+
if (cachedCurrent) return cachedCurrent
|
|
7
9
|
try {
|
|
8
10
|
const pkg = await Bun.file(join(import.meta.dir, "..", "package.json")).json()
|
|
9
|
-
|
|
11
|
+
cachedCurrent = (pkg.version as string) ?? "0.0.0"
|
|
12
|
+
return cachedCurrent
|
|
10
13
|
} catch {
|
|
11
14
|
return "0.0.0"
|
|
12
15
|
}
|