mirror of
https://github.com/Kilo-Org/kilocode.git
synced 2026-08-29 03:44:06 +08:00
Merge pull request #10924 from Kilo-Org/fix/temporarily-disable-session-export
fix(cli): temporarily disable session export
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@kilocode/cli": patch
|
||||
---
|
||||
|
||||
Temporarily disable free-model session and Git workspace data export.
|
||||
@@ -29,6 +29,7 @@ export namespace KilocodeBootstrap {
|
||||
yield* sessions.init()
|
||||
// kilocode_change start - session export bootstrap
|
||||
yield* Effect.gen(function* () {
|
||||
if (!SessionExport.enabled) return
|
||||
const anon = yield* EffectBridge.fromPromise(() =>
|
||||
Identity.getMachineId().catch((err) => {
|
||||
log.warn("session export identity failed", { err })
|
||||
|
||||
@@ -32,6 +32,8 @@ const instances = new Map<string, Instance>()
|
||||
|
||||
const maxRespawns = 3
|
||||
|
||||
export const enabled = false
|
||||
|
||||
export const init = (opts: {
|
||||
agentVersion: string
|
||||
dbPath: string
|
||||
|
||||
@@ -392,7 +392,8 @@ const live: Layer.Layer<
|
||||
const opencodeProjectID = input.model.providerID.startsWith("opencode") ? instance.project.id : undefined
|
||||
|
||||
// kilocode_change start - capture eligible session export request start
|
||||
const org = yield* isKilo && input.model.isFree === true
|
||||
const exporting = SessionExport.enabled
|
||||
const org = yield* exporting && isKilo && input.model.isFree === true
|
||||
? Effect.promise(() => getActiveOrg())
|
||||
: Effect.succeed({ type: "unknown" as const })
|
||||
const started = Date.now()
|
||||
@@ -400,7 +401,7 @@ const live: Layer.Layer<
|
||||
const found = KiloSession.resolveRoot(input.sessionID)
|
||||
const root = parent ? (found === input.sessionID ? parent : found) : input.sessionID
|
||||
const exportable =
|
||||
isKilo && input.model.isFree === true && org.type === "personal" && input.agent.name !== "title"
|
||||
exporting && isKilo && input.model.isFree === true && org.type === "personal" && input.agent.name !== "title"
|
||||
if (exportable) {
|
||||
SessionExport.beforeRequest({
|
||||
input: { model: input.model, org },
|
||||
|
||||
Reference in New Issue
Block a user