free-coding-models 0.4.2 → 0.5.0
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 +7 -7
- package/bin/free-coding-models.js +9 -9
- package/changelog/v0.4.3.md +28 -0
- package/changelog/v0.5.0.md +15 -0
- package/package.json +1 -1
- package/sources.js +7 -5
- package/src/{analysis.js → core/analysis.js} +5 -5
- package/src/{constants.js → core/constants.js} +1 -1
- package/src/{endpoint-installer.js → core/endpoint-installer.js} +1 -1
- package/src/{installed-models-manager.js → core/installed-models-manager.js} +1 -1
- package/src/{kilo.js → core/kilo.js} +1 -2
- package/src/{openclaw.js → core/openclaw.js} +1 -1
- package/src/{opencode.js → core/opencode.js} +2 -1
- package/src/{ping-loop.js → core/ping-loop.js} +1 -1
- package/src/{router-daemon.js → core/router-daemon.js} +3 -3
- package/src/{router-dashboard.js → core/router-dashboard.js} +2 -2
- package/src/{setup.js → core/setup.js} +1 -1
- package/src/{sync-set.js → core/sync-set.js} +1 -1
- package/src/{telemetry.js → core/telemetry.js} +1 -1
- package/src/{tool-launchers.js → core/tool-launchers.js} +2 -2
- package/src/{updater.js → core/updater.js} +1 -1
- package/src/{app.js → tui/app.js} +38 -38
- package/src/{cli-help.js → tui/cli-help.js} +1 -1
- package/src/{command-palette.js → tui/command-palette.js} +2 -2
- package/src/{key-handler.js → tui/key-handler.js} +11 -11
- package/src/{overlays.js → tui/overlays.js} +2 -2
- package/src/{render-helpers.js → tui/render-helpers.js} +2 -2
- package/src/{render-table.js → tui/render-table.js} +8 -8
- package/src/{tui-filters.js → tui/tui-filters.js} +3 -3
- package/src/{tui-state.js → tui/tui-state.js} +1 -1
- package/web/README.md +43 -0
- package/web/dist/assets/{index-hIk1b0wm.js → index-CvMUM9Jr.js} +1 -1
- package/web/dist/index.html +1 -1
- package/web/server.js +3 -3
- package/src/graphify-out/cache/089db1c1def873cf6d112f1590da4490e61e691aff0db41e006aa2fb15ba0656.json +0 -1
- package/src/graphify-out/cache/0b510b53cf1a1393fb52b1fc3bbbf88b63938e961ec5b82119a2e9715fee8bd7.json +0 -1
- package/src/graphify-out/cache/0ec9a95a326bde58e0316889018b278062d06d494d0f31ba177c9de71e5fed2d.json +0 -1
- package/src/graphify-out/cache/1548663a24a68dce740ebab1bd1d3091048c9604e9d067a1650a42a6d82541d4.json +0 -1
- package/src/graphify-out/cache/1783af63cb6d0dfb4d469009f71ac83a74ba0b33d48186ff2c6e63f9429e900a.json +0 -1
- package/src/graphify-out/cache/1e109f5eb5dc4fd285871c3613e32b6b14a8c225f4080ee34b51c7e1a1764571.json +0 -1
- package/src/graphify-out/cache/1eb24dbeb69b46c8bc1caf925df2f2a964af0f33aea143adf8ddf88e017db6ca.json +0 -1
- package/src/graphify-out/cache/21e1bcfed11685e8347243f9d8516072dda183266a4bfe22c52fb31753a446c8.json +0 -1
- package/src/graphify-out/cache/2327473478b9c4b1940bf7ef66c9ee960b3cba8d5302e56b625df8274246e0b4.json +0 -1
- package/src/graphify-out/cache/25955b81fd25454c8fa90fb71a47db8d1215cf621beb8ff3cbd580aaf011b4f3.json +0 -1
- package/src/graphify-out/cache/2739677f19c702f88f3de0a0bac475066adbda98709907ad3de967aef689f86d.json +0 -1
- package/src/graphify-out/cache/2bba03422f6b3ee7f5b5d29cc90314a064d259e5822a176657bda3e04505cf00.json +0 -1
- package/src/graphify-out/cache/2ddf1d2c6d10147b0402446bc71a7988187b79b6210dd7e7250be8c555b9ff35.json +0 -1
- package/src/graphify-out/cache/2ee07457a5767c95a57f8e9eb95b28f800044f35666e0715e9d88ad1103a092e.json +0 -1
- package/src/graphify-out/cache/2fe9f75dc2951c417f2c8dd22749092cf550dc67599f1c8d1866900dc6e9154e.json +0 -1
- package/src/graphify-out/cache/41c4b7c27e7fc3e2948d3a4bf95a72de2ed9a6f0463994babdce8ed2cc84598c.json +0 -1
- package/src/graphify-out/cache/5028defd54b7fbd3c7e444973e493de036e097e9b1d2a7cae7f19b88d68aacde.json +0 -1
- package/src/graphify-out/cache/5b133aba3fb16410c5b1fdbd1730039fc7fa1ac93abd99d7be08f60da70fc8d4.json +0 -1
- package/src/graphify-out/cache/74252e5b0978d85ab3421a3de1a9384aa282ffd2be2cfe7db2530139089f4275.json +0 -1
- package/src/graphify-out/cache/7695ebeea056095edd14332963cc43354ef3a097caf46f1e28d0f01369642901.json +0 -1
- package/src/graphify-out/cache/777aa7085c395a935c6556bbde182cd871edb61f3a685ed8068ec0c8f6fb0075.json +0 -1
- package/src/graphify-out/cache/82a723881980e82273c113def8315533d7da28827e300413d9ad30f27b7407df.json +0 -1
- package/src/graphify-out/cache/86b87c9603e6cd188f42c7eed3b86c291d48a781c223a707e74f3e7ed0c02a21.json +0 -1
- package/src/graphify-out/cache/890fead9a78cadaed560a2d2453916121fa605c3e43a334910ac4bc951a9ef6d.json +0 -1
- package/src/graphify-out/cache/89d3ea66f52783caa775ef9a30923d7d6225e1d8ae9e962f4741b8c7785dab1e.json +0 -1
- package/src/graphify-out/cache/8cc82cd9edce41f0e1c092f14a94fd52bf847addf3237b616dc5a9e505bd05bd.json +0 -1
- package/src/graphify-out/cache/93ba2e25e3ff7ad525f397902345fbd375df7315de7b402e20cc803c14eccde8.json +0 -1
- package/src/graphify-out/cache/99beed29580b9c7bfecfee794cb3d8e535fcf0eb3b92113108f88bdd0a8e79b3.json +0 -1
- package/src/graphify-out/cache/aeeb931fa477c65ce2e51d8149957350fa54225c613222bbbe8448998d1afd3d.json +0 -1
- package/src/graphify-out/cache/baf91bef5b5ecb2a476433b6cc0c48c563c54ee2d07fc3c192e543685e3e7222.json +0 -1
- package/src/graphify-out/cache/bd98b94ac4e9b92b6336d47b26e0366b51a4eaf0711d722f05f98dfae23ab42b.json +0 -1
- package/src/graphify-out/cache/bfcb51e9328e9cbfbee4f6fee0f56635d7b03488addc9f6c4e4b190b70a73362.json +0 -1
- package/src/graphify-out/cache/c0d3dabeb093aa758c49eadf41b87ecc96a16c1449c2670aaf48cbfc891d8da6.json +0 -1
- package/src/graphify-out/cache/c20d6630236f473c1406068c3ae205853e649b216495c93dfec055dd222c55cf.json +0 -1
- package/src/graphify-out/cache/c22b9122816bebce0a2f79af41a986559d01e00163dbcd579c5755621b4cb483.json +0 -1
- package/src/graphify-out/cache/ca556ec14453ddb8f9e0c5a832dac90d77111b9bad5f8c2d80d272e2e7a06371.json +0 -1
- package/src/graphify-out/cache/d6dbc9135dfa35a756b3b09b06700e4bc229fdccba11bb963f2ba44028e0bbae.json +0 -1
- package/src/graphify-out/cache/e1cf71276f1779d0fa075f79bd7c8a9fd0b8eef6932ac043137451b7c7fa7cbe.json +0 -1
- package/src/graphify-out/cache/e4b3be14494467df2d2ed389bc4f18f099021cb5bc355b901fa88387b2d8b8a2.json +0 -1
- package/src/graphify-out/cache/eaea0dded097f6f9553b654220046c6ec0c9be592a5973d906564ee60af34e0d.json +0 -1
- package/src/graphify-out/cache/ef07d0cd2675d1f79d2a2fdbf3bc3319687638751e9ce89b0d0d97ed1cd9f7e1.json +0 -1
- package/src/graphify-out/cache/f81272d6eb8aaff9e96d5a1d9f06777db70ac3652a646b951ded51f79871d733.json +0 -1
- package/src/graphify-out/cache/f9619dd92186f75a6dbda937e0c606647153918524cdb5763f956e6ec2a9e386.json +0 -1
- package/src/graphify-out/cache/fd88b1b2ff4bfcae08559d9c2aaeeb9a3f1e2f5cd8928762c311196956c170a5.json +0 -1
- /package/src/{benchmark.js → core/benchmark.js} +0 -0
- /package/src/{cache.js → core/cache.js} +0 -0
- /package/src/{changelog-loader.js → core/changelog-loader.js} +0 -0
- /package/src/{config.js → core/config.js} +0 -0
- /package/src/{favorites.js → core/favorites.js} +0 -0
- /package/src/{kilo-config.js → core/kilo-config.js} +0 -0
- /package/src/{legacy-proxy-cleanup.js → core/legacy-proxy-cleanup.js} +0 -0
- /package/src/{model-merger.js → core/model-merger.js} +0 -0
- /package/src/{opencode-config.js → core/opencode-config.js} +0 -0
- /package/src/{ping.js → core/ping.js} +0 -0
- /package/src/{product-flags.js → core/product-flags.js} +0 -0
- /package/src/{provider-metadata.js → core/provider-metadata.js} +0 -0
- /package/src/{provider-quota-fetchers.js → core/provider-quota-fetchers.js} +0 -0
- /package/src/{quota-capabilities.js → core/quota-capabilities.js} +0 -0
- /package/src/{security.js → core/security.js} +0 -0
- /package/src/{shell-env.js → core/shell-env.js} +0 -0
- /package/src/{testfcm.js → core/testfcm.js} +0 -0
- /package/src/{token-usage-reader.js → core/token-usage-reader.js} +0 -0
- /package/src/{tool-bootstrap.js → core/tool-bootstrap.js} +0 -0
- /package/src/{tool-metadata.js → core/tool-metadata.js} +0 -0
- /package/src/{usage-reader.js → core/usage-reader.js} +0 -0
- /package/src/{utils.js → core/utils.js} +0 -0
- /package/src/{mouse.js → tui/mouse.js} +0 -0
- /package/src/{theme.js → tui/theme.js} +0 -0
- /package/src/{tier-colors.js → tui/tier-colors.js} +0 -0
- /package/src/{ui-config.js → tui/ui-config.js} +0 -0
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
import chalk from 'chalk'
|
|
36
36
|
import { createRequire } from 'module'
|
|
37
|
-
import { sources } from '
|
|
37
|
+
import { sources } from '../../sources.js'
|
|
38
38
|
import {
|
|
39
39
|
COL_MODEL,
|
|
40
40
|
TIER_CYCLE,
|
|
@@ -44,19 +44,19 @@ import {
|
|
|
44
44
|
WIDTH_WARNING_MIN_COLS,
|
|
45
45
|
TABLE_FOOTER_LINES,
|
|
46
46
|
FRAMES
|
|
47
|
-
} from '
|
|
47
|
+
} from '../core/constants.js'
|
|
48
48
|
import { themeColors, currentPalette, getProviderRgb, getTierRgb, getReadableTextRgb, getTheme } from './theme.js'
|
|
49
49
|
import { TIER_COLOR } from './tier-colors.js'
|
|
50
|
-
import { getAvg, getVerdict, getUptime, getStabilityScore, getVersionStatusInfo } from '
|
|
51
|
-
import { usagePlaceholderForProvider } from '
|
|
52
|
-
import { formatBenchmarkLatency, formatBenchmarkTps } from '
|
|
50
|
+
import { getAvg, getVerdict, getUptime, getStabilityScore, getVersionStatusInfo } from '../core/utils.js'
|
|
51
|
+
import { usagePlaceholderForProvider } from '../core/ping.js'
|
|
52
|
+
import { formatBenchmarkLatency, formatBenchmarkTps } from '../core/benchmark.js'
|
|
53
53
|
import { calculateViewport, sortResultsWithPinnedFavorites, padEndDisplay, displayWidth, stripAnsi } from './render-helpers.js'
|
|
54
|
-
import { getToolMeta, TOOL_METADATA, TOOL_MODE_ORDER, isModelCompatibleWithTool } from '
|
|
54
|
+
import { getToolMeta, TOOL_METADATA, TOOL_MODE_ORDER, isModelCompatibleWithTool } from '../core/tool-metadata.js'
|
|
55
55
|
import { getColumnSpacing } from './ui-config.js'
|
|
56
|
-
import { detectPackageManager, getManualInstallCmd } from '
|
|
56
|
+
import { detectPackageManager, getManualInstallCmd } from '../core/updater.js'
|
|
57
57
|
|
|
58
58
|
const require = createRequire(import.meta.url)
|
|
59
|
-
const { version: LOCAL_VERSION } = require('
|
|
59
|
+
const { version: LOCAL_VERSION } = require('../../package.json')
|
|
60
60
|
|
|
61
61
|
// 📖 Mouse support: column boundary map updated every frame by renderTable().
|
|
62
62
|
// 📖 Each entry maps a column name to its display X-start and X-end (1-based, inclusive).
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
* @see src/tui-state.js — state shape for filter mode indices
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
|
-
import { TIER_CYCLE, VERDICT_CYCLE, HEALTH_CYCLE } from '
|
|
30
|
-
import { TIER_LETTER_MAP } from '
|
|
31
|
-
import { getVerdict } from '
|
|
29
|
+
import { TIER_CYCLE, VERDICT_CYCLE, HEALTH_CYCLE } from '../core/constants.js'
|
|
30
|
+
import { TIER_LETTER_MAP } from '../core/utils.js'
|
|
31
|
+
import { getVerdict } from '../core/utils.js'
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* 📖 createTuiFilters: Build the filter functions for a given TUI state + dependencies.
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
* @see src/ping-loop.js — reads ping mode fields from the state
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
import { WIDTH_WARNING_MIN_COLS } from '
|
|
27
|
+
import { WIDTH_WARNING_MIN_COLS } from '../core/constants.js'
|
|
28
28
|
|
|
29
29
|
// 📖 Ping cadence intervals per mode (ms). Speed = startup burst, normal = steady,
|
|
30
30
|
// 📖 slow = idle throttle, forced = user-triggered fast burst.
|
package/web/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# 📦 free-coding-models-web
|
|
2
|
+
|
|
3
|
+
This directory contains the shared React SPA (Single Page Application) dashboard for `free-coding-models`.
|
|
4
|
+
|
|
5
|
+
## 🌐 Architecture
|
|
6
|
+
|
|
7
|
+
The frontend is a single SPA that is served in two distinct scenarios:
|
|
8
|
+
1. **Web Dashboard / Docker Mode (`--daemon`):** Served directly by the local Node.js `router-daemon` process on `http://localhost:19280/`.
|
|
9
|
+
2. **Desktop Mode (Tauri App):** Loaded locally inside Tauri's native webview from embedded assets in `web/dist/`, communicating via HTTP fetch to the background engine.
|
|
10
|
+
|
|
11
|
+
To maintain maximum code sharing, **95%+ of all components and logic are kept completely identical** between the two distributions.
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## ⚡ API & Event Integration
|
|
16
|
+
|
|
17
|
+
The React app relies on HTTP and Server-Sent Events (SSE) to talk to the engine:
|
|
18
|
+
* `GET /api/models`: Fetches the live model catalog, complete with stability scores and latency details.
|
|
19
|
+
* `GET /api/config`: Retrieves active provider toggles (keys are masked).
|
|
20
|
+
* `POST /api/settings`: Updates API keys and provider preferences.
|
|
21
|
+
* `GET /api/events` / `EventSource`: Listens for real-time SSE updates broadcasted by the ping and benchmark loops.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 🛠️ Development & Building
|
|
26
|
+
|
|
27
|
+
### Prerequisites
|
|
28
|
+
Make sure you have `pnpm` installed and dependencies initialized at the root of the project.
|
|
29
|
+
|
|
30
|
+
### 1. Dev Server (HMR)
|
|
31
|
+
To start the React frontend with Vite HMR (Hot Module Replacement):
|
|
32
|
+
```bash
|
|
33
|
+
cd web
|
|
34
|
+
pnpm dev
|
|
35
|
+
```
|
|
36
|
+
By default, the dev server runs on `http://localhost:5173/`. Ensure a background daemon is running on port `19280` so the API requests proxy correctly.
|
|
37
|
+
|
|
38
|
+
### 2. Production Build
|
|
39
|
+
To compile the production-ready SPA:
|
|
40
|
+
```bash
|
|
41
|
+
pnpm build
|
|
42
|
+
```
|
|
43
|
+
This bundles the HTML, JS, and CSS assets into the `web/dist/` directory, which is then embedded inside both the CLI daemon and the Tauri desktop app binary.
|