refactor: centralize thread helpers

This commit is contained in:
Peter Steinberger
2026-01-07 20:01:19 +01:00
parent 42b637bbc8
commit cb9f8146c4
4 changed files with 60 additions and 15 deletions

View File

@@ -34,3 +34,17 @@ export function formatAgentEnvelope(params: AgentEnvelopeParams): string {
const header = `[${parts.join(" ")}]`;
return `${header} ${params.body}`;
}
export function formatThreadStarterEnvelope(params: {
provider: string;
author?: string;
timestamp?: number | Date;
body: string;
}): string {
return formatAgentEnvelope({
provider: params.provider,
from: params.author,
timestamp: params.timestamp,
body: params.body,
});
}