lovecode-ai 0.2.2 → 0.2.4

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.
@@ -40,6 +40,11 @@ function loadEnv(rootDir) {
40
40
  const envVal = process.env[v.key];
41
41
  if (envVal) vars[v.key] = envVal;
42
42
  }
43
+ for (const [key, value] of Object.entries(vars)) {
44
+ if (value && !process.env[key]) {
45
+ process.env[key] = value;
46
+ }
47
+ }
43
48
  return vars;
44
49
  }
45
50
  function saveEnv(vars, rootDir) {
@@ -224,10 +224,10 @@ var registry = [
224
224
  {
225
225
  name: "groq",
226
226
  provider: new OpenAILikeProvider("groq", "https://api.groq.com/openai/v1"),
227
- models: ["llama3-70b-8192", "llama3-8b-8192", "mixtral-8x7b-32768", "gemma2-9b-it", "deepseek-r1-distill-llama-70b"],
227
+ models: ["llama-3.3-70b-versatile", "llama-3.1-8b-instant", "mixtral-8x7b-32768", "gemma2-9b-it", "deepseek-r1-distill-llama-70b", "meta-llama/llama-4-scout-17b-16e-instruct", "qwen/qwen3-32b"],
228
228
  local: false,
229
229
  priority: 30,
230
- defaultModel: "llama3-70b-8192",
230
+ defaultModel: "llama-3.3-70b-versatile",
231
231
  getConfig: (model) => ({
232
232
  model,
233
233
  baseUrl: "https://api.groq.com/openai/v1",
@@ -20,7 +20,7 @@ import {
20
20
  isGitAvailable,
21
21
  stageAll,
22
22
  switchBranch
23
- } from "./chunk-7CT3XDH6.js";
23
+ } from "./chunk-WNHWSO4Y.js";
24
24
  import {
25
25
  click,
26
26
  formatDOMElement,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  getDefaultModel,
3
3
  resolveModel
4
- } from "./chunk-Y3HADLWO.js";
4
+ } from "./chunk-LTTRUG6S.js";
5
5
 
6
6
  // src/git/commands.ts
7
7
  import { execSync } from "child_process";
@@ -4,7 +4,7 @@ import {
4
4
  loadEnv,
5
5
  saveEnv,
6
6
  saveEnvExample
7
- } from "./chunk-3AHNSXQX.js";
7
+ } from "./chunk-DRN3XLN3.js";
8
8
  export {
9
9
  KNOWN_ENV_VARS,
10
10
  formatEnvStatus,
@@ -32,8 +32,8 @@ import {
32
32
  stageFiles,
33
33
  suggestResolutions,
34
34
  switchBranch
35
- } from "./chunk-7CT3XDH6.js";
36
- import "./chunk-Y3HADLWO.js";
35
+ } from "./chunk-WNHWSO4Y.js";
36
+ import "./chunk-LTTRUG6S.js";
37
37
  export {
38
38
  abbreviateDiff,
39
39
  cleanupMergedBranches,
package/dist/index.js CHANGED
@@ -35,7 +35,7 @@ import {
35
35
  scanDirectory,
36
36
  searchVectors,
37
37
  storeVector
38
- } from "./chunk-DA5SRYF4.js";
38
+ } from "./chunk-MPOKDBWT.js";
39
39
  import "./chunk-LKUWOZUZ.js";
40
40
  import "./chunk-MOZHR2QY.js";
41
41
  import {
@@ -56,7 +56,7 @@ import {
56
56
  loadEnv,
57
57
  saveEnv,
58
58
  saveEnvExample
59
- } from "./chunk-3AHNSXQX.js";
59
+ } from "./chunk-DRN3XLN3.js";
60
60
  import {
61
61
  formatConfig,
62
62
  getDefaults,
@@ -86,13 +86,13 @@ import {
86
86
  stageAll,
87
87
  suggestResolutions,
88
88
  switchBranch
89
- } from "./chunk-7CT3XDH6.js";
89
+ } from "./chunk-WNHWSO4Y.js";
90
90
  import {
91
91
  OllamaProvider,
92
92
  getProvider,
93
93
  printProviders,
94
94
  setDefaultModel
95
- } from "./chunk-Y3HADLWO.js";
95
+ } from "./chunk-LTTRUG6S.js";
96
96
  import "./chunk-IVAMLKMS.js";
97
97
 
98
98
  // src/index.ts
@@ -1133,7 +1133,7 @@ var chatCommand = new Command("chat").alias("c").description("Start an interacti
1133
1133
  let loadEnvFn = () => ({});
1134
1134
  let loadConfigFn = () => ({});
1135
1135
  try {
1136
- ({ loadEnv: loadEnvFn } = await import("./env-HJQWWL6N.js"));
1136
+ ({ loadEnv: loadEnvFn } = await import("./env-7TE4MZGW.js"));
1137
1137
  ({ loadConfig: loadConfigFn } = await import("./config-FJNTTKR3.js"));
1138
1138
  loadEnvFn();
1139
1139
  } catch {
@@ -1151,7 +1151,7 @@ var chatCommand = new Command("chat").alias("c").description("Start an interacti
1151
1151
  if (!cfgProvider) cfgProvider = "ollama";
1152
1152
  }
1153
1153
  }
1154
- const { resolveModel } = await import("./registry-ADSIKXA4.js");
1154
+ const { resolveModel } = await import("./registry-UKNF5I3W.js");
1155
1155
  const resolved = resolveModel(cfgProvider || cfgModel || "codellama");
1156
1156
  const entry = resolved.entry;
1157
1157
  const model = entry.models.includes(cfgModel || "") ? cfgModel || entry.defaultModel : entry.defaultModel;
@@ -3003,7 +3003,7 @@ async function cmdDiff(options) {
3003
3003
  if (!requireGit(options.dir)) return;
3004
3004
  const dir = options.dir || process.cwd();
3005
3005
  const root = getGitRoot(dir);
3006
- const diff = options.staged ? (await import("./git-FZPRJVFI.js")).getStagedDiff(root || dir) : getDiff(root || dir);
3006
+ const diff = options.staged ? (await import("./git-D4TGFVUK.js")).getStagedDiff(root || dir) : getDiff(root || dir);
3007
3007
  if (!diff) {
3008
3008
  console.log(chalk22.yellow(" No changes to show."));
3009
3009
  return;
@@ -3587,9 +3587,9 @@ function App({
3587
3587
  }
3588
3588
  async function handleConnect() {
3589
3589
  try {
3590
- const { getAllProviders } = await import("./registry-ADSIKXA4.js");
3590
+ const { getAllProviders } = await import("./registry-UKNF5I3W.js");
3591
3591
  const { loadConfig: loadConfig2 } = await import("./config-FJNTTKR3.js");
3592
- const { loadEnv: loadEnv2 } = await import("./env-HJQWWL6N.js");
3592
+ const { loadEnv: loadEnv2 } = await import("./env-7TE4MZGW.js");
3593
3593
  loadEnv2();
3594
3594
  const providers = getAllProviders();
3595
3595
  const config = loadConfig2();
@@ -3892,9 +3892,9 @@ When you need to access files, use the appropriate tool tag.
3892
3892
  After getting results, continue helping the user.`;
3893
3893
  async function loadAIProvider() {
3894
3894
  try {
3895
- const { loadEnv: loadEnv2 } = await import("./env-HJQWWL6N.js");
3895
+ const { loadEnv: loadEnv2 } = await import("./env-7TE4MZGW.js");
3896
3896
  const { loadConfig: loadConfig2 } = await import("./config-FJNTTKR3.js");
3897
- const { resolveModel } = await import("./registry-ADSIKXA4.js");
3897
+ const { resolveModel } = await import("./registry-UKNF5I3W.js");
3898
3898
  loadEnv2();
3899
3899
  const cfg = loadConfig2();
3900
3900
  if (!cfg.provider) {
@@ -4996,7 +4996,7 @@ import { Command as Command17 } from "commander";
4996
4996
  import chalk31 from "chalk";
4997
4997
  async function cmdStartMcp() {
4998
4998
  console.log(chalk31.dim("Starting LoveCode MCP server on stdio..."));
4999
- const { startMcpServer } = await import("./server-XUIKJRQZ.js");
4999
+ const { startMcpServer } = await import("./server-VHL4FYCR.js");
5000
5000
  await startMcpServer();
5001
5001
  }
5002
5002
  var mcpCommand = new Command17("mcp").description("Model Context Protocol server \u2014 expose LoveCode tools to MCP clients").addHelpText("after", `
@@ -8,7 +8,7 @@ import {
8
8
  printProviders,
9
9
  resolveModel,
10
10
  setDefaultModel
11
- } from "./chunk-Y3HADLWO.js";
11
+ } from "./chunk-LTTRUG6S.js";
12
12
  export {
13
13
  getAllProviders,
14
14
  getDefaultModel,
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  allTools
3
- } from "./chunk-DA5SRYF4.js";
3
+ } from "./chunk-MPOKDBWT.js";
4
4
  import "./chunk-LKUWOZUZ.js";
5
5
  import "./chunk-MOZHR2QY.js";
6
6
  import "./chunk-OTEQ6CQ7.js";
7
7
  import "./chunk-4IPMBDCG.js";
8
- import "./chunk-7CT3XDH6.js";
9
- import "./chunk-Y3HADLWO.js";
8
+ import "./chunk-WNHWSO4Y.js";
9
+ import "./chunk-LTTRUG6S.js";
10
10
  import "./chunk-IVAMLKMS.js";
11
11
 
12
12
  // src/mcp/server.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lovecode-ai",
3
- "version": "0.2.2",
3
+ "version": "0.2.4",
4
4
  "description": "Terminal-native autonomous coding agent powered by free AI models",
5
5
  "keywords": [
6
6
  "ai",