@pi-plugins/claude-cli 0.2.0 → 0.2.2
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.mjs +2 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getBuiltinModels } from "@earendil-works/pi-ai/providers/all";
|
|
2
|
-
import * as
|
|
2
|
+
import * as PiAi from "@earendil-works/pi-ai/compat";
|
|
3
3
|
import * as NodeChildProcess from "node:child_process";
|
|
4
4
|
import { PassThrough } from "node:stream";
|
|
5
5
|
import * as NodeCrypto from "node:crypto";
|
|
@@ -25698,7 +25698,6 @@ var ClaudeCli = class extends Service()("@pi-plugins/claude-cli/ClaudeCli", { ma
|
|
|
25698
25698
|
"--system-prompt-file",
|
|
25699
25699
|
systemPromptFile
|
|
25700
25700
|
], {
|
|
25701
|
-
cwd: setup.cwd,
|
|
25702
25701
|
extendEnv: true,
|
|
25703
25702
|
env: setup.env,
|
|
25704
25703
|
stdin: fromQueue(input).pipe(map((line) => `${line}\n`), encodeText),
|
|
@@ -25733,7 +25732,6 @@ var ClaudeCli = class extends Service()("@pi-plugins/claude-cli/ClaudeCli", { ma
|
|
|
25733
25732
|
], findFirst((block) => fromNullishOr$1(block.cache_control)), map$7((cacheControl) => cacheControl.ttl ?? "5m"));
|
|
25734
25733
|
const prompt = pipe(params.messages, findFirst((message) => message.role === "user" ? some(message.content) : none()), flatMap$5((content) => findFirst(blocks(content), (block) => block.type === "text" ? fromNullishOr$1(block.text) : none())), filter(isNonEmpty), getOrElse(() => "."));
|
|
25735
25734
|
const setup = {
|
|
25736
|
-
cwd: process.cwd(),
|
|
25737
25735
|
systemPrompt: pipe(system, flatMapNullishOr(({ text }) => text), join$1("\n\n")),
|
|
25738
25736
|
args: [
|
|
25739
25737
|
"--print",
|
|
@@ -25855,7 +25853,7 @@ const release = () => runtime.runPromise(gen(function* () {
|
|
|
25855
25853
|
* `anthropic` provider, and Claude Code sends the request in between.
|
|
25856
25854
|
*/
|
|
25857
25855
|
function stream(model, context, options) {
|
|
25858
|
-
return
|
|
25856
|
+
return PiAi.anthropicMessagesApi().streamSimple({
|
|
25859
25857
|
...model,
|
|
25860
25858
|
api: "anthropic-messages",
|
|
25861
25859
|
compat: model.compat
|