neoagent 2.4.1-beta.37 → 2.4.1-beta.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neoagent",
3
- "version": "2.4.1-beta.37",
3
+ "version": "2.4.1-beta.38",
4
4
  "description": "Proactive personal AI agent with no limits",
5
5
  "license": "AGPL-3.0-only",
6
6
  "main": "server/index.js",
@@ -1 +1 @@
1
- 63ce7c2ea80de28857e3b28e2f06864b
1
+ 36f9d961cabc8d433b6d33a95164922c
@@ -37,6 +37,6 @@ _flutter.buildConfig = {"engineRevision":"c416acfeb8126e097f758c664aaa3da929e27d
37
37
 
38
38
  _flutter.loader.load({
39
39
  serviceWorkerSettings: {
40
- serviceWorkerVersion: "2365760185" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
40
+ serviceWorkerVersion: "434669552" /* Flutter's service worker is deprecated and will be removed in a future Flutter release. */
41
41
  }
42
42
  });
@@ -134211,7 +134211,7 @@ r===$&&A.b()
134211
134211
  o.push(A.jR(p,A.jd(!1,new A.a4(B.uo,A.dr(new A.cy(B.hq,new A.a7x(r,p),p),p,p),p),!1,B.H,!0),p,p,0,0,0,p))}r=!1
134212
134212
  if(!s.ay)if(!s.ch){r=s.e
134213
134213
  r===$&&A.b()
134214
- r=B.b.t("mq44l4tl-174aa08").length!==0&&r.b}if(r){r=s.d
134214
+ r=B.b.t("mq47cfi3-d4fd3f4").length!==0&&r.b}if(r){r=s.d
134215
134215
  r===$&&A.b()
134216
134216
  r=r.av&&!r.aQ?84:0
134217
134217
  q=s.e
@@ -139705,7 +139705,7 @@ $S:0}
139705
139705
  A.ZT.prototype={}
139706
139706
  A.Sy.prototype={
139707
139707
  nc(a){var s=this
139708
- if(B.b.t("mq44l4tl-174aa08").length===0||s.a!=null)return
139708
+ if(B.b.t("mq47cfi3-d4fd3f4").length===0||s.a!=null)return
139709
139709
  s.AR()
139710
139710
  s.a=A.qh(B.Rc,new A.bag(s))},
139711
139711
  AR(){var s=0,r=A.l(t.H),q,p=2,o=[],n=this,m,l,k,j,i,h,g,f
@@ -139723,7 +139723,7 @@ if(!t.f.b(k)){s=1
139723
139723
  break}i=J.T(k,"buildId")
139724
139724
  h=i==null?null:B.b.t(J.p(i))
139725
139725
  j=h==null?"":h
139726
- if(J.bf(j)===0||J.d(j,"mq44l4tl-174aa08")){s=1
139726
+ if(J.bf(j)===0||J.d(j,"mq47cfi3-d4fd3f4")){s=1
139727
139727
  break}n.b=!0
139728
139728
  n.D()
139729
139729
  p=2
@@ -139740,7 +139740,7 @@ case 2:return A.i(o.at(-1),r)}})
139740
139740
  return A.k($async$AR,r)},
139741
139741
  vy(){var s=0,r=A.l(t.H),q,p=2,o=[],n=this,m,l,k,j,i,h,g,f,e,d,c,b,a,a0,a1
139742
139742
  var $async$vy=A.h(function(a2,a3){if(a2===1){o.push(a3)
139743
- s=p}for(;;)switch(s){case 0:if(B.b.t("mq44l4tl-174aa08").length===0||n.c){s=1
139743
+ s=p}for(;;)switch(s){case 0:if(B.b.t("mq47cfi3-d4fd3f4").length===0||n.c){s=1
139744
139744
  break}n.c=!0
139745
139745
  n.D()
139746
139746
  p=4
@@ -161,6 +161,12 @@ const STATIC_MODELS = [
161
161
  provider: 'google',
162
162
  purpose: 'general'
163
163
  },
164
+ {
165
+ id: 'gemini-3.1-pro',
166
+ label: 'Gemini 3.1 Pro (High)',
167
+ provider: 'google',
168
+ purpose: 'general'
169
+ },
164
170
  {
165
171
  id: 'MiniMax-M2.7',
166
172
  label: 'MiniMax M2.7 (Coding Plan)',
@@ -10,14 +10,16 @@ class GoogleProvider extends BaseProvider {
10
10
  'gemini-2.0-pro',
11
11
  'gemini-1.5-pro',
12
12
  'gemini-1.5-flash',
13
- 'gemini-3.1-flash-lite-preview'
13
+ 'gemini-3.1-flash-lite-preview',
14
+ 'gemini-3.1-pro'
14
15
  ];
15
16
  this.contextWindows = {
16
17
  'gemini-2.0-flash': 1048576,
17
18
  'gemini-2.0-pro': 2097152,
18
19
  'gemini-1.5-pro': 2097152,
19
20
  'gemini-1.5-flash': 1048576,
20
- 'gemini-3.1-flash-lite-preview': 1048576
21
+ 'gemini-3.1-flash-lite-preview': 1048576,
22
+ 'gemini-3.1-pro': 2097152
21
23
  };
22
24
  this.genAI = new GoogleGenerativeAI(config.apiKey || process.env.GOOGLE_AI_KEY);
23
25
  }
@@ -177,14 +179,12 @@ class GoogleProvider extends BaseProvider {
177
179
  const toolCalls = [];
178
180
 
179
181
  for await (const chunk of result.stream) {
180
- const text = chunk.text();
181
- if (text) {
182
- content += text;
183
- yield { type: 'content', content: text };
184
- }
185
-
186
182
  for (const candidate of chunk.candidates || []) {
187
183
  for (const part of candidate.content?.parts || []) {
184
+ if (part.text) {
185
+ content += part.text;
186
+ yield { type: 'content', content: part.text };
187
+ }
188
188
  if (part.functionCall) {
189
189
  toolCalls.push({
190
190
  id: `call_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`,
@@ -184,6 +184,7 @@ class OllamaProvider extends BaseProvider {
184
184
  const decoder = new TextDecoder();
185
185
  let content = '';
186
186
  let buffer = '';
187
+ let accumulatedToolCalls = [];
187
188
 
188
189
  while (true) {
189
190
  const { done, value } = await reader.read();
@@ -201,20 +202,23 @@ class OllamaProvider extends BaseProvider {
201
202
  content += data.message.content;
202
203
  yield { type: 'content', content: data.message.content };
203
204
  }
204
- if (data.done) {
205
- const toolCalls = (data.message?.tool_calls || []).map((tc, i) => ({
205
+ if (data.message?.tool_calls && Array.isArray(data.message.tool_calls)) {
206
+ const mapped = data.message.tool_calls.map((tc, i) => ({
206
207
  id: `call_ollama_${Date.now()}_${i}`,
207
208
  type: 'function',
208
209
  function: {
209
210
  name: tc.function.name,
210
- arguments: JSON.stringify(tc.function.arguments || {})
211
+ arguments: typeof tc.function.arguments === 'string' ? tc.function.arguments : JSON.stringify(tc.function.arguments || {})
211
212
  }
212
213
  }));
214
+ accumulatedToolCalls = accumulatedToolCalls.concat(mapped);
215
+ }
216
+ if (data.done) {
213
217
  yield {
214
218
  type: 'done',
215
219
  content,
216
- toolCalls,
217
- finishReason: toolCalls.length > 0 ? 'tool_calls' : 'stop',
220
+ toolCalls: accumulatedToolCalls,
221
+ finishReason: accumulatedToolCalls.length > 0 ? 'tool_calls' : 'stop',
218
222
  usage: data.prompt_eval_count ? {
219
223
  promptTokens: data.prompt_eval_count || 0,
220
224
  completionTokens: data.eval_count || 0,