perf(disk): remove runtime caches left by earlier versions after startup

This commit is contained in:
mesalogo
2026-10-04 09:45:50 +08:00
parent 91edcf5e8b
commit ae4c6d2423
5 changed files with 151 additions and 1 deletions
+2 -1
View File
@@ -55,6 +55,7 @@ import { readBoundedResponseText } from './bounded-response'
import { scopedReadToolNames } from '../../shared/scoped-data-tools'
import { readBoundedFile } from '../workspace-file-access'
import { terminateProcessTreeAndWait } from './child-process-termination'
import { CONTINUE_HOST_LAYOUT_VERSION } from './continue-host-layout'
const supportedVersion = '1.5.47'
const supportedBundleHashes = new Set([
@@ -1052,7 +1053,7 @@ export class ContinueHostAdapter {
const digest = sourceHash.slice(0, 16)
const targetRoot = join(
this.options.cacheRoot,
`host-v7-${supportedVersion}-${digest}`
`host-v${CONTINUE_HOST_LAYOUT_VERSION}-${supportedVersion}-${digest}`
)
const targetDist = join(targetRoot, 'dist')
const targetBundle = join(targetDist, 'index.js')
+2
View File
@@ -0,0 +1,2 @@
/** Prepared Continue host directories are `host-v<layout>-…`; older layouts are never read again. */
export const CONTINUE_HOST_LAYOUT_VERSION = 7