aieo 0.1.21 → 0.1.22
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.cjs +15 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +15 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8213,18 +8213,23 @@ async function getModel(provider, apiKey, cwd) {
|
|
|
8213
8213
|
});
|
|
8214
8214
|
return openai2(SOTA[provider]);
|
|
8215
8215
|
case "claude_code":
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8216
|
+
try {
|
|
8217
|
+
const customProvider = (0, import_ai_sdk_provider_claude_code.createClaudeCode)({
|
|
8218
|
+
defaultSettings: {
|
|
8219
|
+
// Skip permission prompts for all operations
|
|
8220
|
+
permissionMode: "bypassPermissions",
|
|
8221
|
+
// Set working directory for file operations
|
|
8222
|
+
cwd
|
|
8223
|
+
}
|
|
8224
|
+
});
|
|
8225
|
+
if (cwd) {
|
|
8226
|
+
console.log("creating claude code model at", cwd);
|
|
8222
8227
|
}
|
|
8223
|
-
|
|
8224
|
-
|
|
8225
|
-
console.
|
|
8228
|
+
return customProvider(SOTA[provider]);
|
|
8229
|
+
} catch (error) {
|
|
8230
|
+
console.error("Failed to create Claude Code provider:", error);
|
|
8231
|
+
throw new Error("Claude Code CLI not available or not properly installed. Make sure Claude Code is installed and accessible in the environment where this code runs.");
|
|
8226
8232
|
}
|
|
8227
|
-
return customProvider(SOTA[provider]);
|
|
8228
8233
|
default:
|
|
8229
8234
|
throw new Error(`Unsupported provider: ${provider}`);
|
|
8230
8235
|
}
|