@lobehub/cli 0.0.177 → 0.0.178
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 +13 -12
- package/man/man1/lh.1 +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -62440,7 +62440,7 @@ const materializeImageToPath = async (image, cacheDir) => {
|
|
|
62440
62440
|
if (image.path) return image.path;
|
|
62441
62441
|
const ext = EXT_BY_MEDIA_TYPE[normalizeMediaType(image.mediaType)] || EXT_BY_MEDIA_TYPE[guessMediaTypeFromBuffer(image.buffer) ?? ""];
|
|
62442
62442
|
if (!ext) throw new Error(`Unsupported image media type for path materialization: ${image.mediaType}`);
|
|
62443
|
-
const key = sha256Hex(
|
|
62443
|
+
const key = sha256Hex(image.buffer);
|
|
62444
62444
|
const filePath = path.join(cacheDir, `${key}${ext}`);
|
|
62445
62445
|
try {
|
|
62446
62446
|
await access(filePath);
|
|
@@ -62553,6 +62553,7 @@ const buildQoderInput = async (blocks, options) => {
|
|
|
62553
62553
|
* extra CLI args required to attach images. The single source of truth for
|
|
62554
62554
|
* how each external agent CLI receives multimodal input.
|
|
62555
62555
|
*
|
|
62556
|
+
* - `antigravity`: stream-json text on stdin with local paths for the built-in image reader
|
|
62556
62557
|
* - `amp` / `claude-code` / `codebuddy`: stream-json on stdin with text + base64 image content blocks
|
|
62557
62558
|
* - `codex`: raw text on stdin + repeatable `--image <path>` flags
|
|
62558
62559
|
* - `kimi-code`: `--prompt <text>` with materialized image paths referenced in the text
|
|
@@ -62566,15 +62567,18 @@ const buildQoderInput = async (blocks, options) => {
|
|
|
62566
62567
|
const buildAgentInput = async (agentType, prompt, options = {}) => {
|
|
62567
62568
|
const blocks = toBlocks$1(prompt);
|
|
62568
62569
|
switch (agentType) {
|
|
62569
|
-
case "antigravity":
|
|
62570
|
-
|
|
62570
|
+
case "antigravity": {
|
|
62571
|
+
const imagePaths = await resolvePathInputImagePaths(blocks, options);
|
|
62572
|
+
const attachments = imagePaths.length ? ["Use your built-in image-reading tool to inspect the attached images before answering:", ...imagePaths.map((imagePath) => `- ${JSON.stringify(path.resolve(imagePath))}`)].join("\n") : "";
|
|
62573
|
+
const content = [collectText(blocks), attachments].filter(Boolean).join("\n\n");
|
|
62571
62574
|
return {
|
|
62572
62575
|
args: [],
|
|
62573
62576
|
stdin: `${JSON.stringify({
|
|
62574
62577
|
event: "user",
|
|
62575
|
-
message: { content
|
|
62578
|
+
message: { content }
|
|
62576
62579
|
})}\n`
|
|
62577
62580
|
};
|
|
62581
|
+
}
|
|
62578
62582
|
case "amp":
|
|
62579
62583
|
case "claude-code":
|
|
62580
62584
|
case "codebuddy": return buildClaudeCompatibleStdin(blocks, options);
|
|
@@ -76472,14 +76476,11 @@ const spawnCliAgent = async (options, command, cwd, inputPlan, childEnv, codexJw
|
|
|
76472
76476
|
},
|
|
76473
76477
|
supportsSteerImageAttachments: true
|
|
76474
76478
|
},
|
|
76475
|
-
...antigravityLive && {
|
|
76476
|
-
|
|
76477
|
-
|
|
76478
|
-
|
|
76479
|
-
|
|
76480
|
-
},
|
|
76481
|
-
supportsSteerImages: false
|
|
76482
|
-
},
|
|
76479
|
+
...antigravityLive && { sendUserMessage: async (prompt, sendOptions) => {
|
|
76480
|
+
if (!antigravityLive.isOpen) return false;
|
|
76481
|
+
const plan = await buildAgentInput("antigravity", prompt, options.inputOptions);
|
|
76482
|
+
return antigravityLive.send(plan.stdin, sendOptions?.uuid);
|
|
76483
|
+
} },
|
|
76483
76484
|
kill: (signal = "SIGINT") => {
|
|
76484
76485
|
killedByUs = true;
|
|
76485
76486
|
live?.close();
|
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.178" "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.178",
|
|
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": "236e7c8a253e4bc5cdec1230df1bbfc1796d0e2b"
|
|
87
87
|
}
|