Add Windows Chrome side panel and scoped IDE native bridge
This commit is contained in:
1 parent
75afd01b4b
commit
fb6f57cd36
14 files changed
+1018
-1
No files matched your search
@@ -7,6 +7,7 @@ import os from 'node:os'
|
||||
import path from 'node:path'
|
||||
import tls from 'node:tls'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import { startChromeBridge } from './chrome-bridge.mjs'
|
||||
|
||||
import {
|
||||
app,
|
||||
@@ -17740,6 +17741,19 @@ app.on('open-url', (event, url) => {
|
||||
})
|
||||
|
||||
app.whenReady().then(() => {
|
||||
if (process.platform === 'win32' && process.env.LOCALAPPDATA) {
|
||||
void startChromeBridge({
|
||||
directory: path.join(process.env.LOCALAPPDATA, 'TurkServis', 'AITURK-IDE'),
|
||||
resolveBackend: async () => {
|
||||
const profile = primaryProfileKey()
|
||||
if (globalRemoteActive() || profileHasRemoteOverride(profile)) {
|
||||
throw new Error('Chrome beta için IDE’de yerel bağlantıyı seçin.')
|
||||
}
|
||||
return ensureBackend(profile)
|
||||
}
|
||||
}).then(stop => app.once('will-quit', () => { void stop() }))
|
||||
.catch(() => rememberLog('[chrome] Native bridge could not start.'))
|
||||
}
|
||||
// Warm the login-shell PATH resolution immediately so it usually completes
|
||||
// before the backend start path awaits the same single-flight promise.
|
||||
void ensureLoginShellPath()
|
||||
|
||||
Reference in new issue
Block a user