@pheem49/mint 1.2.3 → 1.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.
Binary file
Binary file
Binary file
package/docs/index.html CHANGED
@@ -7,14 +7,18 @@
7
7
  <meta name="description" content="A powerful Electron-based AI desktop assistant powered by Google Gemini, featuring screen vision, web automation, and proactive suggestions.">
8
8
  <link rel="stylesheet" href="style.css">
9
9
  <script src="https://unpkg.com/@phosphor-icons/web"></script>
10
- <link rel="icon" type="image/png" href="assets/logo.png">
10
+ <link rel="icon" type="image/png" href="assets/icon.png">
11
11
  </head>
12
12
  <body>
13
13
  <div class="bg-glow"></div>
14
-
14
+ <div class="floating-blobs">
15
+ <div class="blob blob-1"></div>
16
+ <div class="blob blob-2"></div>
17
+ <div class="blob blob-3"></div>
18
+ </div>
15
19
  <nav>
16
20
  <div class="logo-container">
17
- <img src="assets/logo.png" alt="Mint Logo">
21
+ <img src="assets/icon.png" alt="Mint Logo">
18
22
  <span>Agent Mint</span>
19
23
  </div>
20
24
  <div class="nav-links">
@@ -30,15 +34,59 @@
30
34
 
31
35
  <div class="install-container" id="install-cmd">
32
36
  <span>$</span>
33
- <code>npm install -g @pheem49/mint</code>
37
+ <code>npm install -g @pheem49/mint@latest</code>
34
38
  <button class="copy-btn" title="Copy to clipboard" onclick="copyCommand()">
35
39
  <i class="ph ph-copy"></i>
36
40
  </button>
37
41
  </div>
38
42
 
39
43
  <div class="hero-preview">
44
+ <div class="preview-badge">Terminal Interface</div>
40
45
  <img src="assets/CLI_Screen.png" alt="Mint CLI Preview">
41
46
  </div>
47
+
48
+ <section class="desktop-showcase">
49
+ <div class="showcase-header">
50
+ <img src="assets/icon.png" alt="Mint Icon" class="section-icon">
51
+ <h2>Modern Desktop Interface</h2>
52
+ <p>Enjoy a premium, glassmorphism-inspired GUI designed for the modern desktop environment. Manage your AI companion and customize your experience with ease.</p>
53
+ </div>
54
+
55
+ <div class="showcase-group">
56
+ <div class="showcase-images">
57
+ <div class="image-wrapper main-ui">
58
+ <img src="assets/Agent_Mint.png" alt="Agent Mint Main UI">
59
+ <span>Main Interface</span>
60
+ </div>
61
+ <div class="image-wrapper settings-ui">
62
+ <img src="assets/Settings.png" alt="Mint Settings UI">
63
+ <span>Settings & Controls</span>
64
+ </div>
65
+ </div>
66
+
67
+ <div class="showcase-text-combined">
68
+ <div class="text-block">
69
+ <h3><i class="ph ph-sparkle"></i> Intelligent Companion</h3>
70
+ <p>A sleek, floating chat interface that provides powerful AI capabilities without cluttering your workspace.</p>
71
+ </div>
72
+ <div class="text-block">
73
+ <h3><i class="ph ph-sliders"></i> Granular Controls</h3>
74
+ <p>Fully customize your experience. Manage API keys, switch models, and toggle proactive features with ease.</p>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </section>
79
+
80
+ <section class="downloads">
81
+ <div class="download-container">
82
+ <h2>Get the Latest Release</h2>
83
+ <p>Download the latest stable binaries for Linux including <b>.deb</b> and <b>.AppImage</b> formats directly from our GitHub releases page.</p>
84
+ <a href="https://github.com/Pheem49/Mint/releases" class="download-btn" target="_blank">
85
+ <i class="ph ph-download-simple"></i>
86
+ Download Latest Binaries
87
+ </a>
88
+ </div>
89
+ </section>
42
90
  </header>
43
91
 
44
92
  <section class="features" id="features">
@@ -71,7 +119,7 @@
71
119
 
72
120
  <script>
73
121
  function copyCommand() {
74
- const cmd = "npm install -g @pheem49/mint";
122
+ const cmd = "npm install -g @pheem49/mint@latest";
75
123
  navigator.clipboard.writeText(cmd);
76
124
  const icon = document.querySelector('.copy-btn i');
77
125
  icon.classList.replace('ph-copy', 'ph-check');
package/docs/style.css CHANGED
@@ -31,7 +31,7 @@ body {
31
31
  overflow-x: hidden;
32
32
  }
33
33
 
34
- /* Background Gradients */
34
+ /* Background Gradients & Texture */
35
35
  .bg-glow {
36
36
  position: fixed;
37
37
  top: 0;
@@ -39,8 +39,78 @@ body {
39
39
  width: 100%;
40
40
  height: 100%;
41
41
  z-index: -1;
42
- background: radial-gradient(circle at 20% 30%, rgba(0, 255, 163, 0.05) 0%, transparent 50%),
43
- radial-gradient(circle at 80% 70%, rgba(0, 224, 255, 0.05) 0%, transparent 50%);
42
+ background:
43
+ radial-gradient(circle at 0% 0%, rgba(0, 255, 163, 0.03) 0%, transparent 40%),
44
+ radial-gradient(circle at 100% 100%, rgba(0, 224, 255, 0.03) 0%, transparent 40%),
45
+ var(--bg-color);
46
+ }
47
+
48
+ .bg-glow::before {
49
+ content: '';
50
+ position: absolute;
51
+ top: 0;
52
+ left: 0;
53
+ width: 100%;
54
+ height: 100%;
55
+ background-image: radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
56
+ background-size: 40px 40px;
57
+ opacity: 0.5;
58
+ mask-image: radial-gradient(ellipse at center, black, transparent 80%);
59
+ }
60
+
61
+ /* Floating Blobs */
62
+ .floating-blobs {
63
+ position: fixed;
64
+ top: 0;
65
+ left: 0;
66
+ width: 100%;
67
+ height: 100%;
68
+ z-index: -1;
69
+ overflow: hidden;
70
+ pointer-events: none;
71
+ }
72
+
73
+ .blob {
74
+ position: absolute;
75
+ border-radius: 50%;
76
+ filter: blur(120px);
77
+ opacity: 0.15;
78
+ animation: float 20s infinite alternate cubic-bezier(0.45, 0, 0.55, 1);
79
+ }
80
+
81
+ .blob-1 {
82
+ width: 600px;
83
+ height: 600px;
84
+ background: var(--accent-mint);
85
+ top: -200px;
86
+ left: -100px;
87
+ animation-duration: 25s;
88
+ }
89
+
90
+ .blob-2 {
91
+ width: 500px;
92
+ height: 500px;
93
+ background: var(--accent-blue);
94
+ bottom: -100px;
95
+ right: -100px;
96
+ animation-duration: 30s;
97
+ animation-delay: -5s;
98
+ }
99
+
100
+ .blob-3 {
101
+ width: 400px;
102
+ height: 400px;
103
+ background: #8b5cf6;
104
+ top: 40%;
105
+ left: 50%;
106
+ opacity: 0.08;
107
+ animation-duration: 22s;
108
+ animation-delay: -10s;
109
+ }
110
+
111
+ @keyframes float {
112
+ 0% { transform: translate(0, 0) scale(1); }
113
+ 100% { transform: translate(100px, 50px) scale(1.1); }
44
114
  }
45
115
 
46
116
  /* Navigation */
@@ -99,15 +169,13 @@ nav {
99
169
 
100
170
  /* Hero Section */
101
171
  .hero {
102
- min-height: 100vh;
172
+ min-height: 90vh;
103
173
  display: flex;
104
174
  flex-direction: column;
105
175
  justify-content: center;
106
176
  align-items: center;
107
177
  text-align: center;
108
178
  padding: 120px 20px 60px;
109
- background: url('assets/hero-bg.png') no-repeat center center;
110
- background-size: cover;
111
179
  position: relative;
112
180
  }
113
181
 
@@ -119,6 +187,7 @@ nav {
119
187
  width: 100%;
120
188
  height: 300px;
121
189
  background: linear-gradient(to top, var(--bg-color), transparent);
190
+ pointer-events: none;
122
191
  }
123
192
 
124
193
  .hero h1 {
@@ -179,6 +248,22 @@ nav {
179
248
  border: 1px solid rgba(255, 255, 255, 0.05);
180
249
  }
181
250
 
251
+ .preview-badge {
252
+ position: absolute;
253
+ top: -15px;
254
+ left: 50%;
255
+ transform: translateX(-50%);
256
+ background: var(--accent-mint);
257
+ color: #000;
258
+ padding: 0.4rem 1.2rem;
259
+ border-radius: 100px;
260
+ font-size: 0.8rem;
261
+ font-weight: 800;
262
+ text-transform: uppercase;
263
+ letter-spacing: 1px;
264
+ box-shadow: 0 10px 20px rgba(0, 255, 163, 0.3);
265
+ }
266
+
182
267
  @keyframes slideUp {
183
268
  from {
184
269
  opacity: 0;
@@ -265,6 +350,210 @@ nav {
265
350
  font-size: 1rem;
266
351
  }
267
352
 
353
+ /* Desktop Showcase */
354
+ .desktop-showcase {
355
+ padding: 100px 10%;
356
+ z-index: 1;
357
+ position: relative;
358
+ }
359
+
360
+ .showcase-header {
361
+ text-align: center;
362
+ margin-bottom: 5rem;
363
+ }
364
+
365
+ .section-icon {
366
+ width: 64px;
367
+ height: 64px;
368
+ margin-bottom: 1.5rem;
369
+ filter: drop-shadow(0 0 20px rgba(0, 255, 163, 0.4));
370
+ }
371
+
372
+ .showcase-header h2 {
373
+ font-family: var(--font-heading);
374
+ font-size: 3.5rem;
375
+ margin-bottom: 1rem;
376
+ }
377
+
378
+ .showcase-header p {
379
+ color: var(--text-secondary);
380
+ font-size: 1.2rem;
381
+ max-width: 600px;
382
+ margin: 0 auto;
383
+ }
384
+
385
+ .showcase-group {
386
+ display: flex;
387
+ flex-direction: column;
388
+ align-items: center;
389
+ gap: 4rem;
390
+ }
391
+
392
+ .showcase-images {
393
+ display: flex;
394
+ justify-content: center;
395
+ align-items: flex-start;
396
+ gap: 2rem;
397
+ width: 100%;
398
+ }
399
+
400
+ .image-wrapper {
401
+ flex: 1;
402
+ max-width: 450px;
403
+ background: rgba(255, 255, 255, 0.02);
404
+ border: 1px solid var(--glass-border);
405
+ padding: 0.75rem;
406
+ border-radius: 20px;
407
+ position: relative;
408
+ backdrop-filter: blur(10px);
409
+ transition: transform 0.4s ease;
410
+ }
411
+
412
+ .image-wrapper:hover {
413
+ transform: translateY(-10px);
414
+ border-color: var(--accent-mint);
415
+ }
416
+
417
+ .image-wrapper img {
418
+ width: 100%;
419
+ display: block;
420
+ border-radius: 12px;
421
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
422
+ }
423
+
424
+ .image-wrapper span {
425
+ display: block;
426
+ text-align: center;
427
+ margin-top: 1rem;
428
+ font-size: 0.85rem;
429
+ color: var(--text-secondary);
430
+ font-weight: 500;
431
+ }
432
+
433
+ .showcase-text-combined {
434
+ display: grid;
435
+ grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
436
+ gap: 3rem;
437
+ width: 100%;
438
+ max-width: 900px;
439
+ margin-top: 2rem;
440
+ }
441
+
442
+ .text-block {
443
+ text-align: left;
444
+ }
445
+
446
+ .text-block h3 {
447
+ font-family: var(--font-heading);
448
+ font-size: 1.5rem;
449
+ margin-bottom: 0.75rem;
450
+ color: var(--accent-mint);
451
+ display: flex;
452
+ align-items: center;
453
+ gap: 0.5rem;
454
+ }
455
+
456
+ .text-block p {
457
+ font-size: 1rem;
458
+ color: var(--text-secondary);
459
+ line-height: 1.6;
460
+ }
461
+
462
+ /* Downloads Section */
463
+ .downloads {
464
+ padding: 100px 10% 60px;
465
+ display: flex;
466
+ justify-content: center;
467
+ z-index: 5;
468
+ position: relative;
469
+ }
470
+
471
+ .download-container {
472
+ background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
473
+ border: 1px solid var(--glass-border);
474
+ padding: 3.5rem;
475
+ border-radius: 32px;
476
+ max-width: 800px;
477
+ text-align: center;
478
+ backdrop-filter: blur(15px);
479
+ box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
480
+ z-index: 10;
481
+ }
482
+
483
+ .download-container h2 {
484
+ font-family: var(--font-heading);
485
+ font-size: 2.5rem;
486
+ margin-bottom: 1.5rem;
487
+ }
488
+
489
+ .download-container p {
490
+ color: var(--text-secondary);
491
+ font-size: 1.1rem;
492
+ margin-bottom: 2.5rem;
493
+ line-height: 1.8;
494
+ }
495
+
496
+ .download-container b {
497
+ color: var(--text-primary);
498
+ }
499
+
500
+ .download-btn {
501
+ display: inline-flex;
502
+ align-items: center;
503
+ gap: 0.75rem;
504
+ background: var(--accent-mint);
505
+ color: #000;
506
+ text-decoration: none;
507
+ padding: 1.25rem 2.5rem;
508
+ border-radius: 100px;
509
+ font-weight: 700;
510
+ font-size: 1.1rem;
511
+ transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
512
+ box-shadow: 0 10px 30px rgba(0, 255, 163, 0.3);
513
+ cursor: pointer;
514
+ position: relative;
515
+ z-index: 11;
516
+ }
517
+
518
+ .download-btn:hover {
519
+ transform: scale(1.05);
520
+ box-shadow: 0 15px 40px rgba(0, 255, 163, 0.5);
521
+ background: #fff;
522
+ }
523
+
524
+ .download-btn i {
525
+ font-size: 1.4rem;
526
+ }
527
+
528
+ .download-card h4 {
529
+ font-family: var(--font-heading);
530
+ font-size: 1.25rem;
531
+ margin-bottom: 1rem;
532
+ display: flex;
533
+ align-items: center;
534
+ gap: 0.75rem;
535
+ }
536
+
537
+ .download-card h4 i {
538
+ color: var(--accent-blue);
539
+ }
540
+
541
+ .download-card pre {
542
+ background: #000;
543
+ padding: 1rem;
544
+ border-radius: 8px;
545
+ font-size: 0.9rem;
546
+ color: var(--accent-mint);
547
+ margin-top: 1rem;
548
+ overflow-x: auto;
549
+ border: 1px solid rgba(255, 255, 255, 0.05);
550
+ }
551
+
552
+ .download-card p {
553
+ color: var(--text-secondary);
554
+ font-size: 0.95rem;
555
+ }
556
+
268
557
  /* Footer */
269
558
  footer {
270
559
  padding: 60px 10% 40px;
package/mint-cli.js CHANGED
@@ -2,6 +2,7 @@
2
2
  require('dotenv').config({ quiet: true });
3
3
  const { Command } = require('commander');
4
4
  const { handleChat, resetChat } = require('./src/AI_Brain/Gemini_API');
5
+ const pkg = require('./package.json');
5
6
  const { runOnboarding } = require('./src/CLI/onboarding');
6
7
  const { startAgent } = require('./src/AI_Brain/headless_agent');
7
8
  const { displayFeatures } = require('./src/CLI/list_features');
@@ -17,7 +18,7 @@ const startupTime = startupNow.toLocaleString('th-TH', {
17
18
  day: '2-digit', month: '2-digit', year: 'numeric',
18
19
  hour: '2-digit', minute: '2-digit', hour12: false
19
20
  }).replace(',', '');
20
- console.log(`\x1b[38;5;121m[Mint] ${startupTime} | Active Model: ${startupModel}\x1b[0m`);
21
+ console.log(`\x1b[38;5;121m[Mint] v${pkg.version} | ${startupTime} | Active Model: ${startupModel}\x1b[0m`);
21
22
 
22
23
  // ANSI Colors
23
24
  const colors = {
@@ -35,7 +36,7 @@ const program = new Command();
35
36
  program
36
37
  .name('mint-ai')
37
38
  .description('Mint - Your Personal AI Assistant CLI')
38
- .version('1.0.0');
39
+ .version(pkg.version);
39
40
 
40
41
  // Chat Command (Interactive Mode)
41
42
  program
@@ -218,6 +219,7 @@ async function handleSlashCommandUI(input, appendMessage, updateStatusModel, cop
218
219
  const currentCfg = readConfig();
219
220
  appendMessage('system', [
220
221
  'Current Configuration:',
222
+ ` Version : v${pkg.version}`,
221
223
  ` Provider : ${currentCfg.aiProvider}`,
222
224
  ` Model : ${currentCfg.geminiModel}`,
223
225
  ` Ollama : ${currentCfg.ollamaModel}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pheem49/mint",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "A powerful Electron-based AI desktop assistant powered by Google Gemini, featuring screen vision, web automation, and proactive suggestions.",
5
5
  "main": "main.js",
6
6
  "scripts": {
@@ -9,6 +9,44 @@ const fs = require('fs');
9
9
  const path = require('path');
10
10
  const os = require('os');
11
11
 
12
+ /**
13
+ * Smartly resolves a path.
14
+ * If a path starts with '/' but doesn't exist at root, checks if it exists relative to home.
15
+ * Also handles '~/' expansion.
16
+ */
17
+ function resolveSmartPath(target) {
18
+ if (!target) return target;
19
+
20
+ // 1. If it exists as is (absolute or relative to CWD), use it
21
+ if (fs.existsSync(target)) return target;
22
+
23
+ const commonFolders = ['Downloads', 'Desktop', 'Documents', 'Videos', 'Pictures', 'Music', 'vscode', 'Games'];
24
+
25
+ // 2. If it starts with / and doesn't exist at root, try home directory
26
+ if (target.startsWith('/')) {
27
+ const homeRelative = path.join(os.homedir(), target.substring(1));
28
+ if (fs.existsSync(homeRelative)) return homeRelative;
29
+
30
+ const cwdRelative = path.join(process.cwd(), target.substring(1));
31
+ if (fs.existsSync(cwdRelative)) return cwdRelative;
32
+
33
+ const firstPart = target.split('/')[1];
34
+ if (commonFolders.includes(firstPart)) return homeRelative;
35
+ }
36
+
37
+ // 3. Handle ~ manually
38
+ if (target.startsWith('~/')) {
39
+ return path.join(os.homedir(), target.substring(2));
40
+ }
41
+
42
+ // 4. If it's just a name, search in common folders
43
+ for (const folder of commonFolders) {
44
+ const potentialPath = path.join(os.homedir(), folder, target);
45
+ if (fs.existsSync(potentialPath)) return potentialPath;
46
+ }
47
+
48
+ return target;
49
+ }
12
50
  /**
13
51
  * สร้างโฟลเดอร์ใหม่
14
52
  * target: ชื่อโฟลเดอร์ หรือ absolute path
@@ -17,12 +55,12 @@ const os = require('os');
17
55
  function createFolder(target) {
18
56
  if (!target) return { success: false, message: 'No folder name provided.' };
19
57
 
20
- let folderPath = target;
58
+ let folderPath = resolveSmartPath(target);
21
59
 
22
- // ถ้าไม่ใช่ absolute path ให้สร้างบน Desktop
23
- if (!path.isAbsolute(target)) {
60
+ // If still not absolute (was just a name), default to Desktop
61
+ if (!path.isAbsolute(folderPath)) {
24
62
  const desktopPath = path.join(os.homedir(), 'Desktop');
25
- folderPath = path.join(desktopPath, target);
63
+ folderPath = path.join(desktopPath, folderPath);
26
64
  }
27
65
 
28
66
  try {
@@ -40,11 +78,13 @@ function createFolder(target) {
40
78
  */
41
79
  async function openFile(target) {
42
80
  if (!target) return;
81
+ const resolvedPath = resolveSmartPath(target);
82
+
43
83
  if (shell) {
44
- const result = await shell.openPath(target);
84
+ const result = await shell.openPath(resolvedPath);
45
85
  if (result) console.error('openFile error:', result);
46
86
  } else {
47
- exec(`xdg-open "${target}"`, (err) => {
87
+ exec(`xdg-open "${resolvedPath}"`, (err) => {
48
88
  if (err) console.error("Failed to open path via xdg-open:", err);
49
89
  });
50
90
  }
@@ -55,9 +95,11 @@ async function openFile(target) {
55
95
  */
56
96
  async function deleteFile(target) {
57
97
  if (!target) return { success: false, message: 'No path provided.' };
98
+ const resolvedPath = resolveSmartPath(target);
99
+
58
100
  if (shell) {
59
101
  try {
60
- await shell.trashItem(target);
102
+ await shell.trashItem(resolvedPath);
61
103
  return { success: true };
62
104
  } catch (err) {
63
105
  console.error('deleteFile error:', err);
@@ -65,7 +107,7 @@ async function deleteFile(target) {
65
107
  }
66
108
  } else {
67
109
  return new Promise((resolve) => {
68
- exec(`gio trash "${target}"`, (err) => {
110
+ exec(`gio trash "${resolvedPath}"`, (err) => {
69
111
  if (err) {
70
112
  console.error("Failed to trash item via gio trash:", err);
71
113
  resolve({ success: false, message: err.message });
Binary file
Binary file