@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
12 lines • 526 B
JavaScript
/**
* The thread's pinned persona: one column when the store projects it
* (`AgentStore.personaForThread`), else through the full read. `null` → none pinned (or no thread).
*/
export async function threadPersona(store, threadId) {
if (store.personaForThread !== undefined) {
return store.personaForThread(threadId);
}
const persona = (await store.getThread(threadId))?.persona;
return typeof persona === 'string' && persona.length > 0 ? persona : null;
}
//# sourceMappingURL=thread-persona.js.map