@pheem49/mint 1.8.1 → 1.8.2

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 (184) hide show
  1. package/Cargo.lock +3 -3
  2. package/Cargo.toml +1 -1
  3. package/README.md +0 -17
  4. package/Release_Note.md +92 -58
  5. package/bin/mint +0 -0
  6. package/crates/mint-cli/src/agent.rs +100 -6
  7. package/crates/mint-cli/src/main.rs +166 -52
  8. package/crates/mint-core/src/agent_loop.rs +1 -0
  9. package/crates/mint-core/src/api_server.rs +55 -2
  10. package/crates/mint-core/src/browser.rs +55 -0
  11. package/crates/mint-core/src/channels.rs +1 -0
  12. package/crates/mint-core/src/chat.rs +3 -0
  13. package/crates/mint-core/src/config.rs +61 -0
  14. package/crates/mint-core/src/lib.rs +14 -0
  15. package/crates/mint-core/src/orchestration.rs +180 -11
  16. package/crates/mint-core/src/tts.rs +3 -1
  17. package/flatpak/com.pheem49.mint.desktop +9 -0
  18. package/flatpak/com.pheem49.mint.metainfo.xml +35 -0
  19. package/flatpak/com.pheem49.mint.yaml +52 -0
  20. package/package.json +1 -1
  21. package/shared-modules/.github/workflows/ci.yml +120 -0
  22. package/shared-modules/.github/workflows/update.yaml +28 -0
  23. package/shared-modules/CODEOWNERS +23 -0
  24. package/shared-modules/README.md +79 -0
  25. package/shared-modules/SDL/README.md +3 -0
  26. package/shared-modules/SDL/SDL-1.2.15.json +51 -0
  27. package/shared-modules/SDL/SDL_Pango-0.1.2-API-adds.patch +118 -0
  28. package/shared-modules/SDL/SDL_image-1.2.12.json +25 -0
  29. package/shared-modules/SDL/SDL_mixer-1.2.12.json +27 -0
  30. package/shared-modules/SDL/SDL_net-1.2.8.json +19 -0
  31. package/shared-modules/SDL/SDL_pango-0.1.2.json +26 -0
  32. package/shared-modules/SDL/SDL_ttf-2.0.11.json +28 -0
  33. package/shared-modules/SDL/libsdl-1.2.15-strict-prototypes.patch +316 -0
  34. package/shared-modules/SDL/sdl-check-for-SDL_VIDEO_X11_BACKINGSTORE.patch +24 -0
  35. package/shared-modules/SDL/sdl-libx11-build.patch +59 -0
  36. package/shared-modules/SDL/sdl-sysloadso-buffer-length.patch +27 -0
  37. package/shared-modules/SDL/sdl12-compat.json +22 -0
  38. package/shared-modules/SDL2/SDL2_image.json +27 -0
  39. package/shared-modules/SDL2/SDL2_ttf.json +29 -0
  40. package/shared-modules/cld2/CMakeLists.txt +157 -0
  41. package/shared-modules/cld2/cld2.json +24 -0
  42. package/shared-modules/clutter/clutter.json +72 -0
  43. package/shared-modules/dbus-glib/dbus-glib.json +29 -0
  44. package/shared-modules/glew/glew.json +36 -0
  45. package/shared-modules/glu/glu-9.json +12 -0
  46. package/shared-modules/gtk2/arc-gtk2-theme-Replace-Inkscape-dependency-with-rsvg-convert.patch +180 -0
  47. package/shared-modules/gtk2/gtk2-common-themes.json +360 -0
  48. package/shared-modules/gtk2/gtk2-fix-crash-in-show-uri.patch +30 -0
  49. package/shared-modules/gtk2/gtk2-gcc14.patch +281 -0
  50. package/shared-modules/gtk2/gtk2-gcc15.patch +250 -0
  51. package/shared-modules/gtk2/gtk2-murrine-c99.patch +34 -0
  52. package/shared-modules/gtk2/gtk2-use-adwaita-theme.patch +80 -0
  53. package/shared-modules/gtk2/gtk2.json +120 -0
  54. package/shared-modules/gtk2/ibus-gcc15.patch +13 -0
  55. package/shared-modules/gtk2/murrine-engine-fix-crash.patch +12 -0
  56. package/shared-modules/gtk2/readme.md +10 -0
  57. package/shared-modules/intltool/intltool-0.51.json +20 -0
  58. package/shared-modules/intltool/intltool-perl5.26-regex-fixes.patch +59 -0
  59. package/shared-modules/lame/0001-Build-xmm_quantize_sub.c-with-msse.patch +34 -0
  60. package/shared-modules/lame/0002-Include-GTK-1-autoconf-directives-in-build-system.patch +222 -0
  61. package/shared-modules/lame/0003-Patch-out-remaining-ansi2knr.patch +70 -0
  62. package/shared-modules/lame/0004-initscr-is-not-used-anywhere-in-lame-sourcetree.patch +41 -0
  63. package/shared-modules/lame/0005-Update-autoconf.patch +81 -0
  64. package/shared-modules/lame/lame-3.99.5.json +32 -0
  65. package/shared-modules/libappindicator/libappindicator-gtk2-12.10.json +140 -0
  66. package/shared-modules/libappindicator/libappindicator-gtk3-12.10.json +140 -0
  67. package/shared-modules/libappindicator/libappindicator-gtk3-introspection-12.10.json +140 -0
  68. package/shared-modules/libappindicator/patches/0001-libappindicator-ftbfs.patch +20 -0
  69. package/shared-modules/libappindicator/patches/0002-libappindicator-no-python.patch +888 -0
  70. package/shared-modules/libappindicator/patches/0003-libappindicator-fix-crash-from-incorrect-signal-emission.patch +74 -0
  71. package/shared-modules/libappindicator/patches/0004-libappindicator-fix-crash-iterating-icon-themes.patch +11 -0
  72. package/shared-modules/libayatana-appindicator/0001-Fix-HAVE_VALGRIND-AM_CONDITIONAL.patch +51 -0
  73. package/shared-modules/libayatana-appindicator/0001-Make-introspection-configurable.patch +44 -0
  74. package/shared-modules/libayatana-appindicator/libayatana-appindicator-gtk3.json +121 -0
  75. package/shared-modules/libcanberra/0001-gtk-Don-t-assume-all-GdkDisplays-are-GdkX11Displays-.patch +123 -0
  76. package/shared-modules/libcanberra/libcanberra.json +44 -0
  77. package/shared-modules/libmad/libmad.json +19 -0
  78. package/shared-modules/libsecret/libsecret.json +23 -0
  79. package/shared-modules/libsoup/libsoup-2.4.json +14 -0
  80. package/shared-modules/libusb/libusb.json +27 -0
  81. package/shared-modules/linux-audio/dssi.json +31 -0
  82. package/shared-modules/linux-audio/fftw3f-static.json +44 -0
  83. package/shared-modules/linux-audio/fftw3f.json +42 -0
  84. package/shared-modules/linux-audio/fluidsynth2-static.json +30 -0
  85. package/shared-modules/linux-audio/fluidsynth2.json +19 -0
  86. package/shared-modules/linux-audio/ladspa.json +26 -0
  87. package/shared-modules/linux-audio/lash.json +35 -0
  88. package/shared-modules/linux-audio/libinstpatch.json +16 -0
  89. package/shared-modules/linux-audio/liblo-static.json +22 -0
  90. package/shared-modules/linux-audio/liblo.json +17 -0
  91. package/shared-modules/linux-audio/lilv-static.json +94 -0
  92. package/shared-modules/linux-audio/lilv.json +82 -0
  93. package/shared-modules/linux-audio/lrdf.json +57 -0
  94. package/shared-modules/linux-audio/lv2.json +21 -0
  95. package/shared-modules/linux-audio/patches/lash/0001-configure-remove-aclocal-m4.patch +29 -0
  96. package/shared-modules/linux-audio/patches/lash/0002-Fix-build-with-recent-gcc.patch +73 -0
  97. package/shared-modules/linux-audio/patches/lash/0003-Fix-linking.patch +136 -0
  98. package/shared-modules/linux-audio/patches/raptor-libxml.patch +31 -0
  99. package/shared-modules/linux-audio/patches/stk-install.sh +54 -0
  100. package/shared-modules/linux-audio/stk.json +28 -0
  101. package/shared-modules/lua5.1/0004-Fix-stack-overflow-in-vararg-functions.patch +21 -0
  102. package/shared-modules/lua5.1/lua-5.1.5-so.patch +43 -0
  103. package/shared-modules/lua5.1/lua-5.1.5.json +42 -0
  104. package/shared-modules/lua5.3/lua-5.3.5.json +41 -0
  105. package/shared-modules/lua5.3/lua.pc.in +8 -0
  106. package/shared-modules/lua5.3/luaconf.patch +47 -0
  107. package/shared-modules/lua5.3/makefile-add-liblua.so-rule.patch +47 -0
  108. package/shared-modules/lua5.4/lua-5.4.json +41 -0
  109. package/shared-modules/lua5.4/lua.pc.in +8 -0
  110. package/shared-modules/lua5.4/luaconf.patch +34 -0
  111. package/shared-modules/lua5.4/makefile-add-liblua.so-rule.patch +42 -0
  112. package/shared-modules/luajit/luajit.json +30 -0
  113. package/shared-modules/lzo/lzo.json +27 -0
  114. package/shared-modules/mac/mac.json +18 -0
  115. package/shared-modules/physfs/physfs.json +26 -0
  116. package/shared-modules/pygame/audiofile-gcc6.patch +21 -0
  117. package/shared-modules/pygame/cython-fixes.patch +34 -0
  118. package/shared-modules/pygame/fluidsynth-no-rawmidi.patch +69 -0
  119. package/shared-modules/pygame/glib.patch +25 -0
  120. package/shared-modules/pygame/pygame1-python2.json +157 -0
  121. package/shared-modules/pygtk/pygtk-c99.patch +15 -0
  122. package/shared-modules/pygtk/pygtk.json +117 -0
  123. package/shared-modules/pygtk/pygtk.patch +39 -0
  124. package/shared-modules/python2.7/python-2.7.json +48 -0
  125. package/shared-modules/smpeg/smpeg-0.4.5.json +50 -0
  126. package/shared-modules/smpeg/smpeg-am-prog-as.patch +12 -0
  127. package/shared-modules/smpeg/smpeg-export-mpegaudio-class.patch +17 -0
  128. package/shared-modules/smpeg/smpeg-gcc6.patch +40 -0
  129. package/shared-modules/smpeg/smpeg-no-gtk.patch +37 -0
  130. package/shared-modules/squashfs-tools/squashfs-tools.json +25 -0
  131. package/shared-modules/update-checker.sh +50 -0
  132. package/shared-modules/vorbisgain/0001-temp_files.patch +75 -0
  133. package/shared-modules/vorbisgain/0002-errno.patch +33 -0
  134. package/shared-modules/vorbisgain/0003-manpage.patch +248 -0
  135. package/shared-modules/vorbisgain/0004-vorbisgain_mtime.patch +183 -0
  136. package/shared-modules/vorbisgain/0005-double_fclose.patch +21 -0
  137. package/shared-modules/vorbisgain/0006-manpage_hyphens.patch +56 -0
  138. package/shared-modules/vorbisgain/0007-recursively_spelling.patch +14 -0
  139. package/shared-modules/vorbisgain/0008-manpage_recursion_mistake.patch +23 -0
  140. package/shared-modules/vorbisgain/0009-hardening.patch +13 -0
  141. package/shared-modules/vorbisgain/0010-fclose.patch +13 -0
  142. package/shared-modules/vorbisgain/README.md +23 -0
  143. package/shared-modules/vorbisgain/vorbisgain_0.37-2.json +29 -0
  144. package/src/renderer/shared/agentProgress.ts +145 -0
  145. package/src/renderer/shared/calculator.ts +52 -0
  146. package/src/renderer/shared/components/AgentActivityDrawer.tsx +72 -0
  147. package/src/renderer/shared/components/AgentActivityTable.tsx +66 -0
  148. package/src/renderer/shared/components/ApprovalCard.tsx +93 -0
  149. package/src/renderer/shared/components/ChatCodeBlock.tsx +75 -0
  150. package/src/renderer/shared/components/ThinkingBlock.tsx +101 -0
  151. package/src/renderer/shared/constants/models.ts +91 -0
  152. package/src/renderer/shared/platform.ts +82 -0
  153. package/src/renderer/shared/types.ts +140 -0
  154. package/src/renderer/shared/utils/agentActivity.ts +187 -0
  155. package/src/renderer/shared/utils/approval.ts +1 -0
  156. package/src/renderer/shared/utils/approval.tsx +64 -0
  157. package/src/renderer/shared/utils/markdown.tsx +347 -0
  158. package/src/renderer/shared/utils/providers.ts +36 -0
  159. package/src/renderer/shared/utils/speech.ts +216 -0
  160. package/src/renderer/shared/utils/ui.ts +147 -0
  161. package/src/renderer/src/agentProgress.ts +11 -39
  162. package/src/renderer/src/calculator.ts +3 -46
  163. package/src/renderer/src/components/ChatPanel.tsx +194 -1303
  164. package/src/renderer/src/components/MintDashboard.tsx +23 -169
  165. package/src/renderer/src/components/PicturesLibrary.tsx +32 -8
  166. package/src/renderer/src/components/Settings/AgentsTab.tsx +362 -0
  167. package/src/renderer/src/components/Settings/AutomationTab.tsx +0 -22
  168. package/src/renderer/src/components/SettingsWindow.tsx +53 -3
  169. package/src/renderer/src/css/styles.css +84 -0
  170. package/src/renderer/src/tauri.ts +128 -143
  171. package/src/renderer/src-web/agentProgress.ts +11 -39
  172. package/src/renderer/src-web/calculator.ts +3 -46
  173. package/src/renderer/src-web/components/ChatPanel.tsx +194 -1301
  174. package/src/renderer/src-web/components/MintDashboard.tsx +23 -169
  175. package/src/renderer/src-web/components/PicturesLibrary.tsx +23 -29
  176. package/src/renderer/src-web/components/Settings/AgentsTab.tsx +362 -0
  177. package/src/renderer/src-web/components/Settings/AutomationTab.tsx +0 -22
  178. package/src/renderer/src-web/components/SettingsWindow.tsx +53 -3
  179. package/src/renderer/src-web/css/styles.css +84 -0
  180. package/src/renderer/src-web/tauri.ts +180 -102
  181. package/src-tauri/src/lib.rs +137 -33
  182. package/src-tauri/src/webhooks.rs +1 -0
  183. package/src-tauri/src/workflows.rs +1 -0
  184. package/src-tauri/tauri.conf.json +1 -1
@@ -322,10 +322,30 @@ async fn send_chat_message(app: AppHandle, request: ChatRequest) -> Result<ChatR
322
322
  if request.message.starts_with("/chat ") {
323
323
  let mut clean_request = request.clone();
324
324
  clean_request.message = request.message.strip_prefix("/chat ").unwrap().to_owned();
325
+ let config_clone = config.clone();
326
+ let chat_id_str = request.chat_id.clone().unwrap_or_default();
325
327
 
326
- let (response, _) = orchestrate_chat_with_fallback(&config, &clean_request)
327
- .await
328
- .map_err(|error| error.to_string())?;
328
+ let join_handle = tokio::spawn(async move {
329
+ orchestrate_chat_with_fallback(&config_clone, &clean_request).await
330
+ });
331
+
332
+ let abort_handle = join_handle.abort_handle();
333
+ if !chat_id_str.is_empty() {
334
+ mint_core::ACTIVE_AGENTS.lock().unwrap().insert(chat_id_str.clone(), abort_handle);
335
+ }
336
+
337
+ let res = join_handle.await;
338
+
339
+ if !chat_id_str.is_empty() {
340
+ mint_core::ACTIVE_AGENTS.lock().unwrap().remove(&chat_id_str);
341
+ }
342
+
343
+ let (response, _) = match res {
344
+ Ok(Ok(val)) => val,
345
+ Ok(Err(e)) => return Err(e.to_string()),
346
+ Err(e) if e.is_cancelled() => return Err("Chat execution cancelled by user".to_string()),
347
+ Err(e) => return Err(format!("Task panicked: {}", e)),
348
+ };
329
349
  return Ok(response);
330
350
  }
331
351
 
@@ -363,19 +383,47 @@ async fn send_chat_message(app: AppHandle, request: ChatRequest) -> Result<ChatR
363
383
  let progress_cb = |_| {};
364
384
  let on_chunk = |_| {};
365
385
 
366
- let res = orchestrate_agent_loop(
367
- &config,
368
- &request.message,
369
- &root,
370
- request.image_data_uri.clone(),
371
- request.chat_id.as_deref(),
372
- fast_mode,
373
- approve_cb,
374
- progress_cb,
375
- on_chunk,
376
- )
377
- .await
378
- .map_err(|e| e.to_string())?;
386
+ let chat_id_str = request.chat_id.clone().unwrap_or_default();
387
+ let config_clone = config.clone();
388
+ let message_clone = request.message.clone();
389
+ let root_clone = root.clone();
390
+ let image_data_uri_clone = request.image_data_uri.clone();
391
+ let chat_id_clone = request.chat_id.clone();
392
+ let agent_id_clone = request.agent_id.clone();
393
+
394
+ let join_handle = tokio::spawn(async move {
395
+ orchestrate_agent_loop(
396
+ &config_clone,
397
+ &message_clone,
398
+ &root_clone,
399
+ image_data_uri_clone,
400
+ chat_id_clone.as_deref(),
401
+ agent_id_clone.as_deref(),
402
+ fast_mode,
403
+ approve_cb,
404
+ progress_cb,
405
+ on_chunk,
406
+ )
407
+ .await
408
+ });
409
+
410
+ let abort_handle = join_handle.abort_handle();
411
+ if !chat_id_str.is_empty() {
412
+ mint_core::ACTIVE_AGENTS.lock().unwrap().insert(chat_id_str.clone(), abort_handle);
413
+ }
414
+
415
+ let res = join_handle.await;
416
+
417
+ if !chat_id_str.is_empty() {
418
+ mint_core::ACTIVE_AGENTS.lock().unwrap().remove(&chat_id_str);
419
+ }
420
+
421
+ let res = match res {
422
+ Ok(Ok(val)) => val,
423
+ Ok(Err(e)) => return Err(e.to_string()),
424
+ Err(e) if e.is_cancelled() => return Err("Agent execution cancelled by user".to_string()),
425
+ Err(e) => return Err(format!("Task panicked: {}", e)),
426
+ };
379
427
 
380
428
  Ok(ChatResponse {
381
429
  provider: res.provider,
@@ -397,13 +445,34 @@ async fn stream_chat_message(
397
445
  if request.message.starts_with("/chat ") {
398
446
  let mut clean_request = request.clone();
399
447
  clean_request.message = request.message.strip_prefix("/chat ").unwrap().to_owned();
448
+ let config_clone = config.clone();
449
+ let on_event_clone = on_event.clone();
450
+ let chat_id_str = request.chat_id.clone().unwrap_or_default();
400
451
 
401
- let (response, _) =
402
- orchestrate_chat_stream_with_fallback(&config, &clean_request, |chunk| {
403
- let _ = on_event.send(DesktopStreamEvent::Chunk { chunk });
452
+ let join_handle = tokio::spawn(async move {
453
+ orchestrate_chat_stream_with_fallback(&config_clone, &clean_request, move |chunk| {
454
+ let _ = on_event_clone.send(DesktopStreamEvent::Chunk { chunk });
404
455
  })
405
456
  .await
406
- .map_err(|error| error.to_string())?;
457
+ });
458
+
459
+ let abort_handle = join_handle.abort_handle();
460
+ if !chat_id_str.is_empty() {
461
+ mint_core::ACTIVE_AGENTS.lock().unwrap().insert(chat_id_str.clone(), abort_handle);
462
+ }
463
+
464
+ let res = join_handle.await;
465
+
466
+ if !chat_id_str.is_empty() {
467
+ mint_core::ACTIVE_AGENTS.lock().unwrap().remove(&chat_id_str);
468
+ }
469
+
470
+ let (response, _) = match res {
471
+ Ok(Ok(val)) => val,
472
+ Ok(Err(e)) => return Err(e.to_string()),
473
+ Err(e) if e.is_cancelled() => return Err("Chat execution cancelled by user".to_string()),
474
+ Err(e) => return Err(format!("Task panicked: {}", e)),
475
+ };
407
476
  return Ok(response);
408
477
  }
409
478
 
@@ -456,19 +525,47 @@ async fn stream_chat_message(
456
525
  }
457
526
  };
458
527
 
459
- let res = orchestrate_agent_loop(
460
- &config,
461
- &request.message,
462
- &root,
463
- request.image_data_uri.clone(),
464
- request.chat_id.as_deref(),
465
- fast_mode,
466
- approve_cb,
467
- progress_cb,
468
- on_chunk,
469
- )
470
- .await
471
- .map_err(|e| e.to_string())?;
528
+ let chat_id_str = request.chat_id.clone().unwrap_or_default();
529
+ let config_clone = config.clone();
530
+ let message_clone = request.message.clone();
531
+ let root_clone = root.clone();
532
+ let image_data_uri_clone = request.image_data_uri.clone();
533
+ let chat_id_clone = request.chat_id.clone();
534
+ let agent_id_clone = request.agent_id.clone();
535
+
536
+ let join_handle = tokio::spawn(async move {
537
+ orchestrate_agent_loop(
538
+ &config_clone,
539
+ &message_clone,
540
+ &root_clone,
541
+ image_data_uri_clone,
542
+ chat_id_clone.as_deref(),
543
+ agent_id_clone.as_deref(),
544
+ fast_mode,
545
+ approve_cb,
546
+ progress_cb,
547
+ on_chunk,
548
+ )
549
+ .await
550
+ });
551
+
552
+ let abort_handle = join_handle.abort_handle();
553
+ if !chat_id_str.is_empty() {
554
+ mint_core::ACTIVE_AGENTS.lock().unwrap().insert(chat_id_str.clone(), abort_handle);
555
+ }
556
+
557
+ let res = join_handle.await;
558
+
559
+ if !chat_id_str.is_empty() {
560
+ mint_core::ACTIVE_AGENTS.lock().unwrap().remove(&chat_id_str);
561
+ }
562
+
563
+ let res = match res {
564
+ Ok(Ok(val)) => val,
565
+ Ok(Err(e)) => return Err(e.to_string()),
566
+ Err(e) if e.is_cancelled() => return Err("Agent execution cancelled by user".to_string()),
567
+ Err(e) => return Err(format!("Task panicked: {}", e)),
568
+ };
472
569
 
473
570
  Ok(ChatResponse {
474
571
  provider: res.provider,
@@ -478,6 +575,12 @@ async fn stream_chat_message(
478
575
  })
479
576
  }
480
577
 
578
+ #[tauri::command]
579
+ async fn cancel_chat_message(chat_id: String) -> Result<(), String> {
580
+ mint_core::cancel_agent(&chat_id);
581
+ Ok(())
582
+ }
583
+
481
584
  #[tauri::command]
482
585
  fn save_interaction_agent_activity(
483
586
  interaction_id: i64,
@@ -1123,6 +1226,7 @@ pub fn run() {
1123
1226
  inspect_shell_command,
1124
1227
  send_chat_message,
1125
1228
  stream_chat_message,
1229
+ cancel_chat_message,
1126
1230
  submit_tool_approval,
1127
1231
  get_recent_interactions,
1128
1232
  save_interaction_agent_activity,
@@ -154,6 +154,7 @@ async fn answer(text: &str, system: &str) -> String {
154
154
  audio_data_uri: None,
155
155
  document_attachment: None,
156
156
  workspace_path: None,
157
+ agent_id: None,
157
158
  },
158
159
  )
159
160
  .await
@@ -81,6 +81,7 @@ pub fn start_monitor(app: AppHandle) {
81
81
  audio_data_uri: None,
82
82
  document_attachment: None,
83
83
  workspace_path: None,
84
+ agent_id: None,
84
85
  };
85
86
 
86
87
  tauri::async_runtime::block_on(async {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://schema.tauri.app/config/2",
3
3
  "productName": "Mint",
4
- "version": "1.8.1",
4
+ "version": "1.8.2",
5
5
  "identifier": "com.pheem49.mint",
6
6
  "build": {
7
7
  "beforeDevCommand": "npm run dev:desktop",