@hydra-acp/cli 0.1.42 → 0.1.43
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/cli.js +28 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -6164,7 +6164,7 @@ function writeStyled(term, text, style) {
|
|
|
6164
6164
|
term(text);
|
|
6165
6165
|
return;
|
|
6166
6166
|
case "thought":
|
|
6167
|
-
term.brightBlack.
|
|
6167
|
+
term.brightBlack.noFormat(text);
|
|
6168
6168
|
return;
|
|
6169
6169
|
case "tool":
|
|
6170
6170
|
term.brightBlue.noFormat(text);
|
|
@@ -9155,6 +9155,27 @@ async function pickSession(term, opts) {
|
|
|
9155
9155
|
paintIndicator();
|
|
9156
9156
|
});
|
|
9157
9157
|
};
|
|
9158
|
+
const repaintDataZone = () => {
|
|
9159
|
+
withSync(() => {
|
|
9160
|
+
term.moveTo(1, headerRow());
|
|
9161
|
+
term.dim.noFormat(` ${headerLine}`);
|
|
9162
|
+
for (let v = 0; v < viewportSize; v++) {
|
|
9163
|
+
const row = headerRow() + 1 + v;
|
|
9164
|
+
const sessionIdx = scrollOffset + v;
|
|
9165
|
+
if (sessionIdx < visible.length) {
|
|
9166
|
+
term.moveTo(1, row);
|
|
9167
|
+
paintSessionRow(sessionIdx);
|
|
9168
|
+
} else {
|
|
9169
|
+
term.moveTo(1, row).eraseLineAfter();
|
|
9170
|
+
}
|
|
9171
|
+
}
|
|
9172
|
+
paintIndicator();
|
|
9173
|
+
if (selectedIdx === 0) {
|
|
9174
|
+
placeComposerCursor();
|
|
9175
|
+
term.hideCursor(false);
|
|
9176
|
+
}
|
|
9177
|
+
});
|
|
9178
|
+
};
|
|
9158
9179
|
let pasteActive = false;
|
|
9159
9180
|
let pasteBuffer = "";
|
|
9160
9181
|
let tkStdinHandler = null;
|
|
@@ -9253,6 +9274,7 @@ ${cells}`;
|
|
|
9253
9274
|
const refresh = async (preferredId, refreshOpts = {}) => {
|
|
9254
9275
|
try {
|
|
9255
9276
|
const beforeKey = refreshOpts.silent ? renderFingerprint() : "";
|
|
9277
|
+
const beforeTotal = total;
|
|
9256
9278
|
const next = await listSessions(opts.target);
|
|
9257
9279
|
allSessions = sortSessions(next);
|
|
9258
9280
|
applyFilter();
|
|
@@ -9272,7 +9294,11 @@ ${cells}`;
|
|
|
9272
9294
|
if (refreshOpts.silent && renderFingerprint() === beforeKey) {
|
|
9273
9295
|
return;
|
|
9274
9296
|
}
|
|
9275
|
-
|
|
9297
|
+
if (total === beforeTotal) {
|
|
9298
|
+
repaintDataZone();
|
|
9299
|
+
} else {
|
|
9300
|
+
renderFromScratch();
|
|
9301
|
+
}
|
|
9276
9302
|
} catch (err) {
|
|
9277
9303
|
if (refreshOpts.silent) {
|
|
9278
9304
|
return;
|