Skip to content

An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作

:art: https://github.com/siyuan-note/siyuan/issues/4567

Vanessacdc8f4154db6
diff --git a/app/electron/main.js b/app/electron/main.js
index 8331f3dac1..91448136ce 100644
--- a/app/electron/main.js
+++ b/app/electron/main.js
@@ -384,8 +384,7 @@ const initKernel = (workspace, lang) => {
resolve(false)
return
}
- // TODO
- if (!isDevEnv) {
+ if (isDevEnv) {
writeLog('got kernel port [' + kernelPort + ']')
} else {
const getAvailablePort = () => {
@@ -412,9 +411,9 @@ const initKernel = (workspace, lang) => {
return
}
const cmds = ['--port', kernelPort, '--wd', appDir]
- // TODO if (isDevEnv) {
- // cmds.push('--mode', 'dev')
- // }
+ if (isDevEnv) {
+ cmds.push('--mode', 'dev')
+ }
if (workspace) {
cmds.push('--workspace', workspace)
cmds.push('--lang', lang)
@@ -423,8 +422,7 @@ const initKernel = (workspace, lang) => {
' ')}]`
writeLog(cmd)
let kernelProcessPid = ''
- // TODO
- if (isDevEnv) {
+ if (!isDevEnv) {
const cp = require('child_process')
const kernelProcess = cp.spawn(kernelPath,
cmds, {