Preserve native Codex history and add configurable cross-model compression
Separate encrypted reasoning from actual compaction, stop migration after native return, and retain full history and recent exchanges. Add typed settings, Gemini fallback, verified provider windows, bounded summaries and durable concurrent checkpoints. Validation: 245 bridge tests plus focused concurrency tests; 71 settings/connection tests; 66 supplementary tests; TypeScript checks; renderer and Electron bundles; real primary/native/fallback summary probes and 700K input acceptance.
This commit is contained in:
1 parent
1c6e3656b8
commit
91ecad8e5c
27 files changed
+1119
-117
No files matched your search
@@ -379,6 +379,7 @@ import { createBootstrapCoordinator, sshConfigFingerprint } from './ssh-bootstra
|
||||
import { collectSshConfigHosts, parseSshGOutput } from './ssh-config'
|
||||
import { createSshProbeConnection, pickLocalPort, redactSecrets, SshConnection } from './ssh-connection'
|
||||
import { createStagedTransitionStore } from './staged-transition'
|
||||
import { createCompressionStore } from './compression-settings'
|
||||
import { createStreamThrottle } from './stream-throttle'
|
||||
import { registerTerminalIpc } from './terminal-ipc'
|
||||
import { nativeOverlayWidth as computeNativeOverlayWidth, macTitleBarOverlayHeight } from './titlebar-overlay-width'
|
||||
@@ -17193,6 +17194,7 @@ ipcMain.handle('hermes:quick-entry:settings:set', async (_event, patch) => {
|
||||
// resulting state and asks for changes over IPC. Windows only (the login item is
|
||||
// a Run-key value). All decisions live in electron/codex-link.ts.
|
||||
const AITURK_IDE_DATA_ROOT = path.dirname(HERMES_HOME)
|
||||
const compressionStore = createCompressionStore(path.join(AITURK_IDE_DATA_ROOT, 'codex-bridge'))
|
||||
const stagedTransition = createStagedTransitionStore(
|
||||
path.join(AITURK_IDE_DATA_ROOT, 'codex-bridge'),
|
||||
path.join(app.getPath('home'), '.typesafe', 'typesafe.env'),
|
||||
@@ -17281,6 +17283,30 @@ ipcMain.handle('aiturk:staged-transition:get', async event => {
|
||||
return stagedTransitionState()
|
||||
})
|
||||
|
||||
async function compressionState() {
|
||||
const settings = compressionStore.get()
|
||||
try {
|
||||
const response = await fetch('http://127.0.0.1:8795/aiturk/codex-baglama/status', { signal: AbortSignal.timeout(5000) })
|
||||
if (!response.ok) throw new Error('Bridge unavailable')
|
||||
const body = await response.json()
|
||||
const available = Array.isArray(body.compression_models)
|
||||
return { settings, models: available ? body.compression_models : [], modelsAvailable: available }
|
||||
} catch {
|
||||
return { settings, models: [], modelsAvailable: false }
|
||||
}
|
||||
}
|
||||
|
||||
ipcMain.handle('aiturk:compression:get', async event => {
|
||||
assertCodexLinkSender(event)
|
||||
return compressionState()
|
||||
})
|
||||
|
||||
ipcMain.handle('aiturk:compression:set', async (event, settings) => {
|
||||
assertCodexLinkSender(event)
|
||||
compressionStore.save(settings)
|
||||
return compressionState()
|
||||
})
|
||||
|
||||
ipcMain.handle('aiturk:staged-transition:set', async (event, patch) => {
|
||||
assertCodexLinkSender(event)
|
||||
stagedTransition.save(patch)
|
||||
|
||||
Reference in new issue
Block a user