@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.
- package/.codex +0 -0
- package/.github/FUNDING.yml +2 -0
- package/.github/workflows/ci.yml +45 -0
- package/.github/workflows/release.yml +79 -0
- package/Cargo.lock +5792 -0
- package/Cargo.toml +32 -0
- package/README.md +387 -353
- package/assets/icon.png +0 -0
- package/bin/mint +0 -0
- package/crates/mint-cli/Cargo.toml +23 -0
- package/crates/mint-cli/src/agent.rs +851 -0
- package/crates/mint-cli/src/gmail.rs +216 -0
- package/crates/mint-cli/src/image.rs +142 -0
- package/crates/mint-cli/src/main.rs +2837 -0
- package/crates/mint-cli/src/mcp.rs +63 -0
- package/crates/mint-cli/src/onboard.rs +1149 -0
- package/crates/mint-cli/src/setup.rs +390 -0
- package/crates/mint-cli/src/skills.rs +8 -0
- package/crates/mint-cli/src/updater.rs +279 -0
- package/crates/mint-core/Cargo.toml +22 -0
- package/crates/mint-core/src/agent_loop.rs +94 -0
- package/crates/mint-core/src/api_server.rs +991 -0
- package/crates/mint-core/src/channels.rs +248 -0
- package/crates/mint-core/src/chat.rs +895 -0
- package/crates/mint-core/src/code_tools.rs +729 -0
- package/crates/mint-core/src/config.rs +368 -0
- package/crates/mint-core/src/files.rs +159 -0
- package/crates/mint-core/src/knowledge.rs +541 -0
- package/crates/mint-core/src/lib.rs +84 -0
- package/crates/mint-core/src/mcp.rs +273 -0
- package/crates/mint-core/src/memory.rs +673 -0
- package/crates/mint-core/src/orchestration.rs +2157 -0
- package/crates/mint-core/src/pictures.rs +314 -0
- package/crates/mint-core/src/plugins.rs +727 -0
- package/crates/mint-core/src/safety.rs +416 -0
- package/crates/mint-core/src/semantic.rs +254 -0
- package/crates/mint-core/src/shell.rs +317 -0
- package/crates/mint-core/src/skills.rs +71 -0
- package/crates/mint-core/src/symbols.rs +157 -0
- package/crates/mint-core/src/tasks.rs +308 -0
- package/crates/mint-core/src/tts.rs +92 -0
- package/crates/mint-core/src/weather.rs +93 -0
- package/crates/mint-core/src/web_search.rs +200 -0
- package/crates/mint-core/src/workflows.rs +81 -0
- package/crates/mint-core/tests/mcp_stdio.rs +45 -0
- package/crates/mint-core/tests/memory_persistence.rs +172 -0
- package/crates/mint-core/tests/pictures_storage.rs +14 -0
- package/crates/mint-core/tests/task_lifecycle.rs +87 -0
- package/package.json +35 -99
- package/src/bin/index.js +16 -0
- package/src/renderer/index-web.html +17 -0
- package/src/renderer/index.html +17 -0
- package/src/renderer/public/Live2DCubismCore.js +9 -0
- package/src/renderer/public/assets/icon.png +0 -0
- package/src/renderer/public/models/Shiroko_Model/Shiroko/Shiroko_Core/shiroko.model3.json +36 -0
- package/src/renderer/src/App.tsx +33 -0
- package/src/renderer/src/calculator.ts +47 -0
- package/src/renderer/src/components/ChatPanel.tsx +1598 -0
- package/src/renderer/src/components/DashboardSidebar.tsx +358 -0
- package/src/renderer/src/components/Live2DStage.tsx +374 -0
- package/src/renderer/src/components/MintDashboard.tsx +950 -0
- package/src/renderer/src/components/ModelPanel.tsx +154 -0
- package/src/renderer/src/components/PicturesLibrary.tsx +46 -0
- package/src/renderer/src/components/ProactiveGlow.tsx +19 -0
- package/src/renderer/src/components/ScreenPicker.tsx +579 -0
- package/src/renderer/src/components/SettingsWindow.tsx +1467 -0
- package/src/renderer/src/components/SpotlightWindow.tsx +280 -0
- package/src/renderer/src/components/WidgetWindow.tsx +36 -0
- package/src/renderer/src/components/WorkspacePanel.tsx +268 -0
- package/src/{UI → renderer/src/css}/settings.css +69 -16
- package/src/renderer/src/css/spotlight.css +113 -0
- package/src/renderer/src/css/styles.css +3722 -0
- package/src/renderer/src/css/widget.css +185 -0
- package/src/renderer/src/env.d.ts +116 -0
- package/src/renderer/src/index.css +379 -0
- package/src/renderer/src/main.tsx +13 -0
- package/src/renderer/src/tauri.ts +996 -0
- package/src/renderer/src-web/App.tsx +25 -0
- package/src/renderer/src-web/calculator.ts +47 -0
- package/src/renderer/src-web/components/ChatPanel.tsx +1662 -0
- package/src/renderer/src-web/components/DashboardSidebar.tsx +242 -0
- package/src/renderer/src-web/components/MintDashboard.tsx +763 -0
- package/src/renderer/src-web/components/PicturesLibrary.tsx +73 -0
- package/src/renderer/src-web/components/SettingsWindow.tsx +1500 -0
- package/src/renderer/src-web/css/settings.css +1100 -0
- package/src/{UI → renderer/src-web/css}/spotlight.css +4 -4
- package/src/{UI → renderer/src-web/css}/styles.css +1055 -159
- package/src/{UI → renderer/src-web/css}/widget.css +2 -2
- package/src/renderer/src-web/env.d.ts +107 -0
- package/src/renderer/src-web/index.css +379 -0
- package/src/renderer/src-web/main.tsx +13 -0
- package/src/renderer/src-web/tauri.ts +983 -0
- package/tsconfig.json +30 -0
- package/vite.config.ts +33 -0
- package/vite.config.web.ts +51 -0
- package/GUIDE_TH.md +0 -125
- package/assets/Agent_Mint.png +0 -0
- package/assets/CLI_Screen.png +0 -0
- package/assets/Settings.png +0 -0
- package/benchmark_ai.js +0 -71
- package/install.ps1 +0 -64
- package/install.sh +0 -54
- package/main.js +0 -139
- package/mint-cli-logic.js +0 -3
- package/mint-cli.js +0 -410
- package/models/Shiroko_Model/Shiroko/Shiroko_Core//351/235/242/351/245/2740.model3.json +0 -47
- 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
- package/preload-picker.js +0 -11
- package/preload-settings.js +0 -11
- package/preload.js +0 -41
- package/scripts/install_linux_desktop_entry.js +0 -48
- package/src/AI_Brain/Gemini_API.js +0 -813
- package/src/AI_Brain/agent_orchestrator.js +0 -73
- package/src/AI_Brain/autonomous_brain.js +0 -179
- package/src/AI_Brain/behavior_memory.js +0 -135
- package/src/AI_Brain/headless_agent.js +0 -143
- package/src/AI_Brain/knowledge_base.js +0 -349
- package/src/AI_Brain/memory_store.js +0 -662
- package/src/AI_Brain/proactive_engine.js +0 -172
- package/src/AI_Brain/provider_adapter.js +0 -365
- package/src/Automation_Layer/browser_automation.js +0 -149
- package/src/Automation_Layer/file_operations.js +0 -286
- package/src/Automation_Layer/open_app.js +0 -85
- package/src/Automation_Layer/open_website.js +0 -38
- package/src/CLI/approval_handler.js +0 -47
- package/src/CLI/chat_router.js +0 -247
- package/src/CLI/chat_ui.js +0 -1159
- package/src/CLI/cli_colors.js +0 -115
- package/src/CLI/cli_formatters.js +0 -94
- package/src/CLI/code_agent.js +0 -1667
- package/src/CLI/code_session_memory.js +0 -62
- package/src/CLI/gmail_auth.js +0 -210
- package/src/CLI/image_input.js +0 -90
- package/src/CLI/intent_detectors.js +0 -181
- package/src/CLI/interactive_chat.js +0 -658
- package/src/CLI/list_features.js +0 -64
- package/src/CLI/onboarding.js +0 -416
- package/src/CLI/repo_summarizer.js +0 -282
- package/src/CLI/semantic_code_search.js +0 -312
- package/src/CLI/skill_manager.js +0 -41
- package/src/CLI/slash_command_handler.js +0 -418
- package/src/CLI/symbol_indexer.js +0 -231
- package/src/CLI/updater.js +0 -230
- package/src/CLI/workspace_manager.js +0 -90
- package/src/Channels/brave_search_bridge.js +0 -35
- package/src/Channels/discord_bridge.js +0 -66
- package/src/Channels/google_search_bridge.js +0 -38
- package/src/Channels/line_bridge.js +0 -60
- package/src/Channels/slack_bridge.js +0 -48
- package/src/Channels/telegram_bridge.js +0 -41
- package/src/Channels/whatsapp_bridge.js +0 -57
- package/src/Command_Parser/parser.js +0 -45
- package/src/Plugins/dev_tools.js +0 -41
- package/src/Plugins/discord.js +0 -20
- package/src/Plugins/docker.js +0 -47
- package/src/Plugins/gmail.js +0 -251
- package/src/Plugins/google_calendar.js +0 -252
- package/src/Plugins/mcp_manager.js +0 -95
- package/src/Plugins/notion.js +0 -256
- package/src/Plugins/obsidian.js +0 -54
- package/src/Plugins/plugin_manager.js +0 -81
- package/src/Plugins/spotify.js +0 -173
- package/src/Plugins/system_metrics.js +0 -31
- package/src/Plugins/system_monitor.js +0 -72
- package/src/System/action_executor.js +0 -178
- package/src/System/bridge_manager.js +0 -76
- package/src/System/chat_history_manager.js +0 -83
- package/src/System/config_manager.js +0 -194
- package/src/System/custom_workflows.js +0 -163
- package/src/System/daemon_manager.js +0 -67
- package/src/System/google_tts_urls.js +0 -51
- package/src/System/granular_automation.js +0 -157
- package/src/System/ipc_handlers.js +0 -332
- package/src/System/notifications.js +0 -23
- package/src/System/optional_require.js +0 -23
- package/src/System/picture_store.js +0 -109
- package/src/System/proactive_loop.js +0 -153
- package/src/System/safety_manager.js +0 -273
- package/src/System/sandbox_runner.js +0 -182
- package/src/System/screen_capture.js +0 -175
- package/src/System/smart_context.js +0 -227
- package/src/System/system_automation.js +0 -162
- package/src/System/system_events.js +0 -79
- package/src/System/system_info.js +0 -125
- package/src/System/task_manager.js +0 -222
- package/src/System/tool_registry.js +0 -293
- package/src/System/window_manager.js +0 -220
- package/src/UI/floating.css +0 -80
- package/src/UI/floating.html +0 -17
- package/src/UI/floating.js +0 -67
- package/src/UI/live2d_manager.js +0 -600
- package/src/UI/preload-floating.js +0 -7
- package/src/UI/preload-spotlight.js +0 -11
- package/src/UI/preload-widget.js +0 -5
- package/src/UI/proactive-glow.html +0 -42
- package/src/UI/renderer.js +0 -2127
- package/src/UI/screenPicker.html +0 -214
- package/src/UI/screenPicker.js +0 -262
- package/src/UI/settings.html +0 -577
- package/src/UI/settings.js +0 -770
- package/src/UI/spotlight.html +0 -23
- package/src/UI/spotlight.js +0 -185
- package/src/UI/widget.html +0 -29
- package/src/UI/widget.js +0 -10
- /package/{models → src/renderer/public/models}/Shiroko_Model/Shiroko/Shiroko_Core/72d86db84cfa9730b894c241fd24c0db.png +0 -0
- /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
- /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
- /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
- /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
- /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
- /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
- /package/{models → src/renderer/public/models}/Shiroko_Model/Shiroko/Shiroko_Core/items_pinned_to_model.json +0 -0
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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
- /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/mint-cli.js
DELETED
|
@@ -1,410 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
require('dotenv').config({ quiet: true });
|
|
3
|
-
|
|
4
|
-
// Suppress experimental SQLite warning
|
|
5
|
-
const originalEmit = process.emit;
|
|
6
|
-
process.emit = function (name, data, ...args) {
|
|
7
|
-
if (name === 'warning' && typeof data === 'object' &&
|
|
8
|
-
data.name === 'ExperimentalWarning' && data.message.includes('SQLite')) {
|
|
9
|
-
return false;
|
|
10
|
-
}
|
|
11
|
-
return originalEmit.apply(process, [name, data, ...args]);
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
const { Command } = require('commander');
|
|
15
|
-
|
|
16
|
-
// ── CLI modules ──────────────────────────────────────────────────────────────
|
|
17
|
-
const { colors, exitWithGoodbye } = require('./src/CLI/cli_colors');
|
|
18
|
-
const { formatProgress } = require('./src/CLI/cli_formatters');
|
|
19
|
-
const { startInteractiveChat } = require('./src/CLI/interactive_chat');
|
|
20
|
-
const { requestCodeApproval } = require('./src/CLI/approval_handler');
|
|
21
|
-
const { learnSkillFile } = require('./src/CLI/skill_manager');
|
|
22
|
-
|
|
23
|
-
// ── Feature / system modules ────────────────────────────────────────────────
|
|
24
|
-
const { runOnboarding } = require('./src/CLI/onboarding');
|
|
25
|
-
const { startAgent } = require('./src/AI_Brain/headless_agent');
|
|
26
|
-
const { displayFeatures } = require('./src/CLI/list_features');
|
|
27
|
-
const { readConfig, writeConfig } = require('./src/System/config_manager');
|
|
28
|
-
const { executeCodeTask } = require('./src/CLI/code_agent');
|
|
29
|
-
const memoryStore = require('./src/AI_Brain/memory_store');
|
|
30
|
-
const { runUpdate, runStartupAutoUpdate, shouldRunAutoUpdate } = require('./src/CLI/updater');
|
|
31
|
-
const { runGmailAuth } = require('./src/CLI/gmail_auth');
|
|
32
|
-
const { loadImageAsDataUri } = require('./src/CLI/image_input');
|
|
33
|
-
const { summarizeRepository, formatRepoSummary } = require('./src/CLI/repo_summarizer');
|
|
34
|
-
const { buildSymbolIndex, formatSymbolIndex } = require('./src/CLI/symbol_indexer');
|
|
35
|
-
const {
|
|
36
|
-
indexSemanticCode,
|
|
37
|
-
searchSemanticCode,
|
|
38
|
-
formatSemanticCodeIndex,
|
|
39
|
-
formatSemanticCodeSearch
|
|
40
|
-
} = require('./src/CLI/semantic_code_search');
|
|
41
|
-
|
|
42
|
-
const pkg = require('./package.json');
|
|
43
|
-
|
|
44
|
-
// ── Startup banner ───────────────────────────────────────────────────────────
|
|
45
|
-
const startupConfig = readConfig();
|
|
46
|
-
const startupProvider = startupConfig.aiProvider || 'gemini';
|
|
47
|
-
const startupModel = startupProvider === 'openai'
|
|
48
|
-
? (startupConfig.openaiModel || 'gpt-4o')
|
|
49
|
-
: startupProvider === 'anthropic'
|
|
50
|
-
? (startupConfig.anthropicModel || 'claude-3-5-sonnet-latest')
|
|
51
|
-
: startupProvider === 'local_openai'
|
|
52
|
-
? (startupConfig.localModelName || 'local-model')
|
|
53
|
-
: startupProvider === 'ollama'
|
|
54
|
-
? (startupConfig.ollamaModel || 'llama3:latest')
|
|
55
|
-
: (startupConfig.geminiModel || 'gemini-2.5-flash');
|
|
56
|
-
|
|
57
|
-
const startupNow = new Date();
|
|
58
|
-
const startupTime = startupNow.toLocaleString('th-TH', {
|
|
59
|
-
day: '2-digit', month: '2-digit', year: 'numeric',
|
|
60
|
-
hour: '2-digit', minute: '2-digit', hour12: false
|
|
61
|
-
}).replace(',', '');
|
|
62
|
-
console.log(`${colors.mint}[Mint] v${pkg.version} | ${startupTime} | Active AI: ${startupProvider} • ${startupModel}${colors.reset}`);
|
|
63
|
-
|
|
64
|
-
process.once('SIGINT', () => exitWithGoodbye(0));
|
|
65
|
-
|
|
66
|
-
// ── Commander program ────────────────────────────────────────────────────────
|
|
67
|
-
const program = new Command();
|
|
68
|
-
|
|
69
|
-
program
|
|
70
|
-
.name('mint')
|
|
71
|
-
.description('Mint - Your Personal AI Assistant CLI')
|
|
72
|
-
.version(pkg.version);
|
|
73
|
-
|
|
74
|
-
// Auto-update hook
|
|
75
|
-
program.hook('preAction', async (thisCommand, actionCommand) => {
|
|
76
|
-
if (actionCommand.name() === 'update' || process.env.MINT_SKIP_AUTO_UPDATE === '1') return;
|
|
77
|
-
const config = readConfig();
|
|
78
|
-
if (config.enableAutoUpdate === false || !shouldRunAutoUpdate(config)) return;
|
|
79
|
-
console.log(`${colors.gray}[Mint Update] Checking for updates...${colors.reset}`);
|
|
80
|
-
const result = await runStartupAutoUpdate(config, writeConfig);
|
|
81
|
-
if (result.status === 'updated') {
|
|
82
|
-
console.log(`${colors.mint}[Mint Update] ${result.message}${colors.reset}`);
|
|
83
|
-
} else if (result.status === 'error') {
|
|
84
|
-
console.log(`${colors.gray}[Mint Update] ${result.message}${colors.reset}`);
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
// ── Commands ─────────────────────────────────────────────────────────────────
|
|
89
|
-
|
|
90
|
-
program
|
|
91
|
-
.command('chat', { isDefault: true })
|
|
92
|
-
.description('Start interactive chat session with Mint')
|
|
93
|
-
.argument('[message]', 'Initial message to send to Mint')
|
|
94
|
-
.option('-i, --image <path>', 'Attach an image file to the initial message')
|
|
95
|
-
.action(async (message, options) => {
|
|
96
|
-
await startInteractiveChat(message, { imagePath: options.image });
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
program
|
|
100
|
-
.command('onboard')
|
|
101
|
-
.description('Setup Mint for the first time')
|
|
102
|
-
.option('--install-daemon', 'Automatically install systemd background agent')
|
|
103
|
-
.action(async (options) => {
|
|
104
|
-
await runOnboarding(options);
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
program
|
|
108
|
-
.command('agent')
|
|
109
|
-
.description('Run Mint as a background agent (headless)')
|
|
110
|
-
.argument('[initialTask]', 'Optional first task to perform immediately on startup')
|
|
111
|
-
.action(async (initialTask) => {
|
|
112
|
-
if (initialTask) {
|
|
113
|
-
const taskManager = require('./src/System/task_manager');
|
|
114
|
-
taskManager.addTask(initialTask);
|
|
115
|
-
console.log(`\n${colors.mint}${colors.bright}[Mint-Agent] Starting with initial task:${colors.reset} "${initialTask}"`);
|
|
116
|
-
}
|
|
117
|
-
await startAgent();
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
program
|
|
121
|
-
.command('list')
|
|
122
|
-
.description('Show list of Mint features and commands')
|
|
123
|
-
.action(() => displayFeatures());
|
|
124
|
-
|
|
125
|
-
program
|
|
126
|
-
.command('summarize')
|
|
127
|
-
.alias('summary')
|
|
128
|
-
.description('Summarize a repository structure, tooling, git state, and key files')
|
|
129
|
-
.argument('[path]', 'Repository path to summarize', process.cwd())
|
|
130
|
-
.option('--json', 'Print raw JSON summary')
|
|
131
|
-
.action((targetPath, options) => {
|
|
132
|
-
try {
|
|
133
|
-
const summary = summarizeRepository(targetPath);
|
|
134
|
-
if (options.json) { console.log(JSON.stringify(summary, null, 2)); return; }
|
|
135
|
-
console.log(`\n${formatRepoSummary(summary)}\n`);
|
|
136
|
-
} catch (error) {
|
|
137
|
-
console.error(`\n${colors.pink}Summarize failed:${colors.reset} ${error.message}\n`);
|
|
138
|
-
process.exitCode = 1;
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
program
|
|
143
|
-
.command('symbols')
|
|
144
|
-
.alias('symbol-index')
|
|
145
|
-
.description('Build a source symbol index for the current repository')
|
|
146
|
-
.argument('[path]', 'Repository path to index', process.cwd())
|
|
147
|
-
.option('--json', 'Print raw JSON symbol index')
|
|
148
|
-
.option('--limit <count>', 'Limit formatted symbols shown', value => Number(value), 80)
|
|
149
|
-
.action((targetPath, options) => {
|
|
150
|
-
try {
|
|
151
|
-
const index = buildSymbolIndex(targetPath);
|
|
152
|
-
if (options.json) { console.log(JSON.stringify(index, null, 2)); return; }
|
|
153
|
-
console.log(`\n${formatSymbolIndex(index, { limit: options.limit })}\n`);
|
|
154
|
-
} catch (error) {
|
|
155
|
-
console.error(`\n${colors.pink}Symbol index failed:${colors.reset} ${error.message}\n`);
|
|
156
|
-
process.exitCode = 1;
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
|
|
160
|
-
const semanticCodeCommand = program
|
|
161
|
-
.command('semantic-code')
|
|
162
|
-
.alias('semantic')
|
|
163
|
-
.description('Index and search source code semantically with embeddings');
|
|
164
|
-
|
|
165
|
-
semanticCodeCommand
|
|
166
|
-
.command('index')
|
|
167
|
-
.description('Create embeddings for source code chunks in a repository')
|
|
168
|
-
.argument('[path]', 'Repository path to index', process.cwd())
|
|
169
|
-
.option('--json', 'Print raw JSON index metadata')
|
|
170
|
-
.action(async (targetPath, options) => {
|
|
171
|
-
try {
|
|
172
|
-
const index = await indexSemanticCode(targetPath, {
|
|
173
|
-
onProgress: (info) => {
|
|
174
|
-
if (info.current === 1 || info.current === info.total || info.current % 25 === 0) {
|
|
175
|
-
console.log(`${colors.gray}[Semantic Code] Embedded ${info.current}/${info.total}: ${info.file}${colors.reset}`);
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
if (options.json) { console.log(JSON.stringify(index, null, 2)); return; }
|
|
180
|
-
console.log(`\n${formatSemanticCodeIndex(index)}\n`);
|
|
181
|
-
} catch (error) {
|
|
182
|
-
console.error(`\n${colors.pink}Semantic code index failed:${colors.reset} ${error.message}\n`);
|
|
183
|
-
process.exitCode = 1;
|
|
184
|
-
}
|
|
185
|
-
});
|
|
186
|
-
|
|
187
|
-
semanticCodeCommand
|
|
188
|
-
.command('search')
|
|
189
|
-
.description('Search an existing semantic code index')
|
|
190
|
-
.argument('<query...>', 'Natural language code search query')
|
|
191
|
-
.option('--path <path>', 'Repository path to search', process.cwd())
|
|
192
|
-
.option('--json', 'Print raw JSON search results')
|
|
193
|
-
.option('--top-k <count>', 'Number of results to return', value => Number(value), 5)
|
|
194
|
-
.action(async (query, options) => {
|
|
195
|
-
try {
|
|
196
|
-
const results = await searchSemanticCode(query.join(' '), options.path, { topK: options.topK });
|
|
197
|
-
if (options.json) { console.log(JSON.stringify(results, null, 2)); return; }
|
|
198
|
-
console.log(`\n${formatSemanticCodeSearch(results)}\n`);
|
|
199
|
-
} catch (error) {
|
|
200
|
-
console.error(`\n${colors.pink}Semantic code search failed:${colors.reset} ${error.message}\n`);
|
|
201
|
-
process.exitCode = 1;
|
|
202
|
-
}
|
|
203
|
-
});
|
|
204
|
-
|
|
205
|
-
program
|
|
206
|
-
.command('learn')
|
|
207
|
-
.description('Read a local markdown/text file and remember it as a Mint skill')
|
|
208
|
-
.argument('[filePath]', 'Path to a .md or .txt skill/instruction file')
|
|
209
|
-
.option('--delete <idOrPathOrName>', 'Delete a learned skill by id, path, or name')
|
|
210
|
-
.option('--list', 'List learned skills')
|
|
211
|
-
.action((filePath, options) => {
|
|
212
|
-
try {
|
|
213
|
-
if (options.list) {
|
|
214
|
-
const skills = memoryStore.getLearnedSkills(50);
|
|
215
|
-
if (skills.length === 0) { console.log(`\n${colors.gray}No learned skills stored.${colors.reset}\n`); return; }
|
|
216
|
-
console.log(`\n${colors.bright}Learned Skills:${colors.reset}`);
|
|
217
|
-
skills.forEach(skill => {
|
|
218
|
-
console.log(`${colors.mint}#${skill.id}${colors.reset} ${skill.name}`);
|
|
219
|
-
console.log(` ${colors.gray}${skill.source_path}${colors.reset}`);
|
|
220
|
-
});
|
|
221
|
-
console.log('');
|
|
222
|
-
return;
|
|
223
|
-
}
|
|
224
|
-
if (options.delete) {
|
|
225
|
-
const deleted = memoryStore.deleteLearnedSkill(options.delete);
|
|
226
|
-
if (deleted > 0) {
|
|
227
|
-
console.log(`\n${colors.mint}✓${colors.reset} Deleted learned skill: ${options.delete}\n`);
|
|
228
|
-
} else {
|
|
229
|
-
console.log(`\n${colors.pink}✗${colors.reset} Learned skill not found: ${options.delete}\n`);
|
|
230
|
-
process.exitCode = 1;
|
|
231
|
-
}
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
|
-
if (!filePath) throw new Error('Usage: mint learn <path-to-skill.md>');
|
|
235
|
-
|
|
236
|
-
const learned = learnSkillFile(filePath);
|
|
237
|
-
console.log(`\n${colors.mint}✓${colors.reset} Learned skill: ${learned.name}`);
|
|
238
|
-
console.log(`${colors.gray}Path: ${learned.source_path}${colors.reset}`);
|
|
239
|
-
if (learned.stored_length < learned.content_length) {
|
|
240
|
-
console.log(`${colors.gray}Stored first ${learned.stored_length} of ${learned.content_length} characters.${colors.reset}`);
|
|
241
|
-
}
|
|
242
|
-
console.log('');
|
|
243
|
-
} catch (error) {
|
|
244
|
-
console.error(`\n${colors.pink}Learn failed:${colors.reset} ${error.message}\n`);
|
|
245
|
-
process.exitCode = 1;
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
program
|
|
250
|
-
.command('task')
|
|
251
|
-
.description('Delegate a complex task to the background agent')
|
|
252
|
-
.argument('<description>', 'Description of the task for Mint to perform autonomously')
|
|
253
|
-
.action(async (description) => {
|
|
254
|
-
const taskManager = require('./src/System/task_manager');
|
|
255
|
-
const task = taskManager.addTask(description);
|
|
256
|
-
console.log(`\n${colors.mint}${colors.bright}Task Received!${colors.reset}`);
|
|
257
|
-
console.log(`${colors.gray}Task ID: ${task.id}${colors.reset}`);
|
|
258
|
-
console.log(`"${description}"`);
|
|
259
|
-
console.log(`\n${colors.cyan}Mint Agent is starting to work on this in the background.${colors.reset}`);
|
|
260
|
-
console.log(`${colors.gray}You will receive a notification when it's done.${colors.reset}\n`);
|
|
261
|
-
});
|
|
262
|
-
|
|
263
|
-
program
|
|
264
|
-
.command('update')
|
|
265
|
-
.description('Check for and install the latest Mint CLI version from npm')
|
|
266
|
-
.option('--check', 'Only check whether an update is available')
|
|
267
|
-
.option('--dry-run', 'Show the npm update operation without installing')
|
|
268
|
-
.action(async (options) => {
|
|
269
|
-
console.log(`\n${colors.mint}${colors.bright}[Mint Update]${colors.reset} Checking npm for updates...`);
|
|
270
|
-
try {
|
|
271
|
-
const result = await runUpdate({
|
|
272
|
-
checkOnly: options.check === true,
|
|
273
|
-
dryRun: options.dryRun === true
|
|
274
|
-
});
|
|
275
|
-
const color = result.status === 'error' ? colors.pink : colors.mint;
|
|
276
|
-
console.log(`${color}${result.message}${colors.reset}\n`);
|
|
277
|
-
if (result.status === 'error') process.exitCode = 1;
|
|
278
|
-
} catch (error) {
|
|
279
|
-
console.error(`${colors.pink}Update failed: ${error.message}${colors.reset}\n`);
|
|
280
|
-
process.exitCode = 1;
|
|
281
|
-
}
|
|
282
|
-
});
|
|
283
|
-
|
|
284
|
-
program
|
|
285
|
-
.command('mcp')
|
|
286
|
-
.description('Manage MCP (Model Context Protocol) servers')
|
|
287
|
-
.addCommand(new Command('add')
|
|
288
|
-
.description('Add a new MCP server')
|
|
289
|
-
.argument('<name>', 'Server name')
|
|
290
|
-
.argument('<command>', 'Command to run (e.g. npx)')
|
|
291
|
-
.option('-a, --args <args...>', 'Command arguments')
|
|
292
|
-
.option('-e, --env <env...>', 'Environment variables (KEY=VALUE)')
|
|
293
|
-
.action((name, command, options) => {
|
|
294
|
-
const config = readConfig();
|
|
295
|
-
const mcpServers = config.mcpServers || {};
|
|
296
|
-
const env = {};
|
|
297
|
-
if (options.env) {
|
|
298
|
-
options.env.forEach(kv => {
|
|
299
|
-
const [k, v] = kv.split('=');
|
|
300
|
-
if (k && v) env[k] = v;
|
|
301
|
-
});
|
|
302
|
-
}
|
|
303
|
-
mcpServers[name] = { command, args: options.args || [], env };
|
|
304
|
-
config.mcpServers = mcpServers;
|
|
305
|
-
writeConfig(config);
|
|
306
|
-
console.log(`\n${colors.mint}✓${colors.reset} MCP server "${name}" added successfully.`);
|
|
307
|
-
})
|
|
308
|
-
)
|
|
309
|
-
.addCommand(new Command('remove')
|
|
310
|
-
.description('Remove an MCP server')
|
|
311
|
-
.argument('<name>', 'Server name')
|
|
312
|
-
.action((name) => {
|
|
313
|
-
const config = readConfig();
|
|
314
|
-
if (config.mcpServers && config.mcpServers[name]) {
|
|
315
|
-
delete config.mcpServers[name];
|
|
316
|
-
writeConfig(config);
|
|
317
|
-
console.log(`\n${colors.mint}✓${colors.reset} MCP server "${name}" removed.`);
|
|
318
|
-
} else {
|
|
319
|
-
console.log(`\n${colors.pink}✗${colors.reset} MCP server "${name}" not found.`);
|
|
320
|
-
}
|
|
321
|
-
})
|
|
322
|
-
)
|
|
323
|
-
.addCommand(new Command('list')
|
|
324
|
-
.description('List configured MCP servers')
|
|
325
|
-
.action(() => {
|
|
326
|
-
const config = readConfig();
|
|
327
|
-
const servers = Object.keys(config.mcpServers || {});
|
|
328
|
-
if (servers.length === 0) {
|
|
329
|
-
console.log(`\n${colors.gray}No MCP servers configured.${colors.reset}`);
|
|
330
|
-
} else {
|
|
331
|
-
console.log(`\n${colors.bright}Configured MCP Servers:${colors.reset}`);
|
|
332
|
-
servers.forEach(name => {
|
|
333
|
-
const s = config.mcpServers[name];
|
|
334
|
-
console.log(`${colors.mint}• ${colors.bright}${name}${colors.reset}`);
|
|
335
|
-
console.log(` ${colors.gray}Command:${colors.reset} ${s.command} ${(s.args || []).join(' ')}`);
|
|
336
|
-
});
|
|
337
|
-
}
|
|
338
|
-
})
|
|
339
|
-
)
|
|
340
|
-
.addCommand(new Command('clear')
|
|
341
|
-
.description('Remove all MCP servers')
|
|
342
|
-
.action(() => {
|
|
343
|
-
const config = readConfig();
|
|
344
|
-
config.mcpServers = {};
|
|
345
|
-
writeConfig(config);
|
|
346
|
-
console.log(`\n${colors.mint}✓${colors.reset} All MCP servers cleared.`);
|
|
347
|
-
})
|
|
348
|
-
);
|
|
349
|
-
|
|
350
|
-
program
|
|
351
|
-
.command('gmail')
|
|
352
|
-
.description('Manage Gmail integration')
|
|
353
|
-
.addCommand(new Command('auth')
|
|
354
|
-
.description('Open Google OAuth login and save a Gmail refresh token')
|
|
355
|
-
.option('--port <port>', 'Local callback port, defaults to a random available port')
|
|
356
|
-
.option('--no-open', 'Print the auth link without opening a browser')
|
|
357
|
-
.action(async (options) => {
|
|
358
|
-
try {
|
|
359
|
-
const result = await runGmailAuth({
|
|
360
|
-
port: options.port ? Number(options.port) : 0,
|
|
361
|
-
openBrowser: options.open,
|
|
362
|
-
logger: console
|
|
363
|
-
});
|
|
364
|
-
console.log(`\n${colors.mint}✓${colors.reset} Gmail connected for ${result.userId}. Refresh token saved.`);
|
|
365
|
-
console.log(`${colors.gray}Scopes: ${result.scopes.join(', ')}${colors.reset}\n`);
|
|
366
|
-
} catch (error) {
|
|
367
|
-
console.error(`\n${colors.pink}Gmail auth failed:${colors.reset} ${error.message}\n`);
|
|
368
|
-
process.exitCode = 1;
|
|
369
|
-
}
|
|
370
|
-
})
|
|
371
|
-
);
|
|
372
|
-
|
|
373
|
-
program
|
|
374
|
-
.command('code')
|
|
375
|
-
.description('Run Mint in workspace-aware coding mode for the current project')
|
|
376
|
-
.argument('<task>', 'Coding task to execute in the current working directory')
|
|
377
|
-
.option('-i, --image <path>', 'Attach an image file as context for the coding task')
|
|
378
|
-
.action(async (task, options) => {
|
|
379
|
-
console.log(`\n${colors.mint}${colors.bright}[Mint Code]${colors.reset} Workspace: ${process.cwd()}`);
|
|
380
|
-
try {
|
|
381
|
-
let image = null;
|
|
382
|
-
if (options.image) {
|
|
383
|
-
image = loadImageAsDataUri(options.image);
|
|
384
|
-
console.log(`${colors.gray}[Mint Code] Image: ${image.path}${colors.reset}`);
|
|
385
|
-
}
|
|
386
|
-
console.log(`${colors.gray}[Mint Code] Task: ${task}${colors.reset}\n`);
|
|
387
|
-
|
|
388
|
-
const result = await executeCodeTask(task, {
|
|
389
|
-
cwd: process.cwd(),
|
|
390
|
-
imageDataUri: image ? image.dataUri : null,
|
|
391
|
-
imagePath: image ? image.path : null,
|
|
392
|
-
onProgress: (info) => console.log(formatProgress(info)),
|
|
393
|
-
requestApproval: requestCodeApproval
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
console.log(`\n${colors.mint}${colors.bright}Summary${colors.reset}`);
|
|
397
|
-
console.log(result.summary);
|
|
398
|
-
console.log(`\n${colors.cyan}Verification:${colors.reset} ${result.verification}`);
|
|
399
|
-
console.log(`${colors.gray}Completed in ${result.steps} step(s).${colors.reset}\n`);
|
|
400
|
-
} catch (error) {
|
|
401
|
-
console.error(`\n${colors.pink}[Mint Code Error]${colors.reset} ${error.message}\n`);
|
|
402
|
-
process.exitCode = 1;
|
|
403
|
-
}
|
|
404
|
-
});
|
|
405
|
-
|
|
406
|
-
// ── Parse ────────────────────────────────────────────────────────────────────
|
|
407
|
-
program.parseAsync(process.argv).catch((error) => {
|
|
408
|
-
console.error(`${colors.pink}${error.message}${colors.reset}`);
|
|
409
|
-
process.exitCode = 1;
|
|
410
|
-
});
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"Version": 3,
|
|
3
|
-
"FileReferences": {
|
|
4
|
-
"Moc": "面饼0.moc3",
|
|
5
|
-
"Textures": [
|
|
6
|
-
"面饼0.4096/texture_00.png",
|
|
7
|
-
"面饼0.4096/texture_01.png",
|
|
8
|
-
"面饼0.4096/texture_02.png",
|
|
9
|
-
"面饼0.4096/texture_03.png"
|
|
10
|
-
],
|
|
11
|
-
"Physics": "面饼0.physics3.json",
|
|
12
|
-
"DisplayInfo": "面饼0.cdi3.json"
|
|
13
|
-
},
|
|
14
|
-
"Groups": [
|
|
15
|
-
{
|
|
16
|
-
"Target": "Parameter",
|
|
17
|
-
"Name": "EyeBlink",
|
|
18
|
-
"Ids": ["ParamEyeLOpen", "ParamEyeROpen"]
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"Target": "Parameter",
|
|
22
|
-
"Name": "LipSync",
|
|
23
|
-
"Ids": ["ParamMouthOpenY"]
|
|
24
|
-
}
|
|
25
|
-
],
|
|
26
|
-
"FileReferences": {
|
|
27
|
-
"Moc": "面饼0.moc3",
|
|
28
|
-
"Textures": [
|
|
29
|
-
"面饼0.4096/texture_00.png",
|
|
30
|
-
"面饼0.4096/texture_01.png",
|
|
31
|
-
"面饼0.4096/texture_02.png",
|
|
32
|
-
"面饼0.4096/texture_03.png"
|
|
33
|
-
],
|
|
34
|
-
"Physics": "面饼0.physics3.json",
|
|
35
|
-
"DisplayInfo": "面饼0.cdi3.json",
|
|
36
|
-
"Expressions": [
|
|
37
|
-
{ "Name": "Apron", "File": "围裙.exp3.json" },
|
|
38
|
-
{ "Name": "Dazed", "File": "呆猫.exp3.json" },
|
|
39
|
-
{ "Name": "Photo", "File": "拍照.exp3.json" },
|
|
40
|
-
{ "Name": "Glasses", "File": "眼镜.exp3.json" },
|
|
41
|
-
{ "Name": "Pen", "File": "拿笔.exp3.json" },
|
|
42
|
-
{ "Name": "Click", "File": "点一下.exp3.json" },
|
|
43
|
-
{ "Name": "CatFilter", "File": "猫咪滤镜.exp3.json" },
|
|
44
|
-
{ "Name": "DazedEyes", "File": "呆猫眼珠摇晃.exp3.json" }
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
免费模型、免费发布,禁止转手、倒卖、免费模型、免费发布,禁止转手、倒卖、免费模型、免费发布,禁止转手、倒卖、
|
|
2
|
-
|
|
3
|
-
本模型开放直播收益权利 可以通过直播营业收礼物舰长盈利 可以二创 可以以次形象约稿作为粉丝回馈or舰长礼物
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
*注意:本形象已注册版权 如过渡期间使用本模型的在制作属于私人的新形象时不可参考本模型立绘的设计 否则将追究其责任*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
唯一发布渠道为哔哩哔哩账号:神宫凉子 发布者账号UID:13737731
|
|
11
|
-
唯一发布渠道为哔哩哔哩账号:神宫凉子 发布者账号UID:13737731
|
|
12
|
-
唯一发布渠道为哔哩哔哩账号:神宫凉子 发布者账号UID:13737731
|
|
13
|
-
唯一发布渠道为哔哩哔哩账号:神宫凉子 发布者账号UID:13737731
|
|
14
|
-
|
|
15
|
-
【简单使用流程】
|
|
16
|
-
|
|
17
|
-
1、通过链接下载压缩包
|
|
18
|
-
|
|
19
|
-
2、根据自己使用的软件(vts),选择相应模型文件,不同模型文件都经过简单配置,打开即用
|
|
20
|
-
|
|
21
|
-
3、把模型导入面捕软件,开启面捕即可使用
|
|
22
|
-
|
|
23
|
-
4、直播推流与面捕软件的具体使用方法,可在b站自行搜索
|
package/preload-picker.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const { contextBridge, ipcRenderer } = require('electron');
|
|
2
|
-
|
|
3
|
-
contextBridge.exposeInMainWorld('electronPicker', {
|
|
4
|
-
onScreenshot: (callback) => ipcRenderer.on('screenshot-data', (_, data) => callback(data)),
|
|
5
|
-
sendSelection: (base64Image) => ipcRenderer.send('vision-selection', base64Image),
|
|
6
|
-
startContinuousTranslation: (rect) => ipcRenderer.send('vision-translate-start', rect),
|
|
7
|
-
stopContinuousTranslation: () => ipcRenderer.send('vision-translate-stop'),
|
|
8
|
-
onTranslationResult: (callback) => ipcRenderer.on('vision-translate-result', (_, text) => callback(text)),
|
|
9
|
-
closePicker: () => ipcRenderer.send('vision-cancel'),
|
|
10
|
-
setOverlayInteractable: (isInteractable) => ipcRenderer.send('vision-overlay-interactable', isInteractable)
|
|
11
|
-
});
|
package/preload-settings.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const { contextBridge, ipcRenderer } = require('electron');
|
|
2
|
-
|
|
3
|
-
contextBridge.exposeInMainWorld('settingsApi', {
|
|
4
|
-
getSettings: () => ipcRenderer.invoke('get-settings'),
|
|
5
|
-
saveSettings: (config) => ipcRenderer.invoke('save-settings', config),
|
|
6
|
-
closeSettings: () => ipcRenderer.send('close-settings'),
|
|
7
|
-
quitApp: () => ipcRenderer.send('quit-app'),
|
|
8
|
-
openExternal: (url) => ipcRenderer.invoke('open-external', url),
|
|
9
|
-
openCustomWorkflows: () => ipcRenderer.invoke('open-custom-workflows'),
|
|
10
|
-
reloadCustomWorkflows: () => ipcRenderer.invoke('reload-custom-workflows'),
|
|
11
|
-
});
|
package/preload.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
const { contextBridge, ipcRenderer } = require('electron');
|
|
2
|
-
|
|
3
|
-
contextBridge.exposeInMainWorld('api', {
|
|
4
|
-
sendMessage: (message, base64Image, base64Audio) => ipcRenderer.invoke('chat-message', message, base64Image, base64Audio),
|
|
5
|
-
closeWindow: () => ipcRenderer.send('close-window'),
|
|
6
|
-
minimizeWindow: () => ipcRenderer.send('minimize-window'),
|
|
7
|
-
quitApp: () => ipcRenderer.send('quit-app'),
|
|
8
|
-
maximizeWindow: () => ipcRenderer.send('maximize-window'),
|
|
9
|
-
resetChat: () => ipcRenderer.invoke('reset-chat'),
|
|
10
|
-
getChatHistory: () => ipcRenderer.invoke('get-chat-history'),
|
|
11
|
-
listSavedPictures: () => ipcRenderer.invoke('list-saved-pictures'),
|
|
12
|
-
openSettings: () => ipcRenderer.invoke('open-settings'),
|
|
13
|
-
// Clipboard
|
|
14
|
-
readClipboard: () => ipcRenderer.invoke('clipboard-read'),
|
|
15
|
-
writeClipboard: (text) => ipcRenderer.invoke('clipboard-write', text),
|
|
16
|
-
// System Info
|
|
17
|
-
getSystemInfo: () => ipcRenderer.invoke('get-system-info'),
|
|
18
|
-
getWeather: (city) => ipcRenderer.invoke('get-weather', city),
|
|
19
|
-
// Settings
|
|
20
|
-
getSettings: () => ipcRenderer.invoke('get-settings'),
|
|
21
|
-
saveSettings: (config) => ipcRenderer.invoke('save-settings', config),
|
|
22
|
-
// Listen for settings changes from other window
|
|
23
|
-
onSettingsChanged: (callback) => ipcRenderer.on('settings-changed', (event, data) => callback(data)),
|
|
24
|
-
// Vision
|
|
25
|
-
startVision: () => ipcRenderer.invoke('start-screen-capture'),
|
|
26
|
-
onVisionReady: (callback) => ipcRenderer.on('vision-ready', (event, data) => callback(data)),
|
|
27
|
-
captureSilentScreen: () => ipcRenderer.invoke('capture-silent-screen'),
|
|
28
|
-
getSmartContext: () => ipcRenderer.invoke('get-smart-context'),
|
|
29
|
-
// Proactive Assistant
|
|
30
|
-
onProactiveSuggestion: (callback) => ipcRenderer.on('proactive-suggestion', (event, data) => callback(data)),
|
|
31
|
-
onProactiveNotification: (callback) => ipcRenderer.on('proactive-notification', (event, data) => callback(data)),
|
|
32
|
-
toggleProactive: (isOn) => ipcRenderer.send('toggle-proactive', isOn),
|
|
33
|
-
recordBehavior: (context) => ipcRenderer.send('record-behavior', context),
|
|
34
|
-
executeProactiveAction: (action) => ipcRenderer.invoke('execute-proactive-action', action),
|
|
35
|
-
executeApprovedAction: (action) => ipcRenderer.invoke('execute-approved-action', action),
|
|
36
|
-
onSpotlightToChat: (callback) => ipcRenderer.on('spotlight-to-chat', (_event, query) => callback(query)),
|
|
37
|
-
notifyAiResponse: () => ipcRenderer.send('ai-notify'),
|
|
38
|
-
clearAiNotifications: () => ipcRenderer.send('ai-notify-clear'),
|
|
39
|
-
getTtsUrls: (text) => ipcRenderer.invoke('get-tts-urls', text),
|
|
40
|
-
setAiState: (state) => ipcRenderer.send('set-ai-state', state)
|
|
41
|
-
});
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const os = require('os');
|
|
5
|
-
const path = require('path');
|
|
6
|
-
|
|
7
|
-
if (process.platform !== 'linux') {
|
|
8
|
-
console.log('Desktop entry installation is only needed on Linux.');
|
|
9
|
-
process.exit(0);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const projectRoot = path.resolve(__dirname, '..');
|
|
13
|
-
const home = os.homedir();
|
|
14
|
-
const iconSource = path.join(projectRoot, 'assets', 'icon.png');
|
|
15
|
-
const iconTargets = [16, 24, 32, 48, 64, 128, 256, 512].map(size =>
|
|
16
|
-
path.join(home, '.local', 'share', 'icons', 'hicolor', `${size}x${size}`, 'apps', 'mint-ai.png')
|
|
17
|
-
);
|
|
18
|
-
const desktopTarget = path.join(home, '.local', 'share', 'applications', 'mint-ai.desktop');
|
|
19
|
-
|
|
20
|
-
if (!fs.existsSync(iconSource)) {
|
|
21
|
-
throw new Error(`Missing icon: ${iconSource}`);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
fs.mkdirSync(path.dirname(desktopTarget), { recursive: true });
|
|
25
|
-
for (const iconTarget of iconTargets) {
|
|
26
|
-
fs.mkdirSync(path.dirname(iconTarget), { recursive: true });
|
|
27
|
-
fs.copyFileSync(iconSource, iconTarget);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
const desktopEntry = [
|
|
31
|
-
'[Desktop Entry]',
|
|
32
|
-
'Type=Application',
|
|
33
|
-
'Name=Mint',
|
|
34
|
-
'Comment=Mint AI desktop assistant',
|
|
35
|
-
`Exec=${process.execPath} ${path.join(projectRoot, 'node_modules', 'electron', 'cli.js')} ${projectRoot}`,
|
|
36
|
-
'Icon=mint-ai',
|
|
37
|
-
'Terminal=false',
|
|
38
|
-
'Categories=Utility;',
|
|
39
|
-
'StartupNotify=true',
|
|
40
|
-
'StartupWMClass=Mint',
|
|
41
|
-
''
|
|
42
|
-
].join('\n');
|
|
43
|
-
|
|
44
|
-
fs.writeFileSync(desktopTarget, desktopEntry, 'utf8');
|
|
45
|
-
fs.chmodSync(desktopTarget, 0o755);
|
|
46
|
-
|
|
47
|
-
console.log(`Installed ${desktopTarget}`);
|
|
48
|
-
console.log(`Installed ${iconTargets.length} icon sizes as mint-ai`);
|