perf(opencode): stop retaining every message of a loaded OpenCode thread (#17784)
This commit is contained in:
1 parent
a2f4c7fb7c
commit
b467be4ea7
1 file changed
-5
@@ -384,7 +384,6 @@ interface OpenCodeThreadState {
|
||||
appThread: OrchestrationV2AppThread | null;
|
||||
activeTurn: ActiveOpenCodeTurn | null;
|
||||
readonly providerTurns: Map<string, OrchestrationV2ProviderTurn>;
|
||||
readonly messages: Map<string, OrchestrationV2ConversationMessage>;
|
||||
readonly runtimeRequests: Map<string, OrchestrationV2RuntimeRequest>;
|
||||
readonly messageRoles: Map<string, "user" | "assistant">;
|
||||
readonly userMessageIds: Array<string>;
|
||||
@@ -1257,7 +1256,6 @@ export const makeOpenCodeAdapterV2 = Effect.fn("makeOpenCodeAdapterV2")(function
|
||||
createdAt: startedAt,
|
||||
updatedAt: emittedAt,
|
||||
};
|
||||
state.messages.set(String(message.id), message);
|
||||
yield* emitProviderEvent({
|
||||
type: "message.updated",
|
||||
driver: OPENCODE_PROVIDER,
|
||||
@@ -1428,7 +1426,6 @@ export const makeOpenCodeAdapterV2 = Effect.fn("makeOpenCodeAdapterV2")(function
|
||||
appThread: childThread,
|
||||
activeTurn: null,
|
||||
providerTurns: new Map(),
|
||||
messages: new Map(),
|
||||
runtimeRequests: new Map(),
|
||||
messageRoles: new Map(),
|
||||
userMessageIds: [],
|
||||
@@ -2336,7 +2333,6 @@ export const makeOpenCodeAdapterV2 = Effect.fn("makeOpenCodeAdapterV2")(function
|
||||
createdAt: turn.startedAt,
|
||||
updatedAt: now,
|
||||
};
|
||||
state.messages.set(String(messageId), projected);
|
||||
yield* emitProviderEvent({
|
||||
type: "message.updated",
|
||||
driver: OPENCODE_PROVIDER,
|
||||
@@ -2834,7 +2830,6 @@ export const makeOpenCodeAdapterV2 = Effect.fn("makeOpenCodeAdapterV2")(function
|
||||
appThread,
|
||||
activeTurn: null,
|
||||
providerTurns: new Map(),
|
||||
messages: new Map(),
|
||||
runtimeRequests: new Map(),
|
||||
messageRoles: new Map(),
|
||||
userMessageIds: [],
|
||||
|
||||
Reference in new issue
Block a user