junecoder 1.0.18 → 1.0.20
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/config.mjs +0 -24
- package/package.json +1 -1
- package/tui.mjs +1 -2
package/config.mjs
CHANGED
|
@@ -74,30 +74,6 @@ export function loadConfig(dir = configDir) {
|
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
// ─── TUI support exports ──────────────────────────────────────────────────────
|
|
78
|
-
|
|
79
|
-
/** Provider preset definitions for the TUI provider selector. */
|
|
80
|
-
export const PROVIDER_PRESETS = {};
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Get the thinking API spec for a given model.
|
|
84
|
-
* @param {string} model
|
|
85
|
-
* @returns {{ thinkApi: string }}
|
|
86
|
-
*/
|
|
87
|
-
export function specForModel(model) {
|
|
88
|
-
return { thinkApi: 'default' };
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Resolve the context compaction threshold for a provider/model pair.
|
|
93
|
-
* @param {string} provider
|
|
94
|
-
* @param {string} model
|
|
95
|
-
* @returns {{ value: number }}
|
|
96
|
-
*/
|
|
97
|
-
export function resolveCompactThreshold(provider, model) {
|
|
98
|
-
return { value: 100_000 };
|
|
99
|
-
}
|
|
100
|
-
|
|
101
77
|
/** Shallow-ish deep merge: only merges top-level objects. */
|
|
102
78
|
function deepMerge(base, override) {
|
|
103
79
|
const result = { ...base };
|
package/package.json
CHANGED
package/tui.mjs
CHANGED
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
saveSession, clearSession, archiveCurrent,
|
|
18
18
|
listSlots, switchToSlot, sessionPath,
|
|
19
19
|
} from "./session.mjs";
|
|
20
|
-
import { PROVIDER_PRESETS as PRESETS } from "./config.mjs";
|
|
21
20
|
import { closeAllMcp } from "./mcp.mjs";
|
|
22
21
|
|
|
23
22
|
const ESC = "\x1b";
|
|
@@ -245,7 +244,7 @@ export async function startTUI(agent, opts = {}) {
|
|
|
245
244
|
const taskHint = state.tasks.length > 0 ? " \u2502 \u2713" + state.tasks.filter(t => t.status === "done").length + "/" + state.tasks.length : "";
|
|
246
245
|
const tk = state.tokens, fmtK = n => n >= 10000 ? Math.round(n/1000) + "k" : n >= 1000 ? (n/1000).toFixed(1) + "k" : String(n);
|
|
247
246
|
const tokenHint = tk.prompt > 0 ? " \u2502 \u2191" + fmtK(tk.prompt) + " \u2193" + fmtK(tk.completion) : "";
|
|
248
|
-
const cacheHint = tk.cacheHit > 0 ? " \u2502 Hit " +
|
|
247
|
+
const cacheHint = tk.prompt > 0 && tk.cacheHit > 0 ? " \u2502 Hit " + Math.round(tk.cacheHit / tk.prompt * 100) + "%" : "";
|
|
249
248
|
const elapsed = state.processing ? " " + Math.floor((Date.now() - state.processingStarted)/1000) + "s" : "";
|
|
250
249
|
const toolHint = state.currentTool ? " " + state.currentTool + "\u2026" : "";
|
|
251
250
|
const statusText = state.processing ? state.status + toolHint + elapsed : state.status;
|