free-coding-models 0.1.32 β 0.1.34
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/bin/free-coding-models.js +11 -8
- package/lib/utils.js +10 -10
- package/package.json +1 -1
|
@@ -425,15 +425,18 @@ function renderTable(results, pendingPings, frame, cursor = null, sortColumn = '
|
|
|
425
425
|
const sweH = sortColumn === 'swe' ? dir + ' SWE%' : 'SWE%'
|
|
426
426
|
const pingH = sortColumn === 'ping' ? dir + ' Latest Ping' : 'Latest Ping'
|
|
427
427
|
const avgH = sortColumn === 'avg' ? dir + ' Avg Ping' : 'Avg Ping'
|
|
428
|
-
const
|
|
428
|
+
const healthH = sortColumn === 'condition' ? dir + ' Health' : 'Health'
|
|
429
429
|
const verdictH = sortColumn === 'verdict' ? dir + ' Verdict' : 'Verdict'
|
|
430
430
|
const uptimeH = sortColumn === 'uptime' ? dir + ' Up%' : 'Up%'
|
|
431
431
|
|
|
432
432
|
// π Helper to colorize first letter for keyboard shortcuts
|
|
433
|
+
// π IMPORTANT: Pad PLAIN TEXT first, then apply colors to avoid alignment issues
|
|
433
434
|
const colorFirst = (text, width, colorFn = chalk.yellow) => {
|
|
434
435
|
const first = text[0]
|
|
435
436
|
const rest = text.slice(1)
|
|
436
|
-
|
|
437
|
+
const plainText = first + rest
|
|
438
|
+
const padding = ' '.repeat(Math.max(0, width - plainText.length))
|
|
439
|
+
return colorFn(first) + chalk.dim(rest + padding)
|
|
437
440
|
}
|
|
438
441
|
|
|
439
442
|
// π Now colorize after padding is calculated on plain text
|
|
@@ -441,15 +444,15 @@ function renderTable(results, pendingPings, frame, cursor = null, sortColumn = '
|
|
|
441
444
|
const tierH_c = colorFirst('Tier', W_TIER)
|
|
442
445
|
const originH_c = sortColumn === 'origin' ? chalk.bold.cyan(originH.padEnd(W_SOURCE)) : colorFirst(originH, W_SOURCE)
|
|
443
446
|
const modelH_c = colorFirst(modelH, W_MODEL)
|
|
444
|
-
const sweH_c = sortColumn === 'swe' ? chalk.bold.cyan(sweH.padEnd(W_SWE)) : colorFirst(
|
|
447
|
+
const sweH_c = sortColumn === 'swe' ? chalk.bold.cyan(sweH.padEnd(W_SWE)) : colorFirst(sweH, W_SWE)
|
|
445
448
|
const pingH_c = sortColumn === 'ping' ? chalk.bold.cyan(pingH.padEnd(W_PING)) : colorFirst('Latest Ping', W_PING)
|
|
446
449
|
const avgH_c = sortColumn === 'avg' ? chalk.bold.cyan(avgH.padEnd(W_AVG)) : colorFirst('Avg Ping', W_AVG)
|
|
447
|
-
const
|
|
450
|
+
const healthH_c = sortColumn === 'condition' ? chalk.bold.cyan(healthH.padEnd(W_STATUS)) : colorFirst('Health', W_STATUS)
|
|
448
451
|
const verdictH_c = sortColumn === 'verdict' ? chalk.bold.cyan(verdictH.padEnd(W_VERDICT)) : colorFirst(verdictH, W_VERDICT)
|
|
449
452
|
const uptimeH_c = sortColumn === 'uptime' ? chalk.bold.cyan(uptimeH.padStart(W_UPTIME)) : colorFirst(uptimeH, W_UPTIME, chalk.green)
|
|
450
453
|
|
|
451
454
|
// π Header with proper spacing
|
|
452
|
-
lines.push(' ' + rankH_c + ' ' + tierH_c + ' ' + originH_c + ' ' + modelH_c + ' ' + sweH_c + ' ' + pingH_c + ' ' + avgH_c + ' ' +
|
|
455
|
+
lines.push(' ' + rankH_c + ' ' + tierH_c + ' ' + originH_c + ' ' + modelH_c + ' ' + sweH_c + ' ' + pingH_c + ' ' + avgH_c + ' ' + healthH_c + ' ' + verdictH_c + ' ' + uptimeH_c)
|
|
453
456
|
|
|
454
457
|
// π Separator line
|
|
455
458
|
lines.push(
|
|
@@ -618,7 +621,7 @@ function renderTable(results, pendingPings, frame, cursor = null, sortColumn = '
|
|
|
618
621
|
: mode === 'opencode-desktop'
|
|
619
622
|
? chalk.rgb(0, 200, 255)('EnterβOpenDesktop')
|
|
620
623
|
: chalk.rgb(0, 200, 255)('EnterβOpenCode')
|
|
621
|
-
lines.push(chalk.dim(` ββ Navigate β’ `) + actionHint + chalk.dim(` β’ R/T/O/M/L/A/S/
|
|
624
|
+
lines.push(chalk.dim(` ββ Navigate β’ `) + actionHint + chalk.dim(` β’ R/T/O/M/L/A/S/H/V/U Sort β’ Wβ/Xβ Interval (${intervalSec}s) β’ T Tier β’ Z Mode β’ Ctrl+C Exit`))
|
|
622
625
|
lines.push('')
|
|
623
626
|
lines.push(chalk.dim(' Made with ') + 'π & β' + chalk.dim(' by ') + '\x1b]8;;https://github.com/vava-nessa\x1b\\vava-nessa\x1b]8;;\x1b\\' + chalk.dim(' β’ ') + 'π¬ ' + chalk.cyanBright('\x1b]8;;https://discord.gg/WKA3TwYVuZ\x1b\\Join Free-Coding-Models Discord!\x1b]8;;\x1b\\') + chalk.dim(' β’ ') + 'β ' + '\x1b]8;;https://github.com/vava-nessa/free-coding-models\x1b\\Read the docs on GitHub\x1b]8;;\x1b\\')
|
|
624
627
|
lines.push('')
|
|
@@ -1191,10 +1194,10 @@ async function main() {
|
|
|
1191
1194
|
const onKeyPress = async (str, key) => {
|
|
1192
1195
|
if (!key) return
|
|
1193
1196
|
|
|
1194
|
-
// π Sorting keys: R=rank, T=tier, O=origin, M=model, L=latest ping, A=avg ping, S=SWE-bench,
|
|
1197
|
+
// π Sorting keys: R=rank, T=tier, O=origin, M=model, L=latest ping, A=avg ping, S=SWE-bench, H=health, V=verdict, U=uptime
|
|
1195
1198
|
const sortKeys = {
|
|
1196
1199
|
'r': 'rank', 't': 'tier', 'o': 'origin', 'm': 'model',
|
|
1197
|
-
'l': 'ping', 'a': 'avg', 's': 'swe', '
|
|
1200
|
+
'l': 'ping', 'a': 'avg', 's': 'swe', 'h': 'condition', 'v': 'verdict', 'u': 'uptime'
|
|
1198
1201
|
}
|
|
1199
1202
|
|
|
1200
1203
|
if (sortKeys[key.name]) {
|
package/lib/utils.js
CHANGED
|
@@ -129,16 +129,16 @@ export const getUptime = (r) => {
|
|
|
129
129
|
// π Returns a NEW array β never mutates the original (important for React-style re-renders).
|
|
130
130
|
//
|
|
131
131
|
// π Supported columns (matching the keyboard shortcuts in the TUI):
|
|
132
|
-
// - 'rank'
|
|
133
|
-
// - 'tier'
|
|
134
|
-
// - 'origin'
|
|
135
|
-
// - 'model'
|
|
136
|
-
// - 'ping'
|
|
137
|
-
// - 'avg'
|
|
138
|
-
// - 'swe'
|
|
139
|
-
// - 'condition'(
|
|
140
|
-
// - 'verdict'
|
|
141
|
-
// - 'uptime'
|
|
132
|
+
// - 'rank' (R key) β original index from sources.js
|
|
133
|
+
// - 'tier' (T key) β tier hierarchy (S+ first, C last)
|
|
134
|
+
// - 'origin' (O key) β provider name (all NIM for now, future-proofed)
|
|
135
|
+
// - 'model' (M key) β alphabetical by display label
|
|
136
|
+
// - 'ping' (L key) β last ping latency (only successful ones count)
|
|
137
|
+
// - 'avg' (A key) β average latency across all successful pings
|
|
138
|
+
// - 'swe' (S key) β SWE-bench score (higher is better)
|
|
139
|
+
// - 'condition' (H key) β health status (alphabetical)
|
|
140
|
+
// - 'verdict' (V key) β verdict order (Perfect β Pending)
|
|
141
|
+
// - 'uptime' (U key) β uptime percentage
|
|
142
142
|
//
|
|
143
143
|
// π sortDirection 'asc' = ascending (smallest first), 'desc' = descending (largest first)
|
|
144
144
|
export const sortResults = (results, sortColumn, sortDirection) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "free-coding-models",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.34",
|
|
4
4
|
"description": "Find the fastest coding LLM models in seconds β ping free models from multiple providers, pick the best one for OpenCode, Cursor, or any AI coding assistant.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nvidia",
|