Adds next-sentence suggestions while typing, weekly input insights and a personal phrase memory to the desktop app, and fixes custom instructions so they process the text instead of inserting the instruction's own wording. Local model requests are now bounded and individually cancellable. Bumps the product version to 1.5.0 (Android/iOS build 1050000), refreshes the landing and web download links, and records the new INPUT feature rows and the open verification gaps in the infrastructure map.
81 lines
2.6 KiB
TypeScript
81 lines
2.6 KiB
TypeScript
import { createPublicKey } from 'crypto'
|
|
import { readFileSync } from 'fs'
|
|
import { resolve } from 'path'
|
|
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
const sharedAlias = {
|
|
'@d3ro/core': resolve(__dirname, '../../packages/core/src'),
|
|
'@d3ro/ui': resolve(__dirname, '../../packages/ui/src'),
|
|
'@d3ro/i18n': resolve(__dirname, '../../packages/i18n/src/index.tsx')
|
|
}
|
|
|
|
const workspaceExclude = ['@d3ro/core', '@d3ro/ui', '@d3ro/i18n']
|
|
const licensePublicKeyPath = resolve(__dirname, 'resources/license/production-public.pem')
|
|
const licensePublicKey = readFileSync(licensePublicKeyPath, 'utf8').trim()
|
|
const parsedLicensePublicKey = createPublicKey(licensePublicKey)
|
|
if (parsedLicensePublicKey.asymmetricKeyType !== 'ed25519') {
|
|
throw new Error(`Desktop license public key must be Ed25519: ${licensePublicKeyPath}`)
|
|
}
|
|
|
|
export default defineConfig({
|
|
main: {
|
|
// 공개키만 main bundle에 주입한다. 대응 ADMIN_LICENSE_PRIVATE_KEY는 admin 서버 전용이다.
|
|
define: {
|
|
'process.env.D3RO_LICENSE_PUBLIC_KEY': JSON.stringify(licensePublicKey)
|
|
},
|
|
plugins: [
|
|
externalizeDepsPlugin({
|
|
exclude: ['electron-store', ...workspaceExclude]
|
|
})
|
|
],
|
|
resolve: { alias: sharedAlias }
|
|
},
|
|
preload: {
|
|
plugins: [externalizeDepsPlugin({ exclude: workspaceExclude })],
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
index: resolve(__dirname, 'src/preload/index.ts'),
|
|
popup: resolve(__dirname, 'src/preload/popup.ts')
|
|
}
|
|
}
|
|
},
|
|
resolve: { alias: sharedAlias }
|
|
},
|
|
renderer: {
|
|
build: {
|
|
rollupOptions: {
|
|
input: {
|
|
index: resolve(__dirname, 'src/renderer/index.html'),
|
|
'popups/recording-tip': resolve(
|
|
__dirname,
|
|
'src/renderer/popups/recording-tip/index.html'
|
|
),
|
|
'popups/result-popup': resolve(
|
|
__dirname,
|
|
'src/renderer/popups/result-popup/index.html'
|
|
),
|
|
'popups/history-popup': resolve(
|
|
__dirname,
|
|
'src/renderer/popups/history-popup/index.html'
|
|
),
|
|
'popups/command-popup': resolve(
|
|
__dirname,
|
|
'src/renderer/popups/command-popup/index.html'
|
|
),
|
|
'popups/caption-overlay': resolve(
|
|
__dirname,
|
|
'src/renderer/popups/caption-overlay/index.html'
|
|
),
|
|
'popups/suggestion-overlay': resolve(
|
|
__dirname,
|
|
'src/renderer/popups/suggestion-overlay/index.html'
|
|
)
|
|
}
|
|
}
|
|
},
|
|
resolve: { alias: sharedAlias },
|
|
plugins: [react()]
|
|
}
|
|
})
|