@yanzc/claude-pro 0.7.5 → 0.7.6
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/package.json +1 -1
- package/src/ui/repl.js +16 -8
- package/src/updater.js +4 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yanzc/claude-pro",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
4
4
|
"description": "claude-pro: a command line coding agent for the codex-gateway. Full access with no permission prompts; file edits are checkpointed and can be rewound.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
package/src/ui/repl.js
CHANGED
|
@@ -29,7 +29,7 @@ import { shutdownBackgroundShells, listBackgroundShells } from '../tools/bash.js
|
|
|
29
29
|
import { estimateTokens } from '../agent.js';
|
|
30
30
|
import { readClipboardImage, imageFromFile, watchClipboard, writeClipboard, readClipboardText } from '../utils/clipboard.js';
|
|
31
31
|
import { fitImagesIn, imageSize } from '../utils/images.js';
|
|
32
|
-
import { checkForUpdate, installUpdate, installedVersion, installedByNpm, isNewer
|
|
32
|
+
import { checkForUpdate, installUpdate, installedVersion, installedByNpm, isNewer } from '../updater.js';
|
|
33
33
|
import { PeerNode, peersEnabled, findPeer, resolvePeer, machineName, cleanName, peerMessagePrompt } from '../peers.js';
|
|
34
34
|
import { RemoteControl, transcriptItems, onlineEnabled, REMOTE_WIDTH } from '../remote.js';
|
|
35
35
|
import { ensureHost as startHostIfNeeded, ensureAutostart, hostEnabled, listDirectory, recentDirectories, computerId, markBackgroundEnded } from '../host.js';
|
|
@@ -328,10 +328,8 @@ export class App {
|
|
|
328
328
|
this.fileIndex.refresh();
|
|
329
329
|
this.startSourceWatch();
|
|
330
330
|
if (!this.driven) {
|
|
331
|
-
|
|
332
|
-
//
|
|
333
|
-
this.updateTimer = setInterval(() => { if (!this.exiting) this.autoUpdate({ quiet: true }); }, CHECK_EVERY_MS);
|
|
334
|
-
this.updateTimer.unref?.();
|
|
331
|
+
// Updates are deliberately manual: /update checks npm and installs the selected release.
|
|
332
|
+
// Do not query the registry or install/restart a running session in the background.
|
|
335
333
|
// online or offline as this computer's gateway login changes (/login or /logout in another window)
|
|
336
334
|
this.loginTimer = setInterval(() => this.syncRemote(), 10_000);
|
|
337
335
|
this.loginTimer.unref?.();
|
|
@@ -2416,13 +2414,23 @@ export class App {
|
|
|
2416
2414
|
// An effort that is not set is not sent: the API then uses the model's default, which is shown instead.
|
|
2417
2415
|
const level = effort || defaultEffort(cfg.model.id, cfg);
|
|
2418
2416
|
const info = c.dim(level ? `${model} · effort ${level}` : model);
|
|
2419
|
-
|
|
2420
|
-
|
|
2417
|
+
const version = c.dim(`v${VERSION}`);
|
|
2418
|
+
const compactTokens = (n) => formatTokens(n).replace(/\.0([kM])$/, '$1');
|
|
2419
|
+
const context = c.dim(`ctx ${compactTokens(used)}/${compactTokens(cfg.model.contextWindow)}`);
|
|
2420
|
+
// Before the context, version and model: the prompt cache clock, then what the conversation has cost so far;
|
|
2421
|
+
// when room is short the cost goes first, then the clock.
|
|
2421
2422
|
const spent = this.cost > 0 ? c.dim(formatUsd(this.cost)) : '';
|
|
2422
2423
|
const clock = this.cacheClock();
|
|
2423
2424
|
const join = (...parts) => parts.filter(Boolean).join(c.dim(' · '));
|
|
2424
2425
|
const room = w - stringWidth(left) - 1;
|
|
2425
|
-
const right = [
|
|
2426
|
+
const right = [
|
|
2427
|
+
join(notice, clock, spent, context, version, info),
|
|
2428
|
+
join(notice, clock, context, version, info),
|
|
2429
|
+
join(notice, context, version, info),
|
|
2430
|
+
join(notice, context, version),
|
|
2431
|
+
join(notice, version),
|
|
2432
|
+
version,
|
|
2433
|
+
].find((r) => r && stringWidth(r) < room) || '';
|
|
2426
2434
|
const gap = room - stringWidth(right);
|
|
2427
2435
|
return right ? left + ' '.repeat(gap) + right : left;
|
|
2428
2436
|
}
|
package/src/updater.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
//
|
|
2
|
-
//
|
|
3
|
-
// the
|
|
4
|
-
//
|
|
5
|
-
// then loads it with a restart (the conversation carries over); the others see the files change and restart too,
|
|
6
|
-
// each once it is idle (App.startSourceWatch). A git checkout (the development copy) is never touched. Off with
|
|
7
|
-
// CLAUDE_PRO_AUTO_UPDATE=0 or DISABLE_AUTOUPDATER=1.
|
|
1
|
+
// Manual update support for `npm i -g claude-pro`: the interactive session checks npm and installs a release only
|
|
2
|
+
// when `/update` calls App.autoUpdate({ force: true }). Installation is serialized by a lock file and the session
|
|
3
|
+
// loads the new package with a restart (the conversation carries over). A git checkout (the development copy) is
|
|
4
|
+
// never touched. The environment switches remain for callers that want to disable even manual checks.
|
|
8
5
|
|
|
9
6
|
import fs from 'node:fs';
|
|
10
7
|
import path from 'node:path';
|