mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-24 05:13:32 +00:00
fix(core): reuse prompt cache for forks
This commit is contained in:
parent
46378dda50
commit
d5e83fefda
1 changed files with 2 additions and 1 deletions
|
|
@ -231,7 +231,8 @@ export const layer = Layer.effect(
|
|||
http: {
|
||||
headers: SessionModelHeaders.make(session, app),
|
||||
},
|
||||
promptCacheKey: SessionPromptCacheKey.make(session.id),
|
||||
// TODO: Persist cache lineage so nested forks reuse the root session's cache key.
|
||||
promptCacheKey: SessionPromptCacheKey.make(session.fork?.sessionID ?? session.id),
|
||||
system: context.system,
|
||||
messages: boundImages(unsupportedParts(context.messages, resolved.capabilities)),
|
||||
tools: Array.from(hooked, ([name, tool]) => ({ ...tool, name })),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue