opencode-codebuddy-external-auth 1.0.9 → 1.0.10
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/plugin.js +5 -3
- package/package.json +1 -1
package/dist/plugin.js
CHANGED
|
@@ -147,7 +147,8 @@ async function executeCodeBuddyCLI(prompt, model, systemPrompt) {
|
|
|
147
147
|
args.push("--system-prompt", systemPrompt);
|
|
148
148
|
}
|
|
149
149
|
args.push(prompt);
|
|
150
|
-
|
|
150
|
+
// Debug log (可注释掉)
|
|
151
|
+
// console.log(`[codebuddy-external] Executing: codebuddy ${args.join(" ").substring(0, 100)}...`);
|
|
151
152
|
const child = spawn("codebuddy", args, {
|
|
152
153
|
env: { ...process.env },
|
|
153
154
|
stdio: ["pipe", "pipe", "pipe"],
|
|
@@ -199,8 +200,9 @@ function createProxyFetch() {
|
|
|
199
200
|
const openaiRequest = JSON.parse(typeof body === "string" ? body : await new Response(body).text());
|
|
200
201
|
// Convert to CodeBuddy format
|
|
201
202
|
const { prompt, systemPrompt } = convertMessagesToPrompt(openaiRequest.messages);
|
|
202
|
-
|
|
203
|
-
console.log(`[codebuddy-external]
|
|
203
|
+
// Debug logs (可注释掉)
|
|
204
|
+
// console.log(`[codebuddy-external] Invoking CodeBuddy CLI`);
|
|
205
|
+
// console.log(`[codebuddy-external] Model: ${openaiRequest.model}, Prompt length: ${prompt.length}`);
|
|
204
206
|
// Execute codebuddy CLI
|
|
205
207
|
const resultText = await executeCodeBuddyCLI(prompt, openaiRequest.model, systemPrompt);
|
|
206
208
|
// Convert response to OpenAI format
|