@inetafrica/open-claudia 1.3.3 → 1.3.4

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.
Files changed (2) hide show
  1. package/bot.js +14 -1
  2. package/package.json +1 -1
package/bot.js CHANGED
@@ -834,7 +834,20 @@ bot.onText(/\/restart$/, async (msg) => {
834
834
 
835
835
  bot.onText(/\/upgrade$/, async (msg) => {
836
836
  if (!isOwner(msg)) return;
837
- await send("Upgrading I'll be unreachable for a few seconds...");
837
+ // Check if there's actually a newer version
838
+ try {
839
+ const latest = execSync("npm view @inetafrica/open-claudia version", {
840
+ encoding: "utf-8", timeout: 15000,
841
+ env: { ...process.env, PATH: FULL_PATH, HOME: process.env.HOME || require("os").homedir() },
842
+ }).trim();
843
+ if (latest === CURRENT_VERSION) {
844
+ await send(`Already on the latest version (v${CURRENT_VERSION}).`);
845
+ return;
846
+ }
847
+ await send(`Upgrading v${CURRENT_VERSION} → v${latest}...`);
848
+ } catch (e) {
849
+ await send("Upgrading...");
850
+ }
838
851
  try {
839
852
  execSync("npm install -g @inetafrica/open-claudia@latest 2>&1", {
840
853
  encoding: "utf-8", timeout: 120000,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inetafrica/open-claudia",
3
- "version": "1.3.3",
3
+ "version": "1.3.4",
4
4
  "description": "Your always-on AI coding assistant — Claude Code via Telegram",
5
5
  "main": "bot.js",
6
6
  "bin": {