heartcode 0.1.33 → 0.1.36

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/CHANGELOG.md CHANGED
@@ -2,6 +2,36 @@
2
2
 
3
3
  What changed in each version of HeartCode, newest first.
4
4
 
5
+ ## 0.1.36 (2026-11-02)
6
+
7
+ - Voice: Space in an empty box (or /voice) starts listening at once, no second key; what you say
8
+ shows in the box as you speak, and Enter sends it, all of it as one message. Keys wait while the
9
+ last part is transcribed (an Enter then sent only the part heard so far, and the rest stayed in
10
+ the box). Esc cancels; Space pauses and goes on. While a task works, it's sent as typed then.
11
+
12
+ ## 0.1.35 (2026-11-02)
13
+
14
+ - Settings page, Your list: every column sorts by the value it shows, ↑ smallest first and ↓
15
+ largest first, the first click the useful way (Model A→Z, Provider your ranking, Context and
16
+ Abilities most first, Tools/Thinking/Images with first, prices cheapest first, Works? fastest
17
+ first). Works? sorts by the test's time; failed and untested models (no time), unknown prices and
18
+ contexts are last either way (untested before failed). Clicks still stack sorts (each breaks the
19
+ ties of the ones before). A sort kept from before is converted.
20
+ - A sort redraws the table once (it was redrawn again half a second later, when the page's own
21
+ saved sort came back from the server as a change); the header spins until the new order is drawn,
22
+ and while tests run the sort line says the order moves as results come in.
23
+ - Stop (and every button in the table) works at the first click while tests run: the table was
24
+ redrawn at every result, replacing buttons between a click's press and release. Now it's redrawn
25
+ at most every 400 ms, never while the mouse button is down, Stop keeps its place and acts on press.
26
+
27
+ ## 0.1.34 (2026-11-02)
28
+
29
+ - Model tests on the settings page (Test all, Test selected, a row's Test and Hello) wait 10
30
+ seconds for an answer by default, not 90; the Timeout box next to Test all changes it (1 to 600
31
+ seconds, kept in the config as testTimeout).
32
+ - Sorting by Works? puts the fastest working model first (by its test's time), then the untested,
33
+ then the ones that don't work.
34
+
5
35
  ## 0.1.33 (2026-11-01)
6
36
 
7
37
  - Text you may need can be selected and copied, not only the conversation: drag to select (copied
package/README.md CHANGED
@@ -124,11 +124,18 @@ On **Models → Providers**:
124
124
  On **Models → Your list**:
125
125
 
126
126
  1. **Sort them by context and abilities.** Click the *Abilities* column, then *Context*: the
127
- models that can do the most, with the biggest context window, come first. Click
128
- **Save order** to keep it.
127
+ models that can do the most come first, the biggest context window first among those (each
128
+ column clicked breaks the ties of the ones before; click one again to reverse it, a third time to
129
+ drop it). Click **Save list** to keep it.
129
130
  2. **Rearrange a bit more.** Drag a row to move it. #1 is the one HeartCode uses; the others are
130
131
  its fallbacks, tried in order.
131
132
  3. **Test them** (optional): **Test all** sends each a short message and shows which really answer.
133
+ Each test waits up to 10 seconds; the **Timeout** box next to it changes that.
134
+ 4. **Filter them** (optional): by name, provider, test result (works, doesn't, not tested, or one
135
+ error like 402), context, tools, thinking, images or free. **Test all** then tests only the ones
136
+ shown. **Save list** puts the ones shown first, in the order you see (the rest after them);
137
+ **Keep only these** makes them your whole list. Filter to the working ones, sort by Works?, save:
138
+ your fastest working models come first.
132
139
 
133
140
  If a model says *not found* in models.dev, **Retry** looks it up again, or **Set up** tells
134
141
  HeartCode what it can do.
@@ -139,7 +146,7 @@ HeartCode what it can do.
139
146
  with [@BotFather](https://t.me/BotFather), paste its token, press Start in the bot, and
140
147
  HeartCode finds your chat.
141
148
  - **Advanced → Logs**: a log of each run, and each request with its reply, in files of their own.
142
- Logs older than 30 days are deleted (you can change that).
149
+ Logs older than 3 days are deleted (you can change that).
143
150
 
144
151
  ### 7. Back to HeartCode
145
152
 
package/bin/heart.js CHANGED
@@ -11,7 +11,7 @@
11
11
  // Logs, when they're switched on (the settings page: Logging): each run's log in
12
12
  // ~/.heart/logs/runs/<day-month-year-hour-min-sec>/, a file per tab ("log": true in config.json);
13
13
  // each request to a model in ~/.heart/logs/requests/<same>/, a file per request ("logRequests").
14
- // Kept for logDays days (30 unless changed). HEART_LOG=/path/file.log logs this run in that one file
14
+ // Kept for logDays days (3 unless changed). HEART_LOG=/path/file.log logs this run in that one file
15
15
  // anyway; HEART_LOG=off: no run log.
16
16
  import fs from 'node:fs'
17
17
  import os from 'node:os'
package/bin/heartcode.js CHANGED
@@ -104,7 +104,7 @@ const SECTIONS = [
104
104
  ]],
105
105
  ['settings', [
106
106
  ['/toggle_thinking', "show or collapse the model's thinking"],
107
- ['/voice', 'say your message: Space to talk, Enter to finish; it shows in the input box as you speak'],
107
+ ['/voice', 'say your message (or Space in an empty box): it shows in the box as you speak, Enter sends it, Esc cancels'],
108
108
  ]],
109
109
  ['session', [
110
110
  ['/resume', 'continue an earlier session in this folder'],
@@ -155,7 +155,7 @@ function keysHelp(keys = {}) {
155
155
  const forAct = (a) => Object.entries(keys).filter(([, v]) => v === a).map(([k]) => pretty(k)).join(' / ')
156
156
  const tabs = /(^|,)alt\+[1-9]/.test(Object.keys(keys).join(','))
157
157
  const rows = [
158
- ['Space', 'start voice input (when the input box is empty)'],
158
+ ['Space', 'voice: listens at once, Enter sends what you said (in an empty box)'],
159
159
  ['Enter', 'send · while it works, queue the message (commands like /help, /cost, /select_model run at once)'],
160
160
  ['Option/Shift/Ctrl+Enter', 'new line in the box'],
161
161
  ['Esc', 'stop the task (press twice to confirm)'],
@@ -198,7 +198,7 @@ const ARGS = {
198
198
  // Terminal.app can't report Shift+Enter; Option+Enter works there ("Use Option as Meta key").
199
199
  const NEWLINE_KEY = process.env.TERM_PROGRAM === 'Apple_Terminal' ? 'Option+Enter' : 'Shift+Enter'
200
200
 
201
- const kTokens = (n) => (n >= 1e6 ? `${Math.round(n / 1e5) / 10}M` : n >= 1000 ? `${(n / 1000).toFixed(n >= 10_000 ? 0 : 1)}k` : String(n))
201
+ const kTokens = (n) => (n >= 1e6 ? `${Number((n / 1e6).toFixed(2))}M` : n >= 1000 ? `${(n / 1000).toFixed(n >= 10_000 ? 0 : 1)}k` : String(n)) // 1.05M, not rounded up to 1.1M
202
202
 
203
203
  const mask = (k) => (k ? (k.length > 12 ? `${k.slice(0, 4)}…${k.slice(-4)}` : '…') : c.dim('no key'))
204
204
 
@@ -1644,9 +1644,9 @@ async function slash(app, line, working = false) {
1644
1644
  case 'btw':
1645
1645
  return app.btw(line.trim().replace(/^\/btw\b/, '').trim(), working)
1646
1646
  case 'voice': {
1647
- if (working) return ui.dictateIn() // into the box, as Space does while it works
1647
+ if (working) return ui.dictateIn() // as Space does while it works: sent when you press Enter
1648
1648
  const text = await ui.dictate()
1649
- if (text) app.nextInput = text // in the box, to read over and send
1649
+ if (text) ui.ahead.push(text) // sent: the next prompt takes it, as if typed
1650
1650
  return
1651
1651
  }
1652
1652
  case 'toggle_thinking':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heartcode",
3
- "version": "0.1.33",
3
+ "version": "0.1.36",
4
4
  "description": "A coding CLI for any local or OpenAI-compatible model, including small models without tool calling.",
5
5
  "keywords": [
6
6
  "ai",
package/src/config.js CHANGED
@@ -6,7 +6,7 @@ import { fileURLToPath } from 'node:url'
6
6
  export const HOME = process.env.HEART_HOME || path.join(os.homedir(), '.heart')
7
7
  export const CONFIG_FILE = path.join(HOME, 'config.json')
8
8
 
9
- const SETTINGS = ['context', 'effort', 'permissions', 'autoCompact', 'director', 'theme', 'format', 'lsp', 'voice', 'queue', 'rotation', 'statusBar', 'log', 'logRequests', 'logDetail', 'logDays', 'telegram', 'search']
9
+ const SETTINGS = ['context', 'effort', 'permissions', 'autoCompact', 'director', 'theme', 'format', 'lsp', 'voice', 'queue', 'rotation', 'statusBar', 'log', 'logRequests', 'logDetail', 'logDays', 'telegram', 'search', 'testTimeout']
10
10
  const LOCAL_NAMES = { 11434: 'ollama', 1234: 'lmstudio', 8080: 'llamacpp' }
11
11
 
12
12
  export function readJson(file, fallback) {
package/src/log.js CHANGED
@@ -20,7 +20,7 @@ export const runLog = { on: Boolean(LOG_FILE || (LOG_DIR && (!AUTO || process.en
20
20
  // Where the logs go: bin/heart.js says (the system's temp folder with --temp)
21
21
  export const LOGS = path.resolve(process.env.HEART_LOGS || path.join(process.env.HEART_HOME || path.join(os.homedir(), '.heart'), 'logs'))
22
22
  export const REQUESTS = path.join(LOGS, 'requests')
23
- export const DAYS = 30 // how long logs are kept, unless config.json's logDays says otherwise
23
+ export const DAYS = 3 // how long logs are kept, unless config.json's logDays says otherwise
24
24
  const STAMP = process.env.HEART_LOG_STAMP || stamp()
25
25
 
26
26
  export function stamp(d = new Date()) {