openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
1 lines • 802 B
JavaScript
import{a as e,p as t}from"./transcript-kysely-sync-CAP5xe3V.mjs";import{n,t as r}from"./transcript-session-accessor.sqlite-owner-projection-B_z42siZ.mjs";import{i,n as a,s as o}from"./transcript-session-entry-snapshots-B1SDC3sn.mjs";function selectSessionEntryRows(t,n,i=[]){return e(t.db).selectFrom(`session_nodes`).select(`session_key`).select(`entry_json`).$if(n!==`list`||i.length>0,e=>e.select(n===`list`?a(i):a(void 0,n))).$if(r(t.db),e=>e.select([`owner_actor_type`,`owner_actor_id`,`owner_assigned_by_type`,`owner_assigned_by_id`,`owner_assigned_at`]))}const s=t`CASE WHEN entry_valid = 1 THEN NULL ELSE entry_json END`.as(`entry_json`);function parseSessionEntryJson(e,t=`full`){let r=o(e);return r?(i(r,e,t),n(r,e)):null}export{selectSessionEntryRows as n,s as r,parseSessionEntryJson as t};