spacecode 2.12.7 → 2.13.0

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/repl.mjs CHANGED
@@ -104894,13 +104894,15 @@ async function runCoreForRepl(o) {
104894
104894
  const messages = [...o.history, { role: "user", content: o.prompt }, { role: "assistant", content: [{ type: "text", text: turn.text || "(no reply)" }] }];
104895
104895
  return { success: turn.success, messages, totalInputTokens: turn.tokens, totalOutputTokens: 0 };
104896
104896
  }
104897
- var coreModeOn, sq;
104897
+ var coreSwitch, coreModeOn, shouldUseCore, sq;
104898
104898
  var init_core_mode = __esm({
104899
104899
  "src/core/core-mode.ts"() {
104900
104900
  "use strict";
104901
104901
  init_core_turn();
104902
104902
  init_profile_runtime();
104903
- coreModeOn = (env3) => env3.SPACECODE_CORE?.trim().toLowerCase() === "on";
104903
+ coreSwitch = (env3) => (env3.SPACECODE_CORE ?? "").trim().toLowerCase();
104904
+ coreModeOn = (env3) => !["off", "0", "false", "no"].includes(coreSwitch(env3));
104905
+ shouldUseCore = (env3, repo) => coreModeOn(env3) && (repo !== null || coreSwitch(env3) === "on");
104904
104906
  sq = (s) => `'${s.replace(/'/g, `'\\''`)}'`;
104905
104907
  }
104906
104908
  });
@@ -105494,7 +105496,7 @@ ${list2.map((c) => ` /${c.name} (${c.scope})${c.description ? ` ${c.descripti
105494
105496
  };
105495
105497
  const attached = await mentions.attach(prompt);
105496
105498
  if (attached.notices.length > 0) setNotices(attached.notices);
105497
- const result = coreModeOn(process.env) ? await runCoreForRepl({
105499
+ const result = coreModeOn(process.env) && shouldUseCore(process.env, await detectRepo(projectRoot, process.env)) ? await runCoreForRepl({
105498
105500
  env: process.env,
105499
105501
  apiKey,
105500
105502
  sessionId: sessionIdRef.current ??= sessions ? sessions.newId() : crypto.randomUUID(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "spacecode",
3
- "version": "2.12.7",
3
+ "version": "2.13.0",
4
4
  "description": "SpaceCode - launch cloud dev environments with AI coding agents",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",