@pheem49/mint 1.5.5 → 1.6.1

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 (222) hide show
  1. package/.codex +0 -0
  2. package/.github/FUNDING.yml +2 -0
  3. package/.github/workflows/ci.yml +45 -0
  4. package/.github/workflows/release.yml +79 -0
  5. package/Cargo.lock +5792 -0
  6. package/Cargo.toml +32 -0
  7. package/README.md +387 -353
  8. package/assets/icon.png +0 -0
  9. package/bin/mint +0 -0
  10. package/crates/mint-cli/Cargo.toml +23 -0
  11. package/crates/mint-cli/src/agent.rs +851 -0
  12. package/crates/mint-cli/src/gmail.rs +216 -0
  13. package/crates/mint-cli/src/image.rs +142 -0
  14. package/crates/mint-cli/src/main.rs +2837 -0
  15. package/crates/mint-cli/src/mcp.rs +63 -0
  16. package/crates/mint-cli/src/onboard.rs +1149 -0
  17. package/crates/mint-cli/src/setup.rs +390 -0
  18. package/crates/mint-cli/src/skills.rs +8 -0
  19. package/crates/mint-cli/src/updater.rs +279 -0
  20. package/crates/mint-core/Cargo.toml +22 -0
  21. package/crates/mint-core/src/agent_loop.rs +94 -0
  22. package/crates/mint-core/src/api_server.rs +991 -0
  23. package/crates/mint-core/src/channels.rs +248 -0
  24. package/crates/mint-core/src/chat.rs +895 -0
  25. package/crates/mint-core/src/code_tools.rs +729 -0
  26. package/crates/mint-core/src/config.rs +368 -0
  27. package/crates/mint-core/src/files.rs +159 -0
  28. package/crates/mint-core/src/knowledge.rs +541 -0
  29. package/crates/mint-core/src/lib.rs +84 -0
  30. package/crates/mint-core/src/mcp.rs +273 -0
  31. package/crates/mint-core/src/memory.rs +673 -0
  32. package/crates/mint-core/src/orchestration.rs +2157 -0
  33. package/crates/mint-core/src/pictures.rs +314 -0
  34. package/crates/mint-core/src/plugins.rs +727 -0
  35. package/crates/mint-core/src/safety.rs +416 -0
  36. package/crates/mint-core/src/semantic.rs +254 -0
  37. package/crates/mint-core/src/shell.rs +317 -0
  38. package/crates/mint-core/src/skills.rs +71 -0
  39. package/crates/mint-core/src/symbols.rs +157 -0
  40. package/crates/mint-core/src/tasks.rs +308 -0
  41. package/crates/mint-core/src/tts.rs +92 -0
  42. package/crates/mint-core/src/weather.rs +93 -0
  43. package/crates/mint-core/src/web_search.rs +200 -0
  44. package/crates/mint-core/src/workflows.rs +81 -0
  45. package/crates/mint-core/tests/mcp_stdio.rs +45 -0
  46. package/crates/mint-core/tests/memory_persistence.rs +172 -0
  47. package/crates/mint-core/tests/pictures_storage.rs +14 -0
  48. package/crates/mint-core/tests/task_lifecycle.rs +87 -0
  49. package/package.json +35 -99
  50. package/src/bin/index.js +16 -0
  51. package/src/renderer/index-web.html +17 -0
  52. package/src/renderer/index.html +17 -0
  53. package/src/renderer/public/Live2DCubismCore.js +9 -0
  54. package/src/renderer/public/assets/icon.png +0 -0
  55. package/src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/shiroko.model3.json +36 -0
  56. package/src/renderer/src/App.tsx +33 -0
  57. package/src/renderer/src/calculator.ts +47 -0
  58. package/src/renderer/src/components/ChatPanel.tsx +1598 -0
  59. package/src/renderer/src/components/DashboardSidebar.tsx +358 -0
  60. package/src/renderer/src/components/Live2DStage.tsx +374 -0
  61. package/src/renderer/src/components/MintDashboard.tsx +950 -0
  62. package/src/renderer/src/components/ModelPanel.tsx +154 -0
  63. package/src/renderer/src/components/PicturesLibrary.tsx +46 -0
  64. package/src/renderer/src/components/ProactiveGlow.tsx +19 -0
  65. package/src/renderer/src/components/ScreenPicker.tsx +579 -0
  66. package/src/renderer/src/components/SettingsWindow.tsx +1467 -0
  67. package/src/renderer/src/components/SpotlightWindow.tsx +280 -0
  68. package/src/renderer/src/components/WidgetWindow.tsx +36 -0
  69. package/src/renderer/src/components/WorkspacePanel.tsx +268 -0
  70. package/src/{UI → renderer/src/css}/settings.css +69 -16
  71. package/src/renderer/src/css/spotlight.css +113 -0
  72. package/src/renderer/src/css/styles.css +3722 -0
  73. package/src/renderer/src/css/widget.css +185 -0
  74. package/src/renderer/src/env.d.ts +116 -0
  75. package/src/renderer/src/index.css +379 -0
  76. package/src/renderer/src/main.tsx +13 -0
  77. package/src/renderer/src/tauri.ts +996 -0
  78. package/src/renderer/src-web/App.tsx +25 -0
  79. package/src/renderer/src-web/calculator.ts +47 -0
  80. package/src/renderer/src-web/components/ChatPanel.tsx +1662 -0
  81. package/src/renderer/src-web/components/DashboardSidebar.tsx +242 -0
  82. package/src/renderer/src-web/components/MintDashboard.tsx +763 -0
  83. package/src/renderer/src-web/components/PicturesLibrary.tsx +73 -0
  84. package/src/renderer/src-web/components/SettingsWindow.tsx +1500 -0
  85. package/src/renderer/src-web/css/settings.css +1100 -0
  86. package/src/{UI → renderer/src-web/css}/spotlight.css +4 -4
  87. package/src/{UI → renderer/src-web/css}/styles.css +1055 -159
  88. package/src/{UI → renderer/src-web/css}/widget.css +2 -2
  89. package/src/renderer/src-web/env.d.ts +107 -0
  90. package/src/renderer/src-web/index.css +379 -0
  91. package/src/renderer/src-web/main.tsx +13 -0
  92. package/src/renderer/src-web/tauri.ts +983 -0
  93. package/tsconfig.json +30 -0
  94. package/vite.config.ts +33 -0
  95. package/vite.config.web.ts +51 -0
  96. package/GUIDE_TH.md +0 -125
  97. package/assets/Agent_Mint.png +0 -0
  98. package/assets/CLI_Screen.png +0 -0
  99. package/assets/Settings.png +0 -0
  100. package/benchmark_ai.js +0 -71
  101. package/install.ps1 +0 -64
  102. package/install.sh +0 -54
  103. package/main.js +0 -139
  104. package/mint-cli-logic.js +0 -3
  105. package/mint-cli.js +0 -410
  106. package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.model3.json +0 -47
  107. package/models/Shiroko_Model/Shiroko//342/232/241/351/253/230/344/272/256/342/232/241/344/275/277/347/224/250/346/225/231/347/250/213/344/270/216/346/263/250/346/204/217/344/272/213/351/241/271.txt +0 -23
  108. package/preload-picker.js +0 -11
  109. package/preload-settings.js +0 -11
  110. package/preload.js +0 -41
  111. package/scripts/install_linux_desktop_entry.js +0 -48
  112. package/src/AI_Brain/Gemini_API.js +0 -813
  113. package/src/AI_Brain/agent_orchestrator.js +0 -73
  114. package/src/AI_Brain/autonomous_brain.js +0 -179
  115. package/src/AI_Brain/behavior_memory.js +0 -135
  116. package/src/AI_Brain/headless_agent.js +0 -143
  117. package/src/AI_Brain/knowledge_base.js +0 -349
  118. package/src/AI_Brain/memory_store.js +0 -662
  119. package/src/AI_Brain/proactive_engine.js +0 -172
  120. package/src/AI_Brain/provider_adapter.js +0 -365
  121. package/src/Automation_Layer/browser_automation.js +0 -149
  122. package/src/Automation_Layer/file_operations.js +0 -286
  123. package/src/Automation_Layer/open_app.js +0 -85
  124. package/src/Automation_Layer/open_website.js +0 -38
  125. package/src/CLI/approval_handler.js +0 -47
  126. package/src/CLI/chat_router.js +0 -247
  127. package/src/CLI/chat_ui.js +0 -1159
  128. package/src/CLI/cli_colors.js +0 -115
  129. package/src/CLI/cli_formatters.js +0 -94
  130. package/src/CLI/code_agent.js +0 -1667
  131. package/src/CLI/code_session_memory.js +0 -62
  132. package/src/CLI/gmail_auth.js +0 -210
  133. package/src/CLI/image_input.js +0 -90
  134. package/src/CLI/intent_detectors.js +0 -181
  135. package/src/CLI/interactive_chat.js +0 -658
  136. package/src/CLI/list_features.js +0 -64
  137. package/src/CLI/onboarding.js +0 -416
  138. package/src/CLI/repo_summarizer.js +0 -282
  139. package/src/CLI/semantic_code_search.js +0 -312
  140. package/src/CLI/skill_manager.js +0 -41
  141. package/src/CLI/slash_command_handler.js +0 -418
  142. package/src/CLI/symbol_indexer.js +0 -231
  143. package/src/CLI/updater.js +0 -230
  144. package/src/CLI/workspace_manager.js +0 -90
  145. package/src/Channels/brave_search_bridge.js +0 -35
  146. package/src/Channels/discord_bridge.js +0 -66
  147. package/src/Channels/google_search_bridge.js +0 -38
  148. package/src/Channels/line_bridge.js +0 -60
  149. package/src/Channels/slack_bridge.js +0 -48
  150. package/src/Channels/telegram_bridge.js +0 -41
  151. package/src/Channels/whatsapp_bridge.js +0 -57
  152. package/src/Command_Parser/parser.js +0 -45
  153. package/src/Plugins/dev_tools.js +0 -41
  154. package/src/Plugins/discord.js +0 -20
  155. package/src/Plugins/docker.js +0 -47
  156. package/src/Plugins/gmail.js +0 -251
  157. package/src/Plugins/google_calendar.js +0 -252
  158. package/src/Plugins/mcp_manager.js +0 -95
  159. package/src/Plugins/notion.js +0 -256
  160. package/src/Plugins/obsidian.js +0 -54
  161. package/src/Plugins/plugin_manager.js +0 -81
  162. package/src/Plugins/spotify.js +0 -173
  163. package/src/Plugins/system_metrics.js +0 -31
  164. package/src/Plugins/system_monitor.js +0 -72
  165. package/src/System/action_executor.js +0 -178
  166. package/src/System/bridge_manager.js +0 -76
  167. package/src/System/chat_history_manager.js +0 -83
  168. package/src/System/config_manager.js +0 -194
  169. package/src/System/custom_workflows.js +0 -163
  170. package/src/System/daemon_manager.js +0 -67
  171. package/src/System/google_tts_urls.js +0 -51
  172. package/src/System/granular_automation.js +0 -157
  173. package/src/System/ipc_handlers.js +0 -332
  174. package/src/System/notifications.js +0 -23
  175. package/src/System/optional_require.js +0 -23
  176. package/src/System/picture_store.js +0 -109
  177. package/src/System/proactive_loop.js +0 -153
  178. package/src/System/safety_manager.js +0 -273
  179. package/src/System/sandbox_runner.js +0 -182
  180. package/src/System/screen_capture.js +0 -175
  181. package/src/System/smart_context.js +0 -227
  182. package/src/System/system_automation.js +0 -162
  183. package/src/System/system_events.js +0 -79
  184. package/src/System/system_info.js +0 -125
  185. package/src/System/task_manager.js +0 -222
  186. package/src/System/tool_registry.js +0 -293
  187. package/src/System/window_manager.js +0 -220
  188. package/src/UI/floating.css +0 -80
  189. package/src/UI/floating.html +0 -17
  190. package/src/UI/floating.js +0 -67
  191. package/src/UI/live2d_manager.js +0 -600
  192. package/src/UI/preload-floating.js +0 -7
  193. package/src/UI/preload-spotlight.js +0 -11
  194. package/src/UI/preload-widget.js +0 -5
  195. package/src/UI/proactive-glow.html +0 -42
  196. package/src/UI/renderer.js +0 -2127
  197. package/src/UI/screenPicker.html +0 -214
  198. package/src/UI/screenPicker.js +0 -262
  199. package/src/UI/settings.html +0 -577
  200. package/src/UI/settings.js +0 -770
  201. package/src/UI/spotlight.html +0 -23
  202. package/src/UI/spotlight.js +0 -185
  203. package/src/UI/widget.html +0 -29
  204. package/src/UI/widget.js +0 -10
  205. /package/{models → src/renderer/public/models}/Shiroko_Model/Shiroko/Shiroko_Core/72d86db84cfa9730b894c241fd24c0db.png +0 -0
  206. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//345/233/264/350/243/231.exp3.json" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/apron.exp3.json} +0 -0
  207. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//347/214/253/345/222/252/346/273/244/351/225/234.exp3.json" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/catfilter.exp3.json} +0 -0
  208. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//347/202/271/344/270/200/344/270/213.exp3.json" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/click.exp3.json} +0 -0
  209. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//345/221/206/347/214/253.exp3.json" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/dazed.exp3.json} +0 -0
  210. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//345/221/206/347/214/253/347/234/274/347/217/240/346/221/207/346/231/203.exp3.json" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/dazedeyes.exp3.json} +0 -0
  211. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//347/234/274/351/225/234.exp3.json" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/glasses.exp3.json} +0 -0
  212. /package/{models → src/renderer/public/models}/Shiroko_Model/Shiroko/Shiroko_Core/items_pinned_to_model.json +0 -0
  213. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//346/213/277/347/254/224.exp3.json" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/pen.exp3.json} +0 -0
  214. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//346/213/215/347/205/247.exp3.json" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/photo.exp3.json} +0 -0
  215. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.4096/texture_00.png" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/shiroko.4096/texture_00.png} +0 -0
  216. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.4096/texture_01.png" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/shiroko.4096/texture_01.png} +0 -0
  217. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.4096/texture_02.png" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/shiroko.4096/texture_02.png} +0 -0
  218. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.4096/texture_03.png" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/shiroko.4096/texture_03.png} +0 -0
  219. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.cdi3.json" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/shiroko.cdi3.json} +0 -0
  220. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.moc3" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/shiroko.moc3} +0 -0
  221. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.physics3.json" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/shiroko.physics3.json} +0 -0
  222. /package/{models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.vtube.json" → src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/shiroko.vtube.json} +0 -0
package/tsconfig.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "useDefineForClassFields": true,
5
+ "module": "ESNext",
6
+ "lib": ["DOM", "DOM.Iterable", "ES2022"],
7
+ "skipLibCheck": true,
8
+
9
+ /* Bundler mode */
10
+ "moduleResolution": "bundler",
11
+ "allowImportingTsExtensions": true,
12
+ "allowJs": true,
13
+ "resolveJsonModule": true,
14
+ "isolatedModules": true,
15
+ "noEmit": true,
16
+ "jsx": "react-jsx",
17
+
18
+ /* Linting */
19
+ "strict": false,
20
+ "noUnusedLocals": false,
21
+ "noUnusedParameters": false,
22
+ "noFallthroughCasesInSwitch": true,
23
+
24
+ "paths": {
25
+ "@/*": ["./src/renderer/src/*"],
26
+ "@shared/*": ["./src/*"]
27
+ }
28
+ },
29
+ "include": ["src/renderer/src", "src/renderer/src/env.d.ts"]
30
+ }
package/vite.config.ts ADDED
@@ -0,0 +1,33 @@
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+ import { resolve } from 'path'
4
+
5
+ export default defineConfig({
6
+ root: resolve(__dirname, 'src/renderer'),
7
+ base: './', // Tauri loads bundled webview assets from relative paths.
8
+ build: {
9
+ outDir: resolve(__dirname, 'out/renderer'),
10
+ emptyOutDir: true,
11
+ rollupOptions: {
12
+ input: {
13
+ index: resolve(__dirname, 'src/renderer/index.html')
14
+ }
15
+ }
16
+ },
17
+ server: {
18
+ port: 9000,
19
+ strictPort: true,
20
+ fs: {
21
+ allow: [
22
+ resolve(__dirname)
23
+ ]
24
+ }
25
+ },
26
+ plugins: [react()],
27
+ resolve: {
28
+ alias: {
29
+ '@': resolve(__dirname, 'src/renderer/src'),
30
+ '@shared': resolve(__dirname, 'src')
31
+ }
32
+ }
33
+ })
@@ -0,0 +1,51 @@
1
+ import { defineConfig } from 'vite'
2
+ import react from '@vitejs/plugin-react'
3
+ import { resolve } from 'path'
4
+
5
+ export default defineConfig({
6
+ root: resolve(__dirname, 'src/renderer'),
7
+ base: './',
8
+ cacheDir: resolve(__dirname, '.vite-web'),
9
+ build: {
10
+ outDir: resolve(__dirname, 'out/renderer'),
11
+ emptyOutDir: true,
12
+ rollupOptions: {
13
+ input: {
14
+ index: resolve(__dirname, 'src/renderer/index-web.html')
15
+ }
16
+ }
17
+ },
18
+ server: {
19
+ port: 9000,
20
+ host: true,
21
+ strictPort: true,
22
+ fs: {
23
+ allow: [
24
+ resolve(__dirname)
25
+ ]
26
+ }
27
+ },
28
+ optimizeDeps: {
29
+ force: true,
30
+ },
31
+ plugins: [
32
+ react(),
33
+ {
34
+ name: 'rewrite-html',
35
+ configureServer(server) {
36
+ server.middlewares.use((req, res, next) => {
37
+ if (req.url === '/' || req.url === '/index.html') {
38
+ req.url = '/index-web.html'
39
+ }
40
+ next()
41
+ })
42
+ }
43
+ }
44
+ ],
45
+ resolve: {
46
+ alias: {
47
+ '@': resolve(__dirname, 'src/renderer/src-web'),
48
+ '@shared': resolve(__dirname, 'src')
49
+ }
50
+ }
51
+ })
package/GUIDE_TH.md DELETED
@@ -1,125 +0,0 @@
1
- # Mint: คู่มือการใช้งานฉบับสมบูรณ์ (Official Guide)
2
-
3
- ยินดีต้อนรับสู่ **Mint** ผู้ช่วย AI อัจฉริยะที่รวมพลังของ Desktop UI และ CLI Agent เข้าด้วยกัน เพื่อช่วยให้การทำงานและเขียนโค้ดของคุณง่ายขึ้น รวดเร็วขึ้น และสนุกยิ่งขึ้น!
4
-
5
- ---
6
-
7
- ## 1. การติดตั้ง (Installation)
8
-
9
- คุณสามารถติดตั้ง Mint ได้ด้วยวิธีต่างๆ ดังนี้:
10
-
11
- ### วิธีที่ 1: ติดตั้งแบบด่วน (แนะนำ)
12
- วิธีนี้จะติดตั้ง Mint CLI ให้อัตโนมัติในคำสั่งเดียว:
13
- **สำหรับ macOS และ Linux:**
14
- ```bash
15
- curl -fsSL https://raw.githubusercontent.com/Pheem49/Mint/main/install.sh | bash
16
- ```
17
-
18
- **สำหรับ Windows (PowerShell หรือ CMD):**
19
- ```powershell
20
- powershell -Command "iwr -useb https://raw.githubusercontent.com/Pheem49/Mint/main/install.ps1 | iex"
21
- ```
22
-
23
- ### วิธีที่ 2: ติดตั้งผ่าน NPM
24
- หากคุณต้องการใช้งานคำสั่ง `mint` และถนัดการใช้ NPM:
25
- ```bash
26
- npm install -g @pheem49/mint@latest
27
- ```
28
-
29
- ### วิธีที่ 3: ติดตั้งจาก Source Code (สำหรับนักพัฒนา)
30
- หากคุณต้องการแก้ไขโค้ดหรือลองฟีเจอร์ใหม่ๆ:
31
- 1. Clone repository: `git clone https://github.com/Pheem49/Mint.git`
32
- 2. เข้าไปที่โฟลเดอร์: `cd Mint`
33
- 3. ติดตั้ง dependencies: `npm install`
34
- 4. เรียกใช้งานผ่าน: `node mint-cli.js` หรือ `npm start` (สำหรับ GUI)
35
-
36
- ---
37
-
38
- ## 2. การตั้งค่าเริ่มต้น (Initial Setup)
39
-
40
- หลังจากติดตั้งเสร็จ สิ่งแรกที่ควรทำคือการตั้งค่า API Key และบริการต่างๆ ผ่านระบบ Onboarding:
41
-
42
- ```bash
43
- mint onboard
44
- ```
45
-
46
- ### ขั้นตอนการ Onboard:
47
- 1. **Gemini API Key**: กรอกคีย์จาก [Google AI Studio](https://aistudio.google.com/) (จำเป็นสำหรับการทำงานหลัก)
48
- 2. **Select Model**: เลือกโมเดลที่ต้องการ (แนะนำ `gemini-1.5-flash` เพื่อความเร็ว หรือ `gemini-1.5-pro` เพื่อความฉลาด)
49
- 3. **QuickStart Selection**: เลือกบริการที่ต้องการเปิดใช้งาน (ใช้ปุ่ม **Space** เพื่อเลือก/ยกเลิก และ **Enter** เพื่อยืนยัน)
50
- - **Chat Bridges**: Telegram, Discord, WhatsApp, LINE, Slack
51
- - **AI Providers**: Anthropic (Claude), OpenAI (GPT-4), Hugging Face, Local AI (Ollama/LM Studio)
52
- - **Search APIs**: Google Search, Brave Search
53
- 4. **กรอกรายละเอียด**: ระบบจะถามคีย์หรือ URL ตามบริการที่คุณเลือกไว้
54
-
55
- ---
56
-
57
- ## 3. การใช้งานผ่าน CLI (Terminal)
58
-
59
- Mint CLI เป็นมากกว่าแค่แชท แต่มันคือ **Agent** ที่สามารถคิดและทำงานแทนคุณได้
60
-
61
- ### การเริ่มแชทปกติ
62
- ```bash
63
- mint
64
- ```
65
- *หรือใช้คำสั่งเต็ม:* `mint chat`
66
-
67
- ### คำสั่งพิเศษ (Slash Commands)
68
- ขณะอยู่ในหน้าแชท คุณสามารถพิมพ์ `/` เพื่อเรียกใช้งานเมนูคำสั่งด่วน:
69
- - `/help`: ดูรายการคำสั่งทั้งหมด
70
- - `/code <งาน>`: บังคับเข้าโหมดเขียนโค้ด (Workspace Aware)
71
- - `/cd <เส้นทาง>`: เปลี่ยนโฟลเดอร์ทำงานปัจจุบัน
72
- - `/models`: ดูหรือสลับโมเดล AI
73
- - `/config`: ดูการตั้งค่าปัจจุบัน
74
- - `/clear` / `/reset`: ล้างประวัติการสนทนา
75
- - `/agent <ชื่อ>`: สลับบุคลิกของ AI (เช่น `code`, `reviewer`)
76
- - `/stats`: ดูสถานะทรัพยากรเครื่อง
77
- - `/exit`: ออกจากโปรแกรม
78
-
79
- ### การเขียนโค้ด (Agentic Coding)
80
- คุณสามารถสั่งงานที่ซับซ้อนในโปรเจกต์ของคุณได้ เช่น:
81
- ```bash
82
- mint code "ช่วยเขียน Unit Test สำหรับไฟล์ src/System/config_manager.js ให้หน่อย"
83
- ```
84
- มิ้นท์จะทำการ:
85
- 1. **คิด (Thinking)**: วางแผนการทำงาน
86
- 2. **ใช้เครื่องมือ (Tools)**: อ่านไฟล์, ค้นหาโค้ด, เขียนไฟล์, รันคำสั่ง Shell
87
- 3. **ขออนุมัติ (Approval)**: ถามคุณก่อนรันคำสั่งที่อาจเป็นอันตรายหรือแก้ไขไฟล์
88
-
89
- ---
90
-
91
- ## 4. การจัดการ MCP (Model Context Protocol)
92
-
93
- MCP คือระบบที่ช่วยให้มิ้นท์สามารถ "ขยายร่าง" ไปใช้เครื่องมือภายนอกได้
94
-
95
- ### เพิ่ม Server ใหม่
96
- ```bash
97
- # รูปแบบ: mint mcp add <ชื่อ> <คำสั่ง> --args <อาร์กิวเมนต์> --env <ตัวแปรสภาพแวดล้อม>
98
-
99
- # ตัวอย่าง: เพิ่มความสามารถในการค้นหา Google Search
100
- mint mcp add google-search npx --args -y @modelcontextprotocol/server-google-search --env GOOGLE_API_KEY=คีย์ของคุณ GOOGLE_SEARCH_ENGINE_ID=ไอดีของคุณ
101
- ```
102
-
103
- ### คำสั่งอื่นๆ ของ MCP:
104
- - `mint mcp list`: ดูรายชื่อ Server ที่เชื่อมต่ออยู่
105
- - `mint mcp remove <ชื่อ>`: ลบ Server ออก
106
- - `mint mcp clear`: ล้าง Server ทั้งหมด
107
-
108
- ---
109
-
110
- ## 5. การใช้งาน Desktop UI (GUI)
111
-
112
- หากคุณติดตั้งแบบ Source Code หรือเปิดแอป Mint ขึ้นมา:
113
- - **Floating Widget**: หน้าต่างจิ๋วที่ลอยอยู่บนหน้าจอ กดเรียกแชทได้ทันที
114
- - **Screen Vision**: คลิกที่ไอคอนกล้องเพื่อให้มิ้นท์ "มองเห็น" หน้าจอของคุณ และถามคำถามเกี่ยวกับสิ่งที่คุณเห็นได้
115
- - **Proactive Engine**: มิ้นท์จะคอยสังเกตการณ์และแจ้งเตือนสิ่งที่เป็นประโยชน์ (ตั้งค่าเปิด/ปิดได้ใน Settings)
116
- - **Settings**: ปรับแต่งสีธีม, ความเร็วเสียงอ่าน (TTS), และความถี่ในการตรวจจับหน้าจอ
117
-
118
- ---
119
-
120
- ## 🛡️ ความปลอดภัยและทางเลือก
121
- - **Approval System**: มิ้นท์จะไม่รันคำสั่ง Shell หรือเขียนไฟล์โดยที่คุณไม่กด `y` ยืนยัน
122
- - **Local First**: หากคุณต้องการความเป็นส่วนตัวสูงสุด สามารถเลือกใช้ **Ollama** หรือ **LM Studio** ร่วมกับ Mint ได้ 100%
123
-
124
- ---
125
- *จัดทำโดย มิ้นท์ (ผู้ช่วยส่วนตัวของคุณ) และ Pheem49*
Binary file
Binary file
Binary file
package/benchmark_ai.js DELETED
@@ -1,71 +0,0 @@
1
- const { handleChat, resetChat } = require('./src/AI_Brain/Gemini_API');
2
- require('dotenv').config();
3
-
4
- async function runBenchmark() {
5
- console.log('🚀 Starting AI Response Latency Test...');
6
- console.log('-------------------------------------------');
7
-
8
- const testQueries = [
9
- { name: "Simple Greeting", text: "สวัสดีครับ" },
10
- { name: "Knowledge Lookup (RAG)", text: "มีข้อมูลอะไรใน test_knowledge.txt บ้าง?" },
11
- { name: "Action Command", text: "เปิด YouTube ให้หน่อย" },
12
- { name: "System Command", text: "ขอดูข้อมูลระบบหน่อย" }
13
- ];
14
-
15
- const results = [];
16
-
17
- for (const query of testQueries) {
18
- console.log(`Testing: ${query.name} ("${query.text}")`);
19
-
20
- const start = Date.now();
21
- try {
22
- const response = await handleChat(query.text);
23
- const duration = Date.now() - start;
24
-
25
- results.push({
26
- name: query.name,
27
- latency: duration,
28
- action: response.action.type,
29
- success: true
30
- });
31
- console.log(`✅ Completed in ${duration}ms (Action: ${response.action.type})`);
32
- } catch (err) {
33
- const duration = Date.now() - start;
34
- results.push({
35
- name: query.name,
36
- latency: duration,
37
- success: false,
38
- error: err.message
39
- });
40
- console.log(`❌ Failed after ${duration}ms: ${err.message}`);
41
- }
42
-
43
- // Short delay between tests to avoid rate limiting
44
- await new Promise(resolve => setTimeout(resolve, 1000));
45
- }
46
-
47
- console.log('\n-------------------------------------------');
48
- console.log('📊 Benchmark Summary:');
49
- const totalLatency = results.reduce((sum, r) => sum + r.latency, 0);
50
- const avgLatency = (totalLatency / results.length).toFixed(2);
51
-
52
- results.forEach(r => {
53
- const status = r.success ? 'OK' : 'FAIL';
54
- console.log(`- ${r.name.padEnd(25)}: ${r.latency.toString().padStart(5)}ms [${status}]`);
55
- });
56
-
57
- console.log(`\nAverage Latency: ${avgLatency}ms`);
58
-
59
- if (avgLatency > 4000) {
60
- console.log('\n⚠️ Analysis: Response time is quite high (>4s).');
61
- console.log('Potential causes:');
62
- console.log('1. Large System Instruction (Gemini_API.js)');
63
- console.log('2. Slow Local RAG search (knowledge_base.js)');
64
- console.log('3. Network latency to Gemini API');
65
- } else {
66
- console.log('\n✨ Latency is within acceptable range (<4s).');
67
- }
68
- }
69
-
70
- // Run the benchmark
71
- runBenchmark().catch(console.error);
package/install.ps1 DELETED
@@ -1,64 +0,0 @@
1
- <#
2
- .SYNOPSIS
3
- Mint CLI Installation Script for Windows
4
- .DESCRIPTION
5
- Installs the Mint CLI package globally via NPM.
6
- #>
7
-
8
- $ErrorActionPreference = "Stop"
9
-
10
- Write-Host "Starting Mint CLI installation..." -ForegroundColor Cyan
11
-
12
- # 1. Check for Node.js
13
- try {
14
- $nodeVersion = (node -v) 2>$null
15
- if ([string]::IsNullOrWhiteSpace($nodeVersion)) {
16
- Write-Host "[Error] Node.js is not found on your system!" -ForegroundColor Red
17
- Write-Host "Please install Node.js (version 18 or higher) before using Mint CLI." -ForegroundColor Yellow
18
- Write-Host "Download at: https://nodejs.org/"
19
- exit 1
20
- }
21
- } catch {
22
- Write-Host "[Error] Node.js is not found on your system!" -ForegroundColor Red
23
- Write-Host "Please install Node.js (version 18 or higher) before using Mint CLI." -ForegroundColor Yellow
24
- Write-Host "Download at: https://nodejs.org/"
25
- exit 1
26
- }
27
-
28
- # 2. Check for NPM
29
- try {
30
- $npmVersion = (npm -v) 2>$null
31
- if ([string]::IsNullOrWhiteSpace($npmVersion)) {
32
- Write-Host "[Error] NPM is not found on your system!" -ForegroundColor Red
33
- exit 1
34
- }
35
- } catch {
36
- Write-Host "[Error] NPM is not found on your system!" -ForegroundColor Red
37
- exit 1
38
- }
39
-
40
- # Check Node.js version (recommend 18+)
41
- $majorVersion = [int]($nodeVersion.Substring(1).Split('.')[0])
42
- if ($majorVersion -lt 18) {
43
- Write-Host "[Warning] Your Node.js version is too old (current: $nodeVersion)" -ForegroundColor Yellow
44
- Write-Host "It is recommended to update to version 18 or higher for full functionality." -ForegroundColor Yellow
45
- }
46
-
47
- # 3. Install Mint CLI via NPM
48
- Write-Host "Downloading and installing @pheem49/mint..." -ForegroundColor Cyan
49
-
50
- try {
51
- # In Windows, we usually don't need sudo for global npm install if Node was installed for the user.
52
- # We will just run the command normally.
53
- npm install -g @pheem49/mint@latest
54
- } catch {
55
- Write-Host "[Error] Installation failed. Try running PowerShell as Administrator." -ForegroundColor Red
56
- exit 1
57
- }
58
-
59
- Write-Host ""
60
- Write-Host "Mint CLI installed successfully!" -ForegroundColor Green
61
- Write-Host "- Run 'mint' to get started."
62
- Write-Host "- Run 'mint onboard' to set up your API Keys."
63
- Write-Host "----------------------------------------"
64
- Write-Host "Happy coding!" -ForegroundColor Cyan
package/install.sh DELETED
@@ -1,54 +0,0 @@
1
- #!/bin/bash
2
- # Mint CLI Installation Script
3
- # Usage: curl -fsSL <URL>/install.sh | bash
4
-
5
- set -e
6
-
7
- echo "Starting Mint CLI installation..."
8
-
9
- # 1. Check for Node.js
10
- if ! command -v node &> /dev/null
11
- then
12
- echo "[Error] Node.js is not found on your system!"
13
- echo "Please install Node.js (version 18 or higher) before using Mint CLI."
14
- echo "Download at: https://nodejs.org/"
15
- exit 1
16
- fi
17
-
18
- # 2. Check for NPM
19
- if ! command -v npm &> /dev/null
20
- then
21
- echo "[Error] NPM is not found on your system!"
22
- exit 1
23
- fi
24
-
25
- # Check Node.js version (recommend 18+)
26
- NODE_VERSION=$(node -v | cut -d 'v' -f 2 | cut -d '.' -f 1)
27
- if [ "$NODE_VERSION" -lt 18 ]; then
28
- echo "[Warning] Your Node.js version is too old (current: v${NODE_VERSION})"
29
- echo "It is recommended to update to version 18 or higher for full functionality."
30
- fi
31
-
32
- # 3. Install Mint CLI via NPM
33
- echo "Downloading and installing @pheem49/mint (may require Admin/Root privileges)..."
34
-
35
- # Determine if we need sudo
36
- if [ "$EUID" -ne 0 ] && command -v sudo &> /dev/null; then
37
- # Check if npm global directory is writable by the current user (e.g., using NVM)
38
- NPM_PREFIX=$(npm config get prefix 2>/dev/null || echo "/usr/local")
39
- if [ -w "$NPM_PREFIX" ] || [ -w "$NPM_PREFIX/lib/node_modules" ]; then
40
- npm install -g @pheem49/mint@latest
41
- else
42
- # Preserve user's PATH so sudo can find npm if it's installed via custom paths
43
- sudo env "PATH=$PATH" npm install -g @pheem49/mint@latest
44
- fi
45
- else
46
- npm install -g @pheem49/mint@latest
47
- fi
48
-
49
- echo ""
50
- echo "Mint CLI installed successfully!"
51
- echo "- Run 'mint' to get started."
52
- echo "- Run 'mint onboard' to set up your API Keys."
53
- echo "----------------------------------------"
54
- echo "Happy coding!"
package/main.js DELETED
@@ -1,139 +0,0 @@
1
- const { app, BrowserWindow, ipcMain, shell, globalShortcut, clipboard } = require('electron');
2
- require('dotenv').config();
3
-
4
- // Linux docks match running windows to a .desktop file through WM_CLASS.
5
- app.setName('Mint');
6
- if (process.platform === 'linux') {
7
- app.commandLine.appendSwitch('class', 'Mint');
8
- if (typeof app.setDesktopName === 'function') {
9
- app.setDesktopName('mint-ai.desktop');
10
- }
11
- }
12
-
13
- const { getSystemInfo, getWeather } = require('./src/System/system_info');
14
- const { readConfig, writeConfig } = require('./src/System/config_manager');
15
- const { parseCommand } = require('./src/Command_Parser/parser');
16
- const { getGoogleTtsUrls } = require('./src/System/google_tts_urls');
17
- const { createWindowManager } = require('./src/System/window_manager');
18
- const { createProactiveLoop } = require('./src/System/proactive_loop');
19
- const { createScreenCaptureController } = require('./src/System/screen_capture');
20
- const { registerIpcHandlers } = require('./src/System/ipc_handlers');
21
- const { saveChatImages, listSavedPictures } = require('./src/System/picture_store');
22
-
23
- const systemEvents = require('./src/System/system_events');
24
- const customWorkflows = require('./src/System/custom_workflows');
25
- const mcpManager = require('./src/Plugins/mcp_manager');
26
-
27
- let geminiServices = null;
28
- function getGeminiServices() {
29
- if (!geminiServices) {
30
- geminiServices = require('./src/AI_Brain/Gemini_API');
31
- }
32
- return geminiServices;
33
- }
34
-
35
- function getActionExecutor() {
36
- return require('./src/System/action_executor');
37
- }
38
-
39
- const projectRoot = __dirname;
40
- const windowManager = createWindowManager(projectRoot);
41
- const proactiveLoop = createProactiveLoop({
42
- app,
43
- projectRoot,
44
- readConfig,
45
- getMainWindow: windowManager.getMainWindow
46
- });
47
- const screenCapture = createScreenCaptureController({
48
- projectRoot,
49
- translateImageContent: (...args) => getGeminiServices().translateImageContent(...args),
50
- getMainWindow: windowManager.getMainWindow
51
- });
52
-
53
- registerIpcHandlers({
54
- app,
55
- ipcMain,
56
- shell,
57
- clipboard,
58
- windowManager,
59
- proactiveLoop,
60
- screenCapture,
61
- services: {
62
- handleChat: (...args) => getGeminiServices().handleChat(...args),
63
- resetChat: (...args) => getGeminiServices().resetChat(...args),
64
- getChatTranscript: (...args) => getGeminiServices().getChatTranscript(...args),
65
- refreshApiKeyFromConfig: (...args) => getGeminiServices().refreshApiKeyFromConfig(...args),
66
- getSystemInfo,
67
- getWeather,
68
- readConfig,
69
- writeConfig,
70
- saveChatImages,
71
- listSavedPictures,
72
- parseCommand,
73
- executeAction: (...args) => getActionExecutor().executeAction(...args),
74
- getGoogleTtsUrls,
75
- customWorkflows
76
- }
77
- });
78
-
79
- app.whenReady().then(() => {
80
- const config = readConfig();
81
- const mainWindow = windowManager.createMainWindow();
82
- windowManager.createTray();
83
-
84
- mainWindow.once('ready-to-show', () => {
85
- if (config.showDesktopWidget !== false) {
86
- setTimeout(() => windowManager.createWidgetWindow(), 300);
87
- }
88
-
89
- setTimeout(() => {
90
- mcpManager.init().catch(err => console.error('[MCP] Init Error:', err));
91
-
92
- const bridgeManager = require('./src/System/bridge_manager');
93
- bridgeManager.init().catch(err => console.error('[BridgeManager] Init Error:', err));
94
- }, 1000);
95
- });
96
-
97
- systemEvents.startMonitoring();
98
- if (config.enableCustomWorkflows !== false) {
99
- customWorkflows.startMonitoring(mainWindow.webContents);
100
- }
101
-
102
- systemEvents.on('low-battery', (level) => {
103
- const currentMainWindow = windowManager.getMainWindow();
104
- if (currentMainWindow && !currentMainWindow.isDestroyed()) {
105
- currentMainWindow.webContents.send('proactive-notification', {
106
- message: `⚠️ Battery is low (${level}%). Please plug in your charger. ✨`,
107
- type: 'warning'
108
- });
109
- }
110
- });
111
-
112
- systemEvents.on('connection-change', (isOnline) => {
113
- const currentMainWindow = windowManager.getMainWindow();
114
- if (currentMainWindow && !currentMainWindow.isDestroyed()) {
115
- const msg = isOnline ? '✅ Internet connection restored. ✨' : '❌ Internet connection lost.';
116
- currentMainWindow.webContents.send('proactive-notification', { message: msg, type: 'info' });
117
- }
118
- });
119
-
120
- globalShortcut.register('CommandOrControl+Shift+Space', windowManager.toggleMainWindow);
121
- globalShortcut.register('Alt+Space', windowManager.toggleSpotlightWindow);
122
-
123
- proactiveLoop.startIdleWatcher();
124
-
125
- app.on('activate', () => {
126
- if (BrowserWindow.getAllWindows().length === 0) {
127
- windowManager.createMainWindow();
128
- }
129
- });
130
- });
131
-
132
- app.on('window-all-closed', (event) => {
133
- event.preventDefault();
134
- });
135
-
136
- app.on('will-quit', () => {
137
- globalShortcut.unregisterAll();
138
- mcpManager.shutdown();
139
- });
package/mint-cli-logic.js DELETED
@@ -1,3 +0,0 @@
1
- // Backward-compatible CLI entry point for Mint actions.
2
- // Keep execution rules in one place so desktop, CLI, and agents share safety behavior.
3
- module.exports = require('./src/System/action_executor');