mirror of
https://gitcode.com/JianFeeeee/HomeAgent.git
synced 2026-09-23 02:18:06 +00:00
feat: Windows NSIS installer, embedded icons, GUI auto-launch backend
- Add package/installer.nsi (Full/Server/Client) and toolchain.nsi
- Embed icon.ico (rounded corners) into homed.exe/waiter.exe via .syso
- GUI auto-launches homed.exe from parent dir (Windows only)
- GUI fallback connections.json from app resource dir
- Add initconfig command for config.db seeding
- Replace waiter rawmode* with raw_{unix,windows,other}.go
- Fix .gitignore: /homed instead of homed, add login.json
- Update icon.svg with rounded rect, new mascot.svg
This commit is contained in:
@ -32,7 +32,57 @@ window._i18n = {
|
||||
navAdapters: ['适配器','Adapters'],
|
||||
navKernel: ['内核','Kernel'],
|
||||
navLogout: ['退出登录','Logout'],
|
||||
themeToggle: ['切换亮色/暗色模式','Toggle theme']
|
||||
themeToggle: ['切换亮色/暗色模式','Toggle theme'],
|
||||
clickManage: ['点击管理连接','Click to manage connections'],
|
||||
secondsAgo: ['秒前','s ago'],
|
||||
minutesAgo: ['分钟前','min ago'],
|
||||
hoursAgo: ['小时前','h ago'],
|
||||
noConnection: ['未连接','Not connected'],
|
||||
agentAvatar: ['小宅','Agent'],
|
||||
waitingAI: ['等待AI回复...','Waiting for AI...'],
|
||||
noResponse: ['(无响应)','(no response)'],
|
||||
error: ['错误: ','Error: '],
|
||||
requestFailed: ['请求失败: ','Request failed: '],
|
||||
send: ['发送','Send'],
|
||||
queryFailed: ['查询失败: ','Query failed: '],
|
||||
searchFailed: ['搜索失败: ','Search failed: '],
|
||||
getFailed: ['获取失败: ','Get failed: '],
|
||||
createFailed: ['创建失败','Create failed'],
|
||||
createFailedWith: ['创建失败: ','Create failed: '],
|
||||
nameContentEmpty: ['名称和内容不能为空','Name and content cannot be empty'],
|
||||
knowledgeCreated: ['知识「','Knowledge "'],
|
||||
knowledgeCreatedEnd: ['」已创建','" created'],
|
||||
noContext: ['无上下文','No context'],
|
||||
noSessions: ['暂无终端会话','No terminal sessions'],
|
||||
noHistory: ['暂无命令记录','No command history'],
|
||||
running: ['运行中','Running'],
|
||||
closed: ['已关闭','Closed'],
|
||||
command: ['命令','Command'],
|
||||
status: ['状态','Status'],
|
||||
created: ['创建时间','Created'],
|
||||
uptime: ['运行时长','Uptime'],
|
||||
output: ['输出预览','Output'],
|
||||
time: ['时间','Time'],
|
||||
actions: ['操作','Actions'],
|
||||
name: ['名称','Name'],
|
||||
description: ['描述','Description'],
|
||||
version: ['版本','Version'],
|
||||
details: ['详情','Details'],
|
||||
close: ['关闭','Close'],
|
||||
install: ['安装','Install'],
|
||||
installPlugin: ['安装插件','Install Plugin'],
|
||||
packageUrl: ['.hmap 包下载 URL','Package URL'],
|
||||
uploadHmap: ['选择 .hmap 文件上传','Upload .hmap file'],
|
||||
loadedPlugins: ['已加载插件','Loaded Plugins'],
|
||||
noLoadedPlugins: ['暂无已加载插件','No loaded plugins'],
|
||||
loaded: ['已加载','Loaded'],
|
||||
builtin: ['内置','Built-in'],
|
||||
unload: ['卸载','Unload'],
|
||||
installedExternal: ['已安装外部插件','Installed Plugins'],
|
||||
pluginDetails: ['插件详情','Plugin Details'],
|
||||
registeredTools: ['已注册工具','Registered Tools'],
|
||||
systemOps: ['系统操作','System Operations'],
|
||||
reloadPlugins: ['重载插件','Reload Plugins'],
|
||||
};
|
||||
|
||||
function __(zh, en) { return state.lang === 'en' ? en : zh }
|
||||
@ -84,10 +134,10 @@ function escHtml(s) {
|
||||
|
||||
function timeAgo(t) {
|
||||
var s = Math.floor((Date.now() - new Date(t).getTime()) / 1000);
|
||||
if (s < 60) return s + '秒前';
|
||||
if (s < 60) return s + __('秒前','s ago');
|
||||
var m = Math.floor(s / 60);
|
||||
if (m < 60) return m + '分钟前';
|
||||
return Math.floor(m / 60) + '小时前';
|
||||
if (m < 60) return m + __('分钟前','min ago');
|
||||
return Math.floor(m / 60) + __('小时前','h ago');
|
||||
}
|
||||
|
||||
function toast(m, isError) {
|
||||
@ -325,7 +375,7 @@ function renderChat() {
|
||||
html += '<div class="msg msg-system"><div class="msg-bubble">' + body + '</div></div>';
|
||||
} else {
|
||||
var userAvatar = '<svg viewBox="0 0 24 24" style="width:16px;height:16px" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round"><circle cx="12" cy="8" r="4"/><path d="M4 20c0-4 4-6 8-6s8 2 8 6"/></svg>';
|
||||
var aiAvatar = '<img src="/mascot.webp" style="width:28px;height:28px;border-radius:50%;object-fit:cover" alt="小宅">';
|
||||
var aiAvatar = '<img src="mascot.svg" style="width:28px;height:28px;border-radius:50%;object-fit:cover" alt="' + __('小宅','Agent') + '">';
|
||||
html += '<div class="msg msg-' + role + '">'
|
||||
+ '<div class="msg-avatar">' + (role === 'user' ? userAvatar : aiAvatar) + '</div>'
|
||||
+ '<div class="msg-content"><div class="msg-bubble">' + body + '</div></div>'
|
||||
|
||||
@ -45,7 +45,7 @@
|
||||
<a onclick="switchTab('adapters')" data-i18n="navAdapters">适配器</a>
|
||||
<a onclick="switchTab('kernel')" data-i18n="navKernel">内核</a>
|
||||
<div style="margin-left:auto;display:flex;align-items:center;gap:8px">
|
||||
<span id="conn-status" class="conn-indicator" onclick="openConnManager()" title="点击管理连接">
|
||||
<span id="conn-status" class="conn-indicator" onclick="openConnManager()" title="点击管理连接 / Click to manage connections">
|
||||
<span class="status-dot dot-gray" id="conn-dot"></span>
|
||||
<span id="conn-name-display">未连接</span>
|
||||
<span style="font-size:10px;margin-left:4px;opacity:0.6">▼</span>
|
||||
|
||||
9
cmd/gui/renderer/mascot.svg
Normal file
9
cmd/gui/renderer/mascot.svg
Normal file
@ -0,0 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" width="100" height="100">
|
||||
<circle cx="50" cy="50" r="48" fill="#3B82F6"/>
|
||||
<circle cx="35" cy="40" r="6" fill="white"/>
|
||||
<circle cx="65" cy="40" r="6" fill="white"/>
|
||||
<circle cx="35" cy="40" r="3" fill="#1E3A5F"/>
|
||||
<circle cx="65" cy="40" r="3" fill="#1E3A5F"/>
|
||||
<path d="M35 65 Q50 80 65 65" stroke="white" stroke-width="3" fill="none" stroke-linecap="round"/>
|
||||
<ellipse cx="50" cy="58" rx="8" ry="4" fill="#F59E0B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 496 B |
Reference in New Issue
Block a user