





















@@ -108,9 +108,11 @@ export type UserTurnTranscriptRecorder = {
108108hasRuntimePersistencePending: () => boolean;
109109waitForRuntimePersistence: () => Promise<void>;
110110persistApproved: (params?: {
111+target?: UserTurnTranscriptTargetResolver;
111112updateMode?: UserTurnTranscriptUpdateMode;
112113}) => Promise<UserTurnTranscriptPersistResult | undefined>;
113114persistFallback: (params?: {
115+target?: UserTurnTranscriptTargetResolver;
114116updateMode?: UserTurnTranscriptUpdateMode;
115117}) => Promise<UserTurnTranscriptPersistResult | undefined>;
116118};
@@ -531,6 +533,7 @@ export function createUserTurnTranscriptRecorder(
531533const persistPrepared = async (options: {
532534waitForRuntime: boolean;
533535skipWhenBlocked: boolean;
536+target?: UserTurnTranscriptTargetResolver;
534537updateMode?: UserTurnTranscriptUpdateMode;
535538}): Promise<UserTurnTranscriptPersistResult | undefined> => {
536539if (persisted) {
@@ -552,7 +555,7 @@ export function createUserTurnTranscriptRecorder(
552555return await selfPersistencePromise;
553556}
554557selfPersistencePromise = (async () => {
555-const target = await resolveUserTurnTranscriptTarget(params.target);
558+const target = await resolveUserTurnTranscriptTarget(options.target ?? params.target);
556559if (!target) {
557560return undefined;
558561}
@@ -614,12 +617,14 @@ export function createUserTurnTranscriptRecorder(
614617await persistPrepared({
615618waitForRuntime: false,
616619skipWhenBlocked: true,
620+target: options?.target,
617621updateMode: options?.updateMode,
618622}),
619623persistFallback: async (options) =>
620624await persistPrepared({
621625waitForRuntime: true,
622626skipWhenBlocked: true,
627+target: options?.target,
623628updateMode: options?.updateMode,
624629}),
625630};
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。