xonecas.io
64875
Mc

mini-coder / commit 0e1cbfd

fix: version thingi

xonecas2026-02-20 0e1cbfdbdc67a701dce5566cad342a31977828bc parent 26c61a3

3 files changed

TODO.md+2−6
@@ -1,7 +1,3 @@
1-Plan mode needs a different prompt arrowA when is on
2-
3----
4-
51 # Fix implementation error
62
73 1. The DB only saves text — agent.ts:412–429 strips tool parts before writing to SQLite. That's the right design for persistence, but coreHistory in memory is never trimmed.
@@ -10,6 +6,8 @@ Plan mode needs a different prompt arrowA when is on
106 the history on resume. This breaks the schema, this is ok, we generate a new one.
117 - Ensure we don't break message format expected by the sdks.
128
9+Error now when resuling a session:
10+
1311 ```sh
1412 mini-coder on  main
1513 → bun run src/index.ts -c
@@ -85,8 +83,6 @@ Besides undoing the conversation turn, it should restore some snapshot, using gi
8583
8684 # Tools output
8785
88-Insert/read/edit/write/grep all were changed with the hashline feature, outputs needs to be re-done to match our style of nice formatted data and diffs.
89-
9086 Subagent needs visibity on the ui somehow... that accounts for multiple in parallel... Needs planning, maybe a tree view showing the subagent's tool calls before the output.
9187
9288 ---
package.json+31−31
@@ -1,33 +1,33 @@
11 {
2- "name": "mini-coder",
3- "version": "0.1.0",
4- "description": "A small, fast CLI coding agent",
5- "module": "src/index.ts",
6- "type": "module",
7- "bin": {
8- "mc": "./src/index.ts"
9- },
10- "scripts": {
11- "dev": "bun run src/index.ts",
12- "typecheck": "tsc --noEmit",
13- "lint": "biome check src",
14- "format": "biome format --write src",
15- "test": "bun test"
16- },
17- "dependencies": {
18- "@ai-sdk/anthropic": "^3.0.46",
19- "@ai-sdk/google": "^3.0.30",
20- "@ai-sdk/openai": "^3.0.30",
21- "@ai-sdk/openai-compatible": "^2.0.30",
22- "@modelcontextprotocol/sdk": "^1.26.0",
23- "ai": "^6.0.94",
24- "ollama-ai-provider": "^1.2.0",
25- "yoctocolors": "^2.1.1",
26- "zod": "^4.3.6"
27- },
28- "devDependencies": {
29- "@biomejs/biome": "^1.9.4",
30- "@types/bun": "latest",
31- "typescript": "^5.8.3"
32- }
2+ "name": "mini-coder",
3+ "version": "0.0.1",
4+ "description": "A small, fast CLI coding agent",
5+ "module": "src/index.ts",
6+ "type": "module",
7+ "bin": {
8+ "mc": "./src/index.ts"
9+ },
10+ "scripts": {
11+ "dev": "bun run src/index.ts",
12+ "typecheck": "tsc --noEmit",
13+ "lint": "biome check src",
14+ "format": "biome format --write src",
15+ "test": "bun test"
16+ },
17+ "dependencies": {
18+ "@ai-sdk/anthropic": "^3.0.46",
19+ "@ai-sdk/google": "^3.0.30",
20+ "@ai-sdk/openai": "^3.0.30",
21+ "@ai-sdk/openai-compatible": "^2.0.30",
22+ "@modelcontextprotocol/sdk": "^1.26.0",
23+ "ai": "^6.0.94",
24+ "ollama-ai-provider": "^1.2.0",
25+ "yoctocolors": "^2.1.1",
26+ "zod": "^4.3.6"
27+ },
28+ "devDependencies": {
29+ "@biomejs/biome": "^1.9.4",
30+ "@types/bun": "latest",
31+ "typescript": "^5.8.3"
32+ }
3333 }
src/cli/output.ts+16−1
@@ -1,9 +1,23 @@
1+import { readFileSync } from "node:fs";
12 import { homedir } from "node:os";
3+
24 import * as c from "yoctocolors";
35 import type { TurnEvent } from "../llm-api/types.ts";
46 import { renderLine } from "./markdown.ts";
57
68 const HOME = homedir();
9+const PACKAGE_VERSION = (() => {
10+ try {
11+ const raw = readFileSync(
12+ new URL("../../package.json", import.meta.url),
13+ "utf8",
14+ );
15+ const data = JSON.parse(raw) as { version?: string };
16+ return data.version ?? "unknown";
17+ } catch {
18+ return "unknown";
19+ }
20+})();
721
822 // ─── Terminal restore ─────────────────────────────────────────────────────────
923
@@ -625,6 +639,7 @@ export function renderStatusBar(opts: {
625639 const middle = c.dim(cwdDisplay);
626640 const sep = c.dim(" ");
627641 const full = [...left, middle, ...right.reverse()].join(sep);
642+
628643 const visible = stripAnsi(full);
629644
630645 const out = visible.length > cols ? truncateAnsi(full, cols - 1) : full;
@@ -636,7 +651,7 @@ export function renderStatusBar(opts: {
636651
637652 export function renderBanner(model: string, cwd: string): void {
638653 writeln();
639- writeln(` ${c.cyan("mc")} ${c.dim("mini-coder · v0.1.0")}`);
654+ writeln(` ${c.cyan("mc")} ${c.dim(`mini-coder · v${PACKAGE_VERSION}`)}`);
640655 writeln(` ${c.dim(model)} ${c.dim("·")} ${c.dim(cwd)}`);
641656 writeln(` ${c.dim("/help for commands · ctrl+d to exit")}`);
642657 writeln();