@kud/ai-conventional-commit-cli 3.2.3 → 3.2.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/{chunk-IWJLYYKM.js → chunk-EHJXGWTJ.js} +3 -19
- package/dist/index.cjs +1200 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.js +59 -43
- package/dist/{reword-3MH2DYFS.js → reword-BKQ7K33J.js} +1 -1
- package/dist/{reword-3JBE7MPQ.js → reword-QQO7UBGM.js} +2 -0
- package/package.json +1 -1
- package/dist/chunk-2WRUFO3O.js +0 -689
- package/dist/chunk-2X3JJVRR.js +0 -639
- package/dist/chunk-7FBRAH4R.js +0 -643
- package/dist/chunk-7U4J2ORD.js +0 -614
- package/dist/chunk-CC3NIT53.js +0 -650
- package/dist/chunk-CLQ6OPLU.js +0 -668
- package/dist/chunk-F3BOAVBY.js +0 -122
- package/dist/chunk-FYJNHXAR.js +0 -700
- package/dist/chunk-H4W6AMGZ.js +0 -549
- package/dist/chunk-HJR5M6U7.js +0 -120
- package/dist/chunk-HOUMTU6H.js +0 -699
- package/dist/chunk-KEEMHNNS.js +0 -628
- package/dist/chunk-OLEHSPCO.js +0 -707
- package/dist/chunk-RHXNXVGI.js +0 -621
- package/dist/chunk-SNV4RWS4.js +0 -696
- package/dist/chunk-W7OC77AV.js +0 -649
- package/dist/chunk-WFXVVHL2.js +0 -645
- package/dist/chunk-YIXP5EWA.js +0 -545
- package/dist/chunk-YRVQGOVW.js +0 -649
- package/dist/chunk-ZLYMV2NJ.js +0 -644
- package/dist/config-C3S4LWLD.js +0 -12
- package/dist/config-RHGCFLHQ.js +0 -12
- package/dist/reword-2ASH5EH5.js +0 -212
- package/dist/reword-6EWRZ6WZ.js +0 -212
- package/dist/reword-CZDYMQEV.js +0 -150
- package/dist/reword-D5YVSCPO.js +0 -212
- package/dist/reword-ESY2TLBT.js +0 -212
- package/dist/reword-FE5N4MGV.js +0 -150
- package/dist/reword-IN2D2J4H.js +0 -212
- package/dist/reword-JRE6KAF7.js +0 -212
- package/dist/reword-KIR2DMTO.js +0 -212
- package/dist/reword-KUE3IVBE.js +0 -212
- package/dist/reword-LIVSGNUN.js +0 -212
- package/dist/reword-MCQOCOZ2.js +0 -212
- package/dist/reword-NGEKVTD6.js +0 -212
- package/dist/reword-PEOUOAT7.js +0 -212
- package/dist/reword-Q7MES34W.js +0 -212
- package/dist/reword-T44WTP5I.js +0 -212
- package/dist/reword-UA3EG7DK.js +0 -212
- package/dist/reword-UE5IP5V3.js +0 -212
- package/dist/reword-VKG5G6CB.js +0 -212
- package/dist/reword-VRH7B6BE.js +0 -205
- package/dist/reword-WFCNTOEU.js +0 -203
- package/dist/reword-XWYWVQRZ.js +0 -212
|
@@ -171,18 +171,7 @@ Refine now.`
|
|
|
171
171
|
|
|
172
172
|
// src/model/provider.ts
|
|
173
173
|
import { z } from "zod";
|
|
174
|
-
import { createServer } from "net";
|
|
175
174
|
import { createOpencode } from "@opencode-ai/sdk";
|
|
176
|
-
function findFreePort() {
|
|
177
|
-
return new Promise((resolve, reject) => {
|
|
178
|
-
const server = createServer();
|
|
179
|
-
server.on("error", reject);
|
|
180
|
-
server.listen(0, "127.0.0.1", () => {
|
|
181
|
-
const port = server.address().port;
|
|
182
|
-
server.close(() => resolve(port));
|
|
183
|
-
});
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
175
|
var OpenCodeProvider = class {
|
|
187
176
|
constructor(model = "github-copilot/gpt-4.1") {
|
|
188
177
|
this.model = model;
|
|
@@ -221,16 +210,11 @@ ${userAggregate}`;
|
|
|
221
210
|
const start = Date.now();
|
|
222
211
|
let server;
|
|
223
212
|
try {
|
|
224
|
-
|
|
225
|
-
const port = await findFreePort();
|
|
226
|
-
const opencode = await createOpencode({ signal: ac.signal, port });
|
|
213
|
+
const opencode = await createOpencode({ signal: ac.signal });
|
|
227
214
|
server = opencode.server;
|
|
228
|
-
const client = opencode
|
|
215
|
+
const { client } = opencode;
|
|
229
216
|
const session = await client.session.create({ body: { title: "aicc" } });
|
|
230
|
-
if (!session.data)
|
|
231
|
-
const errMsg = session.error?.message ?? JSON.stringify(session.error) ?? "unknown";
|
|
232
|
-
throw new Error(`Failed to create opencode session: ${errMsg}`);
|
|
233
|
-
}
|
|
217
|
+
if (!session.data) throw new Error("Failed to create opencode session");
|
|
234
218
|
const result = await client.session.prompt({
|
|
235
219
|
path: { id: session.data.id },
|
|
236
220
|
body: {
|