ai-speedometer 1.4.2 → 2.0.1

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.
@@ -0,0 +1,115 @@
1
+ ; Query from: https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/99ddf573531c4dbe53f743ecbc1595af5eb1d32f/queries/markdown_inline/highlights.scm
2
+ ; From MDeiml/tree-sitter-markdown
3
+ (code_span) @markup.raw @nospell
4
+
5
+ (emphasis) @markup.italic
6
+
7
+ (strong_emphasis) @markup.strong
8
+
9
+ (strikethrough) @markup.strikethrough
10
+
11
+ (shortcut_link
12
+ (link_text) @nospell)
13
+
14
+ [
15
+ (backslash_escape)
16
+ (hard_line_break)
17
+ ] @string.escape
18
+
19
+ ; Conceal codeblock and text style markers
20
+ ([
21
+ (code_span_delimiter)
22
+ (emphasis_delimiter)
23
+ ] @conceal
24
+ (#set! conceal ""))
25
+
26
+ ; Inline links - style all parts
27
+ (inline_link
28
+ ["[" "(" ")"] @markup.link)
29
+
30
+ (inline_link
31
+ "]" @markup.link.bracket.close)
32
+
33
+ ; Conceal opening bracket
34
+ ((inline_link
35
+ "[" @conceal)
36
+ (#set! conceal ""))
37
+
38
+ ; Conceal closing bracket with space replacement
39
+ ((inline_link
40
+ "]" @conceal)
41
+ (#set! conceal " "))
42
+
43
+ ; Conceal image links
44
+ (image
45
+ [
46
+ "!"
47
+ "["
48
+ "]"
49
+ "("
50
+ (link_destination)
51
+ ")"
52
+ ] @markup.link
53
+ (#set! conceal ""))
54
+
55
+ ; Conceal full reference links
56
+ (full_reference_link
57
+ [
58
+ "["
59
+ "]"
60
+ (link_label)
61
+ ] @markup.link
62
+ (#set! conceal ""))
63
+
64
+ ; Conceal collapsed reference links
65
+ (collapsed_reference_link
66
+ [
67
+ "["
68
+ "]"
69
+ ] @markup.link
70
+ (#set! conceal ""))
71
+
72
+ ; Conceal shortcut links
73
+ (shortcut_link
74
+ [
75
+ "["
76
+ "]"
77
+ ] @markup.link
78
+ (#set! conceal ""))
79
+
80
+ [
81
+ (link_destination)
82
+ (uri_autolink)
83
+ ] @markup.link.url @nospell
84
+
85
+ [
86
+ (link_label)
87
+ (link_text)
88
+ (link_title)
89
+ (image_description)
90
+ ] @markup.link.label
91
+
92
+ ; Replace common HTML entities.
93
+ ((entity_reference) @character.special
94
+ (#eq? @character.special " ")
95
+ (#set! conceal ""))
96
+
97
+ ((entity_reference) @character.special
98
+ (#eq? @character.special "<")
99
+ (#set! conceal "<"))
100
+
101
+ ((entity_reference) @character.special
102
+ (#eq? @character.special "&gt;")
103
+ (#set! conceal ">"))
104
+
105
+ ((entity_reference) @character.special
106
+ (#eq? @character.special "&amp;")
107
+ (#set! conceal "&"))
108
+
109
+ ((entity_reference) @character.special
110
+ (#eq? @character.special "&quot;")
111
+ (#set! conceal "\""))
112
+
113
+ ((entity_reference) @character.special
114
+ (#any-of? @character.special "&ensp;" "&emsp;")
115
+ (#set! conceal " "))
@@ -0,0 +1,27 @@
1
+ ; Query from: https://raw.githubusercontent.com/nvim-treesitter/nvim-treesitter/refs/heads/master/queries/markdown/injections.scm
2
+ (fenced_code_block
3
+ (info_string
4
+ (language) @_lang)
5
+ (code_fence_content) @injection.content
6
+ (#set-lang-from-info-string! @_lang))
7
+
8
+ ((html_block) @injection.content
9
+ (#set! injection.language "html")
10
+ (#set! injection.combined)
11
+ (#set! injection.include-children))
12
+
13
+ ((minus_metadata) @injection.content
14
+ (#set! injection.language "yaml")
15
+ (#offset! @injection.content 1 0 -1 0)
16
+ (#set! injection.include-children))
17
+
18
+ ((plus_metadata) @injection.content
19
+ (#set! injection.language "toml")
20
+ (#offset! @injection.content 1 0 -1 0)
21
+ (#set! injection.include-children))
22
+
23
+ ([
24
+ (inline)
25
+ (pipe_table_cell)
26
+ ] @injection.content
27
+ (#set! injection.language "markdown_inline"))
package/docs/README.md CHANGED
@@ -84,6 +84,32 @@ The system supports three types of providers:
84
84
 
85
85
  ## Recent Updates
86
86
 
87
+ ### Phase 8 — Build, Polish & Cleanup
88
+
89
+ Production-ready build with full TypeScript, clean dependencies, and proper binary distribution:
90
+
91
+ - **Standalone binary** — `bun build --compile` produces a single ELF executable at `dist/ai-speedometer`
92
+ - **Scripts**: `bun run build`, `bun run typecheck`, `bun test`, `bun test --watch`, `bun test --update-snapshots`
93
+ - **Removed unused deps** — `@ai-sdk/anthropic`, `@ai-sdk/openai-compatible`, `ai`, `cli-table3`, `dotenv`, `esbuild` removed; only `jsonc-parser` remains
94
+ - **SIGINT handler** — `renderer.destroy()` + `process.exit(0)` on `SIGINT` in `src/tui/index.tsx`
95
+ - **Loading guard** — `ModelSelectScreen` shows "Loading config..." during initial config load
96
+ - **0 TypeScript errors** — `bun tsc --noEmit` passes clean
97
+
98
+ Build: `bun run build` → `dist/ai-speedometer` (standalone binary, no bun required)
99
+
100
+ ### Phase 7 — Tests
101
+
102
+ Comprehensive test suite using `bun test` + `@opentui/react/test-utils`:
103
+
104
+ - **51 tests** across 11 files — all passing
105
+ - Component tests: Header, Footer, MenuList, BarChart, ModelRow, ResultsTable
106
+ - Screen tests: MainMenuScreen, ModelSelectScreen, AddVerifiedScreen, AddCustomScreen
107
+ - Benchmark logic tests with mocked fetch (openai-compatible, anthropic, google)
108
+ - 14 snapshots for visual regression detection
109
+ - Test factories in `src/tests/setup.ts`: `mockModel`, `mockBenchmarkResult`, `mockProvider`, `mockModelBenchState`
110
+
111
+ Run with: `bun test`
112
+
87
113
  ### Version 1.0 Bug Fixes
88
114
 
89
115
  The latest release includes critical fixes for:
package/package.json CHANGED
@@ -1,25 +1,23 @@
1
1
  {
2
2
  "name": "ai-speedometer",
3
- "version": "1.4.2",
3
+ "version": "2.0.1",
4
4
  "description": "A comprehensive CLI tool for benchmarking AI models across multiple providers with parallel execution and professional metrics",
5
- "main": "cli.js",
6
5
  "bin": {
7
6
  "ai-speedometer": "dist/ai-speedometer",
8
7
  "aispeed": "dist/ai-speedometer"
9
8
  },
10
- "preferGlobal": true,
11
-
12
9
  "engines": {
13
- "node": ">=18.0.0"
10
+ "bun": ">=1.0.0"
14
11
  },
15
12
  "scripts": {
16
- "start": "node cli.js",
17
- "cli": "node cli.js",
18
- "cli:debug": "node cli.js --debug",
19
- "build": "esbuild cli.js --bundle --platform=node --outfile=dist/ai-speedometer --format=cjs --minify --external:jsonc-parser --external:dotenv && sed -i '1s|^.*|#!/usr/bin/env node|' dist/ai-speedometer",
20
- "build:dev": "esbuild cli.js --bundle --platform=node --outfile=dist/ai-speedometer --format=cjs --external:jsonc-parser --external:dotenv && sed -i '1s|^.*|#!/usr/bin/env node|' dist/ai-speedometer",
21
- "prepublishOnly": "npm run build",
22
- "test": "echo \"Error: no test specified\" && exit 1"
13
+ "start": "bun src/index.ts",
14
+ "dev": "bun --watch src/index.ts",
15
+ "test": "bun test",
16
+ "test:watch": "bun test --watch",
17
+ "test:update": "bun test --update-snapshots",
18
+ "typecheck": "bun tsc --noEmit",
19
+ "build": "bun build src/index.ts --outdir dist --target bun && printf '#!/usr/bin/env bun\\n' | cat - dist/index.js > dist/ai-speedometer && chmod +x dist/ai-speedometer && rm dist/index.js",
20
+ "prepublishOnly": "bun run build"
23
21
  },
24
22
  "keywords": [
25
23
  "ai",
@@ -36,7 +34,7 @@
36
34
  "parallel",
37
35
  "metrics"
38
36
  ],
39
- "author": "ai-speedometer",
37
+ "author": "",
40
38
  "license": "MIT",
41
39
  "repository": {
42
40
  "type": "git",
@@ -47,20 +45,12 @@
47
45
  },
48
46
  "homepage": "https://github.com/aptdnfapt/Ai-speedometer#readme",
49
47
  "files": [
50
- "dist/ai-speedometer",
48
+ "dist/",
51
49
  "docs/",
52
50
  "README.md",
53
51
  "ai-benchmark-config.json.template"
54
52
  ],
55
- "dependencies": {
56
- "@ai-sdk/anthropic": "^2.0.17",
57
- "@ai-sdk/openai-compatible": "^1.0.17",
58
- "ai": "^5.0.44",
59
- "cli-table3": "^0.6.5",
60
- "dotenv": "^17.2.2",
61
- "jsonc-parser": "^3.3.1"
62
- },
63
53
  "devDependencies": {
64
- "esbuild": "^0.25.10"
54
+ "jsonc-parser": "^3.3.1"
65
55
  }
66
56
  }