feat(hololake): ship language platform 0.7.0

This commit is contained in:
冰朔 2026-08-09 03:37:41 +08:00
commit 5105ec5e32
47 changed files with 4566 additions and 398 deletions

View file

@ -11,7 +11,7 @@ import { contextBridge, ipcRenderer } from 'electron';
contextBridge.exposeInMainWorld('hololake', {
// 应用信息
platform: process.platform,
version: '0.5.1',
version: '0.7.0',
// 数据目录
getDataPath: () => ipcRenderer.invoke('get-data-path'),
@ -24,6 +24,21 @@ contextBridge.exposeInMainWorld('hololake', {
getConfig: () => ipcRenderer.invoke('agent:get-config'),
saveConfig: (config: { baseUrl: string; model: string; apiKey?: string }) =>
ipcRenderer.invoke('agent:save-config', config),
testConfig: () => ipcRenderer.invoke('agent:test-config'),
},
server: {
list: () => ipcRenderer.invoke('server:list'),
connect: (nodeId: string) => ipcRenderer.invoke('server:connect', nodeId),
domainRegistry: () => ipcRenderer.invoke('server:domain-registry'),
session: (nodeId?: string) => ipcRenderer.invoke('server:session', nodeId),
login: (input: { nodeId: string; username: string; password: string }) =>
ipcRenderer.invoke('server:login', input),
logout: () => ipcRenderer.invoke('server:logout'),
repositories: () => ipcRenderer.invoke('server:repositories'),
createRepository: (input: { name: string; description?: string }) =>
ipcRenderer.invoke('server:create-repository', input),
gitRemote: (fullName: string) => ipcRenderer.invoke('server:git-remote', fullName),
},
// Forgejo 通过本地知识库 API 管理;此桥只保留非敏感应用信息。