Merge pull request #2958 from kui123456789/fix/context-injector-prt-prefix
fix(context-injector): prefix synthetic part ids with prt_
This commit is contained in:
@@ -111,6 +111,8 @@ describe("createContextInjectorMessagesTransformHook", () => {
|
|||||||
expect(
|
expect(
|
||||||
"synthetic" in secondSyntheticPart && secondSyntheticPart.synthetic === true
|
"synthetic" in secondSyntheticPart && secondSyntheticPart.synthetic === true
|
||||||
).toBe(true)
|
).toBe(true)
|
||||||
|
expect(typeof secondSyntheticPart.id).toBe("string")
|
||||||
|
expect(secondSyntheticPart.id.startsWith("prt_")).toBe(true)
|
||||||
expect(secondSyntheticPart.id).toBe(firstSyntheticPart.id)
|
expect(secondSyntheticPart.id).toBe(firstSyntheticPart.id)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ export function createContextInjectorMessagesTransformHook(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const syntheticPart = {
|
const syntheticPart = {
|
||||||
id: `synthetic_hook_${sessionID}`,
|
id: `prt_synthetic_hook_${sessionID}`,
|
||||||
messageID: lastUserMessage.info.id,
|
messageID: lastUserMessage.info.id,
|
||||||
sessionID: messageSessionID ?? "",
|
sessionID: messageSessionID ?? "",
|
||||||
type: "text" as const,
|
type: "text" as const,
|
||||||
|
|||||||
Reference in New Issue
Block a user