@dzhi/ocpg 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ocpg.ts +3 -1
- package/package.json +1 -1
package/ocpg.ts
CHANGED
|
@@ -229,9 +229,11 @@ async function remember(
|
|
|
229
229
|
return `Similar memory already stored as #${dedup[0].id} for this project; skipping insert.`;
|
|
230
230
|
}
|
|
231
231
|
|
|
232
|
+
// sql.array(tags) alone encodes text[] with quoted elements under bun 1.4.2;
|
|
233
|
+
// the element type hint is required for clean array storage.
|
|
232
234
|
const inserted = await sql`
|
|
233
235
|
INSERT INTO memories (content, tags, session_id, project)
|
|
234
|
-
VALUES (${args.content}, ${sql.array(normalizedTags)}, ${ctx.sessionID}, ${ctx.directory})
|
|
236
|
+
VALUES (${args.content}, ${sql.array(normalizedTags, "text")}, ${ctx.sessionID}, ${ctx.directory})
|
|
235
237
|
RETURNING id
|
|
236
238
|
` as { id: number }[];
|
|
237
239
|
|