agenttop 0.10.3 → 0.10.5
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/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -364,9 +364,14 @@ var getPackageVersion = async () => {
|
|
|
364
364
|
return "0.0.0";
|
|
365
365
|
}
|
|
366
366
|
};
|
|
367
|
+
var getNpmPath = () => {
|
|
368
|
+
const nodeDir = dirname(process.execPath);
|
|
369
|
+
return join(nodeDir, "npm");
|
|
370
|
+
};
|
|
367
371
|
var checkForUpdate = () => new Promise((resolve) => {
|
|
372
|
+
const npm = getNpmPath();
|
|
368
373
|
getPackageVersion().then((current) => {
|
|
369
|
-
execFile(
|
|
374
|
+
execFile(npm, ["view", "agenttop", "version"], { encoding: "utf-8", timeout: 5e3 }, (err, stdout) => {
|
|
370
375
|
if (err || !stdout) {
|
|
371
376
|
resolve({ current, latest: current, available: false });
|
|
372
377
|
return;
|
|
@@ -381,8 +386,9 @@ var checkForUpdate = () => new Promise((resolve) => {
|
|
|
381
386
|
});
|
|
382
387
|
});
|
|
383
388
|
var installUpdate = () => {
|
|
389
|
+
const npm = getNpmPath();
|
|
384
390
|
return new Promise((resolve, reject) => {
|
|
385
|
-
exec(
|
|
391
|
+
exec(`${npm} install -g agenttop@latest`, { timeout: 6e4 }, (err, stdout) => {
|
|
386
392
|
if (err) {
|
|
387
393
|
reject(err);
|
|
388
394
|
} else {
|
|
@@ -764,16 +770,16 @@ var ActivityFeed = React3.memo(
|
|
|
764
770
|
const isSelected = hasSelection && globalIndex === selectedEventIndex;
|
|
765
771
|
const tag = merged ? call.slug.slice(0, 4) : null;
|
|
766
772
|
const tagColor = merged ? slugColorMap.get(call.sessionId) || colors.muted : void 0;
|
|
767
|
-
return /* @__PURE__ */
|
|
773
|
+
return /* @__PURE__ */ jsx3(Box3, { paddingX: 1, overflow: "hidden", children: /* @__PURE__ */ jsxs3(Text3, { wrap: "truncate", children: [
|
|
768
774
|
tag && /* @__PURE__ */ jsx3(Text3, { color: tagColor, children: tag.padEnd(5) }),
|
|
769
775
|
/* @__PURE__ */ jsx3(Text3, { color: isSelected ? colors.bright : colors.muted, underline: isSelected, children: formatTime(call.timestamp) }),
|
|
770
|
-
|
|
776
|
+
" ",
|
|
771
777
|
/* @__PURE__ */ jsx3(Text3, { color: getToolColor(call.toolName), bold: true, underline: isSelected, children: call.toolName.padEnd(8) }),
|
|
772
778
|
/* @__PURE__ */ jsxs3(Text3, { color: isSelected ? colors.bright : colors.text, underline: isSelected, children: [
|
|
773
779
|
" ",
|
|
774
780
|
summarizeInput(call)
|
|
775
781
|
] })
|
|
776
|
-
] }, `${call.timestamp}-${i}`);
|
|
782
|
+
] }) }, `${call.timestamp}-${i}`);
|
|
777
783
|
}),
|
|
778
784
|
focused && canScroll && !isAtTop && visible.length > 0 && /* @__PURE__ */ jsx3(Box3, { paddingX: 1, justifyContent: "flex-end", children: /* @__PURE__ */ jsx3(Text3, { color: colors.muted, children: isAtBottom ? "" : "G:bottom " }) }),
|
|
779
785
|
!merged && sessionId && isActive === false && /* @__PURE__ */ jsxs3(Box3, { paddingX: 1, flexDirection: "column", children: [
|