@vaclav-synacek/pi-coding-agent-termux 0.51.1-0 → 0.51.1-2
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.
|
@@ -9,14 +9,14 @@ import * as path from "node:path";
|
|
|
9
9
|
import { getOAuthProviders, } from "@mariozechner/pi-ai";
|
|
10
10
|
import { CombinedAutocompleteProvider, Container, fuzzyFilter, Loader, Markdown, matchesKey, ProcessTerminal, Spacer, Text, TruncatedText, TUI, visibleWidth, } from "@mariozechner/pi-tui";
|
|
11
11
|
import { spawn, spawnSync } from "child_process";
|
|
12
|
-
import { APP_NAME, getAuthPath, getDebugLogPath, getShareViewerUrl,
|
|
12
|
+
import { APP_NAME, getAuthPath, getDebugLogPath, getShareViewerUrl, VERSION, } from "../../config.js";
|
|
13
13
|
import { parseSkillBlock } from "../../core/agent-session.js";
|
|
14
14
|
import { FooterDataProvider } from "../../core/footer-data-provider.js";
|
|
15
15
|
import { KeybindingsManager } from "../../core/keybindings.js";
|
|
16
16
|
import { createCompactionSummaryMessage } from "../../core/messages.js";
|
|
17
17
|
import { resolveModelScope } from "../../core/model-resolver.js";
|
|
18
18
|
import { SessionManager } from "../../core/session-manager.js";
|
|
19
|
-
import { getChangelogPath,
|
|
19
|
+
import { getChangelogPath, parseChangelog } from "../../utils/changelog.js";
|
|
20
20
|
import { copyToClipboard } from "../../utils/clipboard.js";
|
|
21
21
|
import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
|
|
22
22
|
import { ensureTool } from "../../utils/tools-manager.js";
|
|
@@ -420,17 +420,19 @@ export class InteractiveMode {
|
|
|
420
420
|
}
|
|
421
421
|
/**
|
|
422
422
|
* Check npm registry for a newer version.
|
|
423
|
+
* This port is deprecated - check upstream package instead.
|
|
423
424
|
*/
|
|
424
425
|
async checkForNewVersion() {
|
|
425
426
|
if (process.env.PI_SKIP_VERSION_CHECK)
|
|
426
427
|
return undefined;
|
|
427
428
|
try {
|
|
428
|
-
const response = await fetch("https://registry.npmjs.org/@
|
|
429
|
+
const response = await fetch("https://registry.npmjs.org/@mariozechner/pi-coding-agent/latest");
|
|
429
430
|
if (!response.ok)
|
|
430
431
|
return undefined;
|
|
431
432
|
const data = (await response.json());
|
|
432
433
|
const latestVersion = data.version;
|
|
433
|
-
|
|
434
|
+
// Always show update notification for deprecated port
|
|
435
|
+
if (latestVersion) {
|
|
434
436
|
return latestVersion;
|
|
435
437
|
}
|
|
436
438
|
return undefined;
|
|
@@ -441,7 +443,7 @@ export class InteractiveMode {
|
|
|
441
443
|
}
|
|
442
444
|
/**
|
|
443
445
|
* Get changelog entries to display on startup.
|
|
444
|
-
*
|
|
446
|
+
* This port is deprecated - show deprecation notice instead of changelog.
|
|
445
447
|
*/
|
|
446
448
|
getChangelogForDisplay() {
|
|
447
449
|
// Skip changelog for resumed/continued sessions (already have messages)
|
|
@@ -449,19 +451,26 @@ export class InteractiveMode {
|
|
|
449
451
|
return undefined;
|
|
450
452
|
}
|
|
451
453
|
const lastVersion = this.settingsManager.getLastChangelogVersion();
|
|
452
|
-
const changelogPath = getChangelogPath();
|
|
453
|
-
const entries = parseChangelog(changelogPath);
|
|
454
454
|
if (!lastVersion) {
|
|
455
455
|
// Fresh install - just record the version, don't show changelog
|
|
456
456
|
this.settingsManager.setLastChangelogVersion(VERSION);
|
|
457
457
|
return undefined;
|
|
458
458
|
}
|
|
459
|
-
else {
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
459
|
+
else if (lastVersion !== VERSION) {
|
|
460
|
+
// Show deprecation notice once on version change
|
|
461
|
+
this.settingsManager.setLastChangelogVersion(VERSION);
|
|
462
|
+
return `## [${VERSION}] - Deprecation Notice
|
|
463
|
+
|
|
464
|
+
**This Termux port is no longer needed.**
|
|
465
|
+
|
|
466
|
+
Upstream pi-coding-agent now supports Termux directly since v0.51.0. Please switch to the official package:
|
|
467
|
+
|
|
468
|
+
\`\`\`bash
|
|
469
|
+
npm uninstall -g @vaclav-synacek/pi-coding-agent-termux
|
|
470
|
+
npm install -g @mariozechner/pi-coding-agent
|
|
471
|
+
\`\`\`
|
|
472
|
+
|
|
473
|
+
All functionality from this port (optional clipboard, Termux detection, etc.) is now integrated in the upstream release.`;
|
|
465
474
|
}
|
|
466
475
|
return undefined;
|
|
467
476
|
}
|
|
@@ -2292,15 +2301,14 @@ export class InteractiveMode {
|
|
|
2292
2301
|
this.ui.requestRender();
|
|
2293
2302
|
}
|
|
2294
2303
|
showNewVersionNotification(newVersion) {
|
|
2295
|
-
const
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
const
|
|
2299
|
-
const
|
|
2300
|
-
const changelogLine = theme.fg("muted", "Changelog: ") + changelogUrl;
|
|
2304
|
+
const deprecationMsg = theme.fg("warning", "This Termux port is deprecated. Upstream pi now supports Termux directly.");
|
|
2305
|
+
const uninstallCmd = theme.fg("accent", "npm uninstall -g @vaclav-synacek/pi-coding-agent-termux");
|
|
2306
|
+
const installCmd = theme.fg("accent", "npm install -g @mariozechner/pi-coding-agent");
|
|
2307
|
+
const instructions = `${theme.fg("muted", "Uninstall port:")} ${uninstallCmd}\n${theme.fg("muted", "Install upstream:")} ${installCmd}`;
|
|
2308
|
+
const upstreamVersion = theme.fg("muted", `Latest upstream version: ${newVersion}`);
|
|
2301
2309
|
this.chatContainer.addChild(new Spacer(1));
|
|
2302
2310
|
this.chatContainer.addChild(new DynamicBorder((text) => theme.fg("warning", text)));
|
|
2303
|
-
this.chatContainer.addChild(new Text(`${theme.bold(theme.fg("warning", "
|
|
2311
|
+
this.chatContainer.addChild(new Text(`${theme.bold(theme.fg("warning", "DEPRECATED"))}\n${deprecationMsg}\n${upstreamVersion}\n${instructions}`, 1, 0));
|
|
2304
2312
|
this.chatContainer.addChild(new DynamicBorder((text) => theme.fg("warning", text)));
|
|
2305
2313
|
this.ui.requestRender();
|
|
2306
2314
|
}
|