@lobehub/cli 0.0.89 → 0.0.90
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 +28 -2
- package/man/man1/lh.1 +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -579939,6 +579939,22 @@ var CoalescingBatchIngester = class {
|
|
|
579939
579939
|
|
|
579940
579940
|
//#endregion
|
|
579941
579941
|
//#region src/utils/heteroSteer.ts
|
|
579942
|
+
/** The prompt a follow-up is typed in as: its text, then its images as image blocks. */
|
|
579943
|
+
const buildSteerPrompt = (message) => {
|
|
579944
|
+
const images = message.imageList ?? [];
|
|
579945
|
+
if (images.length === 0) return message.content;
|
|
579946
|
+
return [{
|
|
579947
|
+
text: message.content,
|
|
579948
|
+
type: "text"
|
|
579949
|
+
}, ...images.map(({ id, url }) => ({
|
|
579950
|
+
source: {
|
|
579951
|
+
id,
|
|
579952
|
+
type: "url",
|
|
579953
|
+
url
|
|
579954
|
+
},
|
|
579955
|
+
type: "image"
|
|
579956
|
+
}))];
|
|
579957
|
+
};
|
|
579942
579958
|
const RETRY_MS = 2e3;
|
|
579943
579959
|
/** The server predates steer delivery, or refuses it for this run: stop asking. */
|
|
579944
579960
|
const isPermanentRefusal = (error) => {
|
|
@@ -579978,7 +579994,11 @@ async function* withHeteroSteer(handle, context) {
|
|
|
579978
579994
|
while (!abort.signal.aborted) {
|
|
579979
579995
|
let message;
|
|
579980
579996
|
try {
|
|
579981
|
-
const res = await client.aiAgent.waitHeteroSteer.mutate(supported ? {
|
|
579997
|
+
const res = await client.aiAgent.waitHeteroSteer.mutate(supported ? {
|
|
579998
|
+
acceptsImages: true,
|
|
579999
|
+
operationId
|
|
580000
|
+
} : {
|
|
580001
|
+
acceptsImages: true,
|
|
579982
580002
|
blockMs: 1,
|
|
579983
580003
|
operationId
|
|
579984
580004
|
}, { signal: abort.signal });
|
|
@@ -579995,7 +580015,13 @@ async function* withHeteroSteer(handle, context) {
|
|
|
579995
580015
|
continue;
|
|
579996
580016
|
}
|
|
579997
580017
|
if (!message) continue;
|
|
579998
|
-
|
|
580018
|
+
const steer = message;
|
|
580019
|
+
const options = { uuid: steer.messageId };
|
|
580020
|
+
if (await send(buildSteerPrompt(steer), options).catch(async (error) => {
|
|
580021
|
+
if (!steer.imageList?.length) return false;
|
|
580022
|
+
log$13.debug("Steer images failed, sending the text: %s", String(error));
|
|
580023
|
+
return send(steer.content, options).catch(() => false);
|
|
580024
|
+
})) {
|
|
579999
580025
|
delivered.add(message.messageId);
|
|
580000
580026
|
continue;
|
|
580001
580027
|
}
|
package/man/man1/lh.1
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.\" Code generated by `npm run man:generate`; DO NOT EDIT.
|
|
2
2
|
.\" Manual command details come from the Commander command tree.
|
|
3
|
-
.TH LH 1 "" "@lobehub/cli 0.0.
|
|
3
|
+
.TH LH 1 "" "@lobehub/cli 0.0.90" "User Commands"
|
|
4
4
|
.SH NAME
|
|
5
5
|
lh \- LobeHub CLI \- manage and connect to LobeHub services
|
|
6
6
|
.SH SYNOPSIS
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.90",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/lobehub/lobehub",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"access": "public",
|
|
84
84
|
"registry": "https://registry.npmjs.org"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "d731a5f860e06cfb77f87bf0e8e0b493486ca33e"
|
|
87
87
|
}
|