@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
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
--accent: #10b981;
|
|
3
|
+
--accent-glow: rgba(16, 185, 129, 0.6);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
7
|
+
|
|
8
|
+
body {
|
|
9
|
+
background: transparent;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
align-items: center;
|
|
14
|
+
height: 100vh;
|
|
15
|
+
font-family: 'Outfit', sans-serif;
|
|
16
|
+
user-select: none;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.drag-region {
|
|
20
|
+
-webkit-app-region: drag;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
#widget-container {
|
|
24
|
+
position: relative;
|
|
25
|
+
width: 100px;
|
|
26
|
+
height: 100px;
|
|
27
|
+
display: flex;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
align-items: center;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.aura-container {
|
|
34
|
+
position: absolute;
|
|
35
|
+
width: 80px;
|
|
36
|
+
height: 80px;
|
|
37
|
+
display: flex;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
align-items: center;
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
z-index: 0;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.aura {
|
|
45
|
+
width: 60px;
|
|
46
|
+
height: 60px;
|
|
47
|
+
border-radius: 50%;
|
|
48
|
+
filter: blur(8px);
|
|
49
|
+
opacity: 0;
|
|
50
|
+
transition: opacity 0.25s ease, transform 0.25s ease;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.character-body {
|
|
54
|
+
width: 50px;
|
|
55
|
+
height: 50px;
|
|
56
|
+
background: linear-gradient(135deg, #1e293b, #0f172a);
|
|
57
|
+
border: 2px solid var(--accent);
|
|
58
|
+
border-radius: 50%;
|
|
59
|
+
box-shadow: 0 0 15px var(--accent-glow);
|
|
60
|
+
display: flex;
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
align-items: center;
|
|
64
|
+
position: relative;
|
|
65
|
+
transition: all 0.3s ease;
|
|
66
|
+
-webkit-app-region: drag;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.eyes {
|
|
70
|
+
display: flex;
|
|
71
|
+
gap: 8px;
|
|
72
|
+
margin-bottom: 4px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.eye {
|
|
76
|
+
width: 8px;
|
|
77
|
+
height: 8px;
|
|
78
|
+
background: var(--accent);
|
|
79
|
+
border-radius: 50%;
|
|
80
|
+
transition: height 0.2s, background 0.3s;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.mouth {
|
|
84
|
+
width: 12px;
|
|
85
|
+
height: 4px;
|
|
86
|
+
background: var(--accent);
|
|
87
|
+
border-radius: 4px;
|
|
88
|
+
transition: all 0.2s;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.status-badge {
|
|
92
|
+
position: absolute;
|
|
93
|
+
bottom: -15px;
|
|
94
|
+
background: rgba(0, 0, 0, 0.7);
|
|
95
|
+
color: white;
|
|
96
|
+
font-size: 0.65rem;
|
|
97
|
+
padding: 2px 6px;
|
|
98
|
+
border-radius: 8px;
|
|
99
|
+
opacity: 0;
|
|
100
|
+
transition: opacity 0.3s;
|
|
101
|
+
pointer-events: none;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
#widget-container:hover .status-badge {
|
|
105
|
+
opacity: 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* States */
|
|
109
|
+
.state-idle .eye {
|
|
110
|
+
animation: blink 4s infinite;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.state-listening .character-body {
|
|
114
|
+
box-shadow: 0 0 25px rgba(6, 182, 212, 0.8);
|
|
115
|
+
border-color: #06b6d4;
|
|
116
|
+
transform: scale(1.1);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.state-listening .aura {
|
|
120
|
+
opacity: 0.55;
|
|
121
|
+
background: radial-gradient(circle, #06b6d4, transparent);
|
|
122
|
+
transform: scale(1.25);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.state-listening .eye {
|
|
126
|
+
background: #06b6d4;
|
|
127
|
+
height: 10px;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.state-listening .mouth {
|
|
131
|
+
background: #06b6d4;
|
|
132
|
+
width: 16px;
|
|
133
|
+
height: 6px;
|
|
134
|
+
border-radius: 50%;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.state-thinking .character-body {
|
|
138
|
+
box-shadow: 0 0 20px rgba(245, 158, 11, 0.8);
|
|
139
|
+
border-color: #f59e0b;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.state-thinking .aura {
|
|
143
|
+
opacity: 0.5;
|
|
144
|
+
background: radial-gradient(circle, #f59e0b, transparent);
|
|
145
|
+
transform: scale(1.18);
|
|
146
|
+
border: 2px dashed rgba(245, 158, 11, 0.3);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.state-thinking .eye {
|
|
150
|
+
background: #f59e0b;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.state-thinking .mouth {
|
|
154
|
+
background: #f59e0b;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.state-speaking .character-body {
|
|
158
|
+
box-shadow: 0 0 20px rgba(16, 185, 129, 0.8);
|
|
159
|
+
border-color: #10b981;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.state-speaking .aura {
|
|
163
|
+
opacity: 0.48;
|
|
164
|
+
background: radial-gradient(circle, #10b981, transparent);
|
|
165
|
+
transform: scale(1.2);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.state-speaking .eye {
|
|
169
|
+
background: #10b981;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.state-speaking .mouth {
|
|
173
|
+
background: #10b981;
|
|
174
|
+
animation: speak 0.3s infinite alternate;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@keyframes blink {
|
|
178
|
+
0%, 96%, 100% { height: 8px; }
|
|
179
|
+
98% { height: 2px; }
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
@keyframes speak {
|
|
183
|
+
0% { width: 8px; height: 4px; }
|
|
184
|
+
100% { width: 14px; height: 10px; border-radius: 50%; }
|
|
185
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
declare module '*.css';
|
|
2
|
+
declare module '*.svg?url';
|
|
3
|
+
|
|
4
|
+
type Unlisten = () => void;
|
|
5
|
+
|
|
6
|
+
interface Window {
|
|
7
|
+
SpeechRecognition?: SpeechRecognitionConstructor;
|
|
8
|
+
webkitSpeechRecognition?: SpeechRecognitionConstructor;
|
|
9
|
+
api: {
|
|
10
|
+
sendMessage: (message: string, base64Image?: string | null, base64Audio?: string | null, documentAttachment?: { filename: string; dataUri: string } | null) => Promise<any>;
|
|
11
|
+
closeWindow: () => void;
|
|
12
|
+
minimizeWindow: () => void;
|
|
13
|
+
quitApp: () => void;
|
|
14
|
+
maximizeWindow: () => void;
|
|
15
|
+
resetChat: () => Promise<any>;
|
|
16
|
+
getChatHistory: () => Promise<any>;
|
|
17
|
+
listSavedPictures: () => Promise<any>;
|
|
18
|
+
openSettings: () => Promise<any>;
|
|
19
|
+
readClipboard: () => Promise<string>;
|
|
20
|
+
writeClipboard: (text: string) => Promise<void>;
|
|
21
|
+
getSystemInfo: () => Promise<any>;
|
|
22
|
+
getWeather: (city: string) => Promise<any>;
|
|
23
|
+
getSettings: () => Promise<any>;
|
|
24
|
+
saveSettings: (config: any) => Promise<any>;
|
|
25
|
+
onSettingsChanged: (callback: (data: any) => void) => Promise<void>;
|
|
26
|
+
startVision: () => Promise<any>;
|
|
27
|
+
onVisionReady: (callback: (data: string) => void) => Promise<Unlisten>;
|
|
28
|
+
captureSilentScreen: () => Promise<string | null>;
|
|
29
|
+
getSmartContext: () => Promise<any>;
|
|
30
|
+
onProactiveSuggestion: (callback: (data: any) => void) => Promise<Unlisten>;
|
|
31
|
+
onProactiveNotification: (callback: (data: any) => void) => Promise<Unlisten>;
|
|
32
|
+
toggleProactive: (isOn: boolean) => void;
|
|
33
|
+
recordBehavior: (context: any) => void;
|
|
34
|
+
executeProactiveAction: (action: any) => Promise<any>;
|
|
35
|
+
executeApprovedAction: (action: any) => Promise<any>;
|
|
36
|
+
onSpotlightToChat: (callback: (query: string) => void) => Promise<Unlisten>;
|
|
37
|
+
notifyAiResponse: () => void;
|
|
38
|
+
clearAiNotifications: () => void;
|
|
39
|
+
getTtsUrls: (text: string) => Promise<Array<{ shortText: string; url: string }>>;
|
|
40
|
+
setAiState: (state: string) => void;
|
|
41
|
+
};
|
|
42
|
+
settingsApi: {
|
|
43
|
+
getSettings: () => Promise<any>;
|
|
44
|
+
getUpdaterStatus: () => Promise<any>;
|
|
45
|
+
checkForUpdates: () => Promise<any>;
|
|
46
|
+
installAvailableUpdate: () => Promise<any>;
|
|
47
|
+
saveSettings: (config: any) => Promise<any>;
|
|
48
|
+
closeSettings: () => void;
|
|
49
|
+
quitApp: () => void;
|
|
50
|
+
openExternal: (url: string) => Promise<void>;
|
|
51
|
+
openFolder: (path: string) => Promise<void>;
|
|
52
|
+
openCustomWorkflows: () => Promise<any>;
|
|
53
|
+
reloadCustomWorkflows: () => Promise<any>;
|
|
54
|
+
};
|
|
55
|
+
spotlightAPI: {
|
|
56
|
+
submit: (query: string) => void;
|
|
57
|
+
executeAction: (action: any) => Promise<any>;
|
|
58
|
+
close: () => void;
|
|
59
|
+
hide: () => void;
|
|
60
|
+
resize: (width: number, height: number) => void;
|
|
61
|
+
getSettings: () => Promise<any>;
|
|
62
|
+
onSettingsChanged: (callback: (config: any) => void) => Promise<void>;
|
|
63
|
+
};
|
|
64
|
+
screenPickerApi: {
|
|
65
|
+
onScreenshot: (callback: (data: string) => void) => void;
|
|
66
|
+
sendSelection: (base64Image: string) => void;
|
|
67
|
+
startContinuousTranslation: (rect: any) => void;
|
|
68
|
+
stopContinuousTranslation: () => void;
|
|
69
|
+
onTranslationResult: (callback: (text: string) => void) => void;
|
|
70
|
+
closePicker: () => void;
|
|
71
|
+
setOverlayInteractable: (isInteractable: boolean) => void;
|
|
72
|
+
};
|
|
73
|
+
widgetAPI: {
|
|
74
|
+
onStateChange: (callback: (state: any) => void) => void;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
interface SpeechRecognition extends EventTarget {
|
|
79
|
+
lang: string;
|
|
80
|
+
interimResults: boolean;
|
|
81
|
+
continuous: boolean;
|
|
82
|
+
onstart: ((this: SpeechRecognition, ev: Event) => any) | null;
|
|
83
|
+
onresult: ((this: SpeechRecognition, ev: SpeechRecognitionEvent) => any) | null;
|
|
84
|
+
onerror: ((this: SpeechRecognition, ev: Event) => any) | null;
|
|
85
|
+
onend: ((this: SpeechRecognition, ev: Event) => any) | null;
|
|
86
|
+
start(): void;
|
|
87
|
+
stop(): void;
|
|
88
|
+
abort(): void;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface SpeechRecognitionConstructor {
|
|
92
|
+
new(): SpeechRecognition;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface SpeechRecognitionEvent extends Event {
|
|
96
|
+
readonly resultIndex: number;
|
|
97
|
+
readonly results: SpeechRecognitionResultList;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
interface SpeechRecognitionResultList {
|
|
101
|
+
readonly length: number;
|
|
102
|
+
item(index: number): SpeechRecognitionResult;
|
|
103
|
+
[index: number]: SpeechRecognitionResult;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
interface SpeechRecognitionResult {
|
|
107
|
+
readonly length: number;
|
|
108
|
+
item(index: number): SpeechRecognitionAlternative;
|
|
109
|
+
[index: number]: SpeechRecognitionAlternative;
|
|
110
|
+
readonly isFinal: boolean;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
interface SpeechRecognitionAlternative {
|
|
114
|
+
readonly transcript: string;
|
|
115
|
+
readonly confidence: number;
|
|
116
|
+
}
|
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
@import './css/styles.css';
|
|
2
|
+
@import './css/settings.css';
|
|
3
|
+
@import './css/spotlight.css';
|
|
4
|
+
@import './css/widget.css';
|
|
5
|
+
|
|
6
|
+
* {
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
body, html, #root {
|
|
11
|
+
width: 100vw;
|
|
12
|
+
height: 100vh;
|
|
13
|
+
margin: 0;
|
|
14
|
+
overflow: hidden;
|
|
15
|
+
color: #e5e7eb;
|
|
16
|
+
background: transparent;
|
|
17
|
+
font-family: Inter, ui-sans-serif, system-ui, sans-serif;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
button, textarea {
|
|
21
|
+
font: inherit;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
button {
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.mint-app {
|
|
29
|
+
display: grid;
|
|
30
|
+
grid-template-columns: 184px minmax(0, 1fr);
|
|
31
|
+
width: 100%;
|
|
32
|
+
height: 100%;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
border: 1px solid rgb(148 163 184 / 20%);
|
|
35
|
+
background: radial-gradient(circle at top left, #064e3b, #111827 52%, #0b1020);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.mint-sidebar {
|
|
39
|
+
display: flex;
|
|
40
|
+
min-width: 0;
|
|
41
|
+
flex-direction: column;
|
|
42
|
+
padding: 18px 12px;
|
|
43
|
+
border-right: 1px solid rgb(148 163 184 / 16%);
|
|
44
|
+
background: rgb(7 12 28 / 68%);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.mint-brand {
|
|
48
|
+
display: grid;
|
|
49
|
+
gap: 2px;
|
|
50
|
+
padding: 0 8px 18px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.mint-brand strong {
|
|
54
|
+
color: #a7f3d0;
|
|
55
|
+
font-size: 1.25rem;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.mint-brand span,
|
|
59
|
+
.mint-toolbar span,
|
|
60
|
+
.mint-sidebar__footer span,
|
|
61
|
+
.mint-picture span,
|
|
62
|
+
.mint-message small {
|
|
63
|
+
color: #94a3b8;
|
|
64
|
+
font-size: 0.72rem;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.mint-sidebar nav {
|
|
68
|
+
display: grid;
|
|
69
|
+
gap: 4px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.mint-sidebar button,
|
|
73
|
+
.mint-toolbar button,
|
|
74
|
+
.mint-model button,
|
|
75
|
+
.mint-attachment button,
|
|
76
|
+
.mint-composer label,
|
|
77
|
+
.mint-composer button {
|
|
78
|
+
border: 1px solid transparent;
|
|
79
|
+
border-radius: 8px;
|
|
80
|
+
background: transparent;
|
|
81
|
+
color: #cbd5e1;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.mint-sidebar button {
|
|
85
|
+
padding: 10px 9px;
|
|
86
|
+
text-align: left;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.mint-sidebar button:hover,
|
|
90
|
+
.mint-sidebar button.active,
|
|
91
|
+
.mint-toolbar button:hover {
|
|
92
|
+
border-color: rgb(52 211 153 / 28%);
|
|
93
|
+
background: rgb(16 185 129 / 18%);
|
|
94
|
+
color: #f8fafc;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.mint-sidebar__footer {
|
|
98
|
+
display: grid;
|
|
99
|
+
gap: 8px;
|
|
100
|
+
margin-top: auto;
|
|
101
|
+
padding: 10px 4px 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.mint-sidebar__footer button {
|
|
105
|
+
border-color: rgb(52 211 153 / 30%);
|
|
106
|
+
text-align: center;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.mint-workspace {
|
|
110
|
+
display: grid;
|
|
111
|
+
min-width: 0;
|
|
112
|
+
grid-template-rows: auto auto minmax(0, 1fr);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.mint-toolbar {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: space-between;
|
|
119
|
+
min-height: 58px;
|
|
120
|
+
gap: 12px;
|
|
121
|
+
padding: 10px 18px;
|
|
122
|
+
border-bottom: 1px solid rgb(148 163 184 / 15%);
|
|
123
|
+
background: rgb(15 23 42 / 48%);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.mint-toolbar div:first-child {
|
|
127
|
+
display: grid;
|
|
128
|
+
gap: 3px;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.mint-toolbar__actions {
|
|
132
|
+
display: flex;
|
|
133
|
+
gap: 6px;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.mint-toolbar button {
|
|
137
|
+
padding: 7px 10px;
|
|
138
|
+
font-size: 0.76rem;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.mint-error {
|
|
142
|
+
margin: 10px 18px 0;
|
|
143
|
+
padding: 9px 11px;
|
|
144
|
+
border: 1px solid rgb(251 113 133 / 35%);
|
|
145
|
+
border-radius: 8px;
|
|
146
|
+
background: rgb(127 29 29 / 25%);
|
|
147
|
+
color: #fecdd3;
|
|
148
|
+
font-size: 0.82rem;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.mint-chat {
|
|
152
|
+
display: grid;
|
|
153
|
+
min-height: 0;
|
|
154
|
+
grid-template-rows: minmax(0, 1fr) auto;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.mint-chat__messages,
|
|
158
|
+
.mint-pictures {
|
|
159
|
+
min-height: 0;
|
|
160
|
+
overflow: auto;
|
|
161
|
+
padding: 22px clamp(18px, 4vw, 46px);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.mint-message-group {
|
|
165
|
+
display: grid;
|
|
166
|
+
gap: 7px;
|
|
167
|
+
margin: 0 auto 16px;
|
|
168
|
+
max-width: 840px;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.mint-message {
|
|
172
|
+
width: fit-content;
|
|
173
|
+
max-width: min(82%, 720px);
|
|
174
|
+
padding: 11px 13px;
|
|
175
|
+
border: 1px solid rgb(148 163 184 / 16%);
|
|
176
|
+
border-radius: 10px;
|
|
177
|
+
color: #e2e8f0;
|
|
178
|
+
line-height: 1.5;
|
|
179
|
+
white-space: pre-wrap;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.mint-message--user {
|
|
183
|
+
justify-self: end;
|
|
184
|
+
background: rgb(16 185 129 / 24%);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.mint-message--assistant {
|
|
188
|
+
display: grid;
|
|
189
|
+
gap: 8px;
|
|
190
|
+
background: rgb(30 41 59 / 72%);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.mint-message small {
|
|
194
|
+
color: #34d399;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.mint-composer {
|
|
198
|
+
display: grid;
|
|
199
|
+
gap: 9px;
|
|
200
|
+
margin: 0 clamp(18px, 4vw, 46px) 20px;
|
|
201
|
+
padding: 11px;
|
|
202
|
+
border: 1px solid rgb(148 163 184 / 20%);
|
|
203
|
+
border-radius: 12px;
|
|
204
|
+
background: rgb(15 23 42 / 82%);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.mint-composer textarea {
|
|
208
|
+
width: 100%;
|
|
209
|
+
resize: none;
|
|
210
|
+
border: 0;
|
|
211
|
+
outline: 0;
|
|
212
|
+
background: transparent;
|
|
213
|
+
color: #f8fafc;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.mint-composer__actions,
|
|
217
|
+
.mint-attachment {
|
|
218
|
+
display: flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
gap: 9px;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.mint-composer__actions span {
|
|
224
|
+
margin-right: auto;
|
|
225
|
+
color: #94a3b8;
|
|
226
|
+
font-size: 0.74rem;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.mint-composer label,
|
|
230
|
+
.mint-composer button,
|
|
231
|
+
.mint-model button,
|
|
232
|
+
.mint-attachment button {
|
|
233
|
+
padding: 7px 10px;
|
|
234
|
+
border-color: rgb(148 163 184 / 20%);
|
|
235
|
+
font-size: 0.76rem;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
.mint-composer label:hover,
|
|
239
|
+
.mint-model button:hover,
|
|
240
|
+
.mint-attachment button:hover {
|
|
241
|
+
background: rgb(51 65 85 / 58%);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.mint-composer button {
|
|
245
|
+
border-color: rgb(52 211 153 / 32%);
|
|
246
|
+
background: #059669;
|
|
247
|
+
color: white;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.mint-composer button:disabled {
|
|
251
|
+
cursor: wait;
|
|
252
|
+
opacity: 0.55;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.mint-composer input[type='file'] {
|
|
256
|
+
display: none;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.mint-attachment {
|
|
260
|
+
padding: 7px;
|
|
261
|
+
border-radius: 8px;
|
|
262
|
+
background: rgb(30 41 59 / 76%);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.mint-attachment img {
|
|
266
|
+
width: 40px;
|
|
267
|
+
height: 40px;
|
|
268
|
+
border-radius: 6px;
|
|
269
|
+
object-fit: cover;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.mint-attachment span {
|
|
273
|
+
margin-right: auto;
|
|
274
|
+
overflow: hidden;
|
|
275
|
+
color: #cbd5e1;
|
|
276
|
+
font-size: 0.76rem;
|
|
277
|
+
text-overflow: ellipsis;
|
|
278
|
+
white-space: nowrap;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
.mint-empty {
|
|
282
|
+
display: grid;
|
|
283
|
+
justify-items: center;
|
|
284
|
+
gap: 8px;
|
|
285
|
+
margin: 18vh auto;
|
|
286
|
+
color: #94a3b8;
|
|
287
|
+
text-align: center;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.mint-empty strong {
|
|
291
|
+
color: #e2e8f0;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.mint-pictures__grid {
|
|
295
|
+
display: grid;
|
|
296
|
+
grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
|
|
297
|
+
gap: 13px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.mint-picture {
|
|
301
|
+
display: grid;
|
|
302
|
+
gap: 7px;
|
|
303
|
+
overflow: hidden;
|
|
304
|
+
padding-bottom: 10px;
|
|
305
|
+
border: 1px solid rgb(148 163 184 / 17%);
|
|
306
|
+
border-radius: 10px;
|
|
307
|
+
background: rgb(30 41 59 / 68%);
|
|
308
|
+
color: #e2e8f0;
|
|
309
|
+
text-decoration: none;
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
.mint-picture:hover {
|
|
313
|
+
border-color: rgb(52 211 153 / 55%);
|
|
314
|
+
transform: translateY(-2px);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.mint-picture img {
|
|
318
|
+
width: 100%;
|
|
319
|
+
aspect-ratio: 4 / 3;
|
|
320
|
+
object-fit: cover;
|
|
321
|
+
background: #111827;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.mint-picture strong,
|
|
325
|
+
.mint-picture span {
|
|
326
|
+
overflow: hidden;
|
|
327
|
+
padding: 0 9px;
|
|
328
|
+
font-size: 0.76rem;
|
|
329
|
+
text-overflow: ellipsis;
|
|
330
|
+
white-space: nowrap;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.mint-model {
|
|
334
|
+
display: grid;
|
|
335
|
+
align-content: center;
|
|
336
|
+
justify-items: center;
|
|
337
|
+
gap: 16px;
|
|
338
|
+
padding: 28px;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
.mint-model__stage {
|
|
342
|
+
display: grid;
|
|
343
|
+
min-height: 260px;
|
|
344
|
+
width: min(620px, 100%);
|
|
345
|
+
align-content: center;
|
|
346
|
+
justify-items: center;
|
|
347
|
+
gap: 10px;
|
|
348
|
+
border: 1px dashed rgb(148 163 184 / 28%);
|
|
349
|
+
border-radius: 16px;
|
|
350
|
+
color: #94a3b8;
|
|
351
|
+
background: rgb(15 23 42 / 42%);
|
|
352
|
+
text-align: center;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.mint-model__stage.visible {
|
|
356
|
+
border-color: rgb(52 211 153 / 58%);
|
|
357
|
+
background: radial-gradient(circle, rgb(16 185 129 / 25%), rgb(15 23 42 / 42%));
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.mint-model__stage strong {
|
|
361
|
+
color: #d1fae5;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
@media (max-width: 700px) {
|
|
365
|
+
.mint-app {
|
|
366
|
+
grid-template-columns: 76px minmax(0, 1fr);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.mint-brand span,
|
|
370
|
+
.mint-sidebar__footer span {
|
|
371
|
+
display: none;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
.mint-sidebar button {
|
|
375
|
+
padding: 9px 5px;
|
|
376
|
+
font-size: 0.72rem;
|
|
377
|
+
text-align: center;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react'
|
|
2
|
+
import ReactDOM from 'react-dom/client'
|
|
3
|
+
import App from './App'
|
|
4
|
+
import './index.css'
|
|
5
|
+
import { installTauriAdapters } from './tauri'
|
|
6
|
+
|
|
7
|
+
installTauriAdapters()
|
|
8
|
+
|
|
9
|
+
ReactDOM.createRoot(document.getElementById('root')!).render(
|
|
10
|
+
<React.StrictMode>
|
|
11
|
+
<App />
|
|
12
|
+
</React.StrictMode>,
|
|
13
|
+
)
|