fix(adapters): state the consolidation time in the user's zone; name the memory migration after its content
Profile consolidation now passes the profile's time zone to the shared time instruction, which takes the zone since every run states the time in the user's zone. The semantic memory migration is renamed after what it creates. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
This commit is contained in:
parent
70e376f041
commit
e085dc11a9
@ -332,7 +332,7 @@ export async function consolidateProfile(
|
||||
where: { userId },
|
||||
create: { userId },
|
||||
update: {},
|
||||
select: { consolidatedAt: true, summary: true },
|
||||
select: { consolidatedAt: true, summary: true, timeZone: true },
|
||||
});
|
||||
const lookbackStart = new Date(now - PROFILE_CONSOLIDATION_LOOKBACK_MS);
|
||||
const since =
|
||||
@ -398,6 +398,7 @@ export async function consolidateProfile(
|
||||
runId: `consolidate:${userId}:${cursor.toISOString()}`,
|
||||
prompt,
|
||||
model,
|
||||
timeZone: profile.timeZone,
|
||||
});
|
||||
if (reply === null) return;
|
||||
update = parseProfileUpdate(reply);
|
||||
@ -463,6 +464,7 @@ async function requestProfileUpdate(
|
||||
runId: string;
|
||||
prompt: string;
|
||||
model: AgentRunRequest["model"];
|
||||
timeZone: string | null;
|
||||
},
|
||||
): Promise<string | null> {
|
||||
let reply = "";
|
||||
@ -474,7 +476,7 @@ async function requestProfileUpdate(
|
||||
threadId: input.threadId,
|
||||
runId: input.runId,
|
||||
prompt: input.prompt,
|
||||
instructions: `${formatCurrentTimeInstruction()} ${CONSOLIDATION_INSTRUCTIONS}`,
|
||||
instructions: `${formatCurrentTimeInstruction(input.timeZone)} ${CONSOLIDATION_INSTRUCTIONS}`,
|
||||
history: [],
|
||||
tools: [],
|
||||
model: input.model,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user