(parentThreadId, agentSlug, toolCallId)
| 96 | } |
| 97 | |
| 98 | export async function makeChildThreadId(parentThreadId, agentSlug, toolCallId) { |
| 99 | if (!parentThreadId || !agentSlug || !toolCallId) return '' |
| 100 | const data = new TextEncoder().encode(`${parentThreadId}:${agentSlug}:${toolCallId}`) |
| 101 | const hex = await digestSha256Hex(data) |
| 102 | return `${PREFIX}${hex.slice(0, DIGEST_LENGTH)}` |
| 103 | } |