@appchy/jarvis 0.1.25 → 0.1.26

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/bin.js CHANGED
@@ -1077,9 +1077,6 @@ async function processAfterHooks(ctx, req) {
1077
1077
  }
1078
1078
  function claudeCodeProvider(config = {}) {
1079
1079
  const useSubscription = config.useSubscription ?? false;
1080
- if (useSubscription && process.env.ANTHROPIC_API_KEY) {
1081
- delete process.env.ANTHROPIC_API_KEY;
1082
- }
1083
1080
  const apiKey = useSubscription ? void 0 : config.apiKey ?? process.env.ANTHROPIC_API_KEY;
1084
1081
  async function query(ctx, req, _options) {
1085
1082
  const { query: claudeQuery } = await import("@anthropic-ai/claude-agent-sdk");
@@ -4434,9 +4431,6 @@ function computeCost(model, usage) {
4434
4431
  return input + output + read2 + write;
4435
4432
  }
4436
4433
  function claudeCodeAgent(config = {}) {
4437
- if (config.useSubscription && process.env.ANTHROPIC_API_KEY) {
4438
- delete process.env.ANTHROPIC_API_KEY;
4439
- }
4440
4434
  const activeRuns = /* @__PURE__ */ new Map();
4441
4435
  return {
4442
4436
  id: "claude-code",
@@ -5394,9 +5388,9 @@ function getWorkspacePath() {
5394
5388
  var provider2 = null;
5395
5389
  var pendingInputs = /* @__PURE__ */ new Map();
5396
5390
  function initAgent(c) {
5397
- const useSubscription = c.useSubscription ?? !c.anthropicApiKey;
5398
5391
  provider2 = claudeCodeAgent({
5399
- ...useSubscription ? { useSubscription: true } : { apiKey: c.anthropicApiKey },
5392
+ apiKey: c.anthropicApiKey,
5393
+ useSubscription: c.useSubscription,
5400
5394
  userId: c.userId,
5401
5395
  appUrl: c.appUrl,
5402
5396
  defaultWorkspace: getWorkspacePath()
@@ -5647,7 +5641,7 @@ function codeAgents(config) {
5647
5641
 
5648
5642
  // src/chats.ts
5649
5643
  init_src6();
5650
- var claudeCode = claudeCodeAgent({ useSubscription: true });
5644
+ var claudeCode = claudeCodeAgent();
5651
5645
  var agentProvider = agents({ providers: [claudeCode] });
5652
5646
  var codeAgentProvider = codeAgents({ providers: [claudeCode] });
5653
5647