[object Object]

← back to AbramsOS

chore: lint, refactor, v0.6.0 (session close) — nav-bar chat feature

144d126b840cde0294d35ee4ec54f73ee8767cf5 · 2026-09-01 18:08:41 -0700 · Steve

Files touched

Diff

commit 144d126b840cde0294d35ee4ec54f73ee8767cf5
Author: Steve <steve@designerwallcoverings.com>
Date:   Tue Sep 1 18:08:41 2026 -0700

    chore: lint, refactor, v0.6.0 (session close) — nav-bar chat feature
---
 lib/chat-ner.js    | 7 +------
 lib/chat-redact.js | 9 ++-------
 package-lock.json  | 4 ++--
 package.json       | 2 +-
 public/js/chat.js  | 2 +-
 5 files changed, 7 insertions(+), 17 deletions(-)

diff --git a/lib/chat-ner.js b/lib/chat-ner.js
index 96def47..2c0d1c9 100644
--- a/lib/chat-ner.js
+++ b/lib/chat-ner.js
@@ -94,11 +94,6 @@ async function detectNames(text) {
   }
 }
 
-async function scrub(text) {
-  const names = await detectNames(text);
-  return applyNames(text, names);
-}
-
 // Batched: ONE detect call over all spans joined, then deterministic apply to
 // each span. Keeps a chat request to a single NER round-trip regardless of how
 // many message contents are outgoing. Throws (fail-closed) if detection fails.
@@ -118,4 +113,4 @@ async function scrubSpans(spans) {
   return { spans: out, redactions };
 }
 
-module.exports = { detectNames, applyNames, scrub, scrubSpans, BASE, NER_MODEL };
+module.exports = { detectNames, applyNames, scrubSpans, BASE, NER_MODEL };
diff --git a/lib/chat-redact.js b/lib/chat-redact.js
index 2fedafe..6e7173a 100644
--- a/lib/chat-redact.js
+++ b/lib/chat-redact.js
@@ -80,7 +80,7 @@ const RULES = [
 
   // ZIP (5 or ZIP+4) — only when preceded by a 2-letter state token to avoid
   // nuking every 5-digit number (order numbers, prices).
-  { tag: 'ZIP', re: /\b[A-Z]{2}\s+\d{5}(?:-\d{4})?\b/g, group: 0 },
+  { tag: 'ZIP', re: /\b[A-Z]{2}\s+\d{5}(?:-\d{4})?\b/g },
 ];
 
 // Person-name redaction is done on a supplied list (from the grounding layer,
@@ -173,9 +173,4 @@ function redact(input, { names = [] } = {}) {
   return { text, redactions };
 }
 
-// Convenience: redact a whole grounding-context block and count spans across it.
-function redactContext(context, opts = {}) {
-  return redact(context, opts);
-}
-
-module.exports = { redact, redactContext };
+module.exports = { redact };
diff --git a/package-lock.json b/package-lock.json
index b86eafd..7c02540 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
 {
   "name": "abramsos",
-  "version": "0.5.0",
+  "version": "0.6.0",
   "lockfileVersion": 3,
   "requires": true,
   "packages": {
     "": {
       "name": "abramsos",
-      "version": "0.5.0",
+      "version": "0.6.0",
       "license": "UNLICENSED",
       "dependencies": {
         "bcrypt": "^6.0.0",
diff --git a/package.json b/package.json
index bd82369..4f8bd04 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "abramsos",
-  "version": "0.5.0",
+  "version": "0.6.0",
   "description": "Household rights operating system — receipts, warranties, recalls, claims",
   "main": "server.js",
   "scripts": {
diff --git a/public/js/chat.js b/public/js/chat.js
index c4a68d7..853ecc1 100644
--- a/public/js/chat.js
+++ b/public/js/chat.js
@@ -169,7 +169,7 @@
       const foot = 'via ' + data.modelId + ' · ' + data.lane +
         (data.redactionApplied ? ' · ' + (data.redactions || 0) + ' fields redacted' : '');
       const f = document.createElement('div'); f.className = 'aos-bubble-foot'; f.textContent = foot;
-      thinking.appendChild(f);
+      thinking.insertBefore(f, thinking.querySelector('.aos-bubble-disclaimer'));
       history.push({ role: 'assistant', content: data.reply });
     } catch (err) {
       thinking.classList.add('aos-error');

← cf095c7 chat: guard registry+chat fetch against creds-in-URL (resolv  ·  back to AbramsOS  ·  reviews: native Amazon review + seller thank-you feature ove 2822732 →