@bike4mind/cli 0.2.10-feat-explore-subagent-implementation.17245 → 0.2.10-feat-explore-subagent-implementation.17263

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.
Files changed (2) hide show
  1. package/dist/index.js +30 -8
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -8269,7 +8269,8 @@ var fileReadTool = {
8269
8269
  return content;
8270
8270
  } catch (error) {
8271
8271
  context.logger.error("\u274C FileRead: Failed", error);
8272
- throw error;
8272
+ const errorMessage = error instanceof Error ? error.message : String(error);
8273
+ return `Error reading file: ${errorMessage}`;
8273
8274
  }
8274
8275
  },
8275
8276
  toolSchema: {
@@ -11189,7 +11190,7 @@ import { isAxiosError as isAxiosError2 } from "axios";
11189
11190
  // package.json
11190
11191
  var package_default = {
11191
11192
  name: "@bike4mind/cli",
11192
- version: "0.2.10-feat-explore-subagent-implementation.17245+d73e88b84",
11193
+ version: "0.2.10-feat-explore-subagent-implementation.17263+b92e2f586",
11193
11194
  type: "module",
11194
11195
  description: "Interactive CLI tool for Bike4Mind with ReAct agents",
11195
11196
  license: "UNLICENSED",
@@ -11292,10 +11293,10 @@ var package_default = {
11292
11293
  },
11293
11294
  devDependencies: {
11294
11295
  "@bike4mind/agents": "0.1.0",
11295
- "@bike4mind/common": "2.39.1-feat-explore-subagent-implementation.17245+d73e88b84",
11296
- "@bike4mind/mcp": "1.20.4-feat-explore-subagent-implementation.17245+d73e88b84",
11297
- "@bike4mind/services": "2.34.2-feat-explore-subagent-implementation.17245+d73e88b84",
11298
- "@bike4mind/utils": "2.1.4-feat-explore-subagent-implementation.17245+d73e88b84",
11296
+ "@bike4mind/common": "2.39.1-feat-explore-subagent-implementation.17263+b92e2f586",
11297
+ "@bike4mind/mcp": "1.20.4-feat-explore-subagent-implementation.17263+b92e2f586",
11298
+ "@bike4mind/services": "2.34.2-feat-explore-subagent-implementation.17263+b92e2f586",
11299
+ "@bike4mind/utils": "2.1.4-feat-explore-subagent-implementation.17263+b92e2f586",
11299
11300
  "@types/better-sqlite3": "^7.6.13",
11300
11301
  "@types/diff": "^5.0.9",
11301
11302
  "@types/jsonwebtoken": "^9.0.4",
@@ -11308,7 +11309,7 @@ var package_default = {
11308
11309
  typescript: "^5.9.3",
11309
11310
  vitest: "^3.2.4"
11310
11311
  },
11311
- gitHead: "d73e88b84cc88ea33861cf5270ee1e23eb953ed1"
11312
+ gitHead: "b92e2f586a6e216a1e40919bea0c36aa3c0db84f"
11312
11313
  };
11313
11314
 
11314
11315
  // src/config/constants.ts
@@ -12738,7 +12739,28 @@ No usage data available for the last ${USAGE_DAYS} days.`);
12738
12739
  };
12739
12740
  const handleSaveConfig = async (updatedConfig) => {
12740
12741
  await state.configStore.save(updatedConfig);
12741
- setState((prev) => ({ ...prev, config: updatedConfig }));
12742
+ const modelChanged = state.config?.defaultModel !== updatedConfig.defaultModel;
12743
+ setState((prev) => {
12744
+ if (modelChanged && prev.session) {
12745
+ const updatedSession = {
12746
+ ...prev.session,
12747
+ model: updatedConfig.defaultModel,
12748
+ updatedAt: (/* @__PURE__ */ new Date()).toISOString()
12749
+ };
12750
+ setStoreSession(updatedSession);
12751
+ if (prev.agent) {
12752
+ prev.agent.context.model = updatedConfig.defaultModel;
12753
+ }
12754
+ return { ...prev, config: updatedConfig, session: updatedSession };
12755
+ }
12756
+ return { ...prev, config: updatedConfig };
12757
+ });
12758
+ if (modelChanged && state.agent) {
12759
+ const llm = state.agent.context.llm;
12760
+ if (llm) {
12761
+ llm.currentModel = updatedConfig.defaultModel;
12762
+ }
12763
+ }
12742
12764
  };
12743
12765
  if (initError) {
12744
12766
  return /* @__PURE__ */ React17.createElement(Box16, { flexDirection: "column", padding: 1 }, /* @__PURE__ */ React17.createElement(Text16, { color: "red", bold: true }, "\u274C Initialization Error"), /* @__PURE__ */ React17.createElement(Text16, null, initError), /* @__PURE__ */ React17.createElement(Text16, { dimColor: true }, "\n", "Tip: Run /config to set up your API keys"));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bike4mind/cli",
3
- "version": "0.2.10-feat-explore-subagent-implementation.17245+d73e88b84",
3
+ "version": "0.2.10-feat-explore-subagent-implementation.17263+b92e2f586",
4
4
  "type": "module",
5
5
  "description": "Interactive CLI tool for Bike4Mind with ReAct agents",
6
6
  "license": "UNLICENSED",
@@ -103,10 +103,10 @@
103
103
  },
104
104
  "devDependencies": {
105
105
  "@bike4mind/agents": "0.1.0",
106
- "@bike4mind/common": "2.39.1-feat-explore-subagent-implementation.17245+d73e88b84",
107
- "@bike4mind/mcp": "1.20.4-feat-explore-subagent-implementation.17245+d73e88b84",
108
- "@bike4mind/services": "2.34.2-feat-explore-subagent-implementation.17245+d73e88b84",
109
- "@bike4mind/utils": "2.1.4-feat-explore-subagent-implementation.17245+d73e88b84",
106
+ "@bike4mind/common": "2.39.1-feat-explore-subagent-implementation.17263+b92e2f586",
107
+ "@bike4mind/mcp": "1.20.4-feat-explore-subagent-implementation.17263+b92e2f586",
108
+ "@bike4mind/services": "2.34.2-feat-explore-subagent-implementation.17263+b92e2f586",
109
+ "@bike4mind/utils": "2.1.4-feat-explore-subagent-implementation.17263+b92e2f586",
110
110
  "@types/better-sqlite3": "^7.6.13",
111
111
  "@types/diff": "^5.0.9",
112
112
  "@types/jsonwebtoken": "^9.0.4",
@@ -119,5 +119,5 @@
119
119
  "typescript": "^5.9.3",
120
120
  "vitest": "^3.2.4"
121
121
  },
122
- "gitHead": "d73e88b84cc88ea33861cf5270ee1e23eb953ed1"
122
+ "gitHead": "b92e2f586a6e216a1e40919bea0c36aa3c0db84f"
123
123
  }